summaryrefslogtreecommitdiff
path: root/gtk/gtkmodules.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-09-05 11:44:47 -0400
committerMatthias Clasen <mclasen@redhat.com>2011-09-05 11:44:47 -0400
commita51a31466dcaa6f9ae5915acb1ea7aa0f2407024 (patch)
tree8f449fd316bcdbbb70977a61a0841f257b634b27 /gtk/gtkmodules.c
parent1bede5c3fb47b3ab656c2dfe24d8fb8732873e3e (diff)
downloadgtk+-a51a31466dcaa6f9ae5915acb1ea7aa0f2407024.tar.gz
Make the gail blacklisting more quiet
Don't mention blacklisted modules at all if they are not found.
Diffstat (limited to 'gtk/gtkmodules.c')
-rw-r--r--gtk/gtkmodules.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
index 57765256bb..d4135f0f7c 100644
--- a/gtk/gtkmodules.c
+++ b/gtk/gtkmodules.c
@@ -259,11 +259,14 @@ cmp_module (GtkModuleInfo *info,
}
static gboolean
-module_is_blacklisted (const gchar *name)
+module_is_blacklisted (const gchar *name,
+ gboolean verbose)
{
if (g_str_equal (name, "gail"))
{
- g_message ("Not loading module \"gail\": The functionality is provided by GTK natively. Please try to not load it.");
+ if (verbose)
+ g_message ("Not loading module \"gail\": The functionality is provided by GTK natively. Please try to not load it.");
+
return TRUE;
}
@@ -303,7 +306,7 @@ load_module (GSList *module_list,
{
/* Do the check this late so we only warn about existing modules,
* not old modules that are still in the modules path. */
- if (module_is_blacklisted (name))
+ if (module_is_blacklisted (name, TRUE))
{
modinit_func = NULL;
success = TRUE;
@@ -383,10 +386,13 @@ load_module (GSList *module_list,
}
else
{
- const gchar *error = g_module_error ();
+ if (!module_is_blacklisted (name, FALSE))
+ {
+ const gchar *error = g_module_error ();
- g_message ("Failed to load module \"%s\"%s%s",
- name, error ? ": " : "", error ? error : "");
+ g_message ("Failed to load module \"%s\"%s%s",
+ name, error ? ": " : "", error ? error : "");
+ }
}
return module_list;