[gimp/gimp-2-8] libgimp: make GIMP_PLUGIN_DEBUG messages always visible again
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] libgimp: make GIMP_PLUGIN_DEBUG messages always visible again
- Date: Sat, 23 Feb 2013 15:13:21 +0000 (UTC)
commit 62515d555deece44c5f5278715caca420e19e530
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.
(cherry picked from commit e4f24a539e10a25a3239b8e7e3b391914561adc0)
libgimp/gimp.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/libgimp/gimp.c b/libgimp/gimp.c
index a7a6424..8cafb11 100644
--- a/libgimp/gimp.c
+++ b/libgimp/gimp.c
@@ -337,6 +337,8 @@ gimp_main (const GimpPlugInInfo *info,
if (env_string)
{
+ const gchar *debug_messages;
+
debug_string = strchr (env_string, ',');
if (debug_string)
@@ -356,6 +358,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]