Re: gtk_toggle_button_get_active() error in clicked event?



Hi.

> void on_element_clicked (GtkButton *button, gpointer user_data) {
>    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button))) {
>        g_warning("good");
>    }
>    else {
>        g_warning("wrong");
>    }
> }
>
> If clicked element is toggled, output: "good". But if clicked element
> is not toggled, output: "wrong" and "good". Why running twice? This is
> GTK+ bug?

I already responded to your query here[1], but you failed to provide
any additional information about it. So I'm asking again, what exactly
are you doing when user clicks on toggle button? Are you performing
any kind of checks and set the state of toggle button according to the
result?

Tadej

[1] http://gtkforums.com/viewtopic.php?t=6322

-- 
Tadej Borovšak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com


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