Commit f4621424 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

add DIALOG_FACTORY log domain.

2007-11-18  Michael Natterer  <mitch@gimp.org>

	* app/gimp-log.[ch]: add DIALOG_FACTORY log domain.

	* app/widgets/gimpdialogfactory.c: port debug output to GIMP_LOG().


svn path=/trunk/; revision=24185
parent f98e9de7
2007-11-18 Michael Natterer <mitch@gimp.org>
* app/gimp-log.[ch]: add DIALOG_FACTORY log domain.
* app/widgets/gimpdialogfactory.c: port debug output to GIMP_LOG().
2007-11-18 Michael Natterer <mitch@gimp.org> 2007-11-18 Michael Natterer <mitch@gimp.org>
* app/gimp-log.[ch]: changed to work with different * app/gimp-log.[ch]: changed to work with different
......
...@@ -37,7 +37,8 @@ gimp_log_init (void) ...@@ -37,7 +37,8 @@ gimp_log_init (void)
{ {
{ "tools", GIMP_LOG_TOOLS }, { "tools", GIMP_LOG_TOOLS },
{ "dnd", GIMP_LOG_DND }, { "dnd", GIMP_LOG_DND },
{ "help", GIMP_LOG_HELP } { "help", GIMP_LOG_HELP },
{ "dialog-factory", GIMP_LOG_DIALOG_FACTORY }
}; };
gimp_log_flags = g_parse_debug_string (env_log_val, gimp_log_flags = g_parse_debug_string (env_log_val,
......
...@@ -24,7 +24,8 @@ typedef enum ...@@ -24,7 +24,8 @@ typedef enum
{ {
GIMP_LOG_TOOLS = 1 << 0, GIMP_LOG_TOOLS = 1 << 0,
GIMP_LOG_DND = 1 << 1, GIMP_LOG_DND = 1 << 1,
GIMP_LOG_HELP = 1 << 2 GIMP_LOG_HELP = 1 << 2,
GIMP_LOG_DIALOG_FACTORY = 1 << 3
} GimpLogFlags; } GimpLogFlags;
......
...@@ -40,14 +40,7 @@ ...@@ -40,14 +40,7 @@
#include "gimpmenufactory.h" #include "gimpmenufactory.h"
#include "gimpsessioninfo.h" #include "gimpsessioninfo.h"
#include "gimp-log.h"
/* #define DEBUG_FACTORY */
#ifdef DEBUG_FACTORY
#define D(stmnt) stmnt
#else
#define D(stmnt)
#endif
static void gimp_dialog_factory_dispose (GObject *object); static void gimp_dialog_factory_dispose (GObject *object);
...@@ -753,10 +746,9 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory, ...@@ -753,10 +746,9 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
if (entry) /* dialog is a toplevel (but not a GimpDock) or a GimpDockable */ if (entry) /* dialog is a toplevel (but not a GimpDock) or a GimpDockable */
{ {
D (g_print ("%s: adding %s \"%s\"\n", GIMP_LOG (DIALOG_FACTORY, "adding %s \"%s\"",
G_STRFUNC,
toplevel ? "toplevel" : "dockable", toplevel ? "toplevel" : "dockable",
entry->identifier)); entry->identifier);
for (list = factory->session_infos; list; list = g_list_next (list)) for (list = factory->session_infos; list; list = g_list_next (list))
{ {
...@@ -772,9 +764,9 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory, ...@@ -772,9 +764,9 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
g_warning ("%s: singleton dialog \"%s\" created twice", g_warning ("%s: singleton dialog \"%s\" created twice",
G_STRFUNC, entry->identifier); G_STRFUNC, entry->identifier);
D (g_print ("%s: corrupt session info: %p (widget %p)\n", GIMP_LOG (DIALOG_FACTORY,
G_STRFUNC, "corrupt session info: %p (widget %p)",
info, info->widget)); info, info->widget);
return; return;
} }
...@@ -784,11 +776,11 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory, ...@@ -784,11 +776,11 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
info->widget = dialog; info->widget = dialog;
D (g_print ("%s: updating session info %p (widget %p) for %s \"%s\"\n", GIMP_LOG (DIALOG_FACTORY,
G_STRFUNC, "updating session info %p (widget %p) for %s \"%s\"",
info, info->widget, info, info->widget,
toplevel ? "toplevel" : "dockable", toplevel ? "toplevel" : "dockable",
entry->identifier)); entry->identifier);
if (toplevel && entry->session_managed) if (toplevel && entry->session_managed)
gimp_session_info_set_geometry (info); gimp_session_info_set_geometry (info);
...@@ -803,11 +795,11 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory, ...@@ -803,11 +795,11 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
info->widget = dialog; info->widget = dialog;
D (g_print ("%s: creating session info %p (widget %p) for %s \"%s\"\n", GIMP_LOG (DIALOG_FACTORY,
G_STRFUNC, "creating session info %p (widget %p) for %s \"%s\"",
info, info->widget, info, info->widget,
toplevel ? "toplevel" : "dockable", toplevel ? "toplevel" : "dockable",
entry->identifier)); entry->identifier);
if (toplevel) if (toplevel)
{ {
...@@ -833,7 +825,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory, ...@@ -833,7 +825,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
} }
else /* dialog is a GimpDock */ else /* dialog is a GimpDock */
{ {
D (g_print ("%s: adding dock\n", G_STRFUNC)); GIMP_LOG (DIALOG_FACTORY, "adding dock");
for (list = factory->session_infos; list; list = g_list_next (list)) for (list = factory->session_infos; list; list = g_list_next (list))
{ {
...@@ -846,9 +838,9 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory, ...@@ -846,9 +838,9 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
{ {
info->widget = dialog; info->widget = dialog;
D (g_print ("%s: updating session info %p (widget %p) for dock\n", GIMP_LOG (DIALOG_FACTORY,
G_STRFUNC, "updating session info %p (widget %p) for dock",
info, info->widget)); info, info->widget);
gimp_session_info_set_geometry (info); gimp_session_info_set_geometry (info);
...@@ -862,9 +854,9 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory, ...@@ -862,9 +854,9 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
info->widget = dialog; info->widget = dialog;
D (g_print ("%s: creating session info %p (widget %p) for dock\n", GIMP_LOG (DIALOG_FACTORY,
G_STRFUNC, "creating session info %p (widget %p) for dock",
info, info->widget)); info, info->widget);
/* if we create a new session info, we never call /* if we create a new session info, we never call
* gimp_session_info_set_geometry(), but still the * gimp_session_info_set_geometry(), but still the
...@@ -972,9 +964,8 @@ gimp_dialog_factory_remove_dialog (GimpDialogFactory *factory, ...@@ -972,9 +964,8 @@ gimp_dialog_factory_remove_dialog (GimpDialogFactory *factory,
return; return;
} }
D (g_print ("%s: removing \"%s\"\n", GIMP_LOG (DIALOG_FACTORY, "removing \"%s\"",
G_STRFUNC, entry ? entry->identifier : "dock");
entry ? entry->identifier : "dock"));
for (list = factory->session_infos; list; list = g_list_next (list)) for (list = factory->session_infos; list; list = g_list_next (list))
{ {
...@@ -982,10 +973,10 @@ gimp_dialog_factory_remove_dialog (GimpDialogFactory *factory, ...@@ -982,10 +973,10 @@ gimp_dialog_factory_remove_dialog (GimpDialogFactory *factory,
if (session_info->widget == dialog) if (session_info->widget == dialog)
{ {
D (g_print ("%s: clearing session info %p (widget %p) for \"%s\"\n", GIMP_LOG (DIALOG_FACTORY,
G_STRFUNC, "clearing session info %p (widget %p) for \"%s\"",
session_info, session_info->widget, session_info, session_info->widget,
entry ? entry->identifier : "dock")); entry ? entry->identifier : "dock");
session_info->widget = NULL; session_info->widget = NULL;
...@@ -1247,8 +1238,9 @@ gimp_dialog_factory_dialog_configure (GtkWidget *dialog, ...@@ -1247,8 +1238,9 @@ gimp_dialog_factory_dialog_configure (GtkWidget *dialog,
if (session_info->widget == dialog) if (session_info->widget == dialog)
{ {
D (g_print ("%s: updating session info for \"%s\" from window geometry\n", GIMP_LOG (DIALOG_FACTORY,
G_STRFUNC, entry->identifier)); "updating session info for \"%s\" from window geometry",
entry->identifier);
gimp_session_info_get_geometry (session_info); gimp_session_info_get_geometry (session_info);
......
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