[glade/glade-3-8] * plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Ensure 'related-action' and 'use-action-appe
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/glade-3-8] * plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Ensure 'related-action' and 'use-action-appe
- Date: Sun, 9 Oct 2011 17:32:14 +0000 (UTC)
commit db64c0238f8150b97d95a575f80c5b82f42888cb
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sun Oct 9 13:22:57 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
plugins/gtk+/glade-gtk.c
plugins/gtk+/gtk+.xml.in
ChangeLog | 5 ++++-
plugins/gtk+/glade-gtk.c | 16 +++++++++++++++-
plugins/gtk+/gtk+.xml.in | 12 ++++++------
3 files changed, 25 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6567485..a40f875 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-2011-10-06 Tristan Van Berkom <tvb gnome org>
+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.
* gladeui/glade-widget-adaptor.c: Implemented a generic ->depends() routine
to ensure that liststores are serialized before treemodelfilters which refer to them (bug 657164).
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index 0ef33ce..67fc953 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -830,10 +830,24 @@ glade_gtk_widget_write_widget (GladeWidgetAdaptor *adaptor,
if (!glade_xml_node_verify (node, GLADE_XML_TAG_WIDGET (fmt)))
return;
+ /* Make sure use-action-appearance and related-action properties are
+ * ordered in a sane way */
+ if (fmt == GLADE_PROJECT_FORMAT_GTKBUILDER &&
+ GTK_IS_ACTIVATABLE (glade_widget_get_object (widget)))
+ {
+ GladeProperty *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);
-
/* in Libglade the order must be Properties, Atk, Signals, Accels.
* in builder it doesnt matter so long as signals are after properties
* and before objects.
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index 5456c7e..b8537a3 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -465,8 +465,8 @@ embedded in another object</_tooltip>
<property id="use-underline" _name="Use Underline" gtkbuilder-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 -->
@@ -682,9 +682,9 @@ embedded in another object</_tooltip>
<properties>
<!-- GtkActivatable -->
- <property id="related-action" _name="Related Action" custom-layout="True" since="2.16"/>
+ <property id="related-action" _name="Related Action" custom-layout="True" since="2.16" save="False"/>
<property id="use-action-appearance" _name="Use Action Appearance" custom-layout="True"
- default="False" since="2.16"/>
+ default="False" since="2.16" save="False"/>
</properties>
</glade-widget-class>
@@ -1001,8 +1001,8 @@ embedded in another object</_tooltip>
</property>
<!-- GtkActivatable -->
- <property id="related-action" _name="Related Action" custom-layout="True" since="2.16"/>
- <property id="use-action-appearance" _name="Use Action Appearance" custom-layout="True" default="False" since="2.16"/>
+ <property id="related-action" _name="Related Action" custom-layout="True" since="2.16" save="False"/>
+ <property id="use-action-appearance" _name="Use Action Appearance" custom-layout="True" default="False" since="2.16" save="False"/>
<!-- Atk click property -->
<property id="atk-click" _name="Click" ignore="True" atk-property="True" save="False">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]