summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-09-13 21:32:09 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-09-13 21:32:09 +0000
commit5d19795077b8327dfa1fdf62c2639247c8643fa4 (patch)
treea88dd515200c86a81c44e9e586bd07f0109c9612
parentb090edda657f1272fa0fe98596d5918726d83d98 (diff)
downloadpango-5d19795077b8327dfa1fdf62c2639247c8643fa4.tar.gz
Err about failing to load engine only once per module.
2006-09-13 Behdad Esfahbod <behdad@gnome.org> * pango/modules.c (pango_engine_pair_get_engine): Err about failing to load engine only once per module.
-rw-r--r--ChangeLog5
-rw-r--r--pango/modules.c20
2 files changed, 24 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 47225d79..377a4882 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2006-09-13 Behdad Esfahbod <behdad@gnome.org>
+ * pango/modules.c (pango_engine_pair_get_engine): Err about failing to
+ load engine only once per module.
+
+2006-09-13 Behdad Esfahbod <behdad@gnome.org>
+
Bug 355697 – The IndicOTClassTable of Oriya has a error.
* modules/indic/indic-ot-class-tables.c: Compute lastChar from
diff --git a/pango/modules.c b/pango/modules.c
index 57b13443..2c2b7321 100644
--- a/pango/modules.c
+++ b/pango/modules.c
@@ -261,7 +261,25 @@ pango_engine_pair_get_engine (PangoEnginePair *pair)
}
if (!pair->engine)
- g_printerr ("Failed to load Pango module for id: '%s'", pair->info.id);
+ {
+ /* If a module cannot be used, or doesn't not create an engine
+ * correctly, we print out an error containing module name and id,
+ * but to not flood the terminal with zillions of the message, we
+ * set a flag on the module to only err once per module.
+ */
+ static GQuark warned_quark = 0;
+
+ if (!warned_quark)
+ warned_quark = g_quark_from_static_string ("pango-module-warned");
+
+ if (!g_object_get_qdata (G_OBJECT (pair->module), warned_quark))
+ {
+ g_warning ("Failed to load Pango module '%s' for id '%s'", pair->module->path, pair->info.id);
+
+ g_object_set_qdata_full (G_OBJECT (pair->module), warned_quark,
+ GINT_TO_POINTER (1), NULL);
+ }
+ }
}
return pair->engine;