diff options
author | Tristan Van Berkom <tvb@src.gnome.org> | 2007-05-18 17:06:05 +0000 |
---|---|---|
committer | Tristan Van Berkom <tvb@src.gnome.org> | 2007-05-18 17:06:05 +0000 |
commit | 902679f40a56801fbd54d84b97ef0cbd27b638f7 (patch) | |
tree | fc2ad727eb4347c21c08d11effaf9e9e5b01fc0c | |
parent | f129aff7fd8af8ed3d1eb91f8630bf519af4471d (diff) | |
download | glade-902679f40a56801fbd54d84b97ef0cbd27b638f7.tar.gz |
Added glade_widget_adaptor_from_pspec() and made
* gladeui/glade-widget-adaptor.[ch]: Added glade_widget_adaptor_from_pspec()
and made glade_widget_adaptor_from_pclass() always return the owning
adaptor and not the adaptor for the class which the property was originally
created for.
* gladeui/glade-editor-property.c: Use glade_widget_adaptor_from_pspec()
where appropriate (Fixing bug 423425)
svn path=/branches/gnome-2-18/; revision=1323
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | doc/tmpl/glade-property-class.sgml | 1 | ||||
-rw-r--r-- | doc/tmpl/glade-widget.sgml | 1 | ||||
-rw-r--r-- | gladeui/glade-editor-property.c | 4 | ||||
-rw-r--r-- | gladeui/glade-widget-adaptor.c | 1 | ||||
-rw-r--r-- | gladeui/glade-widget-adaptor.h | 3 |
6 files changed, 18 insertions, 2 deletions
@@ -1,3 +1,13 @@ +2007-05-18 Tristan Van Berkom <tvb@gnome.org> + + * gladeui/glade-widget-adaptor.[ch]: Added glade_widget_adaptor_from_pspec() + and made glade_widget_adaptor_from_pclass() always return the owning + adaptor and not the adaptor for the class which the property was originally + created for. + + * gladeui/glade-editor-property.c: Use glade_widget_adaptor_from_pspec() + where appropriate (Fixing bug 423425) + 2007-05-16 Tristan Van Berkom <tvb@gnome.org> * plugins/gtk+/gtk+.xml.in: Set "response-id" property to be "save-always" fixing diff --git a/doc/tmpl/glade-property-class.sgml b/doc/tmpl/glade-property-class.sgml index d2e022e1..c9e88b76 100644 --- a/doc/tmpl/glade-property-class.sgml +++ b/doc/tmpl/glade-property-class.sgml @@ -45,6 +45,7 @@ va_lists etc (back and forth). @translatable: @visible_lines: @save: +@save_always: @visible: @ignore: @is_modified: diff --git a/doc/tmpl/glade-widget.sgml b/doc/tmpl/glade-widget.sgml index 328cbd13..3c164d6d 100644 --- a/doc/tmpl/glade-widget.sgml +++ b/doc/tmpl/glade-widget.sgml @@ -501,6 +501,7 @@ convenience api for getting and setting properties (mostly from the plugin). </para> @template_widget: +@exact: @Returns: diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c index 8791ece7..c4606cfa 100644 --- a/gladeui/glade-editor-property.c +++ b/gladeui/glade-editor-property.c @@ -244,7 +244,7 @@ glade_editor_property_info_clicked_cb (GtkWidget *info, GladeWidgetAdaptor *adaptor; gchar *search, *book; - adaptor = glade_widget_adaptor_from_pclass (eprop->klass); + adaptor = glade_widget_adaptor_from_pspec (eprop->klass->pspec); search = g_strdup_printf ("The %s property", eprop->klass->id); g_object_get (adaptor, "book", &book, NULL); @@ -3848,7 +3848,7 @@ glade_editor_property_show_info (GladeEditorProperty *eprop) g_return_if_fail (GLADE_IS_EDITOR_PROPERTY (eprop)); - adaptor = glade_widget_adaptor_from_pclass (eprop->klass); + adaptor = glade_widget_adaptor_from_pspec (eprop->klass->pspec); g_object_get (adaptor, "book", &book, NULL); diff --git a/gladeui/glade-widget-adaptor.c b/gladeui/glade-widget-adaptor.c index 1e1f2b09..337373a5 100644 --- a/gladeui/glade-widget-adaptor.c +++ b/gladeui/glade-widget-adaptor.c @@ -421,6 +421,7 @@ gwa_clone_parent_properties (GladeWidgetAdaptor *adaptor, gboolean is_packing) { GladePropertyClass *pclass = glade_property_class_clone (list->data); + pclass->handle = adaptor; properties = g_list_prepend (properties, pclass); } } diff --git a/gladeui/glade-widget-adaptor.h b/gladeui/glade-widget-adaptor.h index 7b659f45..ab12f6df 100644 --- a/gladeui/glade-widget-adaptor.h +++ b/gladeui/glade-widget-adaptor.h @@ -459,6 +459,9 @@ struct _GladeWidgetAdaptorClass #define glade_widget_adaptor_from_pclass(pclass) \ ((pclass) ? (GladeWidgetAdaptor *)((GladePropertyClass *)(pclass))->handle : NULL) +#define glade_widget_adaptor_from_pspec(pspec) \ + ((pspec) ? glade_widget_adaptor_get_by_type (((GParamSpec *)(pspec))->owner_type) : NULL) + LIBGLADEUI_API GType glade_widget_adaptor_get_type (void) G_GNUC_CONST; |