summaryrefslogtreecommitdiff
path: root/gladeui/glade-widget-adaptor.h
diff options
context:
space:
mode:
authorTristan Van Berkom <tvb@src.gnome.org>2008-11-15 22:38:48 +0000
committerTristan Van Berkom <tvb@src.gnome.org>2008-11-15 22:38:48 +0000
commit18127438cd569651754e8b8b9a04c9e8ac36d66d (patch)
tree4991e12bb0dc179b015e57cbb3260b42a75c4a7f /gladeui/glade-widget-adaptor.h
parentfa51f128784f19ef561b84bd42b5c156fb0f32d8 (diff)
downloadglade-18127438cd569651754e8b8b9a04c9e8ac36d66d.tar.gz
Added new backend ->depends() vfunc to determine toplevel dependancies
* gladeui/glade-widget-adaptor.[ch], gladeui/glade-xml-utils.h: Added new backend ->depends() vfunc to determine toplevel dependancies (for glade file output ordering). * gladeui/glade-project.[ch]: - Sort dependancies using glade_widget_adaptor_depends() * plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: - Added ->depends() func for GtkWidget and GtkSizeGroup svn path=/trunk/; revision=2032
Diffstat (limited to 'gladeui/glade-widget-adaptor.h')
-rw-r--r--gladeui/glade-widget-adaptor.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/gladeui/glade-widget-adaptor.h b/gladeui/glade-widget-adaptor.h
index 1cc67522..2fde45db 100644
--- a/gladeui/glade-widget-adaptor.h
+++ b/gladeui/glade-widget-adaptor.h
@@ -417,6 +417,22 @@ typedef GtkWidget *(* GladeActionSubmenuFunc) (GladeWidgetAdaptor *adaptor,
const gchar *action_path);
+/**
+ * GladeDependsFunc:
+ * @adaptor: A #GladeWidgetAdaptor
+ * @widget: A #GladeWidget of the adaptor
+ * @another: another #GladeWidget
+ *
+ * Checks whether @widget depends on @another to be placed earlier in
+ * the glade file.
+ *
+ * Returns: whether @widget depends on @another being parsed first in
+ * the resulting glade file.
+ */
+typedef gboolean (* GladeDependsFunc) (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeWidget *another);
+
/**
@@ -669,6 +685,8 @@ struct _GladeWidgetAdaptorClass
GladeActionSubmenuFunc action_submenu; /* Delagate function to create dynamic submenus */
/* in action menus. */
+
+ GladeDependsFunc depends; /* Periodically sort widgets in the project */
GladeReadWidgetFunc read_widget; /* Reads widget attributes from xml */
@@ -841,6 +859,10 @@ GtkWidget *glade_widget_adaptor_action_submenu (GladeWidgetAdap
GObject *object,
const gchar *action_path);
+gboolean glade_widget_adaptor_depends (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeWidget *another);
+
void glade_widget_adaptor_read_widget (GladeWidgetAdaptor *adaptor,
GladeWidget *widget,