GNOME Bugzilla – Bug 624540
GtkRadionAction loop in its activate handler
Last modified: 2010-07-19 13:17:47 UTC
Created attachment 166023 [details] [review] define and use a GtkToggleAction "direct" set instead of emitting unwillingly and event Since commit 3ce68cd5dea2f720f01f9e30dc7289a4a628a4f9 "Use accessor functions to access GtkToggleAction" the Radio action activate is broken. Ie it is based on the assumption that the GtkToggleAction "set" does set the value not emit an event that calls the GtkAction activate handler (which here is not gtk_toggle action activate but the caller , ie gtk radio action activate. Thus this loops. I made this locally as reverting to the old way is not possible (ie the structure of toggle_action is now opaque. That is define a GtkToggleAction "direct" set .
Created attachment 166027 [details] [review] Add _gtk_toggle_action_set_active() internal function Another solution similar to the solution proposed in bug #624432
Review of attachment 166027 [details] [review]: it could be replaced by a flag inside GtkRadioAction, in order to check for cycles. as a stop-gap solution, though, it makes more sense to have a private internal setter. ::: gtk/gtktoggleaction.c @@ +369,3 @@ +void + + can you please document this internal setter? something like: /* * _gtk_toggle_action_set_active: * @toggle_action: a #GtkToggleAction * @is_active: whether the action is active or not * * Sets the :active property directly. This function does * not emit signals or notifications: it is left to the * caller to do so. */
Comment on attachment 166027 [details] [review] Add _gtk_toggle_action_set_active() internal function committed with your comments commit 1bfa931e2033e81d226483394a90cbbbe33a92b1
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.