[gnome-terminal] app: Only build app menu when there's a shell that will show it
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] app: Only build app menu when there's a shell that will show it
- Date: Thu, 3 May 2012 19:08:38 +0000 (UTC)
commit 44343a916a4739ef3c2d33444b06821994a728be
Author: Christian Persch <chpe gnome org>
Date: Thu May 3 20:59:39 2012 +0200
app: Only build app menu when there's a shell that will show it
This is a temporary workaround until the menubar is either gone or converted
to GMenu; otherwise the window will lose rows when opening more than one tab
at once.
src/terminal-app.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/terminal-app.c b/src/terminal-app.c
index b96cbdb..32efb7c 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -1159,11 +1159,16 @@ terminal_app_startup (GApplication *application)
GtkBuilder *builder;
GError *error = NULL;
+ gboolean shell_shows_app_menu;
G_APPLICATION_CLASS (terminal_app_parent_class)->startup (application);
/* FIXME: Is this the right place to do prefs migration from gconf->dconf? */
+ g_object_get (gtk_settings_get_for_screen (gdk_screen_get_default ()), "gtk-shell-shows-app-menu", &shell_shows_app_menu, NULL);
+ if (!shell_shows_app_menu)
+ return;
+
g_action_map_add_action_entries (G_ACTION_MAP (application),
app_menu_actions, G_N_ELEMENTS (app_menu_actions),
application);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]