[Glade-devel] libglade usage

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 
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
#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 */
    return 0;
compiling it with gcc -Wall -g `pkg-config libglade-2.0 --cflags --libs` 

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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]