[gnome-terminal] window: Allow debugging the appmenu



commit bef228a045505f36818f2777249cd4c66a932cb1
Author: Christian Persch <chpe gnome org>
Date:   Fri Jun 7 19:57:13 2013 +0200

    window: Allow debugging the appmenu
    
    Add GNOME_TERMINAL_DEBUG=appmenu to make the app menu show up on fallback mode.

 src/terminal-debug.c  |    1 +
 src/terminal-debug.h  |    3 ++-
 src/terminal-window.c |    4 ++++
 3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/terminal-debug.c b/src/terminal-debug.c
index 4657291..c525cdf 100644
--- a/src/terminal-debug.c
+++ b/src/terminal-debug.c
@@ -36,6 +36,7 @@ _terminal_debug_init(void)
     { "processes",     TERMINAL_DEBUG_PROCESSES     },
     { "profile",       TERMINAL_DEBUG_PROFILE       },
     { "settings-list", TERMINAL_DEBUG_SETTINGS_LIST },
+    { "appmenu",       TERMINAL_DEBUG_APPMENU       },
   };
 
   _terminal_debug_flags = g_parse_debug_string (g_getenv ("GNOME_TERMINAL_DEBUG"),
diff --git a/src/terminal-debug.h b/src/terminal-debug.h
index b5bb792..aec9c54 100644
--- a/src/terminal-debug.h
+++ b/src/terminal-debug.h
@@ -32,7 +32,8 @@ typedef enum {
   TERMINAL_DEBUG_MDI           = 1 << 4,
   TERMINAL_DEBUG_PROCESSES     = 1 << 5,
   TERMINAL_DEBUG_PROFILE       = 1 << 6,
-  TERMINAL_DEBUG_SETTINGS_LIST = 1 << 7
+  TERMINAL_DEBUG_SETTINGS_LIST = 1 << 7,
+  TERMINAL_DEBUG_APPMENU       = 1 << 8
 } TerminalDebugFlags;
 
 void _terminal_debug_init(void);
diff --git a/src/terminal-window.c b/src/terminal-window.c
index c863f43..80c9f16 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2048,7 +2048,11 @@ terminal_window_new (GApplication *app)
 {
   return g_object_new (TERMINAL_TYPE_WINDOW,
                        "application", app,
+#ifdef GNOME_ENABLE_DEBUG
+                       "show-menubar", _terminal_debug_on (TERMINAL_DEBUG_APPMENU),
+#else
                        "show-menubar", FALSE,
+#endif
                        NULL);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]