[gedit] Use GtkGrid in the pythonconsole settings



commit b040f52bf38a498a8d16afb842a31946d16888fe
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Nov 27 22:36:14 2011 +0100

    Use GtkGrid in the pythonconsole settings

 plugins/pythonconsole/pythonconsole/config.py |    4 +-
 plugins/pythonconsole/pythonconsole/config.ui |   94 ++++++++++++++----------
 2 files changed, 57 insertions(+), 41 deletions(-)
---
diff --git a/plugins/pythonconsole/pythonconsole/config.py b/plugins/pythonconsole/pythonconsole/config.py
index 7b2e5e4..93a280c 100644
--- a/plugins/pythonconsole/pythonconsole/config.py
+++ b/plugins/pythonconsole/pythonconsole/config.py
@@ -43,7 +43,7 @@ class PythonConsoleConfigWidget(object):
         self._ui = Gtk.Builder()
 
     def configure_widget(self):
-        self._ui.add_objects_from_file(self._ui_path, ["table"])
+        self._ui.add_objects_from_file(self._ui_path, ["grid"])
 
         self.set_colorbutton_color(self._ui.get_object('colorbutton-command'),
                                    self._settings.get_string(self.CONSOLE_KEY_COMMAND_COLOR))
@@ -52,7 +52,7 @@ class PythonConsoleConfigWidget(object):
 
         self._ui.connect_signals(self)
 
-        widget = self._ui.get_object('table')
+        widget = self._ui.get_object('grid')
 
         return widget
 
diff --git a/plugins/pythonconsole/pythonconsole/config.ui b/plugins/pythonconsole/pythonconsole/config.ui
index 870223b..5899644 100644
--- a/plugins/pythonconsole/pythonconsole/config.ui
+++ b/plugins/pythonconsole/pythonconsole/config.ui
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="dialog-config">
     <property name="can_focus">False</property>
     <property name="window_position">center-on-parent</property>
@@ -13,43 +13,16 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="button1">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
         <child>
-          <object class="GtkTable" id="table">
+          <object class="GtkGrid" id="grid">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="border_width">6</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">2</property>
-            <property name="column_spacing">6</property>
+            <property name="margin_left">12</property>
+            <property name="margin_right">12</property>
+            <property name="margin_top">12</property>
+            <property name="margin_bottom">12</property>
             <property name="row_spacing">6</property>
+            <property name="column_spacing">12</property>
             <child>
               <object class="GtkLabel" id="label-command">
                 <property name="visible">True</property>
@@ -59,6 +32,12 @@
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">colorbutton-command</property>
               </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label-error">
@@ -70,45 +49,82 @@
                 <property name="mnemonic_widget">colorbutton-error</property>
               </object>
               <packing>
+                <property name="left_attach">0</property>
                 <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
             <child>
               <object class="GtkColorButton" id="colorbutton-command">
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
+                <property name="hexpand">True</property>
                 <property name="use_action_appearance">False</property>
                 <property name="color">#31314e4e6c6c</property>
                 <signal name="color-set" handler="on_colorbutton_command_color_set" swapped="no"/>
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
             <child>
               <object class="GtkColorButton" id="colorbutton-error">
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
+                <property name="hexpand">True</property>
                 <property name="use_action_appearance">False</property>
                 <property name="color">#999900000000</property>
                 <signal name="color-set" handler="on_colorbutton_error_color_set" swapped="no"/>
               </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="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">1</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button1">
+                <property name="label">gtk-close</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
           </packing>
         </child>
       </object>



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