[gnome-documents] Revert "Let GtkApplication load the app menu automatically"
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] Revert "Let GtkApplication load the app menu automatically"
- Date: Tue, 31 May 2016 17:27:24 +0000 (UTC)
commit 1a6c032641a7f76a3392c11b73a6ea7695213c47
Author: Bastien Nocera <hadess hadess net>
Date: Tue May 31 19:26:17 2016 +0200
Revert "Let GtkApplication load the app menu automatically"
This reverts commit 0c0f72d22d695a97f663c79d689fe6fb4c4b1cbe.
This broke the app menu in gnome-books.
See https://bugzilla.gnome.org/show_bug.cgi?id=746736#c12
data/org.gnome.Documents.data.gresource.xml | 2 +-
src/application.js | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/data/org.gnome.Documents.data.gresource.xml b/data/org.gnome.Documents.data.gresource.xml
index aa1a37e..e374424 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 alias="gtk/menus.ui" preprocess="xml-stripblanks">ui/app-menu.ui</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>
diff --git a/src/application.js b/src/application.js
index b146c25..e2c68b4 100644
--- a/src/application.js
+++ b/src/application.js
@@ -330,6 +330,14 @@ 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;
@@ -634,6 +642,7 @@ 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]