[meld] meld.preferences: Construct our sizegroup in Glade



commit 65e45fff5c18470e282cbd36555c91593ac9fe8b
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Thu Nov 14 07:53:31 2013 +1000

    meld.preferences: Construct our sizegroup in Glade

 data/ui/preferences.ui |   13 ++++++++++---
 meld/preferences.py    |    7 ++-----
 2 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/data/ui/preferences.ui b/data/ui/preferences.ui
index 7cd9d8b..fa0f324 100644
--- a/data/ui/preferences.ui
+++ b/data/ui/preferences.ui
@@ -166,7 +166,7 @@
                                 <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
-                                  <object class="GtkLabel" id="label1">
+                                  <object class="GtkLabel" id="label_fontpicker">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="xalign">0</property>
@@ -272,7 +272,7 @@
                                 <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
-                                  <object class="GtkLabel" id="label16">
+                                  <object class="GtkLabel" id="label_tabsize">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="xalign">0</property>
@@ -517,7 +517,7 @@
                                 <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
-                                  <object class="GtkLabel" id="label2">
+                                  <object class="GtkLabel" id="label_editor_command">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="xalign">0</property>
@@ -1377,4 +1377,11 @@
       <action-widget response="-7">closebutton1</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkSizeGroup" id="sizegroup_editor">
+    <widgets>
+      <widget name="label_fontpicker"/>
+      <widget name="label_tabsize"/>
+      <widget name="label_editor_command"/>
+    </widgets>
+  </object>
 </interface>
diff --git a/meld/preferences.py b/meld/preferences.py
index 278d695..00b235b 100644
--- a/meld/preferences.py
+++ b/meld/preferences.py
@@ -144,7 +144,8 @@ class PreferencesDialog(gnomeglade.Component):
     def __init__(self, parent, prefs):
         gnomeglade.Component.__init__(self, "preferences.ui",
                                       "preferencesdialog",
-                                      ["adjustment1", "adjustment2", "fileorderstore"])
+                                      ["adjustment1", "adjustment2", "fileorderstore",
+                                       "sizegroup_editor"])
         self.widget.set_transient_for(parent)
         self.prefs = prefs
 
@@ -177,10 +178,6 @@ class PreferencesDialog(gnomeglade.Component):
                 self.checkbutton_split_words.set_active(False)
             self.checkbutton_wrap_text.set_active(True)
 
-        size_group = Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL)
-        size_group.add_widget(self.label1)
-        size_group.add_widget(self.label2)
-        size_group.add_widget(self.label16)
         use_default = self.prefs.edit_command_type == "internal" or \
                       self.prefs.edit_command_type == "gnome"
         self.system_editor_checkbutton.set_active(use_default)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]