[glade] * plugins/gtk+/glade-gtk-grid.c: Fixed Drag/Resize algo to use ints instead of uints (since grid



commit a4ed22853ec28a523ac4a4fafa16dbc89b650b9c
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sun Mar 6 20:48:57 2011 +0900

    	* plugins/gtk+/glade-gtk-grid.c: Fixed Drag/Resize algo to use ints instead
    	  of uints (since grid packing properties are ints).
    
    	* plugins/gtk+/gtk+.xml.in: Fixed unserialized GtkGrid packing property
    	  values (bug 643668).

 ChangeLog                     |    6 ++++++
 plugins/gtk+/glade-gtk-grid.c |   26 +++++++++++++-------------
 plugins/gtk+/gtk+.xml.in      |   14 ++++----------
 3 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d49676c..04ee666 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,12 @@
 	* plugins/gtk+/glade-gtk.c: Fixed dialog warnings to be better translatable
 	  (fixing bug 640937).
 
+	* plugins/gtk+/glade-gtk-grid.c: Fixed Drag/Resize algo to use ints instead
+	  of uints (since grid packing properties are ints).
+
+	* plugins/gtk+/gtk+.xml.in: Fixed unserialized GtkGrid packing property
+	  values (bug 643668).
+
 2011-03-02  Juan Pablo Ugarte <juanpablougarte gmail com>
 
 	* gladeui/glade-design-layout.c:
diff --git a/plugins/gtk+/glade-gtk-grid.c b/plugins/gtk+/glade-gtk-grid.c
index e461b46..c15540b 100644
--- a/plugins/gtk+/glade-gtk-grid.c
+++ b/plugins/gtk+/glade-gtk-grid.c
@@ -385,25 +385,25 @@ glade_gtk_grid_configure_end (GladeFixed * fixed,
       glade_property_get_value (top_attach_prop, &new_top_attach_value);
       glade_property_get_value (height_attach_prop, &new_height_attach_value);
 
-      g_value_init (&left_attach_value, G_TYPE_UINT);
-      g_value_init (&width_attach_value, G_TYPE_UINT);
-      g_value_init (&top_attach_value, G_TYPE_UINT);
-      g_value_init (&height_attach_value, G_TYPE_UINT);
+      g_value_init (&left_attach_value, G_TYPE_INT);
+      g_value_init (&width_attach_value, G_TYPE_INT);
+      g_value_init (&top_attach_value, G_TYPE_INT);
+      g_value_init (&height_attach_value, G_TYPE_INT);
 
-      g_value_set_uint (&left_attach_value, grid_edit.left_attach);
-      g_value_set_uint (&width_attach_value, grid_edit.width);
-      g_value_set_uint (&top_attach_value, grid_edit.top_attach);
-      g_value_set_uint (&height_attach_value, grid_edit.height);
+      g_value_set_int (&left_attach_value, grid_edit.left_attach);
+      g_value_set_int (&width_attach_value, grid_edit.width);
+      g_value_set_int (&top_attach_value, grid_edit.top_attach);
+      g_value_set_int (&height_attach_value, grid_edit.height);
 
       glade_command_push_group (_("Placing %s inside %s"),
                                 glade_widget_get_name (child), 
 				glade_widget_get_name (GLADE_WIDGET (fixed)));
       glade_command_set_properties
-          (left_attach_prop, &left_attach_value, &new_left_attach_value,
-           width_attach_prop, &width_attach_value, &new_width_attach_value,
-           top_attach_prop, &top_attach_value, &new_top_attach_value,
-           height_attach_prop, &height_attach_value, &new_height_attach_value,
-           NULL);
+	(left_attach_prop,   &left_attach_value,   &new_left_attach_value,
+	 width_attach_prop,  &width_attach_value,  &new_width_attach_value,
+	 top_attach_prop,    &top_attach_value,    &new_top_attach_value,
+	 height_attach_prop, &height_attach_value, &new_height_attach_value,
+	 NULL);
       glade_command_pop_group ();
 
       g_value_unset (&left_attach_value);
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index e13cf02..f4b0098 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -1464,16 +1464,10 @@ embedded in another object</_tooltip>
       </properties>
       
       <packing-properties>
-        <property id="x-options" transfer-on-paste="True">
-          <displayable-values>
-            <value id="GTK_EXPAND" _name="Expand"/>
-            <value id="GTK_SHRINK" _name="Shrink"/>
-            <value id="GTK_FILL" _name="Fill"/>
-          </displayable-values>
-        </property>
-        <property id="y-options" transfer-on-paste="True"/>
-        <property id="x-padding" transfer-on-paste="True"/>
-        <property id="y-padding" transfer-on-paste="True"/>
+        <property id="left-attach" save-always="True" needs-sync="True"/>
+        <property id="top-attach" save-always="True" needs-sync="True"/>
+        <property id="width" save-always="True"/>
+        <property id="height" save-always="True"/>
       </packing-properties>
     </glade-widget-class>
 



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