[gnome-terminal] app: Remove app menu
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] app: Remove app menu
- Date: Fri, 2 Nov 2018 17:41:56 +0000 (UTC)
commit 4b9f6d398d1f37fd9031a916d0782be1d33fa36d
Author: Egmont Koblinger <egmont gmail com>
Date: Fri Nov 2 18:41:36 2018 +0100
app: Remove app menu
https://gitlab.gnome.org/GNOME/gnome-terminal/issues/39
org.gnome.Terminal.appdata.xml.in | 1 -
po/POTFILES.in | 1 -
src/Makefile.am | 1 -
src/terminal-app.c | 20 +++++--------------
src/terminal-appmenu.ui | 42 ---------------------------------------
src/terminal.gresource.xml | 1 -
6 files changed, 5 insertions(+), 61 deletions(-)
---
diff --git a/org.gnome.Terminal.appdata.xml.in b/org.gnome.Terminal.appdata.xml.in
index 80780512..31aaa302 100644
--- a/org.gnome.Terminal.appdata.xml.in
+++ b/org.gnome.Terminal.appdata.xml.in
@@ -45,7 +45,6 @@
<screenshot
type="default">https://help.gnome.org/users/gnome-terminal/stable/figures/gnome-terminal.png</screenshot>
</screenshots>
<kudos>
- <kudo>AppMenu</kudo>
<kudo>HiDpiIcon</kudo>
<kudo>HighContrast</kudo>
<kudo>ModernToolkit</kudo>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1fe13a18..fb4e696c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -11,7 +11,6 @@ src/profile-editor.c
src/server.c
src/terminal-accels.c
src/terminal-app.c
-[type: gettext/glade]src/terminal-appmenu.ui
src/terminal.c
src/terminal-encoding.c
src/terminal-mdi-container.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 29e6c4de..f8f2c8e7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -325,7 +325,6 @@ CLEANFILES = \
EXTRA_DIST = \
terminal.about \
- terminal-appmenu.ui \
terminal-menubar.ui.in \
terminal-notebook-menu.ui \
terminal-window.ui \
diff --git a/src/terminal-app.c b/src/terminal-app.c
index f8e290d5..be39e6e3 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -558,7 +558,8 @@ clipboard_owner_change_cb (GtkClipboard *clipboard,
app);
}
-/* App menu callbacks */
+/* Callbacks from former app menu.
+ * The preferences one is still used with the "--preferences" cmdline option. */
static void
app_menu_preferences_cb (GSimpleAction *action,
@@ -617,7 +618,6 @@ static void
terminal_app_startup (GApplication *application)
{
TerminalApp *app = TERMINAL_APP (application);
- GtkApplication *gtk_application = GTK_APPLICATION (application);
const GActionEntry action_entries[] = {
{ "preferences", app_menu_preferences_cb, NULL, NULL, NULL },
{ "help", app_menu_help_cb, NULL, NULL, NULL },
@@ -638,18 +638,12 @@ terminal_app_startup (GApplication *application)
app_load_css (application);
- /* Figure out whether the shell shows appmenu/menubar */
- gboolean shell_shows_appmenu, shell_shows_menubar;
+ /* Figure out whether the shell shows the menubar */
+ gboolean shell_shows_menubar;
g_object_get (gtk_settings_get_default (),
- "gtk-shell-shows-app-menu", &shell_shows_appmenu,
"gtk-shell-shows-menubar", &shell_shows_menubar,
NULL);
- /* App menu */
- GMenu *appmenu_new_terminal_section = gtk_application_get_menu_by_id (gtk_application,
- "new-terminal-section");
- fill_new_terminal_section (app, appmenu_new_terminal_section, NULL, 0); /* no submenu */
-
/* Menubar */
/* If the menubar is shown by the shell, omit mnemonics for the submenus. This is because Alt+F etc.
* are more important to be usable in the terminal, the menu cannot be replaced runtime (to toggle
@@ -676,11 +670,7 @@ 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 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);
+ /* Show/hide the menubar as appropriate: If the shell wants to show the menubar, make it available. */
if (shell_shows_menubar)
gtk_application_set_menubar (GTK_APPLICATION (app), app->menubar);
diff --git a/src/terminal.gresource.xml b/src/terminal.gresource.xml
index 7b84a5f7..f408877f 100644
--- a/src/terminal.gresource.xml
+++ b/src/terminal.gresource.xml
@@ -18,7 +18,6 @@
<gresources>
<gresource prefix="/org/gnome/terminal">
<file alias="css/terminal.css" compressed="true">terminal.common.css</file>
- <file alias="gtk/menus.ui" compressed="true" preprocess="xml-stripblanks">terminal-appmenu.ui</file>
<file alias="ui/menubar-with-mnemonics.ui" compressed="true"
preprocess="xml-stripblanks">terminal-menubar-with-mnemonics.ui</file>
<file alias="ui/menubar-without-mnemonics.ui" compressed="true"
preprocess="xml-stripblanks">terminal-menubar-without-mnemonics.ui</file>
<file alias="ui/notebook-menu.ui" compressed="true"
preprocess="xml-stripblanks">terminal-notebook-menu.ui</file>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]