|
Hi,
I am trying to save the text from a button when it is clicked.
I attach the event like this..
g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK (FlagClicked), window);
void FlagClicked(GtkWidget *widget, gpointer data)
{
SaveToPreferences("Setup","Language",gtk_button_get_label(GTK_BUTTON(widget)));
}
To check the text I added the line..
g_printf("Button text %s\r\n",gtk_button_get_label(GTK_BUTTON(widget)));
This prints "Button text (null)"
I would appreciate some pointers on where Iam going wrong ? Why can't I access the button text.
|