I had a similar problem and solved it with "gtk_toggle_button_get_active(GTK_TOOGLE_BUTTON(radio))".   When I pressed a radio button, the former active button would call the callback as well as the new active button would call the callback. Inside my callback use the argument given to gtk_signal_connect()  to see if the callback was called by the active button.  This way I only execute code for the new active button.

I don't know if thats the best way to handle the problem, but it works.

Bill

Jeff Shipman wrote:

Whenever you click a radio button that has not been depressed,
it causes its callback to be executed twice. This can cause
problems with stuff like logging when this callback is called
because I only want things to be logged once rather than
twice. The only thing I've thought of is setting a static
variable and using the value of that to determine whether
to really log or not. This seems rather kludgy to me and
I was wondering if anybody has a better idea?

--
+-----------------------------------------------------+
| Jeff "Shippy" Shipman     E-Mail: [EMAIL PROTECTED] |
| Computer Science Major    ICQ: 1786493              |
| New Mexico Institute of Mining and Technology       |
| Homepage: http://www.nmt.edu/~shippy                |
+-----------------------------------------------------+

--
To unsubscribe: mail -s unsubscribe [EMAIL PROTECTED] < /dev/null

 
-- 
Bill Smith [EMAIL PROTECTED] 215-323-2074
There are 2 Bill Smith's working at GI.
* Please use correct email addr, and phone #. *
 

Reply via email to