mirror of https://github.com/GNOME/gimp.git
app, libgimp: add log handlers for all LibGimp* log domains
Looks like they were forgotten so messages from libs went to stdout instead of being routed through the log handlers, which would show them in a dialog, or in the error console.
This commit is contained in:
parent
4c55f45552
commit
5e591eb232
11
app/errors.c
11
app/errors.c
|
@ -86,8 +86,10 @@ errors_init (Gimp *gimp,
|
|||
"Gimp-Dialogs",
|
||||
"Gimp-Display",
|
||||
"Gimp-File",
|
||||
"Gimp-GEGL",
|
||||
"Gimp-GUI",
|
||||
"Gimp-Menus",
|
||||
"Gimp-Operations",
|
||||
"Gimp-PDB",
|
||||
"Gimp-Paint",
|
||||
"Gimp-Paint-Funcs",
|
||||
|
@ -96,7 +98,14 @@ errors_init (Gimp *gimp,
|
|||
"Gimp-Tools",
|
||||
"Gimp-Vectors",
|
||||
"Gimp-Widgets",
|
||||
"Gimp-XCF"
|
||||
"Gimp-XCF",
|
||||
"LibGimpBase",
|
||||
"LibGimpColor",
|
||||
"LibGimpConfig",
|
||||
"LibGimpMath",
|
||||
"LibGimpModule",
|
||||
"LibGimpThumb",
|
||||
"LibGimpWidgets"
|
||||
};
|
||||
gint i;
|
||||
|
||||
|
|
|
@ -491,15 +491,31 @@ gimp_main (const GimpPlugInInfo *info,
|
|||
|
||||
|
||||
/* set handler both for the "LibGimp" and "" domains */
|
||||
{
|
||||
const gchar * const log_domains[] =
|
||||
{
|
||||
"LibGimp",
|
||||
"LibGimpBase",
|
||||
"LibGimpColor",
|
||||
"LibGimpConfig",
|
||||
"LibGimpMath",
|
||||
"LibGimpModule",
|
||||
"LibGimpThumb",
|
||||
"LibGimpWidgets"
|
||||
};
|
||||
gint i;
|
||||
|
||||
g_log_set_handler (G_LOG_DOMAIN,
|
||||
for (i = 0; i < G_N_ELEMENTS (log_domains); i++)
|
||||
g_log_set_handler (log_domains[i],
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
NULL);
|
||||
|
||||
g_log_set_handler (NULL,
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
NULL);
|
||||
}
|
||||
|
||||
if (gimp_debug_flags & GIMP_DEBUG_FATAL_WARNINGS)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue