infinite loop by toggle button



I made a toggle button to toggle visiblity of a dialog.

give signal handler of "toggled",
the callback check GTK_WIDGET_VISIBLE(dialog) to show or hide.
and set active button itself.

here is the trouble infinite.
1. click to toggle button.
2. callback comes up.
3. set active button itself.
4. the button face "toggle" signal.
5. infinite to 2.

how can I solve this problem?
I wanted to sync button's toggle status with visibility of dialog.
(if toggle is on, visible. if off, hidden)

thanks.



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