Merge branch 'pu'
[jungerl.git] / lib / gtkNode / src / gtkNode_glade.c
blob2e00650016e9ce833d49ad773321297226f90216
1 #include "gtkNode.h"
3 gboolean gn_glade_init(char *filename) {
4 const char *rootnode = NULL;
5 extern GladeXML *xml;
7 if ( ! (xml = glade_xml_new(filename, rootnode, NULL)) )
8 return FALSE;
9 glade_xml_signal_autoconnect(xml);
10 return TRUE;
13 void gn_sighandler(GtkWidget *widget){
14 GdkEvent *gdk_event;
15 GtkWidget *wid;
16 GType gtyp;
17 char evtype[100];
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));
28 }else{
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) {
37 extern GladeXML *xml;
38 return glade_xml_get_widget(xml, widget_name);