1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * $Id: glade.c,v 1.1 2005/02/18 02:13:35 nedko Exp $
12 *****************************************************************************/
16 #include <glade/glade.h>
21 static GladeXML
*xml
= NULL
;
24 glade_signal_connect_func (
25 const gchar
*cb_name
, GObject
*obj
,
26 const gchar
*signal_name
, const gchar
*signal_data
,
27 GObject
*conn_obj
, gboolean conn_after
,
30 /** Module with all the symbols of the program */
31 static GModule
*mod_self
= NULL
;
32 gpointer handler_func
;
34 /* initialize gmodule */
37 mod_self
= g_module_open (NULL
, 0);
38 g_assert (mod_self
!= NULL
);
41 /*g_print( "glade_signal_connect_func: cb_name = '%s', signal_name = '%s', signal_data = '%s'\n",
42 cb_name, signal_name, signal_data ); */
44 if (g_module_symbol (mod_self
, cb_name
, &handler_func
))
51 g_signal_connect_object
53 handler_func
, conn_obj
,
58 g_signal_connect_object
60 handler_func
, conn_obj
,
66 /* no conn_obj; use standard connect */
73 g_signal_connect_after
87 g_warning("callback function not found: %s", cb_name
);
92 construct_glade_widget(
95 gchar
* glade_filename
;
100 glade_filename
= path_get_data_filename("mediadatabase.glade");
101 if (glade_filename
== NULL
)
103 g_warning("Cannot find glade UI description file.");
107 /* load the interface */
108 xml
= glade_xml_new(glade_filename
, id
, NULL
);
110 g_free(glade_filename
);
113 widget
= glade_xml_get_widget(xml
, id
);
115 /* connect the signals in the interface */
116 glade_xml_signal_autoconnect_full(
118 (GladeXMLConnectFunc
)glade_signal_connect_func
,
128 return glade_xml_get_widget(
133 /*****************************************************************************
137 * !!! WARNING !!! Following lines are automatically updated by the CVS system.
140 * Revision 1.1 2005/02/18 02:13:35 nedko
143 *****************************************************************************/