[POS-commit] r202 - libglade

Johan Dahlin jdahlin at async.com.br
Thu Mar 24 15:54:20 BRT 2005


Author: jdahlin
Date: 2005-03-24 15:54:19 -0300 (Thu, 24 Mar 2005)
New Revision: 202

Modified:
   libglade/glade-xml.c
   libglade/glade-xml.h
Log:
kill glade_xml_construct

Modified: libglade/glade-xml.c
===================================================================
--- libglade/glade-xml.c	2005-03-24 18:52:50 UTC (rev 201)
+++ libglade/glade-xml.c	2005-03-24 18:54:19 UTC (rev 202)
@@ -224,34 +224,11 @@
  *
  * Returns: the newly created GladeXML object, or NULL on failure.
  */
+
 GladeXML *
 glade_xml_new(const char *fname, const char *root, const char *domain)
 {
-    GladeXML *self = g_object_new(GLADE_TYPE_XML, NULL);
-
-    if (!glade_xml_construct(self, fname, root, domain)) {
-	g_object_unref(G_OBJECT(self));
-	return NULL;
-    }
-    return self;
-}
-
-/**
- * glade_xml_construct:
- * @self: the GladeXML object
- * @fname: the XML filename
- * @root: the root widget node (or %NULL for none)
- * @domain: the translation domain (or %NULL for the default)
- *
- * This routine can be used by bindings (such as gtk--) to help construct
- * a GladeXML object, if it is needed.
- *
- * Returns: TRUE if the construction succeeded.
- */
-gboolean
-glade_xml_construct (GladeXML *self, const char *fname, const char *root,
-		     const char *domain)
-{
+    GladeXML *self;
     GladeInterface *iface;
 
     g_return_val_if_fail(self != NULL, FALSE);
@@ -262,13 +239,16 @@
     if (!iface)
 	return FALSE;
 
-    self->priv->tree = iface;
+    self = g_object_new(GLADE_TYPE_XML, NULL);
+
     if (self->filename)
 	g_free(self->filename);
     self->filename = g_strdup(fname);
+    self->priv->tree = iface;
+    
     glade_xml_build_interface(self, iface, root);
-
-    return TRUE;
+    
+    return self;
 }
 
 /**

Modified: libglade/glade-xml.h
===================================================================
--- libglade/glade-xml.h	2005-03-24 18:52:50 UTC (rev 201)
+++ libglade/glade-xml.h	2005-03-24 18:54:19 UTC (rev 202)
@@ -62,10 +62,6 @@
 GladeXML  *glade_xml_new_from_buffer     (const char *buffer, int size,
 					  const char *root,
 					  const char *domain);
-gboolean   glade_xml_construct           (GladeXML *self, const char *fname,
-					  const char *root,
-					  const char *domain);
-
 void       glade_xml_signal_connect      (GladeXML *self,
 					  const char *handlername,
 					  GCallback func);



More information about the POS-commit mailing list