diff options
author | Not Zed <NotZed@Ximian.com> | 2004-04-28 14:37:26 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-04-28 14:37:26 +0800 |
commit | 4e99c39bcf70a2b15d4bd6dbb609ef0aba8d9675 (patch) | |
tree | f3efbe218556d095fe49ea91494b7b09265ca544 /widgets/misc/e-error.c | |
parent | 8aeb46417a17826f24eb2c128c30d905f507e1d6 (diff) | |
download | gsoc2013-evolution-4e99c39bcf70a2b15d4bd6dbb609ef0aba8d9675.tar gsoc2013-evolution-4e99c39bcf70a2b15d4bd6dbb609ef0aba8d9675.tar.gz gsoc2013-evolution-4e99c39bcf70a2b15d4bd6dbb609ef0aba8d9675.tar.bz2 gsoc2013-evolution-4e99c39bcf70a2b15d4bd6dbb609ef0aba8d9675.tar.lz gsoc2013-evolution-4e99c39bcf70a2b15d4bd6dbb609ef0aba8d9675.tar.xz gsoc2013-evolution-4e99c39bcf70a2b15d4bd6dbb609ef0aba8d9675.tar.zst gsoc2013-evolution-4e99c39bcf70a2b15d4bd6dbb609ef0aba8d9675.zip |
holder for system errors.
2004-04-28 Not Zed <NotZed@Ximian.com>
* e-system-errors.xml.in: holder for system errors.
* test-error.c: helper to show an error message/test it.
* e-error.[ch]: Api for disk-based, hig-compliant error messages
and query boxes.
svn path=/trunk/; revision=25650
Diffstat (limited to 'widgets/misc/e-error.c')
-rw-r--r-- | widgets/misc/e-error.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/widgets/misc/e-error.c b/widgets/misc/e-error.c index f7cc9ee7bf..d60d301cab 100644 --- a/widgets/misc/e-error.c +++ b/widgets/misc/e-error.c @@ -214,10 +214,15 @@ ee_load(const char *path) return; } - table = g_malloc0(sizeof(*table)); - table->domain = g_strdup(tmp); + table = g_hash_table_lookup(error_table, tmp); + if (table == NULL) { + table = g_malloc0(sizeof(*table)); + table->domain = g_strdup(tmp); + table->errors = g_hash_table_new(g_str_hash, g_str_equal); + g_hash_table_insert(error_table, table->domain, table); + } else + g_warning("Error file '%s', domain '%s' already used, merging", path, tmp); g_free(tmp); - table->errors = g_hash_table_new(g_str_hash, g_str_equal); for (error = root->children;error;error = error->next) { if (!strcmp(error->name, "error")) { @@ -304,8 +309,6 @@ ee_load(const char *path) } xmlFreeDoc(doc); - - g_hash_table_insert(error_table, table->domain, table); } static void @@ -324,7 +327,7 @@ ee_load_tables(void) /* setup system error types */ table = g_malloc0(sizeof(*table)); - table->domain = "system"; + table->domain = "builtin"; table->errors = g_hash_table_new(g_str_hash, g_str_equal); for (i=0;i<sizeof(default_errors)/sizeof(default_errors[0]);i++) g_hash_table_insert(table->errors, default_errors[i].id, &default_errors[i]); |