← Back to team overview

deja-dup-team team mailing list archive

[Merge] ~jbicha/deja-dup:menus-gnome-3-32 into deja-dup:master

 

Jeremy Bicha has proposed merging ~jbicha/deja-dup:menus-gnome-3-32 into deja-dup:master.

Requested reviews:
  Déjà Dup Maintainers (deja-dup-team)

For more details, see:
https://code.launchpad.net/~jbicha/deja-dup/+git/deja-dup/+merge/360147

GNOME is removing its iconic app menu in the 3.32 release. So here's a merge request to update Deja Dup for the latest GNOME menu recommendations.

https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement
-- 
Your team Déjà Dup Maintainers is requested to review the proposed merge of ~jbicha/deja-dup:menus-gnome-3-32 into deja-dup:master.
diff --git a/data/resources.xml b/data/resources.xml
index 65e0375..b41d739 100644
--- a/data/resources.xml
+++ b/data/resources.xml
@@ -10,6 +10,5 @@
   </gresource>
   <gresource prefix="/org/gnome/DejaDup/gtk">
     <file compressed="true">help-overlay.ui</file>
-    <file compressed="true">menus.ui</file>
   </gresource>
 </gresources>
diff --git a/data/ui/menus.ui b/data/ui/menus.ui
deleted file mode 100644
index dcd5352..0000000
--- a/data/ui/menus.ui
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- -*- Mode: XML; indent-tabs-mode: nil; tab-width: 2 -*- -->
-<interface>
-  <menu id="app-menu">
-    <section>
-      <item>
-        <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
-        <attribute name="action">win.show-help-overlay</attribute>
-      </item>
-      <item>
-        <attribute name="label" translatable="yes">_Help</attribute>
-        <attribute name="action">app.help</attribute>
-      </item>
-      <item>
-        <attribute name="label" translatable="yes">_About</attribute>
-        <attribute name="action">app.about</attribute>
-      </item>
-      <item>
-        <attribute name="label" translatable="yes">_Quit</attribute>
-        <attribute name="action">app.quit</attribute>
-      </item>
-    </section>
-  </menu>
-</interface>
diff --git a/deja-dup/main.vala b/deja-dup/main.vala
index 8f2976b..e762a71 100644
--- a/deja-dup/main.vala
+++ b/deja-dup/main.vala
@@ -163,6 +163,16 @@ public class DejaDupApp : Gtk.Application
       header.show_close_button = true;
       main_window.set_titlebar(header);
 
+      var menu = new Menu ();
+      menu.append (_("_Keyboard Shortcuts"), "win.show-help-overlay");
+      menu.append (_("_Help"), "app.help");
+      menu.append (_("_About Backups"), "app.about");
+      var menu_button = new Gtk.MenuButton ();
+      menu_button.set_image (new Gtk.Image.from_icon_name ("open-menu-symbolic", Gtk.IconSize.BUTTON));
+      menu_button.show ();
+      menu_button.set_menu_model (menu);
+      header.pack_end(menu_button);
+
       var auto_switch = new DejaDup.PreferencesPeriodicSwitch();
       auto_switch.valign = Gtk.Align.CENTER;
       header.pack_end(auto_switch);
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3e8c68d..e16cfa3 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,7 +3,6 @@ data/org.gnome.DejaDup.desktop
 data/org.gnome.DejaDup.gschema.xml
 data/org.gnome.DejaDup.policy.in
 data/ui/help-overlay.ui
-data/ui/menus.ui
 data/ui/restore-missing.ui
 data/ui/server-hint.ui
 

Follow ups