diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2013-04-18 13:10:40 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2013-04-18 14:20:28 +0200 |
commit | 464f13f2c6be53d0abc51ea4242e5b5c63ad1505 (patch) | |
tree | 949f4e9699ffcb1597176fe84369a17b295c4057 | |
parent | a62ea7584cd9b77a8a963649c827495e2f87c5df (diff) |
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
-rw-r--r-- | src/wizard.vala | 4 |
1 files changed, 4 insertions, 0 deletions
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", |