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
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2003-01-11 01:55:53 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
2009-05-16 20:42:17 +08:00
|
|
|
#include <glib/gprintf.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
|
|
|
|
2008-10-19 15:59:08 +08:00
|
|
|
#include "base/tile-manager.h"
|
|
|
|
#include "base/tile.h"
|
|
|
|
|
2006-09-06 05:36:20 +08:00
|
|
|
#include "core/gimp.h"
|
|
|
|
#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/gimplayer.h"
|
2008-11-04 20:07:17 +08:00
|
|
|
#include "core/gimppickable.h"
|
2009-02-24 04:43:30 +08:00
|
|
|
#include "core/gimpprojectable.h"
|
2008-10-19 15:59:08 +08:00
|
|
|
#include "core/gimpprojection.h"
|
2003-01-11 01:55:53 +08:00
|
|
|
|
2009-02-28 18:11:48 +08:00
|
|
|
#include "file/file-utils.h"
|
|
|
|
|
2009-02-24 04:43:30 +08:00
|
|
|
#include "gegl/gimp-gegl-utils.h"
|
|
|
|
|
2009-05-08 23:40:13 +08:00
|
|
|
#include "display/gimpdisplay.h"
|
|
|
|
#include "display/gimpdisplayshell.h"
|
2009-09-23 22:58:03 +08:00
|
|
|
#include "display/gimpimagewindow.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
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
2004-02-05 20:52:35 +08:00
|
|
|
#ifdef ENABLE_DEBUG_MENU
|
2003-01-11 01:55:53 +08:00
|
|
|
|
|
|
|
/* local function prototypes */
|
|
|
|
|
2009-05-08 23:40:13 +08:00
|
|
|
static gboolean debug_benchmark_projection (GimpImage *image);
|
|
|
|
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 */
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2008-10-21 01:21:21 +08:00
|
|
|
void
|
|
|
|
debug_benchmark_projection_cmd_callback (GtkAction *action,
|
|
|
|
gpointer data)
|
|
|
|
{
|
2008-11-15 20:43:18 +08:00
|
|
|
GimpImage *image;
|
2008-10-21 01:21:21 +08:00
|
|
|
return_if_no_image (image, data);
|
|
|
|
|
2008-11-15 20:43:18 +08:00
|
|
|
g_idle_add ((GSourceFunc) debug_benchmark_projection, g_object_ref (image));
|
2008-10-21 01:21:21 +08:00
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
for (list = global_menu_factory->registered_menus;
|
|
|
|
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
|
|
|
|
2004-05-05 23:54:42 +08:00
|
|
|
for (list = global_menu_factory->registered_menus;
|
|
|
|
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"
|
|
|
|
"========================================\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)
|
|
|
|
{
|
|
|
|
GimpDisplay *display = NULL;
|
2009-09-23 22:58:03 +08:00
|
|
|
GtkWidget *window = NULL;
|
|
|
|
GtkUIManager *manager = NULL;
|
2009-05-08 23:40:13 +08:00
|
|
|
GtkAccelGroup *accel_group = NULL;
|
|
|
|
GList *group_it = NULL;
|
2009-05-16 20:42:17 +08:00
|
|
|
GList *strings = NULL;
|
2009-05-08 23:40:13 +08:00
|
|
|
return_if_no_display (display, data);
|
|
|
|
|
2009-09-23 22:58:03 +08:00
|
|
|
window = gtk_widget_get_toplevel (display->shell);
|
|
|
|
|
|
|
|
manager = GTK_UI_MANAGER (GIMP_IMAGE_WINDOW (window)->menubar_manager);
|
|
|
|
|
|
|
|
accel_group = gtk_ui_manager_get_accel_group (manager);
|
2009-05-08 23:40:13 +08:00
|
|
|
|
2009-05-16 20:42:17 +08:00
|
|
|
/* Gather formated 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 */
|
|
|
|
|
2008-11-15 20:43:18 +08:00
|
|
|
static gboolean
|
|
|
|
debug_benchmark_projection (GimpImage *image)
|
|
|
|
{
|
|
|
|
GimpProjection *projection = gimp_image_get_projection (image);
|
|
|
|
TileManager *tiles;
|
|
|
|
GTimer *timer;
|
|
|
|
gint x, y;
|
|
|
|
|
2009-08-26 19:06:55 +08:00
|
|
|
gimp_image_invalidate (image,
|
|
|
|
0, 0,
|
|
|
|
gimp_image_get_width (image),
|
|
|
|
gimp_image_get_height (image));
|
2008-11-15 20:43:18 +08:00
|
|
|
gimp_projection_flush_now (projection);
|
|
|
|
|
|
|
|
tiles = gimp_pickable_get_tiles (GIMP_PICKABLE (projection));
|
|
|
|
|
|
|
|
timer = g_timer_new ();
|
|
|
|
|
|
|
|
for (x = 0; x < tile_manager_width (tiles); x += TILE_WIDTH)
|
|
|
|
{
|
|
|
|
for (y = 0; y < tile_manager_height (tiles); y += TILE_HEIGHT)
|
|
|
|
{
|
|
|
|
Tile *tile = tile_manager_get_tile (tiles, x, y, TRUE, FALSE);
|
|
|
|
|
|
|
|
tile_release (tile, FALSE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
g_print ("Validation of the entire projection took %.0f ms\n",
|
|
|
|
1000 * g_timer_elapsed (timer, NULL));
|
|
|
|
|
|
|
|
g_timer_destroy (timer);
|
|
|
|
|
|
|
|
g_object_unref (image);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2009-02-24 04:43:30 +08:00
|
|
|
static gboolean
|
|
|
|
debug_show_image_graph (GimpImage *source_image)
|
|
|
|
{
|
|
|
|
Gimp *gimp = source_image->gimp;
|
|
|
|
GimpProjectable *projectable = GIMP_PROJECTABLE (source_image);
|
|
|
|
GeglNode *image_graph = gimp_projectable_get_graph (projectable);
|
2009-04-12 18:23:02 +08:00
|
|
|
GeglNode *output_node = gegl_node_get_output_proxy (image_graph, "output");
|
2009-02-24 04:43:30 +08:00
|
|
|
GimpImage *new_image = NULL;
|
|
|
|
TileManager *tiles = NULL;
|
|
|
|
GimpLayer *layer = NULL;
|
|
|
|
GeglNode *introspect = NULL;
|
|
|
|
GeglNode *sink = NULL;
|
|
|
|
GeglBuffer *buffer = NULL;
|
|
|
|
gchar *new_name = NULL;
|
|
|
|
|
|
|
|
/* Setup and process the introspection graph */
|
|
|
|
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);
|
|
|
|
gegl_node_link_many (introspect, sink, NULL);
|
|
|
|
gegl_node_process (sink);
|
|
|
|
|
|
|
|
/* Create a new image of the result */
|
|
|
|
tiles = gimp_buffer_to_tiles (buffer);
|
|
|
|
new_name = g_strdup_printf ("%s GEGL graph",
|
2009-02-28 18:11:48 +08:00
|
|
|
file_utils_uri_display_name (gimp_image_get_uri (source_image)));
|
2009-02-24 04:43:30 +08:00
|
|
|
new_image = gimp_create_image (gimp,
|
|
|
|
tile_manager_width (tiles),
|
|
|
|
tile_manager_height (tiles),
|
|
|
|
GIMP_RGB,
|
|
|
|
FALSE);
|
|
|
|
gimp_object_set_name (GIMP_OBJECT (new_image),
|
|
|
|
new_name);
|
|
|
|
layer = gimp_layer_new_from_tiles (tiles,
|
|
|
|
new_image,
|
|
|
|
GIMP_RGBA_IMAGE,
|
|
|
|
new_name,
|
|
|
|
1.0,
|
|
|
|
GIMP_NORMAL_MODE);
|
2009-08-04 01:21:51 +08:00
|
|
|
gimp_image_add_layer (new_image, layer, NULL, 0, FALSE);
|
2009-02-24 04:43:30 +08:00
|
|
|
gimp_create_display (gimp, new_image, GIMP_UNIT_PIXEL, 1.0);
|
|
|
|
|
|
|
|
/* Cleanup */
|
|
|
|
g_object_unref (new_image);
|
|
|
|
g_free (new_name);
|
|
|
|
tile_manager_unref (tiles);
|
|
|
|
g_object_unref (buffer);
|
|
|
|
g_object_unref (sink);
|
|
|
|
g_object_unref (introspect);
|
|
|
|
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)
|
|
|
|
{
|
2008-03-13 00:58:28 +08:00
|
|
|
GList *list;
|
2003-01-11 01:55:53 +08:00
|
|
|
|
|
|
|
for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
|
|
|
|
{
|
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
|
|
|
{
|
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
|
|
|
|
2006-04-12 20:49:29 +08:00
|
|
|
if (GTK_MENU_ITEM (menu_item)->submenu)
|
|
|
|
debug_dump_menus_recurse_menu (GTK_MENU_ITEM (menu_item)->submenu,
|
2003-01-11 01:55:53 +08:00
|
|
|
depth + 1, full_path);
|
|
|
|
|
2006-04-12 20:49:29 +08:00
|
|
|
g_free (full_path);
|
|
|
|
}
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-02-05 20:52:35 +08:00
|
|
|
#endif /* ENABLE_DEBUG_MENU */
|