[Glade-users] signal not used in callback?


i've been using the glade interface designer that comes with suse9.0, i believe 2.0 and i have an app
which uses a calendar widget. now i added my own function as a signal/callback to the glade file the app
is using, and put the prototype in callbacks.h and the function in callbacks.c.

this is the function:

void check_schedule(GtkWidget *widget,GdkEvent *event,gpointer userdata)
        guint year;
        guint month;
        guint day;
        char *string;

        /* Get the day highlighted on the Calendar widget */
        gtk_calendar_get_date((GtkCalendar *)lookup_widget(widget,"calendar1"),&year,&month,&day);

        sprintf(string,"%d %d %d\n",day,month,year);

        gtk_text_buffer_set_text(gtk_text_view_get_buffer((GtkTextView *)


It's just a test thingie ofcourse, but it's almost as if the signal never get's caught!
i tried to debug it but i got nowhere.
did i miss something maybe? 

oh, i used the signal day_select i believe in the glade file to signal on.
i'm also not quite sure if the lookup_widget() function is correctly used but since i can't use something
like GladeXML without using libglade i'm not sure.

i want to use libglade ofcourse but i'm trying to get this working first, then stripping it to rebuild it
using libglade. i got to many errors/flaky behaviour when not using the ide output, that's my fault ofcourse.

thanks for any input

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