From 4c0b4f2f0e5804ea247eca7a6cf902f7f35a42f4 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 20 Mar 2002 23:46:23 +0000 Subject: Add an informative warning if no modules at all were found. (#74982, Wed Mar 20 18:40:34 2002 Owen Taylor * pango/modules.c (build_map): Add an informative warning if no modules at all were found. (#74982, suggestion from Dan Winship.) --- ChangeLog | 6 ++++++ ChangeLog.pre-1-10 | 6 ++++++ ChangeLog.pre-1-2 | 6 ++++++ ChangeLog.pre-1-4 | 6 ++++++ ChangeLog.pre-1-6 | 6 ++++++ ChangeLog.pre-1-8 | 6 ++++++ pango/modules.c | 20 ++++++++++++++++++++ 7 files changed, 56 insertions(+) diff --git a/ChangeLog b/ChangeLog index b5b02f4f..bf2e8124 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Mar 20 18:40:34 2002 Owen Taylor + + * pango/modules.c (build_map): Add an informative + warning if no modules at all were found. (#74982, + suggestion from Dan Winship.) + Wed Mar 20 15:22:54 2002 Owen Taylor * configure.in: Error out if no backends found. (#74880) diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index b5b02f4f..bf2e8124 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,9 @@ +Wed Mar 20 18:40:34 2002 Owen Taylor + + * pango/modules.c (build_map): Add an informative + warning if no modules at all were found. (#74982, + suggestion from Dan Winship.) + Wed Mar 20 15:22:54 2002 Owen Taylor * configure.in: Error out if no backends found. (#74880) diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index b5b02f4f..bf2e8124 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,9 @@ +Wed Mar 20 18:40:34 2002 Owen Taylor + + * pango/modules.c (build_map): Add an informative + warning if no modules at all were found. (#74982, + suggestion from Dan Winship.) + Wed Mar 20 15:22:54 2002 Owen Taylor * configure.in: Error out if no backends found. (#74880) diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index b5b02f4f..bf2e8124 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,9 @@ +Wed Mar 20 18:40:34 2002 Owen Taylor + + * pango/modules.c (build_map): Add an informative + warning if no modules at all were found. (#74982, + suggestion from Dan Winship.) + Wed Mar 20 15:22:54 2002 Owen Taylor * configure.in: Error out if no backends found. (#74880) diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index b5b02f4f..bf2e8124 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,9 @@ +Wed Mar 20 18:40:34 2002 Owen Taylor + + * pango/modules.c (build_map): Add an informative + warning if no modules at all were found. (#74982, + suggestion from Dan Winship.) + Wed Mar 20 15:22:54 2002 Owen Taylor * configure.in: Error out if no backends found. (#74880) diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index b5b02f4f..bf2e8124 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,9 @@ +Wed Mar 20 18:40:34 2002 Owen Taylor + + * pango/modules.c (build_map): Add an informative + warning if no modules at all were found. (#74982, + suggestion from Dan Winship.) + Wed Mar 20 15:22:54 2002 Owen Taylor * configure.in: Error out if no backends found. (#74880) 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++) -- cgit v1.2.1