[gnome-terminal] prefs: Add UI for the default-show-menubar key
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] prefs: Add UI for the default-show-menubar key
- Date: Wed, 30 Jan 2013 17:43:08 +0000 (UTC)
commit 1162f4b00311f064161fb1d87b87106bc5f169d7
Author: Christian Persch <chpe gnome org>
Date: Mon Jan 28 11:38:02 2013 +0100
prefs: Add UI for the default-show-menubar key
https://bugzilla.gnome.org/show_bug.cgi?id=690571
src/preferences.ui | 46 +++++++++++++++++++++++++++-------------------
src/terminal-prefs.c | 11 ++++++++++-
2 files changed, 37 insertions(+), 20 deletions(-)
---
diff --git a/src/preferences.ui b/src/preferences.ui
index 510d07e..dc20f7c 100644
--- a/src/preferences.ui
+++ b/src/preferences.ui
@@ -4,7 +4,7 @@
<object class="GtkDialog" id="preferences-dialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
- <property name="title" translatable="yes">Keyboard Shortcuts</property>
+ <property name="title" translatable="yes">Preferences</property>
<property name="role">gnome-terminal-accels</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
@@ -21,13 +21,11 @@
<child>
<object class="GtkButton" id="close_button1">
<property name="label">gtk-close</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -39,12 +37,10 @@
<child>
<object class="GtkButton" id="button1">
<property name="label">gtk-help</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -66,24 +62,24 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
- <property name="n_rows">4</property>
+ <property name="n_rows">5</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkCheckButton" id="disable-mnemonics-checkbutton">
<property name="label" translatable="yes">_Enable menu access keys (such as Alt+F to open the File menu)</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0.5</property>
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="y_options"></property>
</packing>
</child>
<child>
@@ -104,27 +100,25 @@
</child>
</object>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="disable-menu-accel-checkbutton">
<property name="label" translatable="yes">Enable the _menu shortcut key (F10 by default)</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0.5</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="y_options"></property>
</packing>
</child>
<child>
@@ -137,10 +131,24 @@
<property name="mnemonic_widget">accelerators-treeview</property>
</object>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="default-show-menubar-checkbutton">
+ <property name="label" translatable="yes">Show _menubar by default in new terminals</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
diff --git a/src/terminal-prefs.c b/src/terminal-prefs.c
index c6035e8..86b09bd 100644
--- a/src/terminal-prefs.c
+++ b/src/terminal-prefs.c
@@ -49,7 +49,8 @@ prefs_dialog_response_cb (GtkWidget *editor,
void
terminal_prefs_show_preferences (GtkWindow *transient_parent)
{
- GtkWidget *dialog, *tree_view, *disable_mnemonics_button, *disable_menu_accel_button;
+ GtkWidget *dialog, *tree_view;
+ GtkWidget *show_menubar_button, *disable_mnemonics_button, *disable_menu_accel_button;
GSettings *settings;
if (prefs_dialog != NULL)
@@ -57,6 +58,7 @@ terminal_prefs_show_preferences (GtkWindow *transient_parent)
terminal_util_load_builder_resource ("/org/gnome/terminal/ui/preferences.ui",
"preferences-dialog", &dialog,
+ "default-show-menubar-checkbutton", &show_menubar_button,
"disable-mnemonics-checkbutton", &disable_mnemonics_button,
"disable-menu-accel-checkbutton", &disable_menu_accel_button,
"accelerators-treeview", &tree_view,
@@ -65,6 +67,13 @@ terminal_prefs_show_preferences (GtkWindow *transient_parent)
terminal_util_bind_mnemonic_label_sensitivity (dialog);
settings = terminal_app_get_global_settings (terminal_app_get ());
+
+ g_settings_bind (settings,
+ TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR_KEY,
+ show_menubar_button,
+ "active",
+ G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+
g_settings_bind (settings,
TERMINAL_SETTING_ENABLE_MNEMONICS_KEY,
disable_mnemonics_button,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]