[gnome-documents] Let GtkApplication load the app menu automatically



commit 0c0f72d22d695a97f663c79d689fe6fb4c4b1cbe
Author: Neha Yadav <inehayadav28 gmail com>
Date:   Tue Mar 8 16:21:19 2016 +0530

    Let GtkApplication load the app menu automatically
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746736

 data/org.gnome.Documents.data.gresource.xml |    2 +-
 src/application.js                          |    9 ---------
 2 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/data/org.gnome.Documents.data.gresource.xml b/data/org.gnome.Documents.data.gresource.xml
index e374424..aa1a37e 100644
--- a/data/org.gnome.Documents.data.gresource.xml
+++ b/data/org.gnome.Documents.data.gresource.xml
@@ -2,7 +2,7 @@
 <gresources>
   <gresource prefix="/org/gnome/Documents">
     <file>application.css</file>
-    <file preprocess="xml-stripblanks">ui/app-menu.ui</file>
+    <file alias="gtk/menus.ui" preprocess="xml-stripblanks">ui/app-menu.ui</file>
     <file preprocess="xml-stripblanks">ui/organize-collection-dialog.ui</file>
     <file preprocess="xml-stripblanks">ui/preview-context-menu.ui</file>
     <file preprocess="xml-stripblanks">ui/preview-menu.ui</file>
diff --git a/src/application.js b/src/application.js
index 843626c..284d44a 100644
--- a/src/application.js
+++ b/src/application.js
@@ -336,14 +336,6 @@ const Application = new Lang.Class({
             }));
     },
 
-    _initAppMenu: function() {
-        let builder = new Gtk.Builder();
-        builder.add_from_resource('/org/gnome/Documents/ui/app-menu.ui');
-
-        let menu = builder.get_object('app-menu');
-        this.set_app_menu(menu);
-    },
-
     _createMiners: function(callback) {
         let count = 3;
 
@@ -648,7 +640,6 @@ const Application = new Lang.Class({
         ];
 
         this._initActions();
-        this._initAppMenu();
 
         if (!this.isBooks)
             this._initGettingStarted();


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