app, menus: add new menu item Debug -> Start GtkInspector

so it can by launchaed at any time even if not requested via
GTK_DEBUG=interactive and without enabling the magic keyboard
shortcut.
This commit is contained in:
Michael Natterer 2018-06-20 20:43:41 +02:00
parent 52204b74b1
commit 669127dbd6
4 changed files with 16 additions and 0 deletions

View file

@ -36,6 +36,11 @@ static const GimpActionEntry debug_actions[] =
{
{ "debug-menu", NULL, "_Debug" },
{ "debug-gtk-inspector", NULL,
"Start _GtkInspector", NULL, NULL,
G_CALLBACK (debug_gtk_inspector_cmd_callback),
NULL },
{ "debug-mem-profile", NULL,
"_Memory Profile", NULL, NULL,
G_CALLBACK (debug_mem_profile_cmd_callback),

View file

@ -70,6 +70,13 @@ static gboolean debug_accel_find_func (GtkAccelKey *key,
/* public functions */
void
debug_gtk_inspector_cmd_callback (GtkAction *action,
gpointer data)
{
gtk_window_set_interactive_debugging (TRUE);
}
void
debug_mem_profile_cmd_callback (GtkAction *action,
gpointer data)

View file

@ -19,6 +19,8 @@
#define __DEBUG_COMMANDS_H__
void debug_gtk_inspector_cmd_callback (GtkAction *action,
gpointer data);
void debug_mem_profile_cmd_callback (GtkAction *action,
gpointer data);
void debug_benchmark_projection_cmd_callback (GtkAction *action,

View file

@ -25,6 +25,8 @@
<!-- The debug-menu is hidden by default for stable releases -->
<menu action="debug-menu" name="Debug">
<menuitem action="debug-gtk-inspector" />
<separator />
<menuitem action="debug-mem-profile" />
<menuitem action="debug-benchmark-projection" />
<menuitem action="debug-show-image-graph" />