[Glade-devel] libglade usage
- From: taf2 lehigh edu (Todd Fisher)
- Subject: [Glade-devel] libglade usage
- Date: Sat, 27 Dec 2003 15:58:05 -0500
I have a very simple libglade application. I used glade-2.0.1 to
generate a
.glade file which contains a gtkWindow and a GtkButton nothing else. It
defines
two signal handlers. A realize and destroy signal for the GtkWindow.
when i use the following as my main applicaion the realize signal
handler is not
called.
#include <gtk/gtk.h>
#include <glade/glade.h>
void realize( GtkWidget *widget, gpointer null )
{
printf( "hello\n" );
}
int main( int argc, char **argv )
{
GladeXML *xml;
gtk_init( &argc, &argv );
/* load the interface */
xml = glade_xml_new( "gui.glade", NULL, NULL );
if( xml == NULL ){
g_error( "Failed to initialize glade_xml file" );
return 1;
}
/* connect the signals in the interface */
glade_xml_signal_autoconnect( xml );
/* start the event loop */
gtk_main();
return 0;
}
compiling it with gcc -Wall -g `pkg-config libglade-2.0 --cflags --libs`
testapp.c
I expect to run the program see my window pop up and see hello printed
at the terminal.
I get no Gtk Warnings or Errors instead. I think its important to have
this realize signal
handler called because I want to initialize my application here.
any ideas? Am i misuing the api? is this a bug in libglade?
I've tested this with the lastest unstable release of libglade and a
fairly recent cvs version and
noticed the same behavoir.
-todd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]