3 gboolean
gn_glade_init(char *filename
) {
4 const char *rootnode
= NULL
;
7 if ( ! (xml
= glade_xml_new(filename
, rootnode
, NULL
)) )
9 glade_xml_signal_autoconnect(xml
);
13 void gn_sighandler(GtkWidget
*widget
){
18 const char *widgetname
;
20 /* instantiate the GdkEventType */
21 g_assert( gn_GType_from_name("GdkEventType") );
23 if ( ! (widgetname
= glade_get_widget_name(widget
)) )
24 widgetname
= "UNKNOWN";
26 if ( ! (gdk_event
= gtk_get_current_event()) ){
27 g_strlcpy(evtype
,"NONE",sizeof(evtype
));
29 /*wid = gtk_get_event_widget(gdk_event);*/
30 g_assert( gn_get_enum_name("GdkEventType", gdk_event
->type
, evtype
));
31 gdk_event_free(gdk_event
);
33 gn_send_signal(widgetname
, evtype
);
36 GtkWidget
* gn_check_widget_name(char* widget_name
) {
38 return glade_xml_get_widget(xml
, widget_name
);