[gnome-chess] preferences: do not use deprecated GtkAlignment
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess] preferences: do not use deprecated GtkAlignment
- Date: Wed, 25 Jun 2014 06:42:25 +0000 (UTC)
commit cb0600a8d373b9df77a3533d365df69db1215f7d
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Wed Jun 25 01:41:35 2014 -0500
preferences: do not use deprecated GtkAlignment
data/preferences.ui | 82 +++++++++++++++++++++++---------------------------
src/gnome-chess.vala | 4 +-
2 files changed, 40 insertions(+), 46 deletions(-)
---
diff --git a/data/preferences.ui b/data/preferences.ui
index d0c923a..b6192e6 100644
--- a/data/preferences.ui
+++ b/data/preferences.ui
@@ -314,59 +314,53 @@
</packing>
</child>
<child>
- <object class="GtkAlignment" id="custom_duration_box">
+ <object class="GtkBox" id="custom_duration_box">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_start">18</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkBox" id="hbox22">
+ <object class="GtkSpinButton" id="custom_duration_spin">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">•</property>
+ <property name="adjustment">duration_adjustment</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="custom_duration_units_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkSpinButton" id="custom_duration_spin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">•</property>
- <property name="adjustment">duration_adjustment</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="model">custom_duration_units_model</property>
+ <signal name="changed" handler="duration_units_changed_cb" swapped="no"/>
<child>
- <object class="GtkComboBox" id="custom_duration_units_combo">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">custom_duration_units_model</property>
- <signal name="changed" handler="duration_units_changed_cb" swapped="no"/>
- <child>
- <object class="GtkCellRendererText" id="custom_duration_units_cellrenderer"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
+ <object class="GtkCellRendererText" id="custom_duration_units_cellrenderer"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
</child>
</object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
</child>
<child>
<object class="GtkLabel" id="label3">
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index bf5c238..fac9fe1 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -34,7 +34,7 @@ public class ChessApplication : Gtk.Application
private Gtk.ComboBox difficulty_combo;
private Gtk.ComboBox duration_combo;
private Gtk.Adjustment duration_adjustment;
- private Gtk.Container custom_duration_box;
+ private Gtk.Box custom_duration_box;
private Gtk.ComboBox custom_duration_units_combo;
private uint save_duration_timeout = 0;
private Gtk.FileChooserDialog? open_dialog = null;
@@ -1695,7 +1695,7 @@ public class ChessApplication : Gtk.Application
duration_combo = (Gtk.ComboBox) preferences_builder.get_object ("duration_combo");
duration_adjustment = (Gtk.Adjustment) preferences_builder.get_object ("duration_adjustment");
- custom_duration_box = (Gtk.Container) preferences_builder.get_object ("custom_duration_box");
+ custom_duration_box = (Gtk.Box) preferences_builder.get_object ("custom_duration_box");
custom_duration_units_combo = (Gtk.ComboBox) preferences_builder.get_object
("custom_duration_units_combo");
set_duration (settings.get_int ("duration"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]