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



commit 09a5e4f2609951705be62296d1a7d0e8febc2d62
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 |    6 +++++-
 src/application.js                          |    9 ---------
 2 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/data/org.gnome.Documents.data.gresource.xml b/data/org.gnome.Documents.data.gresource.xml
index e374424..9f6267e 100644
--- a/data/org.gnome.Documents.data.gresource.xml
+++ b/data/org.gnome.Documents.data.gresource.xml
@@ -2,7 +2,6 @@
 <gresources>
   <gresource prefix="/org/gnome/Documents">
     <file>application.css</file>
-    <file 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>
@@ -13,6 +12,11 @@
     <file alias="ui/thumbnail-frame.png" preprocess="to-pixdata">media/thumbnail-frame.png</file>
   </gresource>
   <gresource prefix="/org/gnome/Documents/gtk">
+    <file alias="menus.ui" preprocess="xml-stripblanks">ui/app-menu.ui</file>
+    <file alias="help-overlay.ui" preprocess="xml-stripblanks">ui/help-overlay.ui</file>
+  </gresource>
+  <gresource prefix="/org/gnome/Books/gtk">
+    <file alias="menus.ui" preprocess="xml-stripblanks">ui/app-menu.ui</file>
     <file alias="help-overlay.ui" preprocess="xml-stripblanks">ui/help-overlay.ui</file>
   </gresource>
 </gresources>
diff --git a/src/application.js b/src/application.js
index f7a7e75..4f583ee 100644
--- a/src/application.js
+++ b/src/application.js
@@ -333,14 +333,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;
 
@@ -651,7 +643,6 @@ const Application = new Lang.Class({
         }
 
         this._initActions();
-        this._initAppMenu();
     },
 
     _createWindow: function() {


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