mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
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
2 changed files with 34 additions and 9 deletions
11
app/errors.c
11
app/errors.c
|
@ -86,8 +86,10 @@ errors_init (Gimp *gimp,
|
||||||
"Gimp-Dialogs",
|
"Gimp-Dialogs",
|
||||||
"Gimp-Display",
|
"Gimp-Display",
|
||||||
"Gimp-File",
|
"Gimp-File",
|
||||||
|
"Gimp-GEGL",
|
||||||
"Gimp-GUI",
|
"Gimp-GUI",
|
||||||
"Gimp-Menus",
|
"Gimp-Menus",
|
||||||
|
"Gimp-Operations",
|
||||||
"Gimp-PDB",
|
"Gimp-PDB",
|
||||||
"Gimp-Paint",
|
"Gimp-Paint",
|
||||||
"Gimp-Paint-Funcs",
|
"Gimp-Paint-Funcs",
|
||||||
|
@ -96,7 +98,14 @@ errors_init (Gimp *gimp,
|
||||||
"Gimp-Tools",
|
"Gimp-Tools",
|
||||||
"Gimp-Vectors",
|
"Gimp-Vectors",
|
||||||
"Gimp-Widgets",
|
"Gimp-Widgets",
|
||||||
"Gimp-XCF"
|
"Gimp-XCF",
|
||||||
|
"LibGimpBase",
|
||||||
|
"LibGimpColor",
|
||||||
|
"LibGimpConfig",
|
||||||
|
"LibGimpMath",
|
||||||
|
"LibGimpModule",
|
||||||
|
"LibGimpThumb",
|
||||||
|
"LibGimpWidgets"
|
||||||
};
|
};
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
|
|
|
@ -491,15 +491,31 @@ gimp_main (const GimpPlugInInfo *info,
|
||||||
|
|
||||||
|
|
||||||
/* set handler both for the "LibGimp" and "" domains */
|
/* 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,
|
G_LOG_LEVEL_MESSAGE,
|
||||||
gimp_message_func,
|
gimp_message_func,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
g_log_set_handler (NULL,
|
g_log_set_handler (NULL,
|
||||||
G_LOG_LEVEL_MESSAGE,
|
G_LOG_LEVEL_MESSAGE,
|
||||||
gimp_message_func,
|
gimp_message_func,
|
||||||
NULL);
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (gimp_debug_flags & GIMP_DEBUG_FATAL_WARNINGS)
|
if (gimp_debug_flags & GIMP_DEBUG_FATAL_WARNINGS)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue