[gnome-boxes] Make sure wizard buttons use underlined chars



commit 41e9cb50a8fd10e401f0be4787dec5be011f4e59
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Thu Apr 18 13:10:40 2013 +0200

    Make sure wizard buttons use underlined chars
    
    Because of libgd bgo#698289, creating a button with a label containing a
    "_" and setting use_underline to TRUE afterwards don't make
    GdHeadersimpleButton reinterpret the label to remove the '_' character
    and use it as an underline mark.
    
    Setting the label to the value it already has right after setting
    use_underline works around this issue.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698287

 src/wizard.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/wizard.vala b/src/wizard.vala
index d664ed4..f748e03 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -648,6 +648,7 @@ private class Boxes.Wizard: Boxes.UI {
         toolbar_sizegroup = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
         cancel_button = toolbar.add_button (null, _("_Cancel"), true) as Gtk.Button;
         cancel_button.use_underline = true;
+        cancel_button.label = _("_Cancel");
         cancel_button.clicked.connect (() => {
             destroy_machine ();
             wizard_source.page = SourcePage.MAIN;
@@ -657,6 +658,7 @@ private class Boxes.Wizard: Boxes.UI {
 
         back_button = toolbar.add_button (null, _("_Back"), false) as Gtk.Button;
         back_button.use_underline = true;
+        back_button.label = _("_Back");
         back_button.clicked.connect (() => {
             page = page - 1;
         });
@@ -664,6 +666,7 @@ private class Boxes.Wizard: Boxes.UI {
 
         continue_button = toolbar.add_button (null, _("C_ontinue"), false) as Gtk.Button;
         continue_button.use_underline = true;
+        continue_button.label = _("C_ontinue");
         continue_button.get_style_context ().add_class ("boxes-continue");
         continue_button.bind_property ("sensitive",
                                        continue_button, "has-focus",
@@ -675,6 +678,7 @@ private class Boxes.Wizard: Boxes.UI {
 
         create_button = toolbar.add_button (null, _("C_reate"), false) as Gtk.Button;
         create_button.use_underline = true;
+        create_button.label = _("C_reate");
         create_button.get_style_context ().add_class ("boxes-continue");
         create_button.bind_property ("sensitive",
                                      create_button, "has-focus",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]