[glade] * plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Ensure 'related-action' and 'use-action-appe



commit 3d08e35b8c2a30d5a739e165f62a4b1fcb072cc5
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Tue Oct 4 18:13:36 2011 -0400

    	* plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Ensure 'related-action'
    	and 'use-action-appearance' are serialized in the right order.
    
    Conflicts:
    
    	ChangeLog

 ChangeLog                |    5 +++++
 plugins/gtk+/glade-gtk.c |   16 +++++++++++++++-
 plugins/gtk+/gtk+.xml.in |    5 +++--
 3 files changed, 23 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e20279b..4d2506f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-04  Tristan Van Berkom <tvb gnome org>
+
+	* plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Ensure 'related-action'
+	and 'use-action-appearance' are serialized in the right order.
+
 2011-10-04  Juan Pablo Ugarte <juanpablougarte gmail com>
 
         * gladeui/glade-previewer.c:
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index 22bf3ed..799c545 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -618,13 +618,27 @@ glade_gtk_widget_write_widget (GladeWidgetAdaptor * adaptor,
                                GladeWidget * widget,
                                GladeXmlContext * context, GladeXmlNode * node)
 {
+  GladeProperty *prop;
+
   if (!glade_xml_node_verify (node, GLADE_XML_TAG_WIDGET))
     return;
 
+  /* Make sure use-action-appearance and related-action properties are
+   * ordered in a sane way */
+  if (GTK_IS_ACTIVATABLE (glade_widget_get_object (widget)))
+    {
+      prop = glade_widget_get_property (widget, "use-action-appearance");
+      if (prop)
+	glade_property_write (prop, context, node);
+
+      prop = glade_widget_get_property (widget, "related-action");
+      if (prop)
+	glade_property_write (prop, context, node);
+    }
+
   /* First chain up and read in all the normal properties.. */
   GWA_GET_CLASS (G_TYPE_OBJECT)->write_widget (adaptor, widget, context, node);
 
-  /* The core takes care of signals */
   glade_gtk_write_accels (widget, context, node, TRUE);
   glade_gtk_widget_write_atk_props (widget, context, node);
 }
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index 25cb640..3b8d897 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -524,8 +524,8 @@ embedded in another object</_tooltip>
         <property id="use-underline" _name="Use Underline" since="2.16"/>
 
 	<!-- GtkActivatable -->
-      	<property id="related-action" _name="Related Action" custom-layout="True" since="2.16"/>
-      	<property id="use-action-appearance" _name="Use Action Appearance" 
+      	<property id="related-action" _name="Related Action" custom-layout="True" since="2.16" save="False"/>
+      	<property id="use-action-appearance" _name="Use Action Appearance" save="False"
 		  custom-layout="True" needs-sync="True" default="False" since="2.16"/>
 
 	<!-- Atk click property -->
@@ -2249,6 +2249,7 @@ embedded in another object</_tooltip>
 
 
     <glade-widget-class name="GtkTreeView" generic-name="treeview" _title="Tree View">
+      <post-create-function>empty</post-create-function>
       <add-child-verify-function>glade_gtk_treeview_add_verify</add-child-verify-function>
       <child-set-property-function>glade_gtk_treeview_set_child_property</child-set-property-function>
       <child-get-property-function>glade_gtk_treeview_get_child_property</child-get-property-function>



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