Commit 37f99069 authored by Jehan's avatar Jehan

app: when WARNING or CRITICAL debugging are ignored, go to terminal.

Current code was redirecting WARNING and CRITICAL errors to normal
messaging when the debugging was deactivated (in Preferences). But if
you deactivate these on purpose, then it means you don't want to get
annoyed by small pop-ups either.
This commit makes them directly displayed in terminal, as they used to
before, when debugging is deactivated.
parent a1b1f53b
......@@ -190,10 +190,11 @@ gimp_message_log_func (const gchar *log_domain,
const gchar *message,
gpointer data)
{
Gimp *gimp = data;
GimpCoreConfig *config = gimp->config;
const gchar *msg_domain = NULL;
GimpMessageSeverity severity = GIMP_MESSAGE_WARNING;
Gimp *gimp = data;
GimpCoreConfig *config = gimp->config;
const gchar *msg_domain = NULL;
GimpMessageSeverity severity = GIMP_MESSAGE_WARNING;
gboolean gui_message = TRUE;
GimpDebugPolicy debug_policy;
/* All GIMP messages are processed under the same domain, but
......@@ -214,16 +215,18 @@ gimp_message_log_func (const gchar *log_domain,
switch (flags & G_LOG_LEVEL_MASK)
{
case G_LOG_LEVEL_WARNING:
if (debug_policy == GIMP_DEBUG_POLICY_WARNING)
severity = GIMP_MESSAGE_BUG_WARNING;
severity = GIMP_MESSAGE_BUG_WARNING;
if (debug_policy > GIMP_DEBUG_POLICY_WARNING)
gui_message = FALSE;
break;
case G_LOG_LEVEL_CRITICAL:
if (debug_policy <= GIMP_DEBUG_POLICY_CRITICAL)
severity = GIMP_MESSAGE_BUG_CRITICAL;
severity = GIMP_MESSAGE_BUG_CRITICAL;
if (debug_policy > GIMP_DEBUG_POLICY_CRITICAL)
gui_message = FALSE;
break;
}
if (gimp)
if (gimp && gui_message)
{
gimp_show_message (gimp, NULL, severity, msg_domain, message);
}
......
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