diff options
author | Dom Lachowicz <domlachowicz@gmail.com> | 2009-11-09 14:24:32 +0000 |
---|---|---|
committer | Dom Lachowicz <domlachowicz@gmail.com> | 2009-11-09 14:24:32 +0000 |
commit | ffe789245d82134cf3a6c8fd2322187fca6a4ca7 (patch) | |
tree | 68a6141c80333741035c2c345db0a3794eca88ab | |
parent | 11c1264de9e8a635a8e6e45689814eda158223fb (diff) | |
download | enchant-ffe789245d82134cf3a6c8fd2322187fca6a4ca7.tar.gz |
Bugzilla Bug 12472 - Win32 DLL dependency not found popup occurs when module has unmet dependencies
If, for example, the aspell module is present, but the required aspell library
isn't available when the broker is initialized, a modal win32 error MessageBox
appears saying that the required DLL can't be found in addition to the
'g_warning ("Error loading plugin: %s\n", g_module_error())' message that gets
printed to the log.
From Daniel Atallah <daniel_atallah@yahoo.com>
git-svn-id: svn+ssh://svn.abisource.com/svnroot/enchant/trunk@28462 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
-rw-r--r-- | src/enchant.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/enchant.c b/src/enchant.c index d51e3e6..6fd1ebb 100644 --- a/src/enchant.c +++ b/src/enchant.c @@ -1423,6 +1423,10 @@ enchant_load_providers_in_dir (EnchantBroker * broker, const char *dir_name) if ((entry_len > g_module_suffix_len) && !strcmp(dir_entry+(entry_len-g_module_suffix_len), G_MODULE_SUFFIX)) { +#ifdef _WIN32 + /* Suppress error popups for failing to load plugins */ + UINT old_error_mode = SetErrorMode(SEM_FAILCRITICALERRORS); +#endif filename = g_build_filename (dir_name, dir_entry, NULL); module = g_module_open (filename, (GModuleFlags) 0); @@ -1457,6 +1461,10 @@ enchant_load_providers_in_dir (EnchantBroker * broker, const char *dir_name) } g_free (filename); +#ifdef _WIN32 + /* Restore the original error mode */ + SetErrorMode(old_error_mode); +#endif } if (provider) { |