GNOME Bugzilla – Bug 373279
Toggling a GtkToggleButton emits "clicked", not "toggled"
Last modified: 2012-08-14 11:45:07 UTC
The docs claim that calling gtk_toggle_button_set_active() causes a "toggled" event, while the "clicked" event defined on GtkButton is only caused by the button being pressed and released. In reality, gtk_toggle_button_set_active() does emit a "clicked" event:
+ Trace 84974
The explanation is at best rather misleading. Also, this means (AFAICT) that there is no nice way to programmatically toggle a button without getting an event for it -- I was hoping "clicked" would allow me that.
Created attachment 208034 [details] [review] document clicked signal and fix example I chatted to Ryan about this, and he said that it was not possible to change the behaviour without breaking API, so both the clicked and the toggled signals are emitted by gtk_toggle_button_set_active(). I added some extra markup so that the toggled signal is linked in the description, and added that the clicked signal is emitted, making this a bit more obvious. Additionally, I fixed the example code.
Review of attachment 208034 [details] [review]: There appears to be some unrelated things tucked into this patch. The docs part looks good, though.
Created attachment 213431 [details] [review] clarify action signals
Comment on attachment 213431 [details] [review] clarify action signals Pushed to master as commit 9d11da702b6ead8027456a107b879499ba84fcd9.