a couple of libglade api additions



in doing gnomeui support for libglade, i've come across a couple of
libglade functions that need to be made public.

the _get_toplevel() is needed to add dock items to GnomeApp (otherwise
any GnomeApps done in glade are useless).

i think the second is needed if you are building your child widgets
manually... there might be a different way to do this.

these changes are in the previously-internal libglade support apis, not
the application apis, so again they do not affect any applications
(except if they use GnomeApp with libglade - then they will actually be
usable).

btw james - in the gnome support i am re-registering bonobo-dock,
because i need it to behave differently when used with GnomeApp (it
needs to make a gnome_app_ call which can't be done in libbonoboui).  is
there a better way to do this?

jacob
-- 
"In fact, can you imagine anything more terrifying than a zombie clown?"
	-- moby
? foo.py
? glade-xml.c.mine
? group
Index: glade-build.h
===================================================================
RCS file: /cvs/gnome/libglade/glade/glade-build.h,v
retrieving revision 1.34
diff -u -r1.34 glade-build.h
--- glade-build.h	2001/11/23 03:25:41	1.34
+++ glade-build.h	2001/12/05 21:56:43
@@ -66,7 +66,8 @@
 				GladeApplyCustomPropFunc apply_prop);
 
 /* set the current toplevel widget while building (use NULL to unset) */
-void glade_xml_set_toplevel(GladeXML *xml, GtkWindow *window);
+void       glade_xml_set_toplevel(GladeXML *xml, GtkWindow *window);
+GtkWindow *glade_xml_get_toplevel(GladeXML *xml);
 
 /* push and pop accelerator groups on a stack */
 GtkAccelGroup *glade_xml_push_accel(GladeXML *xml);
@@ -78,6 +79,10 @@
 void glade_xml_handle_widget_prop(GladeXML *self, GtkWidget *widget,
 				  const gchar *prop_name,
 				  const gchar *value_name);
+
+void glade_xml_set_packing_property (GladeXML   *self,
+				     GtkWidget  *parent, GtkWidget  *child,
+				     const char *name,   const char *value);
 
 /* this function is called to build the interface by GladeXML */
 GtkWidget *glade_xml_build_widget(GladeXML *self, GladeWidgetInfo *info);
Index: glade-xml.c
===================================================================
RCS file: /cvs/gnome/libglade/glade/glade-xml.c,v
retrieving revision 1.83
diff -u -r1.83 glade-xml.c
--- glade-xml.c	2001/11/27 19:19:56	1.83
+++ glade-xml.c	2001/12/05 21:56:43
@@ -657,6 +657,22 @@
 }
 
 /**
+ * glade_xml_get_toplevel:
+ * @xml: the GladeXML object.
+ *
+ * Description:
+ * This is used while the tree is being built to get the toplevel window that
+ * is currently being built.
+ *
+ * Returns: The current GtkWindow being built
+ */
+GtkWindow *
+glade_xml_get_toplevel (GladeXML *xml)
+{
+    return xml->priv->toplevel;
+}
+
+/**
  * glade_xml_handle_widget_prop
  * @xml: the GladeXML object
  * @widget: the property the widget to set the property on.
@@ -1700,7 +1716,7 @@
  * This sets the packing property on container @parent of widget
  * @child with @name to @value
  **/
-static void
+void
 glade_xml_set_packing_property (GladeXML   *self,
 				GtkWidget  *parent, GtkWidget  *child,
 				const char *name,   const char *value)


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