#include #include #include #include /* the filename and root node of the interface */ #define FILENAME "../talk.glade" #define ROOTNODE "rootnode" /* we're using a global variable since it will be referenced later. * note it's a module global, not a program global. */ static GladeXML *xml; int main (int argc, char **argv) { /* standard gtk+ init, followed by a glade init */ gtk_init(&argc, &argv); glade_init(); /* try to load the interface and verify it happened */ xml = glade_xml_new(FILENAME, ROOTNODE); if (!xml) { g_warning("something bad happened while creating the interface"); return 1; } /* connect signals to exported symbol names */ glade_xml_signal_autoconnect(xml); /* then just run gtk_main() as per usual */ gtk_main(); return 0; }