summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHari Rana <theevilskeleton@riseup.net>2023-02-09 19:55:00 -0500
committerHari Rana <theevilskeleton@riseup.net>2023-02-09 19:55:00 -0500
commit942a5ce3c8c3814758d672d52b431fbc9ddb878b (patch)
tree1887ae1e6856bc55d8aaaff633cd3615ed0f9d48
parent91c5e855e6deb7bdef2bef254ff6f4c419272279 (diff)
downloadgnome-contacts-942a5ce3c8c3814758d672d52b431fbc9ddb878b.tar.gz
primary-menu: Rename IDs and tooltip
This replaces the standard popover menu's ID to primary_menu, and renames the tooltip to "Main Menu" Per the GNOME HIG, the standard popover menu is called Primary Menu, and tooltip/accessibility label is "Main Menu" Source: https://developer.gnome.org/hig/patterns/controls/menus.html#primary-menus
-rw-r--r--data/ui/contacts-main-window.ui8
-rw-r--r--src/contacts-main-window.vala4
2 files changed, 6 insertions, 6 deletions
diff --git a/data/ui/contacts-main-window.ui b/data/ui/contacts-main-window.ui
index 3d01bdc..1b2cd6b 100644
--- a/data/ui/contacts-main-window.ui
+++ b/data/ui/contacts-main-window.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <menu id="hamburger_menu_popover">
+ <menu id="primary_menu_popover">
<section>
<attribute name="label" translatable="yes">List Contacts By:</attribute>
<item>
@@ -86,10 +86,10 @@
</child>
<child type="end">
- <object class="GtkMenuButton" id="hamburger_menu_button">
- <property name="menu-model">hamburger_menu_popover</property>
+ <object class="GtkMenuButton" id="primary_menu_button">
+ <property name="menu-model">primary_menu_popover</property>
<property name="primary">True</property>
- <property name="tooltip_text" translatable="yes">Menu</property>
+ <property name="tooltip_text" translatable="yes">Main Menu</property>
<property name="icon-name">open-menu-symbolic</property>
</object>
</child>
diff --git a/src/contacts-main-window.vala b/src/contacts-main-window.vala
index 4ba5480..0d62184 100644
--- a/src/contacts-main-window.vala
+++ b/src/contacts-main-window.vala
@@ -66,7 +66,7 @@ public class Contacts.MainWindow : Adw.ApplicationWindow {
[GtkChild]
private unowned Gtk.Button select_cancel_button;
[GtkChild]
- private unowned Gtk.MenuButton hamburger_menu_button;
+ private unowned Gtk.MenuButton primary_menu_button;
[GtkChild]
private unowned Gtk.Box contact_sheet_buttons;
[GtkChild]
@@ -197,7 +197,7 @@ public class Contacts.MainWindow : Adw.ApplicationWindow {
private void on_ui_state_changed (Object obj, ParamSpec pspec) {
// UI when we're not editing of selecting stuff
this.add_button.visible
- = this.hamburger_menu_button.visible
+ = this.primary_menu_button.visible
= (this.state == UiState.NORMAL || this.state == UiState.SHOWING);
// UI when showing a contact