summaryrefslogtreecommitdiff
path: root/capplets/keyboard
diff options
context:
space:
mode:
authorSergey V. Udaltsov <svu@gnome.org>2009-11-09 22:35:15 +0000
committerSergey V. Udaltsov <svu@gnome.org>2009-11-09 22:36:26 +0000
commit585991e259580098ad74775c624be8890b88963d (patch)
treea60858a40a659bb2b9d7204f5d1679b3106862a6 /capplets/keyboard
parent07c4a415df42cc541883d90203b8b528b2b98872 (diff)
downloadgnome-control-center-585991e259580098ad74775c624be8890b88963d.tar.gz
Further layout improvements
As discussed on IRC (with aday)
Diffstat (limited to 'capplets/keyboard')
-rw-r--r--capplets/keyboard/gnome-keyboard-properties-dialog.ui163
-rw-r--r--capplets/keyboard/gnome-keyboard-properties-xkb.c27
-rw-r--r--capplets/keyboard/gnome-keyboard-properties-xkblt.c12
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 5e5b3c392..371b3469f 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 160524f6a..31ce53a5f 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 c7d2fc129..761f812a0 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);
}