GNOME Bugzilla – Bug 596019
No accesors for GtkDialog buttons
Last modified: 2009-10-13 00:10:16 UTC
There already are gtk_font_selection_dialog_get_ok_button (), but there is not accesor for the rest of Gtk*Dialog widgets As discussed in the IRC, the best solution would be add API for GtkDialog to return widgets by response ID: gtk_dialog_get_widget_for_response () Patch following
Created attachment 143761 [details] [review] Implementation of gtk_dialog_get_widget_for_response()
Created attachment 143762 [details] [review] Implementation of gtk_dialog_get_widget_for_response().v2 Sorry, here the correct patch. Fixed a small typo in the previous one
Looks like a nice addition to me. It spares us from adding accessors for all subclasses and at the same time can be used for third party dialogues as well. Note that Since should be 2.20, and maybe you want to use dialog->action_area directly since this is inside gtkdialog.c.
Created attachment 143805 [details] [review] Implementation of gtk_dialog_get_widget_for_response().v3 Reworked patch with the Christian comments: - Change since to 2.20 - Use dialog->action_area directly
Um, 2.18 was absolutely correct :)
2.18 was technically correct at the time the patch was uploaded, unfortunately it came out a day later.
Comment on attachment 143805 [details] [review] Implementation of gtk_dialog_get_widget_for_response().v3 commit 127033f83d309612bc3a386e2519c4d93ff882c1