[Glade-users] signal not used in callback?



On Sun, 2004-02-22 at 20:34, Alef T Veld wrote:
Hello,

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);
        printf("%s\n",string);
        g_warning(string);

        gtk_text_buffer_set_text(gtk_text_view_get_buffer((GtkTextView *)
        lookup_widget(widget,"textview7")),string,-1);

      }

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? 

I've just tries using the "day_selected" signal and it worked fine.

Check that the signal is being connected in interface.c.

Damon






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