[gimp/soc-2011-seamless-clone2] libgimp: make GIMP_PLUGIN_DEBUG messages always visible again
- From: Clayton Walker <claytonw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2011-seamless-clone2] libgimp: make GIMP_PLUGIN_DEBUG messages always visible again
- Date: Wed, 8 May 2013 15:01:39 +0000 (UTC)
commit 760f42099de86f35366ad2c3c604096920a156bd
Author: Michael Natterer <mitch gimp org>
Date: Sat Feb 23 16:10:19 2013 +0100
libgimp: make GIMP_PLUGIN_DEBUG messages always visible again
by adding "LibGimp" to G_MESSAGES_DEBUG so it doesn't get filtered
away by newer GLib.
libgimp/gimp.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/libgimp/gimp.c b/libgimp/gimp.c
index 30b2a84..0f6e386 100644
--- a/libgimp/gimp.c
+++ b/libgimp/gimp.c
@@ -336,6 +336,8 @@ gimp_main (const GimpPlugInInfo *info,
if (env_string)
{
+ const gchar *debug_messages;
+
debug_string = strchr (env_string, ',');
if (debug_string)
@@ -355,6 +357,20 @@ gimp_main (const GimpPlugInInfo *info,
{
gimp_debug_flags = GIMP_DEBUG_DEFAULT;
}
+
+ /* make debug output visible by setting G_MESSAGES_DEBUG */
+ debug_messages = g_getenv ("G_MESSAGES_DEBUG");
+
+ if (debug_messages)
+ {
+ gchar *tmp = g_strconcat (debug_messages, ",LibGimp", NULL);
+ g_setenv ("G_MESSAGES_DEBUG", tmp, TRUE);
+ g_free (tmp);
+ }
+ else
+ {
+ g_setenv ("G_MESSAGES_DEBUG", "LibGimp", TRUE);
+ }
}
g_free (basename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]