[gnome-control-center] keyboard: Port typing tab to GtkGrid
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] keyboard: Port typing tab to GtkGrid
- Date: Fri, 15 Aug 2014 12:45:53 +0000 (UTC)
commit c3d2631a9a078d877d41caf760e6c65ef7b4ef23
Author: Kalev Lember <kalevlember gmail com>
Date: Sun Sep 29 22:55:43 2013 +0200
keyboard: Port typing tab to GtkGrid
https://bugzilla.gnome.org/show_bug.cgi?id=709057
panels/keyboard/gnome-keyboard-panel.ui | 93 ++++++++++++-------------------
panels/keyboard/keyboard-general.c | 4 +-
2 files changed, 37 insertions(+), 60 deletions(-)
---
diff --git a/panels/keyboard/gnome-keyboard-panel.ui b/panels/keyboard/gnome-keyboard-panel.ui
index 174c1ec..dbbfb0a 100644
--- a/panels/keyboard/gnome-keyboard-panel.ui
+++ b/panels/keyboard/gnome-keyboard-panel.ui
@@ -222,11 +222,9 @@
</packing>
</child>
<child>
- <object class="GtkTable" id="repeat_table">
+ <object class="GtkGrid" id="repeat_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">4</property>
<child>
<object class="GtkLabel" id="repeat_delay_label">
<property name="visible">True</property>
@@ -238,8 +236,8 @@
<property name="mnemonic_widget">repeat_delay_scale</property>
</object>
<packing>
- <property name="x_options">GTK_SHRINK</property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -253,10 +251,8 @@
<property name="mnemonic_widget">repeat_speed_scale</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_SHRINK</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -272,9 +268,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_SHRINK</property>
- <property name="y_options"></property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -290,30 +284,27 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_SHRINK</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkHScale" id="repeat_delay_scale">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="adjustment">repeat_delay_adjustment</property>
<property name="draw_value">False</property>
</object>
<packing>
<property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="y_options"></property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkHScale" id="repeat_speed_scale">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="adjustment">repeat_speed_adjustment</property>
<property name="draw_value">False</property>
<child internal-child="accessible">
@@ -324,10 +315,7 @@
</object>
<packing>
<property name="left_attach">2</property>
- <property name="right_attach">3</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -342,9 +330,7 @@
</object>
<packing>
<property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="x_options">GTK_SHRINK</property>
- <property name="y_options"></property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -359,17 +345,13 @@
</object>
<packing>
<property name="left_attach">3</property>
- <property name="right_attach">4</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_SHRINK</property>
- <property name="y_options"></property>
</packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -454,10 +436,9 @@
</packing>
</child>
<child>
- <object class="GtkTable" id="cursor_table">
+ <object class="GtkGrid" id="cursor_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_columns">4</property>
<child>
<object class="GtkLabel" id="cursor_speed_label">
<property name="visible">True</property>
@@ -469,14 +450,31 @@
<property name="mnemonic_widget">cursor_blink_time_scale</property>
</object>
<packing>
- <property name="x_options">GTK_SHRINK</property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="blink_slow_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xpad">10</property>
+ <property name="label" translatable="yes" context="keyboard,
speed">Slow</property>
+ <attributes>
+ <attribute name="scale" value="0.82999999999999996"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkHScale" id="cursor_blink_time_scale">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="adjustment">cursor_blink_time_adjustment</property>
<property name="draw_value">False</property>
<property name="inverted">True</property>
@@ -488,8 +486,7 @@
</object>
<packing>
<property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="y_options"></property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -504,33 +501,13 @@
</object>
<packing>
<property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="x_options">GTK_SHRINK</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="blink_slow_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="xpad">10</property>
- <property name="label" translatable="yes" context="keyboard,
speed">Slow</property>
- <attributes>
- <attribute name="scale" value="0.82999999999999996"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_SHRINK</property>
- <property name="y_options"></property>
+ <property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
diff --git a/panels/keyboard/keyboard-general.c b/panels/keyboard/keyboard-general.c
index ead752e..4bf506e 100644
--- a/panels/keyboard/keyboard-general.c
+++ b/panels/keyboard/keyboard-general.c
@@ -83,7 +83,7 @@ keyboard_general_init (CcPanel *panel, GtkBuilder *builder)
WID ("repeat_toggle"), "active",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind (keyboard_settings, "repeat",
- WID ("repeat_table"), "sensitive",
+ WID ("repeat_grid"), "sensitive",
G_SETTINGS_BIND_GET);
g_settings_bind (keyboard_settings, "delay",
@@ -98,7 +98,7 @@ keyboard_general_init (CcPanel *panel, GtkBuilder *builder)
WID ("cursor_toggle"), "active",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind (interface_settings, "cursor-blink",
- WID ("cursor_table"), "sensitive",
+ WID ("cursor_grid"), "sensitive",
G_SETTINGS_BIND_GET);
g_settings_bind (interface_settings, "cursor-blink-time",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]