Passing Struct to g_signal_connect

I need to pass a struct using g_signal_connect, but the issue I'm having is
that I can't alter the elements of the struct within the called function

void on_button2_clicked (struct allStructs *by_ptr)

        gtk_label_set_text ((GtkLabel*)by_ptr->widgets.label, "whatever");

blah blah
struct allStructs baseStruct;

g_signal_connect (G_OBJECT(baseStruct.widgets.nextButton), "clicked",
G_CALLBACK (on_button2_clicked), &baseStruct);

Any idea's? If I pass this struct to any other function I have no problem
performing functions like in the callback. For some reason, I can't in the

View this message in context:
Sent from the Gtk+ - Apps Dev mailing list archive at

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