[gnome-contacts/wip/nielsdg/a11y-mnemonics] window: Add mnemonics when creating a new contact
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/wip/nielsdg/a11y-mnemonics] window: Add mnemonics when creating a new contact
- Date: Sun, 29 Nov 2020 16:32:12 +0000 (UTC)
commit b86c606eafd338787fb43c2911894cb9d1f2a476
Author: Niels De Graef <nielsdegraef gmail com>
Date: Sun Nov 29 17:30:59 2020 +0100
window: Add mnemonics when creating a new contact
Fixes https://gitlab.gnome.org/GNOME/gnome-contacts/-/issues/129
data/ui/contacts-window.ui | 3 ++-
src/contacts-window.vala | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/contacts-window.ui b/data/ui/contacts-window.ui
index aa858e80..137fe68d 100644
--- a/data/ui/contacts-window.ui
+++ b/data/ui/contacts-window.ui
@@ -276,7 +276,8 @@
<property name="visible">False</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
- <property name="label" translatable="yes">Cancel</property>
+ <property name="label" translatable="yes">_Cancel</property>
+ <property name="use_underline">True</property>
<property name="width_request">70</property>
<property name="valign">center</property>
<signal name="notify::visible" handler="on_cancel_visible" object="ContactsWindow"
after="yes" swapped="no"/>
diff --git a/src/contacts-window.vala b/src/contacts-window.vala
index fc3f44e1..274baef1 100644
--- a/src/contacts-window.vala
+++ b/src/contacts-window.vala
@@ -234,7 +234,8 @@ public class Contacts.Window : Hdy.ApplicationWindow {
= this.done_button.visible
= this.state.editing ();
if (this.state.editing ()) {
- this.done_button.label = (this.state == UiState.CREATING)? _("Add") : _("Done");
+ this.done_button.use_underline = true;
+ this.done_button.label = (this.state == UiState.CREATING)? _("_Add") : _("Done");
// Cast is required because Gtk.Button.set_focus_on_click is deprecated and
// we have to use Gtk.Widget.set_focus_on_click instead
((Gtk.Widget) this.done_button).set_focus_on_click (true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]