Commit 5084b69a authored by Tristan Van Berkom's avatar Tristan Van Berkom

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.[ch]: Removed some deadcode

	* gladeui/glade-editor-property.c: Use glade_widget_adaptor_from_pspec()
	  where appropriate (Fixing bug 423425)


svn path=/trunk/; revision=1322
parent cf0e4a52
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.[ch]: Removed some deadcode
* gladeui/glade-editor-property.c: Use glade_widget_adaptor_from_pspec()
where appropriate (Fixing bug 423425)
2007-05-18 Tristan Van Berkom <tvb@gnome.org>
* Reverting Juan's last fix for bug 435912 since it broke the build.
......
......@@ -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);
......
......@@ -305,7 +305,6 @@ glade_editor_init (GladeEditor *editor)
{
GtkSizeGroup *size_group;
GtkWidget *hbox;
GtkWidget *label;
editor->notebook = gtk_notebook_new ();
editor->page_widget = glade_editor_notebook_page (editor, _("_General"));
......
......@@ -100,10 +100,6 @@ struct _GladeEditor
* was loaded.
*/
GtkWidget *launch_button; /* Button used to launch custom editors implemented
* through the plugin backend.
*/
gulong project_closed_signal_id; /* Unload widget when widget's project closes.
*/
......
......@@ -343,6 +343,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);
}
}
......
......@@ -452,11 +452,13 @@ 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)
GType glade_widget_adaptor_get_type (void) G_GNUC_CONST;
GType glade_create_reason_get_type (void) G_GNUC_CONST;
GType glade_create_reason_get_type (void) G_GNUC_CONST;
GladeWidgetAdaptor *glade_widget_adaptor_from_catalog (GladeXmlNode *class_node,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment