After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 596019 - No accesors for GtkDialog buttons
No accesors for GtkDialog buttons
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.17.x
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 594716 597610
 
 
Reported: 2009-09-22 23:26 UTC by Javier Jardón (IRC: jjardon)
Modified: 2009-10-13 00:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Implementation of gtk_dialog_get_widget_for_response() (2.90 KB, patch)
2009-09-22 23:36 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Implementation of gtk_dialog_get_widget_for_response().v2 (2.90 KB, patch)
2009-09-22 23:53 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Implementation of gtk_dialog_get_widget_for_response().v3 (2.88 KB, patch)
2009-09-23 15:03 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review

Description Javier Jardón (IRC: jjardon) 2009-09-22 23:26:05 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
Comment 1 Javier Jardón (IRC: jjardon) 2009-09-22 23:36:13 UTC
Created attachment 143761 [details] [review]
Implementation of gtk_dialog_get_widget_for_response()
Comment 2 Javier Jardón (IRC: jjardon) 2009-09-22 23:53:13 UTC
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
Comment 3 Christian Dywan 2009-09-23 13:23:28 UTC
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.
Comment 4 Javier Jardón (IRC: jjardon) 2009-09-23 15:03:52 UTC
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
Comment 5 Michael Natterer 2009-09-24 08:55:58 UTC
Um, 2.18 was absolutely correct :)
Comment 6 Christian Dywan 2009-09-24 09:05:28 UTC
2.18 was technically correct at the time the patch was uploaded, unfortunately it came out a day later.
Comment 7 Javier Jardón (IRC: jjardon) 2009-10-12 15:22:26 UTC
Comment on attachment 143805 [details] [review]
Implementation of gtk_dialog_get_widget_for_response().v3

commit 127033f83d309612bc3a386e2519c4d93ff882c1