[gnome-control-center] Further layout improvements
- From: Sergey V. Udaltsov <svu src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Further layout improvements
- Date: Mon, 9 Nov 2009 22:37:42 +0000 (UTC)
commit 585991e259580098ad74775c624be8890b88963d
Author: Sergey V. Udaltsov <svu gnome org>
Date: Mon Nov 9 22:35:15 2009 +0000
Further layout improvements
As discussed on IRC (with aday)
.../keyboard/gnome-keyboard-properties-dialog.ui | 163 ++++++++------------
capplets/keyboard/gnome-keyboard-properties-xkb.c | 27 ++--
.../keyboard/gnome-keyboard-properties-xkblt.c | 12 --
3 files changed, 79 insertions(+), 123 deletions(-)
---
diff --git a/capplets/keyboard/gnome-keyboard-properties-dialog.ui b/capplets/keyboard/gnome-keyboard-properties-dialog.ui
index 5e5b3c3..371b346 100644
--- a/capplets/keyboard/gnome-keyboard-properties-dialog.ui
+++ b/capplets/keyboard/gnome-keyboard-properties-dialog.ui
@@ -507,91 +507,23 @@
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
- <object class="GtkHBox" id="xkb_models_box">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="label48">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Keyboard _model:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">xkb_model_pick</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="xkb_model_pick">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<object class="GtkVBox" id="vbox34">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkVBox" id="vbox41">
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
<child>
- <object class="GtkLabel" id="label52">
+ <object class="GtkTreeView" id="xkb_layouts_selected">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Selected _layouts:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">xkb_layouts_selected</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="xkb_layouts_panels">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="xkb_layouts_selected">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
</child>
</object>
<packing>
@@ -599,13 +531,15 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkVButtonBox" id="vbuttonbox1">
+ <object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">3</property>
+ <property name="spacing">6</property>
+ <property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="xkb_layouts_add">
<property name="label" translatable="yes">_Add...</property>
@@ -615,8 +549,6 @@
<property name="use_underline">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
@@ -629,21 +561,20 @@
<property name="use_stock">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkVButtonBox" id="vbuttonbox2">
+ <object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="xkb_layouts_move_up">
<property name="label" translatable="yes">Move _Up</property>
@@ -653,8 +584,6 @@
<property name="use_underline">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
@@ -667,8 +596,6 @@
<property name="use_underline">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -678,10 +605,11 @@
</packing>
</child>
<child>
- <object class="GtkVButtonBox" id="vbuttonbox3">
+ <object class="GtkVBox" id="vbox6">
<property name="visible">True</property>
<property name="orientation">vertical</property>
- <property name="layout_style">start</property>
+ <property name="spacing">6</property>
+ <property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="xkb_layouts_print">
<property name="label">_Print...</property>
@@ -691,23 +619,26 @@
<property name="use_underline">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -727,8 +658,8 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="chk_new_windows_get_first_layout">
- <property name="label" translatable="yes">New windows get layout "foobar"</property>
+ <object class="GtkCheckButton" id="chk_new_windows_inherit_layout">
+ <property name="label" translatable="yes">New windows u_se active window's layout</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -743,12 +674,50 @@
</child>
</object>
<packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="xkb_models_box">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label48">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Keyboard _model:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">xkb_model_pick</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="xkb_model_pick">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHButtonBox" id="hbuttonbox2">
<property name="visible">True</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">end</property>
<child>
<object class="GtkButton" id="xkb_layout_options">
<property name="label" translatable="yes">_Options...</property>
diff --git a/capplets/keyboard/gnome-keyboard-properties-xkb.c b/capplets/keyboard/gnome-keyboard-properties-xkb.c
index 160524f..31ce53a 100644
--- a/capplets/keyboard/gnome-keyboard-properties-xkb.c
+++ b/capplets/keyboard/gnome-keyboard-properties-xkb.c
@@ -146,27 +146,27 @@ chk_separate_group_per_window_toggled (GConfPropertyEditor * peditor,
const GConfValue * value,
GtkBuilder * dialog)
{
- gtk_widget_set_sensitive (WID ("chk_new_windows_get_first_layout"),
+ gtk_widget_set_sensitive (WID ("chk_new_windows_inherit_layout"),
gconf_value_get_bool (value));
}
static void
-chk_new_windows_get_first_layout_toggled (GtkWidget *
- chk_new_windows_get_first_layout,
- GtkBuilder * dialog)
+chk_new_windows_inherit_layout_toggled (GtkWidget *
+ chk_new_windows_inherit_layout,
+ GtkBuilder * dialog)
{
xkb_save_default_group (gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON
- (chk_new_windows_get_first_layout)) ? 0 :
- -1);
+ (chk_new_windows_inherit_layout)) ? -1 :
+ 0);
}
void
setup_xkb_tabs (GtkBuilder * dialog, GConfChangeSet * changeset)
{
GObject *peditor;
- GtkWidget *chk_new_windows_get_first_layout =
- WID ("chk_new_windows_get_first_layout");
+ GtkWidget *chk_new_windows_inherit_layout =
+ WID ("chk_new_windows_inherit_layout");
xkb_gconf_client = gconf_client_get_default ();
@@ -201,24 +201,23 @@ setup_xkb_tabs (GtkBuilder * dialog, GConfChangeSet * changeset)
xkb_layouts_prepare_selected_tree (dialog, changeset);
xkb_layouts_fill_selected_tree (dialog);
- gtk_widget_set_sensitive (chk_new_windows_get_first_layout,
+ gtk_widget_set_sensitive (chk_new_windows_inherit_layout,
gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON
(WID
("chk_separate_group_per_window"))));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
- (chk_new_windows_get_first_layout),
- xkb_get_default_group () == 0);
+ (chk_new_windows_inherit_layout),
+ xkb_get_default_group () < 0);
xkb_layouts_register_buttons_handlers (dialog);
g_signal_connect (G_OBJECT (WID ("xkb_reset_to_defaults")),
"clicked", G_CALLBACK (reset_to_defaults),
dialog);
- g_signal_connect (G_OBJECT (chk_new_windows_get_first_layout),
+ g_signal_connect (G_OBJECT (chk_new_windows_inherit_layout),
"toggled", (GCallback)
- chk_new_windows_get_first_layout_toggled,
- dialog);
+ chk_new_windows_inherit_layout_toggled, dialog);
g_signal_connect_swapped (G_OBJECT (WID ("xkb_layout_options")),
"clicked",
diff --git a/capplets/keyboard/gnome-keyboard-properties-xkblt.c b/capplets/keyboard/gnome-keyboard-properties-xkblt.c
index c7d2fc1..761f812 100644
--- a/capplets/keyboard/gnome-keyboard-properties-xkblt.c
+++ b/capplets/keyboard/gnome-keyboard-properties-xkblt.c
@@ -295,8 +295,6 @@ xkb_layouts_fill_selected_tree (GtkBuilder * dialog)
GTK_LIST_STORE (gtk_tree_view_get_model
(GTK_TREE_VIEW
(WID ("xkb_layouts_selected"))));
- GtkWidget *chk_new_windows_get_first_layout =
- WID ("chk_new_windows_get_first_layout");
int counter = 0;
/* temporarily disable the buttons' status update */
@@ -315,16 +313,6 @@ xkb_layouts_fill_selected_tree (GtkBuilder * dialog)
utf_visible,
SEL_LAYOUT_TREE_COL_ID,
cur_layout->data, -1);
- if (!counter) {
- gchar *chklbl =
- g_strdup_printf (_
- ("New windows get layout \"%s\""),
-utf_visible);
- gtk_button_set_label (GTK_BUTTON
- (chk_new_windows_get_first_layout),
- chklbl);
- g_free (chklbl);
- }
g_free (utf_visible);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]