[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: Thu, 24 Jan 2019 18:35:34 +0000 (UTC)
commit f8ce007810950a0953d3d55bfe8675a74238b4d9
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/53
src/mainWindow.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 560521b..c016703 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -249,6 +249,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;
@@ -257,8 +261,8 @@ var MainWindow = GObject.registerClass({
if (layout) {
let [buttonsLeft, buttonsRight] = layout.split(':');
- layoutLeft = `${buttonsLeft}:`;
- layoutRight = `:${buttonsRight}`;
+ layoutLeft = `${this._filterFallbackAppMenu(buttonsLeft)}:`;
+ layoutRight = `:${this._filterFallbackAppMenu(buttonsRight)}`;
}
this._titlebarLeft.set_decoration_layout(layoutLeft);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]