2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2003-01-11 01:55:53 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2003-01-11 01:55:53 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2003-01-11 01:55:53 +08:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-07-12 05:27:07 +08:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2003-01-11 01:55:53 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
2008-10-19 15:59:08 +08:00
|
|
|
#include <gegl.h>
|
2003-01-11 01:55:53 +08:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
#include "libgimpbase/gimpbase.h"
|
|
|
|
|
2004-04-20 21:25:55 +08:00
|
|
|
#include "actions-types.h"
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2006-09-06 05:36:20 +08:00
|
|
|
#include "core/gimp.h"
|
2010-06-07 02:24:27 +08:00
|
|
|
#include "core/gimp-utils.h"
|
2006-09-06 05:36:20 +08:00
|
|
|
#include "core/gimpcontext.h"
|
2008-10-19 15:59:08 +08:00
|
|
|
#include "core/gimpimage.h"
|
2009-02-24 04:43:30 +08:00
|
|
|
#include "core/gimpprojectable.h"
|
2014-06-03 03:32:00 +08:00
|
|
|
#include "core/gimpprojection.h"
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2009-02-24 04:43:30 +08:00
|
|
|
#include "gegl/gimp-gegl-utils.h"
|
|
|
|
|
2009-05-08 23:40:13 +08:00
|
|
|
#include "widgets/gimpaction.h"
|
2003-01-11 01:55:53 +08:00
|
|
|
#include "widgets/gimpmenufactory.h"
|
2004-05-05 23:54:42 +08:00
|
|
|
#include "widgets/gimpuimanager.h"
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2014-05-03 02:20:46 +08:00
|
|
|
#include "display/gimpdisplay.h"
|
|
|
|
#include "display/gimpdisplayshell.h"
|
|
|
|
#include "display/gimpimagewindow.h"
|
|
|
|
|
2004-05-06 15:41:53 +08:00
|
|
|
#include "menus/menus.h"
|
|
|
|
|
2005-06-27 17:56:25 +08:00
|
|
|
#include "actions.h"
|
2003-01-11 01:55:53 +08:00
|
|
|
#include "debug-commands.h"
|
|
|
|
|
|
|
|
|
|
|
|
/* local function prototypes */
|
|
|
|
|
2014-06-03 03:32:00 +08:00
|
|
|
static gboolean debug_benchmark_projection (GimpDisplay *display);
|
2009-05-08 23:40:13 +08:00
|
|
|
static gboolean debug_show_image_graph (GimpImage *source_image);
|
|
|
|
|
|
|
|
static void debug_dump_menus_recurse_menu (GtkWidget *menu,
|
|
|
|
gint depth,
|
|
|
|
gchar *path);
|
2008-11-15 20:43:18 +08:00
|
|
|
|
2009-05-08 23:40:13 +08:00
|
|
|
static void debug_print_qdata (GimpObject *object);
|
|
|
|
static void debug_print_qdata_foreach (GQuark key_id,
|
|
|
|
gpointer data,
|
|
|
|
gpointer user_data);
|
2008-11-15 20:43:18 +08:00
|
|
|
|
2009-05-08 23:40:13 +08:00
|
|
|
static gboolean debug_accel_find_func (GtkAccelKey *key,
|
|
|
|
GClosure *closure,
|
|
|
|
gpointer data);
|
2003-01-11 01:55:53 +08:00
|
|
|
|
|
|
|
|
|
|
|
/* public functions */
|
|
|
|
|
2018-06-21 02:43:41 +08:00
|
|
|
void
|
|
|
|
debug_gtk_inspector_cmd_callback (GtkAction *action,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
gtk_window_set_interactive_debugging (TRUE);
|
|
|
|
}
|
|
|
|
|
2004-05-05 23:54:42 +08:00
|
|
|
void
|
|
|
|
debug_mem_profile_cmd_callback (GtkAction *action,
|
|
|
|
gpointer data)
|
|
|
|
{
|
2005-06-27 17:56:25 +08:00
|
|
|
extern gboolean gimp_debug_memsize;
|
|
|
|
Gimp *gimp;
|
|
|
|
return_if_no_gimp (gimp, data);
|
2004-05-05 23:54:42 +08:00
|
|
|
|
|
|
|
gimp_debug_memsize = TRUE;
|
|
|
|
|
2005-06-27 17:56:25 +08:00
|
|
|
gimp_object_get_memsize (GIMP_OBJECT (gimp), NULL);
|
2004-05-05 23:54:42 +08:00
|
|
|
|
|
|
|
gimp_debug_memsize = FALSE;
|
|
|
|
}
|
|
|
|
|
2014-06-03 03:32:00 +08:00
|
|
|
void
|
|
|
|
debug_benchmark_projection_cmd_callback (GtkAction *action,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
GimpDisplay *display;
|
|
|
|
return_if_no_display (display, data);
|
|
|
|
|
|
|
|
g_idle_add ((GSourceFunc) debug_benchmark_projection, g_object_ref (display));
|
|
|
|
}
|
|
|
|
|
2009-02-24 04:43:30 +08:00
|
|
|
void
|
|
|
|
debug_show_image_graph_cmd_callback (GtkAction *action,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
GimpImage *source_image = NULL;
|
|
|
|
return_if_no_image (source_image, data);
|
|
|
|
|
|
|
|
g_idle_add ((GSourceFunc) debug_show_image_graph, g_object_ref (source_image));
|
|
|
|
}
|
|
|
|
|
2003-01-11 01:55:53 +08:00
|
|
|
void
|
2004-04-29 20:52:29 +08:00
|
|
|
debug_dump_menus_cmd_callback (GtkAction *action,
|
2004-04-20 00:00:54 +08:00
|
|
|
gpointer data)
|
2003-01-11 01:55:53 +08:00
|
|
|
{
|
|
|
|
GList *list;
|
|
|
|
|
2009-12-06 17:23:05 +08:00
|
|
|
for (list = gimp_menu_factory_get_registered_menus (global_menu_factory);
|
2003-01-11 01:55:53 +08:00
|
|
|
list;
|
|
|
|
list = g_list_next (list))
|
|
|
|
{
|
2004-04-29 20:52:29 +08:00
|
|
|
GimpMenuFactoryEntry *entry = list->data;
|
2005-09-26 19:06:15 +08:00
|
|
|
GList *managers;
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2005-09-26 19:06:15 +08:00
|
|
|
managers = gimp_ui_managers_from_name (entry->identifier);
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2005-09-26 19:06:15 +08:00
|
|
|
if (managers)
|
2003-01-11 01:55:53 +08:00
|
|
|
{
|
2005-09-26 19:06:15 +08:00
|
|
|
GimpUIManager *manager = managers->data;
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
for (list = manager->registered_uis; list; list = g_list_next (list))
|
|
|
|
{
|
|
|
|
GimpUIManagerUIEntry *ui_entry = list->data;
|
|
|
|
|
|
|
|
if (GTK_IS_MENU_SHELL (ui_entry->widget))
|
|
|
|
{
|
2008-11-15 20:43:18 +08:00
|
|
|
g_print ("\n\n"
|
|
|
|
"========================================\n"
|
2005-09-26 19:06:15 +08:00
|
|
|
"Menu: %s%s\n"
|
|
|
|
"========================================\n\n",
|
|
|
|
entry->identifier, ui_entry->ui_path);
|
|
|
|
|
|
|
|
debug_dump_menus_recurse_menu (ui_entry->widget, 1,
|
|
|
|
entry->identifier);
|
|
|
|
g_print ("\n");
|
|
|
|
}
|
|
|
|
}
|
2003-01-11 01:55:53 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2004-05-05 23:54:42 +08:00
|
|
|
debug_dump_managers_cmd_callback (GtkAction *action,
|
|
|
|
gpointer data)
|
2003-01-11 01:55:53 +08:00
|
|
|
{
|
2004-05-05 23:54:42 +08:00
|
|
|
GList *list;
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2009-12-06 17:23:05 +08:00
|
|
|
for (list = gimp_menu_factory_get_registered_menus (global_menu_factory);
|
2004-05-05 23:54:42 +08:00
|
|
|
list;
|
|
|
|
list = g_list_next (list))
|
|
|
|
{
|
|
|
|
GimpMenuFactoryEntry *entry = list->data;
|
|
|
|
GList *managers;
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2004-05-05 23:54:42 +08:00
|
|
|
managers = gimp_ui_managers_from_name (entry->identifier);
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2004-05-05 23:54:42 +08:00
|
|
|
if (managers)
|
|
|
|
{
|
2008-11-04 20:33:09 +08:00
|
|
|
g_print ("\n\n"
|
2016-12-21 11:05:32 +08:00
|
|
|
"========================================\n"
|
2004-05-05 23:54:42 +08:00
|
|
|
"UI Manager: %s\n"
|
|
|
|
"========================================\n\n",
|
|
|
|
entry->identifier);
|
|
|
|
|
2008-11-04 22:05:24 +08:00
|
|
|
g_print ("%s\n", gtk_ui_manager_get_ui (managers->data));
|
2004-05-05 23:54:42 +08:00
|
|
|
}
|
|
|
|
}
|
2003-01-11 01:55:53 +08:00
|
|
|
}
|
|
|
|
|
2009-05-08 23:40:13 +08:00
|
|
|
void
|
|
|
|
debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
|
|
|
|
gpointer data)
|
|
|
|
{
|
2009-09-30 02:32:26 +08:00
|
|
|
GimpDisplay *display;
|
|
|
|
GimpImageWindow *window;
|
|
|
|
GtkUIManager *manager;
|
|
|
|
GtkAccelGroup *accel_group;
|
|
|
|
GList *group_it;
|
|
|
|
GList *strings = NULL;
|
2009-05-08 23:40:13 +08:00
|
|
|
return_if_no_display (display, data);
|
|
|
|
|
2009-10-05 01:56:39 +08:00
|
|
|
window = gimp_display_shell_get_window (gimp_display_get_shell (display));
|
2009-09-30 03:44:43 +08:00
|
|
|
manager = GTK_UI_MANAGER (gimp_image_window_get_ui_manager (window));
|
2009-09-23 22:58:03 +08:00
|
|
|
|
|
|
|
accel_group = gtk_ui_manager_get_accel_group (manager);
|
2009-05-08 23:40:13 +08:00
|
|
|
|
2018-03-25 04:49:01 +08:00
|
|
|
/* Gather formatted strings of keyboard shortcuts */
|
2009-09-23 22:58:03 +08:00
|
|
|
for (group_it = gtk_ui_manager_get_action_groups (manager);
|
2009-05-08 23:40:13 +08:00
|
|
|
group_it;
|
|
|
|
group_it = g_list_next (group_it))
|
|
|
|
{
|
|
|
|
GimpActionGroup *group = group_it->data;
|
|
|
|
GList *actions = NULL;
|
|
|
|
GList *action_it = NULL;
|
|
|
|
|
|
|
|
actions = gtk_action_group_list_actions (GTK_ACTION_GROUP (group));
|
|
|
|
actions = g_list_sort (actions, (GCompareFunc) gimp_action_name_compare);
|
|
|
|
|
|
|
|
for (action_it = actions; action_it; action_it = g_list_next (action_it))
|
|
|
|
{
|
|
|
|
GtkAction *action = action_it->data;
|
|
|
|
const gchar *name = gtk_action_get_name (action);
|
|
|
|
GClosure *accel_closure = NULL;
|
|
|
|
|
|
|
|
if (strstr (name, "-menu") ||
|
|
|
|
strstr (name, "-popup") ||
|
|
|
|
name[0] == '<')
|
|
|
|
continue;
|
|
|
|
|
|
|
|
accel_closure = gtk_action_get_accel_closure (action);
|
|
|
|
|
|
|
|
if (accel_closure)
|
|
|
|
{
|
|
|
|
GtkAccelKey *key = gtk_accel_group_find (accel_group,
|
|
|
|
debug_accel_find_func,
|
|
|
|
accel_closure);
|
|
|
|
if (key &&
|
|
|
|
key->accel_key &&
|
|
|
|
key->accel_flags & GTK_ACCEL_VISIBLE)
|
|
|
|
{
|
2009-05-25 04:29:18 +08:00
|
|
|
const gchar *label_tmp;
|
|
|
|
gchar *label;
|
|
|
|
gchar *key_string;
|
2009-05-08 23:40:13 +08:00
|
|
|
|
2009-05-30 02:49:40 +08:00
|
|
|
label_tmp = gtk_action_get_label (action);
|
|
|
|
label = gimp_strip_uline (label_tmp);
|
|
|
|
key_string = gtk_accelerator_get_label (key->accel_key,
|
|
|
|
key->accel_mods);
|
2009-05-08 23:40:13 +08:00
|
|
|
|
2009-05-30 02:49:40 +08:00
|
|
|
strings = g_list_prepend (strings,
|
|
|
|
g_strdup_printf ("%-20s %s",
|
|
|
|
key_string, label));
|
2009-05-08 23:40:13 +08:00
|
|
|
|
|
|
|
g_free (key_string);
|
|
|
|
g_free (label);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
g_list_free (actions);
|
|
|
|
}
|
2009-05-16 20:42:17 +08:00
|
|
|
|
|
|
|
/* Sort and prints the strings */
|
|
|
|
{
|
|
|
|
GList *string_it = NULL;
|
|
|
|
|
|
|
|
strings = g_list_sort (strings, (GCompareFunc) strcmp);
|
|
|
|
|
|
|
|
for (string_it = strings; string_it; string_it = g_list_next (string_it))
|
|
|
|
{
|
2009-05-30 02:49:40 +08:00
|
|
|
g_print ("%s\n", (gchar *) string_it->data);
|
2009-05-16 20:42:17 +08:00
|
|
|
g_free (string_it->data);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_list_free (strings);
|
|
|
|
}
|
2009-05-08 23:40:13 +08:00
|
|
|
}
|
|
|
|
|
2006-09-06 05:36:20 +08:00
|
|
|
void
|
|
|
|
debug_dump_attached_data_cmd_callback (GtkAction *action,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
Gimp *gimp = action_data_get_gimp (data);
|
|
|
|
GimpContext *user_context = gimp_get_user_context (gimp);
|
|
|
|
|
|
|
|
debug_print_qdata (GIMP_OBJECT (gimp));
|
|
|
|
debug_print_qdata (GIMP_OBJECT (user_context));
|
|
|
|
}
|
|
|
|
|
2003-01-11 01:55:53 +08:00
|
|
|
|
|
|
|
/* private functions */
|
|
|
|
|
2014-06-03 03:32:00 +08:00
|
|
|
static gboolean
|
|
|
|
debug_benchmark_projection (GimpDisplay *display)
|
|
|
|
{
|
2018-01-10 17:29:37 +08:00
|
|
|
GimpImage *image = gimp_display_get_image (display);
|
2014-06-03 03:32:00 +08:00
|
|
|
|
2018-01-10 17:29:37 +08:00
|
|
|
if (image)
|
|
|
|
{
|
|
|
|
GimpProjection *projection = gimp_image_get_projection (image);
|
|
|
|
|
app: add "direct" parameter to gimp_projection_flush_now()
Add a boolean "direct" parameter to gimp_projection_flush_now(),
which specifies if the projection buffer should only be invalidated
(FALSE), or rendered directly (TRUE).
Pass TRUE when flushing the projection during painting, so that the
affected regions are rendered in a single step, instead of tile-by-
tile. We previously only invalidated the projection buffer, but
since we synchronously flush the display right after that, the
invalidated regions would still get rendered, albeit less
efficiently.
Likewise, pass TRUE when benchmarking the projection through the
debug action, and avoid flushing the display, to more accurately
measure the render time.
2018-12-02 22:44:52 +08:00
|
|
|
gimp_projection_stop_rendering (projection);
|
|
|
|
|
2018-01-10 17:29:37 +08:00
|
|
|
GIMP_TIMER_START ();
|
2014-06-03 03:32:00 +08:00
|
|
|
|
2018-01-10 17:29:37 +08:00
|
|
|
gimp_image_invalidate (image,
|
|
|
|
0, 0,
|
|
|
|
gimp_image_get_width (image),
|
|
|
|
gimp_image_get_height (image));
|
app: add "direct" parameter to gimp_projection_flush_now()
Add a boolean "direct" parameter to gimp_projection_flush_now(),
which specifies if the projection buffer should only be invalidated
(FALSE), or rendered directly (TRUE).
Pass TRUE when flushing the projection during painting, so that the
affected regions are rendered in a single step, instead of tile-by-
tile. We previously only invalidated the projection buffer, but
since we synchronously flush the display right after that, the
invalidated regions would still get rendered, albeit less
efficiently.
Likewise, pass TRUE when benchmarking the projection through the
debug action, and avoid flushing the display, to more accurately
measure the render time.
2018-12-02 22:44:52 +08:00
|
|
|
gimp_projection_flush_now (projection, TRUE);
|
2014-06-03 03:32:00 +08:00
|
|
|
|
2018-01-10 17:29:37 +08:00
|
|
|
GIMP_TIMER_END ("Validation of the entire projection");
|
2014-06-03 03:32:00 +08:00
|
|
|
|
2018-01-10 17:29:37 +08:00
|
|
|
g_object_unref (display);
|
|
|
|
}
|
2014-06-03 03:32:00 +08:00
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2009-02-24 04:43:30 +08:00
|
|
|
static gboolean
|
|
|
|
debug_show_image_graph (GimpImage *source_image)
|
|
|
|
{
|
2015-06-20 05:49:41 +08:00
|
|
|
GeglNode *image_graph;
|
|
|
|
GeglNode *output_node;
|
|
|
|
GimpImage *new_image;
|
|
|
|
GeglNode *introspect;
|
|
|
|
GeglNode *sink;
|
|
|
|
GeglBuffer *buffer;
|
|
|
|
gchar *new_name;
|
|
|
|
|
|
|
|
image_graph = gimp_projectable_get_graph (GIMP_PROJECTABLE (source_image));
|
|
|
|
|
|
|
|
output_node = gegl_node_get_output_proxy (image_graph, "output");
|
|
|
|
|
2009-02-24 04:43:30 +08:00
|
|
|
introspect = gegl_node_new_child (NULL,
|
|
|
|
"operation", "gegl:introspect",
|
2009-04-12 18:23:02 +08:00
|
|
|
"node", output_node,
|
2009-02-24 04:43:30 +08:00
|
|
|
NULL);
|
|
|
|
sink = gegl_node_new_child (NULL,
|
|
|
|
"operation", "gegl:buffer-sink",
|
|
|
|
"buffer", &buffer,
|
|
|
|
NULL);
|
2015-06-20 05:49:41 +08:00
|
|
|
|
2009-02-24 04:43:30 +08:00
|
|
|
gegl_node_link_many (introspect, sink, NULL);
|
|
|
|
gegl_node_process (sink);
|
|
|
|
|
|
|
|
new_name = g_strdup_printf ("%s GEGL graph",
|
2012-07-18 04:52:49 +08:00
|
|
|
gimp_image_get_display_name (source_image));
|
2015-06-20 05:49:41 +08:00
|
|
|
|
|
|
|
new_image = gimp_create_image_from_buffer (source_image->gimp,
|
|
|
|
buffer, new_name);
|
2014-07-08 05:56:56 +08:00
|
|
|
gimp_image_set_file (new_image, g_file_new_for_uri (new_name));
|
2015-06-20 05:49:41 +08:00
|
|
|
|
2009-02-24 04:43:30 +08:00
|
|
|
g_free (new_name);
|
2015-06-20 05:49:41 +08:00
|
|
|
|
2009-02-24 04:43:30 +08:00
|
|
|
g_object_unref (buffer);
|
2015-06-20 05:49:41 +08:00
|
|
|
|
2009-02-24 04:43:30 +08:00
|
|
|
g_object_unref (sink);
|
|
|
|
g_object_unref (introspect);
|
2015-06-20 05:49:41 +08:00
|
|
|
|
2009-02-24 04:43:30 +08:00
|
|
|
g_object_unref (source_image);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-01-11 01:55:53 +08:00
|
|
|
static void
|
|
|
|
debug_dump_menus_recurse_menu (GtkWidget *menu,
|
|
|
|
gint depth,
|
|
|
|
gchar *path)
|
|
|
|
{
|
2009-10-09 17:13:51 +08:00
|
|
|
GList *children;
|
2008-03-13 00:58:28 +08:00
|
|
|
GList *list;
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2009-10-09 17:13:51 +08:00
|
|
|
children = gtk_container_get_children (GTK_CONTAINER (menu));
|
|
|
|
|
|
|
|
for (list = children; list; list = g_list_next (list))
|
2003-01-11 01:55:53 +08:00
|
|
|
{
|
2008-03-13 00:58:28 +08:00
|
|
|
GtkWidget *menu_item = GTK_WIDGET (list->data);
|
|
|
|
GtkWidget *child = gtk_bin_get_child (GTK_BIN (menu_item));
|
2003-08-25 18:49:33 +08:00
|
|
|
|
2008-03-13 00:58:28 +08:00
|
|
|
if (GTK_IS_LABEL (child))
|
2006-04-12 20:49:29 +08:00
|
|
|
{
|
2009-10-09 17:12:41 +08:00
|
|
|
GtkWidget *submenu;
|
2008-03-13 00:58:28 +08:00
|
|
|
const gchar *label;
|
|
|
|
gchar *full_path;
|
|
|
|
gchar *help_page;
|
|
|
|
gchar *format_str;
|
|
|
|
|
|
|
|
label = gtk_label_get_text (GTK_LABEL (child));
|
2006-04-12 20:49:29 +08:00
|
|
|
full_path = g_strconcat (path, "/", label, NULL);
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2005-09-26 19:06:15 +08:00
|
|
|
help_page = g_object_get_data (G_OBJECT (menu_item), "gimp-help-id");
|
2003-08-25 18:49:33 +08:00
|
|
|
help_page = g_strdup (help_page);
|
|
|
|
|
2006-04-12 20:49:29 +08:00
|
|
|
format_str = g_strdup_printf ("%%%ds%%%ds %%-20s %%s\n",
|
|
|
|
depth * 2, depth * 2 - 40);
|
|
|
|
g_print (format_str,
|
|
|
|
"", label, "", help_page ? help_page : "");
|
|
|
|
g_free (format_str);
|
|
|
|
g_free (help_page);
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2009-10-09 17:12:41 +08:00
|
|
|
submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (menu_item));
|
|
|
|
|
|
|
|
if (submenu)
|
|
|
|
debug_dump_menus_recurse_menu (submenu, depth + 1, full_path);
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2006-04-12 20:49:29 +08:00
|
|
|
g_free (full_path);
|
|
|
|
}
|
2003-01-11 01:55:53 +08:00
|
|
|
}
|
2009-10-09 17:13:51 +08:00
|
|
|
|
|
|
|
g_list_free (children);
|
2003-01-11 01:55:53 +08:00
|
|
|
}
|
|
|
|
|
2006-09-06 05:36:20 +08:00
|
|
|
static void
|
|
|
|
debug_print_qdata (GimpObject *object)
|
|
|
|
{
|
|
|
|
g_print ("\nData attached to '%s':\n\n", gimp_object_get_name (object));
|
|
|
|
g_datalist_foreach (&G_OBJECT (object)->qdata,
|
|
|
|
debug_print_qdata_foreach,
|
|
|
|
NULL);
|
|
|
|
g_print ("\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
debug_print_qdata_foreach (GQuark key_id,
|
|
|
|
gpointer data,
|
|
|
|
gpointer user_data)
|
|
|
|
{
|
|
|
|
g_print ("%s: %p\n", g_quark_to_string (key_id), data);
|
|
|
|
}
|
|
|
|
|
2009-05-08 23:40:13 +08:00
|
|
|
static gboolean
|
|
|
|
debug_accel_find_func (GtkAccelKey *key,
|
|
|
|
GClosure *closure,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
return (GClosure *) data == closure;
|
|
|
|
}
|