Commit 4ecccfe9 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/core/gimp.c app/core/gimpdocuments.c app/core/gimpmodules.c fixed some

2002-01-31  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp.c
	* app/core/gimpdocuments.c
	* app/core/gimpmodules.c
	* app/core/gimppalette.c: fixed some get_memsize()
	implementations, give useful names to some global objects so the
	new mem profile of "the_gimp" looks nicer.

	* app/gui/menus.c
	* app/gui/commands.[ch]: added a "Debug" menu to the toolbox,
	offer a mem profile of the global "Gimp" instance.
parent c1f00274
......@@ -24,6 +24,8 @@
#include "core/core-types.h"
#include "core/gimpobject.h"
#include "plug-in/plug-in.h"
#include "commands.h"
......@@ -55,9 +57,11 @@ help_context_help_cmd_callback (GtkWidget *widget,
gimp_context_help ();
}
/***** Debug *****/
void
mem_profile_cmd_callback (GtkWidget *widget,
gpointer data)
debug_mem_profile_cmd_callback (GtkWidget *widget,
gpointer data)
{
g_mem_profile ();
gimp_object_get_memsize (GIMP_OBJECT (data));
}
......@@ -29,7 +29,7 @@ void help_help_cmd_callback (GtkWidget *widget,
void help_context_help_cmd_callback (GtkWidget *widget,
gpointer data);
void mem_profile_cmd_callback (GtkWidget *widget,
void debug_mem_profile_cmd_callback (GtkWidget *widget,
gpointer data);
......
......@@ -24,6 +24,8 @@
#include "core/core-types.h"
#include "core/gimpobject.h"
#include "plug-in/plug-in.h"
#include "commands.h"
......@@ -55,9 +57,11 @@ help_context_help_cmd_callback (GtkWidget *widget,
gimp_context_help ();
}
/***** Debug *****/
void
mem_profile_cmd_callback (GtkWidget *widget,
gpointer data)
debug_mem_profile_cmd_callback (GtkWidget *widget,
gpointer data)
{
g_mem_profile ();
gimp_object_get_memsize (GIMP_OBJECT (data));
}
......@@ -29,7 +29,7 @@ void help_help_cmd_callback (GtkWidget *widget,
void help_context_help_cmd_callback (GtkWidget *widget,
gpointer data);
void mem_profile_cmd_callback (GtkWidget *widget,
void debug_mem_profile_cmd_callback (GtkWidget *widget,
gpointer data);
......
......@@ -24,6 +24,8 @@
#include "core/core-types.h"
#include "core/gimpobject.h"
#include "plug-in/plug-in.h"
#include "commands.h"
......@@ -55,9 +57,11 @@ help_context_help_cmd_callback (GtkWidget *widget,
gimp_context_help ();
}
/***** Debug *****/
void
mem_profile_cmd_callback (GtkWidget *widget,
gpointer data)
debug_mem_profile_cmd_callback (GtkWidget *widget,
gpointer data)
{
g_mem_profile ();
gimp_object_get_memsize (GIMP_OBJECT (data));
}
......@@ -29,7 +29,7 @@ void help_help_cmd_callback (GtkWidget *widget,
void help_context_help_cmd_callback (GtkWidget *widget,
gpointer data);
void mem_profile_cmd_callback (GtkWidget *widget,
void debug_mem_profile_cmd_callback (GtkWidget *widget,
gpointer data);
......
......@@ -76,6 +76,9 @@
#include "libgimp/gimpintl.h"
/* #define ENABLE_DEBUG_ENTRY 1 */
/* local function prototypes */
static void menus_filters_subdirs_to_top (GtkMenu *menu);
......@@ -283,16 +286,16 @@ static GimpItemFactoryEntry toolbox_entries[] =
"gimp:about-dialog",
"help/dialogs/about.html", NULL },
SEPARATOR ("/Help/---"),
BRANCH ("/_Debug"),
{ { N_("/Help/Mem Profile"), NULL,
mem_profile_cmd_callback, 0 },
{ { "/Debug/Mem Profile", NULL,
debug_mem_profile_cmd_callback, 0 },
NULL, NULL, NULL }
#ifdef ENABLE_DEBUG_ENTRY
, { { "/Help/Dump Items (Debug)", NULL,
menus_debug_cmd_callback, 0 },
NULL, NULL, NULL }
, { { "/Debug/Dump Items", NULL,
menus_debug_cmd_callback, 0 },
NULL, NULL, NULL }
#endif
};
......
......@@ -76,6 +76,9 @@
#include "libgimp/gimpintl.h"
/* #define ENABLE_DEBUG_ENTRY 1 */
/* local function prototypes */
static void menus_filters_subdirs_to_top (GtkMenu *menu);
......@@ -283,16 +286,16 @@ static GimpItemFactoryEntry toolbox_entries[] =
"gimp:about-dialog",
"help/dialogs/about.html", NULL },
SEPARATOR ("/Help/---"),
BRANCH ("/_Debug"),
{ { N_("/Help/Mem Profile"), NULL,
mem_profile_cmd_callback, 0 },
{ { "/Debug/Mem Profile", NULL,
debug_mem_profile_cmd_callback, 0 },
NULL, NULL, NULL }
#ifdef ENABLE_DEBUG_ENTRY
, { { "/Help/Dump Items (Debug)", NULL,
menus_debug_cmd_callback, 0 },
NULL, NULL, NULL }
, { { "/Debug/Dump Items", NULL,
menus_debug_cmd_callback, 0 },
NULL, NULL, NULL }
#endif
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment