[polari] mainWindow: Never show fallback app menu
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] mainWindow: Never show fallback app menu
- Date: Mon, 16 Jul 2018 19:52:24 +0000 (UTC)
commit 7f0a16a47bc9a0d06fb01d726e8bede4c47a5604
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Jul 16 01:57:45 2018 +0200
mainWindow: Never show fallback app menu
Now that the app menu's action have been moved inside the window and
the menu is only kept around to have GNOME's fallback work correctly,
there is no need for GTK's fallback menu under shells that don't
show the app menu, so filter it out from the decoration layout.
https://gitlab.gnome.org/GNOME/polari/merge_requests/50
src/mainWindow.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 9fc14dc..10ec5b9 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -280,6 +280,10 @@ var MainWindow = GObject.registerClass({
this._roomListRevealer.reveal_child = hasAccounts;
}
+ _filterFallbackAppMenu(layoutStr) {
+ return layoutStr.split(',').filter(s => s != 'menu').join(',');
+ }
+
_updateDecorations() {
let layoutLeft = null;
let layoutRight = null;
@@ -288,8 +292,8 @@ var MainWindow = GObject.registerClass({
if (layout) {
let split = layout.split(':');
- layoutLeft = split[0] + ':';
- layoutRight = ':' + split[1];
+ layoutLeft = this._filterFallbackAppMenu(split[0]) + ':';
+ layoutRight = ':' + this._filterFallbackAppMenu(split[1]);
}
this._titlebarLeft.set_decoration_layout(layoutLeft);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]