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

add HELP log domain.

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

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

	* app/widgets/gimphelp.c: port debug output to GIMP_LOG() and
	improve it.


svn path=/trunk/; revision=24177
parent 710e498d
2007-11-16 Michael Natterer <mitch@gimp.org>
* app/gimp-log.[ch]: add HELP log domain.
* app/widgets/gimphelp.c: port debug output to GIMP_LOG() and
improve it.
2007-11-16 Tor Lillqvist <tml@novell.com> 2007-11-16 Tor Lillqvist <tml@novell.com>
* app/base/base-utils.c * app/base/base-utils.c
......
...@@ -36,7 +36,8 @@ gimp_log_init (void) ...@@ -36,7 +36,8 @@ gimp_log_init (void)
const GDebugKey log_keys[] = const GDebugKey log_keys[] =
{ {
{ "tools", GIMP_LOG_TOOLS }, { "tools", GIMP_LOG_TOOLS },
{ "dnd", GIMP_LOG_DND } { "dnd", GIMP_LOG_DND },
{ "help", GIMP_LOG_HELP }
}; };
gimp_log_flags = g_parse_debug_string (env_log_val, gimp_log_flags = g_parse_debug_string (env_log_val,
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
typedef enum 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
} GimpLogFlags; } GimpLogFlags;
......
...@@ -47,12 +47,10 @@ ...@@ -47,12 +47,10 @@
#include "gimpmessagebox.h" #include "gimpmessagebox.h"
#include "gimpmessagedialog.h" #include "gimpmessagedialog.h"
#include "gimp-log.h"
#include "gimp-intl.h" #include "gimp-intl.h"
/* #define GIMP_HELP_DEBUG */
typedef struct _GimpIdleHelp GimpIdleHelp; typedef struct _GimpIdleHelp GimpIdleHelp;
struct _GimpIdleHelp struct _GimpIdleHelp
...@@ -127,12 +125,9 @@ gimp_idle_help (GimpIdleHelp *idle_help) ...@@ -127,12 +125,9 @@ gimp_idle_help (GimpIdleHelp *idle_help)
GimpGuiConfig *config = GIMP_GUI_CONFIG (idle_help->gimp->config); GimpGuiConfig *config = GIMP_GUI_CONFIG (idle_help->gimp->config);
const gchar *procedure_name = NULL; const gchar *procedure_name = NULL;
#ifdef GIMP_HELP_DEBUG GIMP_LOG (HELP, "Domain = '%s', ID = '%s'",
g_printerr ("Help Domain: %s\n", idle_help->help_domain ? idle_help->help_domain : "NULL",
idle_help->help_domain ? idle_help->help_domain : "NULL"); idle_help->help_id ? idle_help->help_id : "NULL");
g_printerr ("Help ID: %s\n\n",
idle_help->help_id ? idle_help->help_id : "NULL");
#endif
if (config->help_browser == GIMP_HELP_BROWSER_GIMP) if (config->help_browser == GIMP_HELP_BROWSER_GIMP)
{ {
...@@ -290,6 +285,12 @@ gimp_help_call (Gimp *gimp, ...@@ -290,6 +285,12 @@ gimp_help_call (Gimp *gimp,
{ {
GValueArray *return_vals; GValueArray *return_vals;
GIMP_LOG (HELP, "Calling help via %s: %s %s %s",
procedure_name,
help_domain ? help_domain : "(null)",
help_locales ? help_locales : "(null)",
help_id ? help_id : "(null)");
return_vals = return_vals =
gimp_pdb_execute_procedure_by_name (gimp->pdb, gimp_pdb_execute_procedure_by_name (gimp->pdb,
gimp_get_user_context (gimp), gimp_get_user_context (gimp),
...@@ -347,13 +348,11 @@ gimp_help_call (Gimp *gimp, ...@@ -347,13 +348,11 @@ gimp_help_call (Gimp *gimp,
{ {
GValueArray *return_vals; GValueArray *return_vals;
#ifdef GIMP_HELP_DEBUG GIMP_LOG (HELP, "Calling help via %s: %s %s %s",
g_printerr ("Calling help via %s: %s %s %s\n", procedure_name,
procedure_name, help_domain ? help_domain : "(null)",
help_domain ? help_domain : "(null)", help_locales ? help_locales : "(null)",
help_locales ? help_locales : "(null)", help_id ? help_id : "(null)");
help_id ? help_id : "(null)");
#endif
return_vals = return_vals =
gimp_pdb_execute_procedure_by_name (gimp->pdb, gimp_pdb_execute_procedure_by_name (gimp->pdb,
...@@ -378,4 +377,3 @@ gimp_help_get_locales (GimpGuiConfig *config) ...@@ -378,4 +377,3 @@ gimp_help_get_locales (GimpGuiConfig *config)
return g_strjoinv (":", (gchar **) g_get_language_names ()); return g_strjoinv (":", (gchar **) g_get_language_names ());
} }
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