glibmm r740 - in trunk: . tools/extra_defs_gen



Author: jaalburqu
Date: Wed Oct 15 15:58:17 2008
New Revision: 740
URL: http://svn.gnome.org/viewvc/glibmm?rev=740&view=rev

Log:
2008-10-15  Josà Alburquerque  <jaalburqu svn gnome org>

	* tools/extra_defs_gen/generate_extra_defs.cc: Modify signal and props
	generation tool to generate interface signals.

Modified:
   trunk/ChangeLog
   trunk/tools/extra_defs_gen/generate_extra_defs.cc

Modified: trunk/tools/extra_defs_gen/generate_extra_defs.cc
==============================================================================
--- trunk/tools/extra_defs_gen/generate_extra_defs.cc	(original)
+++ trunk/tools/extra_defs_gen/generate_extra_defs.cc	Wed Oct 15 15:58:17 2008
@@ -135,9 +135,12 @@
   std::string strObjectName = g_type_name(gtype);
 
   gpointer gclass_ref = 0;
+  gpointer ginterface_ref = 0;
 
   if(G_TYPE_IS_OBJECT(gtype))
     gclass_ref = g_type_class_ref(gtype); //Ensures that class_init() is called.
+  else if(G_TYPE_IS_INTERFACE(gtype))
+    ginterface_ref = g_type_default_interface_ref(gtype); //install signals.
 
   //Get the list of signals:
   guint iCount = 0;
@@ -220,6 +223,8 @@
 
   if(gclass_ref)
     g_type_class_unref(gclass_ref); //to match the g_type_class_ref() above.
+  else if(ginterface_ref)
+    g_type_default_interface_unref(ginterface_ref); // for interface ref above.
 
   return strResult;
 }



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