[glade/composite-templates-new: 1/5] Fixed previous commit to make GtkToolbar use a GtkIconSize in the UI.



commit 47d958099e45c33c8f00d12db02819f188fcfec1
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sun Mar 31 20:44:00 2013 +0900

    Fixed previous commit to make GtkToolbar use a GtkIconSize in the UI.
    
    Now only one icon-size it saved (numerically, as "icon_size").

 plugins/gtk+/glade-gtk.c |    8 ++++++--
 plugins/gtk+/gtk+.xml.in |    2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index 5d2b0b2..62f266b 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -4379,17 +4379,21 @@ glade_gtk_write_icon_size (GladeWidget * widget,
   if (glade_property_get_enabled (size_prop) &&
       !glade_property_original_default (size_prop))
     {
+      gchar *write_prop_name = g_strdup (prop_name);
+
+      glade_util_replace (write_prop_name, '-', '_');
+
       pclass = glade_property_get_class (size_prop);
       prop_node = glade_xml_node_new (context, GLADE_TAG_PROPERTY);
       glade_xml_node_append_child (node, prop_node);
 
-      glade_xml_node_set_property_string (prop_node, GLADE_TAG_NAME,
-                                          glade_property_class_id (pclass));
+      glade_xml_node_set_property_string (prop_node, GLADE_TAG_NAME, write_prop_name);
 
       glade_property_get (size_prop, &icon_size);
       value = g_strdup_printf ("%d", icon_size);
       glade_xml_set_content (prop_node, value);
       g_free (value);
+      g_free (write_prop_name);
     }
 }
 
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index ce86d20..e9cdfc0 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -659,7 +659,7 @@ embedded in another object</_tooltip>
        </property>
        <!-- We have to save/load icon-size as int, and fake the enum -->
        <property id="icon-size" since="2.10" optional="True" optional-default="False" weight="0.5"
-                 default="GTK_ICON_SIZE_LARGE_TOOLBAR">
+                 default="GTK_ICON_SIZE_LARGE_TOOLBAR" save="False">
          <parameter-spec>
            <type>GParamEnum</type>
            <value-type>GtkIconSize</value-type>


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