GTK+ 2.0, one button affecting another



Hello, In my application I have two buttons, normal and toggle, what I want 
is when I press the normal button the toggle button would be released. Here 
is the signal and callback function

g_signal_connect_swapped(GTK_OBJECT(button), "clicked", 
G_CALLBACK(button_callback), G_OBJECT(toggle));

void button_callback(gpointer data, GtkWidget *widget)
{
if (active)
{
gtk_toggle_button_set_active(G_OBJECT(widget), FALSE);
active = FALSE;
g_print("Button is not active\n");
}
}

The thing is the program works but I get a warning when compiling:

warning passing arg 1 of 'gtk_toggle_button_set_active' from incompatible 
pointer type

Sorry but I'm very new to GTK
~flood



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