summaryrefslogtreecommitdiff
path: root/gladeui/glade-property-class.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tvb@src.gnome.org>2008-10-27 20:00:34 +0000
committerTristan Van Berkom <tvb@src.gnome.org>2008-10-27 20:00:34 +0000
commitc20614b4ddfceb9bc776322a41195340aa86f590 (patch)
tree631ac1ba2f44c015aed5b4db73dcb0799652d035 /gladeui/glade-property-class.c
parent72e543f08080be0ce54a1d177df7e3f213c3924f (diff)
downloadglade-c20614b4ddfceb9bc776322a41195340aa86f590.tar.gz
Override type of GtkImage::icon-size to use real GTK_TYPE_ICON_SIZE for
* plugins/gtk+/glade-image-editor.[ch], plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c, gladeui/glade-property-class.c: Override type of GtkImage::icon-size to use real GTK_TYPE_ICON_SIZE for editing purposes (needed to fix the core a bit for this), also improved image editor to keep sizes contextual to image edit mode. svn path=/trunk/; revision=2005
Diffstat (limited to 'gladeui/glade-property-class.c')
-rw-r--r--gladeui/glade-property-class.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/gladeui/glade-property-class.c b/gladeui/glade-property-class.c
index f24e6cad..dbf3b6ec 100644
--- a/gladeui/glade-property-class.c
+++ b/gladeui/glade-property-class.c
@@ -1301,7 +1301,7 @@ glade_property_class_update_from_node (GladeXmlNode *node,
return TRUE;
}
- /* ...the spec... */
+ /* ...the spec... we could be introducing a new one or even overriding an existing spec... */
buf = glade_xml_get_value_string (node, GLADE_TAG_SPEC);
if (buf)
{
@@ -1313,6 +1313,9 @@ glade_property_class_update_from_node (GladeXmlNode *node,
*/
klass->pspec->owner_type = object_type;
+ /* We overrode the pspec, now it *is* a virtual property. */
+ klass->virt = TRUE;
+
if (klass->tooltip) g_free (klass->tooltip);
if (klass->name) g_free (klass->name);
@@ -1322,15 +1325,17 @@ glade_property_class_update_from_node (GladeXmlNode *node,
if (klass->pspec->flags & G_PARAM_CONSTRUCT_ONLY)
klass->construct_only = TRUE;
+ if (klass->orig_def) {
+ g_value_unset (klass->orig_def);
+ g_free (klass->orig_def);
+ }
+ klass->orig_def = glade_property_class_get_default_from_spec (klass->pspec);
+
if (klass->def) {
g_value_unset (klass->def);
g_free (klass->def);
}
- klass->def = glade_property_class_get_default_from_spec (klass->pspec);
-
- if (klass->orig_def == NULL)
- klass->orig_def =
- glade_property_class_get_default_from_spec (klass->pspec);
+ klass->def = glade_property_class_get_default_from_spec (klass->pspec);
}