[gtk+/composite-templates] Fix mnemonic activation for some printer option widgets
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/composite-templates] Fix mnemonic activation for some printer option widgets
- Date: Fri, 14 Sep 2012 21:23:43 +0000 (UTC)
commit d92a7fca25a7b7a0d3b5b13c8d3bd96abb4e52f6
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Aug 31 22:44:45 2012 -0400
Fix mnemonic activation for some printer option widgets
The file type radio group has a mnemonic on its label, but
activating it did not work, since GtkPrinterOptionWidget did
not know to forward the activation to one of the buttons.
gtk/gtkprinteroptionwidget.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkprinteroptionwidget.c b/gtk/gtkprinteroptionwidget.c
index a62fd0c..44c54ad 100644
--- a/gtk/gtkprinteroptionwidget.c
+++ b/gtk/gtkprinteroptionwidget.c
@@ -826,11 +826,16 @@ construct_widgets (GtkPrinterOptionWidget *widget)
gtk_widget_show (priv->box);
gtk_box_pack_start (GTK_BOX (widget), priv->box, TRUE, TRUE, 0);
for (i = 0; i < source->num_choices; i++)
- group = alternative_append (priv->box,
- source->choices_display[i],
- source->choices[i],
- widget,
- group);
+ {
+ group = alternative_append (priv->box,
+ source->choices_display[i],
+ source->choices[i],
+ widget,
+ group);
+ /* for mnemonic activation */
+ if (i == 0)
+ priv->button = group->data;
+ }
if (source->display_text)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]