summaryrefslogtreecommitdiff
path: root/pango/modules.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-03-20 23:46:23 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-03-20 23:46:23 +0000
commit4c0b4f2f0e5804ea247eca7a6cf902f7f35a42f4 (patch)
treec6a5f5112531c38e2f3c838822f1356c982d4703 /pango/modules.c
parent817f21990a8e9e253af102bdaa8046b11b850b73 (diff)
downloadpango-4c0b4f2f0e5804ea247eca7a6cf902f7f35a42f4.tar.gz
Add an informative warning if no modules at all were found. (#74982,
Wed Mar 20 18:40:34 2002 Owen Taylor <otaylor@redhat.com> * pango/modules.c (build_map): Add an informative warning if no modules at all were found. (#74982, suggestion from Dan Winship.)
Diffstat (limited to 'pango/modules.c')
-rw-r--r--pango/modules.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/pango/modules.c b/pango/modules.c
index 9153341b..c261df8a 100644
--- a/pango/modules.c
+++ b/pango/modules.c
@@ -499,6 +499,26 @@ build_map (PangoMapInfo *info)
init_modules();
+ if (!dlloaded_engines && !registered_engines && !builtin_engines)
+ {
+ static gboolean no_module_warning = FALSE;
+ if (!no_module_warning)
+ {
+ gchar *filename = g_build_filename (pango_get_sysconf_subdirectory (),
+ "pango.modules",
+ NULL);
+ g_warning ("No builtin or dynamically loaded modules\n"
+ "were found. Pango will not work correctly. This probably means\n"
+ "there was an error in the creation of:\n"
+ " '%s'\n"
+ "You may be able to recreate this file by running pango-querymodules.",
+ filename);
+ g_free (filename);
+
+ no_module_warning = TRUE;
+ }
+ }
+
info->map = map = g_new (PangoMap, 1);
map->n_submaps = 256;
for (i=0; i<256; i++)