[gnome-terminal] app: Revise the logic for having an appmenu
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] app: Revise the logic for having an appmenu
- Date: Mon, 5 Feb 2018 13:39:33 +0000 (UTC)
commit f997189bfa6a8753e5886f1bb545b3a5465591cb
Author: Egmont Koblinger <egmont gmail com>
Date: Mon Feb 5 14:33:56 2018 +0100
app: Revise the logic for having an appmenu
Display the appmenu as the 4th window decoration button in GNOME Shell,
when the shell doesn't show the appmenu. This was accidentally gone with
the GMenu port.
Don't have an appmenu in Unity where the shell displays both the appmenu
and the menubar, the appmenu is pointless in this case.
https://bugzilla.gnome.org/show_bug.cgi?id=793135
src/terminal-app.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/terminal-app.c b/src/terminal-app.c
index 4af540b..f820d2b 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -727,8 +727,10 @@ terminal_app_startup (GApplication *application)
/* Install the encodings submenu */
terminal_encodings_append_menu (app->menubar_set_encoding_submenu);
- /* Show/hide the appmenu/menubar as appropriate */
- if (!shell_shows_appmenu)
+ /* Show/hide the appmenu/menubar as appropriate:
+ * If the shell wants to show the menubar, make it available.
+ * If the shell wants to show both the appmenu and the menubar, there's no need for the appmenu. */
+ if (shell_shows_appmenu && shell_shows_menubar)
gtk_application_set_app_menu (GTK_APPLICATION (app), NULL);
if (shell_shows_menubar)
gtk_application_set_menubar (GTK_APPLICATION (app), app->menubar);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]