aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-05-12 11:34:33 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-05-12 11:34:33 +0800
commit97926d706a599a789b8d7b03a9e41a20513659d1 (patch)
tree89f1c9d163e295ebb436a53de2dcd506c81ba3e4
parent2cf63ca4bace1165d5f0385f4d0dbcce83269775 (diff)
downloadgsoc2013-evolution-97926d706a599a789b8d7b03a9e41a20513659d1.tar
gsoc2013-evolution-97926d706a599a789b8d7b03a9e41a20513659d1.tar.gz
gsoc2013-evolution-97926d706a599a789b8d7b03a9e41a20513659d1.tar.bz2
gsoc2013-evolution-97926d706a599a789b8d7b03a9e41a20513659d1.tar.lz
gsoc2013-evolution-97926d706a599a789b8d7b03a9e41a20513659d1.tar.xz
gsoc2013-evolution-97926d706a599a789b8d7b03a9e41a20513659d1.tar.zst
gsoc2013-evolution-97926d706a599a789b8d7b03a9e41a20513659d1.zip
add for translators.
2004-05-12 Not Zed <NotZed@Ximian.com> * mail-errors.xml.h: add for translators. * Makefile.am (%.xml.h): fix for xml i18n stuff. * mail-errors.xml: moved from the .xml.in file. 2004-05-11 Not Zed <NotZed@Ximian.com> * em-utils.c (em_uri_from_camel): pass an exception to provider_get, it relies on one. * em-migrate.c (em_migrate_1_4): fix some error messages, and fail with fatal errors properly. (em_migrate_local_folders_1_4): EEP! Who cares if this fails! Well I do. Setup exceptions and return codes. (em_migrate_dir): and here too. Sloppy! (em_migrate_dir): change the code slightly, 1.4 would recurse all folders, even if the parent folder doesn't have a folder-metadata.xml. Make sure we copy that mode. (get_local_store_uri): Make it copy the 1.4 behaviour properly. Any error -> use defaults. (em_migrate_dir): lots of changes. (mbox_build_filename): take the output string as an arg. (cp): add an argument to overwrite/append or require a unique empty file. (cp_r): add mode arg here too. (em_migrate_folder): split the folder copy stuff from em_migrate dir entirely. blah. (em_upgrade_accounts_1_4): can't fail, remove return code, etc. (em_upgrade_xml_1_4): removed this rather redundant odd api. (upgrade_xml_uris): this can't fail, remove return codes etc. (em_upgrade_xml_1_0): another oddly redundant function. (em_migrate_pop_uid_caches_1_4): error messages, blah blah. (em_migrate_folder_expand_state_1_4): no fatal states here. (em_migrate_folder_view_settings_1_4): nor here. (emm_setup_initial): do i18n 'better', using gnome_i18n_get_language_list, rather than hacky code. 2004-05-10 Not Zed <NotZed@Ximian.com> * mail-tools.c: remove e-meta.h, not used anymore. svn path=/trunk/; revision=25870
-rw-r--r--mail/ChangeLog44
-rw-r--r--mail/Makefile.am11
-rw-r--r--mail/em-migrate.c539
-rw-r--r--mail/em-utils.c8
-rw-r--r--mail/mail-account-editor.c2
-rw-r--r--mail/mail-component.c15
-rw-r--r--mail/mail-errors.xml298
-rw-r--r--mail/mail-errors.xml.h218
-rw-r--r--mail/mail-errors.xml.in286
-rw-r--r--mail/mail-tools.c2
10 files changed, 834 insertions, 589 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index cdd72b130e..9b1a2bd764 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,47 @@
+2004-05-12 Not Zed <NotZed@Ximian.com>
+
+ * mail-errors.xml.h: add for translators.
+
+ * Makefile.am (%.xml.h): fix for xml i18n stuff.
+
+ * mail-errors.xml: moved from the .xml.in file.
+
+2004-05-11 Not Zed <NotZed@Ximian.com>
+
+ * em-utils.c (em_uri_from_camel): pass an exception to
+ provider_get, it relies on one.
+
+ * em-migrate.c (em_migrate_1_4): fix some error messages, and fail
+ with fatal errors properly.
+ (em_migrate_local_folders_1_4): EEP! Who cares if this fails!
+ Well I do. Setup exceptions and return codes.
+ (em_migrate_dir): and here too. Sloppy!
+ (em_migrate_dir): change the code slightly, 1.4 would recurse all
+ folders, even if the parent folder doesn't have a
+ folder-metadata.xml. Make sure we copy that mode.
+ (get_local_store_uri): Make it copy the 1.4 behaviour properly.
+ Any error -> use defaults.
+ (em_migrate_dir): lots of changes.
+ (mbox_build_filename): take the output string as an arg.
+ (cp): add an argument to overwrite/append or require a unique
+ empty file.
+ (cp_r): add mode arg here too.
+ (em_migrate_folder): split the folder copy stuff from em_migrate
+ dir entirely. blah.
+ (em_upgrade_accounts_1_4): can't fail, remove return code, etc.
+ (em_upgrade_xml_1_4): removed this rather redundant odd api.
+ (upgrade_xml_uris): this can't fail, remove return codes etc.
+ (em_upgrade_xml_1_0): another oddly redundant function.
+ (em_migrate_pop_uid_caches_1_4): error messages, blah blah.
+ (em_migrate_folder_expand_state_1_4): no fatal states here.
+ (em_migrate_folder_view_settings_1_4): nor here.
+ (emm_setup_initial): do i18n 'better', using
+ gnome_i18n_get_language_list, rather than hacky code.
+
+2004-05-10 Not Zed <NotZed@Ximian.com>
+
+ * mail-tools.c: remove e-meta.h, not used anymore.
+
2004-05-11 Dan Winship <danw@ximian.com>
* GNOME_Evolution_Mail.server.in.in: Remove the mail folder
diff --git a/mail/Makefile.am b/mail/Makefile.am
index c8b533bd26..6d9f0c7f73 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -184,10 +184,11 @@ server_DATA = $(server_in_files:.server.in.in=_$(BASE_VERSION).server)
# Misc data to install
-error_in_files = mail-errors.xml.in
-error_DATA = $(error_in_files:.xml.in=.xml)
+error_DATA = mail-errors.xml
+error_i18n = $(error_DATA:.xml=.xml.h)
errordir = $(privdatadir)/errors
-@INTLTOOL_XML_RULE@
+%.xml.h: %.xml
+ $(top_builddir)/e-util/e-error-tool $^
glade_DATA = mail-config.glade subscribe-dialog.glade message-tags.glade mail-search.glade mail-security.glade
MARSHAL_GENERATED = em-marshal.c em-marshal.h
@@ -199,7 +200,7 @@ EXTRA_DIST = \
ChangeLog.pre-1-4 \
em-marshal.list \
$(SPELL_IDL) \
- $(error_in_files) \
+ $(error_DATA) $(error_i18n) \
$(glade_DATA) \
$(schema_DATA) \
$(server_in_files) \
@@ -243,6 +244,6 @@ install-data-local:
dist-hook:
cd $(distdir); rm -f $(BUILT_SOURCES)
-BUILT_SOURCES = $(SPELL_IDL_GENERATED) $(MARSHAL_GENERATED) $(server_DATA) $(error_DATA)
+BUILT_SOURCES = $(SPELL_IDL_GENERATED) $(MARSHAL_GENERATED) $(server_DATA) $(error_i18n)
CLEANFILES = $(BUILT_SOURCES)
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
index 43c0480f89..0f9324b183 100644
--- a/mail/em-migrate.c
+++ b/mail/em-migrate.c
@@ -49,6 +49,8 @@
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
+#include <libgnome/gnome-i18n.h>
+
#include <gal/util/e-util.h>
#include <gal/util/e-iconv.h>
#include <gal/util/e-xml-utils.h>
@@ -57,6 +59,7 @@
#include "e-util/e-account-list.h"
#include "e-util/e-signature-list.h"
#include "e-util/e-path.h"
+#include "widgets/misc/e-error.h"
#include "mail-config.h"
#include "em-utils.h"
@@ -82,23 +85,23 @@ xml_find_node (xmlNodePtr parent, const char *name)
return NULL;
}
-static int
+static void
upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
{
xmlNodePtr root, node;
char *uri, *new;
if (!doc || !(root = xmlDocGetRootElement (doc)))
- return 0;
+ return;
if (!root->name || strcmp (root->name, "filteroptions") != 0) {
/* root node is not <filteroptions>, nothing to upgrade */
- return 0;
+ return;
}
if (!(node = xml_find_node (root, "ruleset"))) {
/* no ruleset node, nothing to upgrade */
- return 0;
+ return;
}
node = node->children;
@@ -157,8 +160,6 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
node = node->next;
}
-
- return 0;
}
/* 1.0 upgrade functions & data */
@@ -316,12 +317,6 @@ upgrade_xml_uris_1_0 (const char *uri)
return out;
}
-static int
-em_upgrade_xml_1_0 (xmlDocPtr doc)
-{
- return upgrade_xml_uris (doc, upgrade_xml_uris_1_0);
-}
-
static char *
parse_lsub (const char *lsub, char *dir_sep)
{
@@ -511,9 +506,9 @@ em_migrate_1_0 (const char *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr fil
accounts_1_0 = g_hash_table_new (g_str_hash, g_str_equal);
accounts_name_1_0 = g_hash_table_new (g_str_hash, g_str_equal);
load_accounts_1_0 (config_xmldb);
-
- em_upgrade_xml_1_0 (filters);
- em_upgrade_xml_1_0 (vfolders);
+
+ upgrade_xml_uris(filters, upgrade_xml_uris_1_0);
+ upgrade_xml_uris(vfolders, upgrade_xml_uris_1_0);
g_hash_table_foreach (accounts_1_0, (GHFunc) accounts_1_0_free, NULL);
g_hash_table_destroy (accounts_1_0);
@@ -1223,65 +1218,80 @@ get_local_et_expanded (const char *dirname)
}
static char *
-get_local_store_uri (const char *dirname, const char *metadata, char **namep, int *index, CamelException *ex)
+get_local_store_uri (const char *dirname, char **namep, int *indexp)
{
- char *protocol, *name, *buf;
+ char *protocol, *name, *metadata, *tmp;
+ int index;
struct stat st;
xmlNodePtr node;
xmlDocPtr doc;
+
+ metadata = g_build_filename(dirname, "local-metadata.xml", NULL);
+
+ /* in 1.4, any errors are treated as defaults, this function cannot fail */
+
+ /* defaults */
+ name = "mbox";
+ protocol = "mbox";
+ index = TRUE;
+
+ if (stat (metadata, &st) == -1 || !S_ISREG (st.st_mode))
+ goto nofile;
+
+ doc = xmlParseFile(metadata);
+ if (doc == NULL)
+ goto nofile;
+
+ node = doc->children;
+ if (strcmp(node->name, "folderinfo"))
+ goto dodefault;
- if (stat (metadata, &st) == -1 || !S_ISREG (st.st_mode)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "`%s' is not a regular file", metadata);
- return NULL;
- }
-
- if (!(doc = xmlParseFile (metadata))) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "cannot parse `%s'", metadata);
- return NULL;
- }
-
- if (!(node = xmlDocGetRootElement (doc)) || strcmp (node->name, "folderinfo") != 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "`%s' is malformed", metadata);
- xmlFreeDoc (doc);
- return NULL;
- }
-
- node = node->children;
- while (node != NULL) {
+ for (node = node->children; node; node = node->next) {
if (node->name && !strcmp (node->name, "folder")) {
- protocol = xmlGetProp (node, "type");
- name = xmlGetProp (node, "name");
- buf = xmlGetProp (node, "index");
- if (buf != NULL) {
- *index = atoi (buf);
- xmlFree (buf);
- } else {
- *index = 0;
+ tmp = xmlGetProp (node, "type");
+ if (tmp) {
+ protocol = alloca(strlen(tmp)+1);
+ strcpy(protocol, tmp);
+ xmlFree(tmp);
+ }
+ tmp = xmlGetProp (node, "name");
+ if (tmp) {
+ name = alloca(strlen(tmp)+1);
+ strcpy(name, tmp);
+ xmlFree(tmp);
+ }
+ tmp = xmlGetProp (node, "index");
+ if (tmp) {
+ index = atoi(tmp);
+ xmlFree(tmp);
}
-
- xmlFreeDoc (doc);
-
- buf = g_strdup_printf ("%s:%s", protocol, dirname);
- xmlFree (protocol);
-
- *namep = g_strdup (name);
- xmlFree (name);
-
- return buf;
}
-
- node = node->next;
}
-
+dodefault:
xmlFreeDoc (doc);
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "`%s' does not contain needed info", metadata);
-
- return NULL;
+nofile:
+ g_free(metadata);
+
+ *namep = g_strdup(name);
+ *indexp = index;
+
+ return g_strdup_printf("%s:%s", protocol, dirname);
}
+enum {
+ CP_UNIQUE = 0,
+ CP_OVERWRITE,
+ CP_APPEND,
+};
+
+static int open_flags[3] = {
+ O_WRONLY | O_CREAT | O_TRUNC,
+ O_WRONLY | O_CREAT | O_TRUNC,
+ O_WRONLY | O_CREAT | O_APPEND,
+};
+
static int
-cp (const char *src, const char *dest, gboolean show_progress)
+cp (const char *src, const char *dest, gboolean show_progress, int mode)
{
unsigned char readbuf[65536];
ssize_t nread, nwritten;
@@ -1289,19 +1299,19 @@ cp (const char *src, const char *dest, gboolean show_progress)
size_t total = 0;
struct stat st;
struct utimbuf ut;
-
+
/* if the dest file exists and has content, abort - we don't
* want to corrupt their existing data */
- if (stat (dest, &st) == 0 && st.st_size > 0)
- return -1;
-
- if (stat (src, &st) == -1)
+ if (stat (dest, &st) == 0 && st.st_size > 0 && mode == CP_UNIQUE) {
+ errno = EEXIST;
return -1;
+ }
- if ((readfd = open (src, O_RDONLY)) == -1)
+ if (stat (src, &st) == -1
+ || (readfd = open (src, O_RDONLY)) == -1)
return -1;
-
- if ((writefd = open (dest, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
+
+ if ((writefd = open (dest, open_flags[mode], 0666)) == -1) {
errnosav = errno;
close (readfd);
errno = errnosav;
@@ -1362,7 +1372,7 @@ cp (const char *src, const char *dest, gboolean show_progress)
}
static int
-cp_r (const char *src, const char *dest, const char *pattern)
+cp_r (const char *src, const char *dest, const char *pattern, int mode)
{
GString *srcpath, *destpath;
struct dirent *dent;
@@ -1398,9 +1408,9 @@ cp_r (const char *src, const char *dest, const char *pattern)
continue;
if (S_ISDIR (st.st_mode)) {
- cp_r (srcpath->str, destpath->str, pattern);
+ cp_r (srcpath->str, destpath->str, pattern, mode);
} else if (!pattern || !strcmp (dent->d_name, pattern)) {
- cp (srcpath->str, destpath->str, FALSE);
+ cp (srcpath->str, destpath->str, FALSE, mode);
}
}
@@ -1412,20 +1422,19 @@ cp_r (const char *src, const char *dest, const char *pattern)
return 0;
}
-static GString *
-mbox_build_filename (const char *toplevel_dir, const char *full_name)
+static void
+mbox_build_filename (GString *path, const char *toplevel_dir, const char *full_name)
{
const char *start, *inptr = full_name;
int subdirs = 0;
- GString *path;
while (*inptr != '\0') {
if (*inptr == '/')
subdirs++;
inptr++;
}
-
- path = g_string_new (toplevel_dir);
+
+ g_string_assign(path, toplevel_dir);
g_string_append_c (path, '/');
inptr = full_name;
@@ -1445,72 +1454,47 @@ mbox_build_filename (const char *toplevel_dir, const char *full_name)
inptr++;
}
}
-
- return path;
}
-#define mbox_store_build_filename(s,n) mbox_build_filename (((CamelService *) s)->url->path, n)
-
-static void
-em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full_name)
+static int
+em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *full_name, CamelException *ex)
{
- guint32 flags = CAMEL_STORE_FOLDER_CREATE;
- CamelFolder *old_folder, *new_folder;
- CamelStore *local_store;
- struct dirent *dent;
- CamelException ex;
- char *path, *name, *uri;
+ CamelFolder *old_folder = NULL, *new_folder = NULL;
+ CamelStore *local_store = NULL;
+ char *name, *uri;
GPtrArray *uids;
struct stat st;
int thread_list;
int index, i;
- DIR *dir;
-
- path = g_strdup_printf ("%s/folder-metadata.xml", dirname);
- if (stat (path, &st) == -1 || !S_ISREG (st.st_mode)) {
- g_free (path);
- return;
- }
-
- if (!is_mail_folder (path)) {
- g_free (path);
- goto try_subdirs;
- }
-
- g_free (path);
-
- camel_exception_init (&ex);
-
- /* get old store & folder */
- path = g_strdup_printf ("%s/local-metadata.xml", dirname);
- if (!(uri = get_local_store_uri (dirname, path, &name, &index, &ex))) {
- g_warning ("error opening old store for `%s': %s", full_name, ex.desc);
- camel_exception_clear (&ex);
- g_free (path);
-
- /* try subfolders anyway? */
- goto try_subdirs;
+ GString *src, *dest;
+ int res = -1;
+
+ src = g_string_new("");
+
+ g_string_printf(src, "%s/folder-metadata.xml", dirname);
+ if (stat (src->str, &st) == -1
+ || !S_ISREG (st.st_mode)
+ || !is_mail_folder(src->str)) {
+ /* Not an evolution mail folder */
+ g_string_free(src, TRUE);
+ return 0;
}
- g_free (path);
-
+ dest = g_string_new("");
+ uri = get_local_store_uri(dirname, &name, &index);
em_migrate_set_folder_name (full_name);
-
thread_list = get_local_et_expanded (dirname);
-
+
+ /* Manually copy local mbox files, its much faster */
if (!strncmp (uri, "mbox:", 5)) {
- static char *ibex_ext[] = { ".ibex.index", ".ibex.index.data" };
- GString *src, *dest;
+ static char *meta_ext[] = { ".summary", ".ibex.index", ".ibex.index.data" };
size_t slen, dlen;
FILE *fp;
char *p;
- int i;
+ int i, mode;
- src = g_string_new ("");
- g_string_append_printf (src, "%s/%s", uri + 5, name);
- g_free (name);
-
- dest = mbox_store_build_filename (session->store, full_name);
+ g_string_printf (src, "%s/%s", uri + 5, name);
+ mbox_build_filename (dest, ((CamelService *)session->store)->url->path, full_name);
p = strrchr (dest->str, '/');
*p = '\0';
@@ -1518,22 +1502,39 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full
dlen = dest->len;
if (camel_mkdir (dest->str, 0777) == -1 && errno != EEXIST) {
- g_string_free (dest, TRUE);
- g_string_free (src, TRUE);
- goto try_subdirs;
+ camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
+ _("Unable to create new folder `%s': %s"),
+ dest->str, g_strerror(errno));
+ goto fatal;
}
*p = '/';
- if (cp (src->str, dest->str, TRUE) == -1) {
- g_string_free (dest, TRUE);
- g_string_free (src, TRUE);
- goto try_subdirs;
+ mode = CP_UNIQUE;
+ retry_copy:
+ if (cp (src->str, dest->str, TRUE, mode) == -1) {
+ if (errno == EEXIST) {
+ int save = errno;
+
+ switch (e_error_run(NULL, "mail:ask-migrate-existing", src->str, dest->str, NULL)) {
+ case GTK_RESPONSE_ACCEPT:
+ mode = CP_OVERWRITE;
+ goto retry_copy;
+ case GTK_RESPONSE_OK:
+ mode = CP_APPEND;
+ goto retry_copy;
+ case GTK_RESPONSE_REJECT:
+ goto ignore;
+ }
+
+ errno = save;
+ }
+ camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
+ _("Unable to copy folder `%s' to `%s': %s"),
+ src->str, dest->str, g_strerror(errno));
+ goto fatal;
+ ignore:
}
- g_string_append (src, ".ev-summary");
- g_string_append (dest, ".ev-summary");
- cp (src->str, dest->str, FALSE);
-
/* create a .cmeta file specifying to index and/or thread the folder */
g_string_truncate (dest, dlen);
g_string_append (dest, ".cmeta");
@@ -1583,51 +1584,25 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full
}
}
- /* copy over the ibex files */
- for (i = 0; i < 2; i++) {
+ /* copy over the metadata files */
+ for (i = 0; i < sizeof(meta_ext)/sizeof(meta_ext[0]); i++) {
g_string_truncate (src, slen);
g_string_truncate (dest, dlen);
- g_string_append (src, ibex_ext[i]);
- g_string_append (dest, ibex_ext[i]);
- cp (src->str, dest->str, FALSE);
+ g_string_append (src, meta_ext[i]);
+ g_string_append (dest, meta_ext[i]);
+ cp (src->str, dest->str, FALSE, CP_OVERWRITE);
}
-
- g_string_free (dest, TRUE);
- g_string_free (src, TRUE);
} else {
- if (!(local_store = camel_session_get_store ((CamelSession *) session, uri, &ex))) {
- g_warning ("error opening old store for `%s': %s", full_name, ex.desc);
- camel_exception_clear (&ex);
- g_free (name);
- g_free (uri);
-
- /* try subfolders anyway? */
- goto try_subdirs;
- }
-
- if (!(old_folder = camel_store_get_folder (local_store, name, 0, &ex))) {
- g_warning ("error opening old folder `%s': %s", full_name, ex.desc);
- camel_object_unref (local_store);
- camel_exception_clear (&ex);
- g_free (name);
-
- /* try subfolders anyway? */
- goto try_subdirs;
- }
-
- g_free (name);
+ guint32 flags = CAMEL_STORE_FOLDER_CREATE;
+
+ if (!(local_store = camel_session_get_store ((CamelSession *) session, uri, ex))
+ || !(old_folder = camel_store_get_folder (local_store, name, 0, ex)))
+ goto fatal;
flags |= (index ? CAMEL_STORE_FOLDER_BODY_INDEX : 0);
- if (!(new_folder = camel_store_get_folder (session->store, full_name, flags, &ex))) {
- g_warning ("error creating new mbox folder `%s': %s", full_name, ex.desc);
- camel_object_unref (local_store);
- camel_object_unref (old_folder);
- camel_exception_clear (&ex);
-
- /* try subfolders anyway? */
- goto try_subdirs;
- }
+ if (!(new_folder = camel_store_get_folder (session->store, full_name, flags, ex)))
+ goto fatal;
if (thread_list != -1) {
camel_object_meta_set (new_folder, "evolution:thread_list", thread_list ? "1" : "0");
@@ -1642,16 +1617,17 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full
if (!(info = camel_folder_get_message_info (old_folder, uids->pdata[i])))
continue;
- if (!(message = camel_folder_get_message (old_folder, uids->pdata[i], &ex))) {
+ if (!(message = camel_folder_get_message (old_folder, uids->pdata[i], ex))) {
camel_folder_free_message_info (old_folder, info);
- break;
+ camel_folder_free_uids (old_folder, uids);
+ goto fatal;
}
- camel_folder_append_message (new_folder, message, info, NULL, &ex);
+ camel_folder_append_message (new_folder, message, info, NULL, ex);
camel_folder_free_message_info (old_folder, info);
camel_object_unref (message);
- if (camel_exception_is_set (&ex))
+ if (camel_exception_is_set (ex))
break;
em_migrate_set_progress (((double) i + 1) / ((double) uids->len));
@@ -1659,39 +1635,51 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full
camel_folder_free_uids (old_folder, uids);
- if (camel_exception_is_set (&ex)) {
- g_warning ("error migrating folder `%s': %s", full_name, ex.desc);
- camel_object_unref (local_store);
- camel_object_unref (old_folder);
- camel_object_unref (new_folder);
- camel_exception_clear (&ex);
-
- /* try subfolders anyway? */
- goto try_subdirs;
- }
-
- /*camel_object_unref (local_store);*/
- camel_object_unref (old_folder);
- camel_object_unref (new_folder);
+ if (camel_exception_is_set (ex))
+ goto fatal;
}
-
- try_subdirs:
-
+ res = 0;
+fatal:
+ g_string_free(src, TRUE);
+ g_string_free(dest, TRUE);
+ if (local_store)
+ camel_object_unref(local_store);
+ if (old_folder)
+ camel_object_unref(old_folder);
+ if (new_folder)
+ camel_object_unref(new_folder);
+
+ return res;
+}
+
+static int
+em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full_name, CamelException *ex)
+{
+ char *path;
+ DIR *dir;
+ struct stat st;
+ struct dirent *dent;
+ int res = 0;
+
+ if (em_migrate_folder(session, dirname, full_name, ex) == -1)
+ return -1;
+
+ /* no subfolders, not readable, don't care */
path = g_strdup_printf ("%s/subfolders", dirname);
if (stat (path, &st) == -1 || !S_ISDIR (st.st_mode)) {
g_free (path);
- return;
+ return 0;
}
if (!(dir = opendir (path))) {
- g_warning ("cannot open `%s': %s", path, strerror (errno));
g_free (path);
- return;
+ return 0;
}
- while ((dent = readdir (dir))) {
+ while (res == 0 && (dent = readdir (dir))) {
char *full_path;
-
+ char *name;
+
if (dent->d_name[0] == '.')
continue;
@@ -1702,7 +1690,7 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full
}
name = g_strdup_printf ("%s/%s", full_name, dent->d_name);
- em_migrate_dir (session, full_path, name);
+ res = em_migrate_dir (session, full_path, name, ex);
g_free (full_path);
g_free (name);
}
@@ -1710,23 +1698,28 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full
closedir (dir);
g_free (path);
+
+ return res;
}
-static void
-em_migrate_local_folders_1_4 (EMMigrateSession *session)
+static int
+em_migrate_local_folders_1_4 (EMMigrateSession *session, CamelException *ex)
{
struct dirent *dent;
struct stat st;
DIR *dir;
-
+ int res = 0;
+
if (!(dir = opendir (session->srcdir))) {
- g_warning ("cannot open `%s': %s", session->srcdir, strerror (errno));
- return;
+ camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
+ _("Unable to scan for existing mailboxes at `%s': %s"),
+ session->srcdir, g_strerror(errno));
+ return -1;
}
em_migrate_setup_progress_dialog ();
- while ((dent = readdir (dir))) {
+ while (res == 0 && (dent = readdir (dir))) {
char *full_path;
if (dent->d_name[0] == '.')
@@ -1738,13 +1731,15 @@ em_migrate_local_folders_1_4 (EMMigrateSession *session)
continue;
}
- em_migrate_dir (session, full_path, dent->d_name);
+ res = em_migrate_dir (session, full_path, dent->d_name, ex);
g_free (full_path);
}
closedir (dir);
em_migrate_close_progress_dialog ();
+
+ return res;
}
static char *
@@ -1831,15 +1826,6 @@ upgrade_vfolder_sources_1_4 (xmlDocPtr doc)
}
}
-static int
-em_upgrade_xml_1_4 (xmlDocPtr doc, gboolean vfolders_xml)
-{
- if (vfolders_xml)
- upgrade_vfolder_sources_1_4 (doc);
-
- return upgrade_xml_uris (doc, upgrade_xml_uris_1_4);
-}
-
static char *
get_nth_sig (int id)
{
@@ -1867,14 +1853,14 @@ get_nth_sig (int id)
return uid;
}
-static int
+static void
em_upgrade_accounts_1_4 (void)
{
EAccountList *accounts;
EIterator *iter;
if (!(accounts = mail_config_get_accounts ()))
- return 0;
+ return;
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
@@ -1907,8 +1893,6 @@ em_upgrade_accounts_1_4 (void)
g_object_unref (iter);
mail_config_save_accounts ();
-
- return 0;
}
static int
@@ -1919,7 +1903,10 @@ em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex)
size_t olen, nlen;
char *cache_dir;
DIR *dir;
-
+ int res = 0;
+
+ /* Sigh, too many unique strings to translate, for cases which shouldn't ever happen */
+
/* open the old cache dir */
cache_dir = g_build_filename (g_get_home_dir (), "evolution", "mail", "pop3", NULL);
if (!(dir = opendir (cache_dir))) {
@@ -1929,9 +1916,8 @@ em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex)
}
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to migrate pop3 uid caches: %s"),
- g_strerror (errno));
- g_warning ("cannot open `%s': %s", cache_dir, strerror (errno));
+ _("Unable to open old POP keep-on-server data `%s': %s"),
+ cache_dir, g_strerror (errno));
g_free (cache_dir);
return -1;
}
@@ -1944,9 +1930,8 @@ em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex)
cache_dir = g_build_filename (evolution_dir, "mail", "pop", NULL);
if (camel_mkdir (cache_dir, 0777) == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to migrate pop3 uid caches: %s"),
- g_strerror (errno));
- g_warning ("cannot create `%s': %s", cache_dir, strerror (errno));
+ _("Unable to create POP3 keep-on-server data directory `%s': %s"),
+ cache_dir, g_strerror(errno));
g_string_free (oldpath, TRUE);
g_free (cache_dir);
closedir (dir);
@@ -1958,7 +1943,7 @@ em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex)
nlen = newpath->len;
g_free (cache_dir);
- while ((dent = readdir (dir))) {
+ while (res == 0 && (dent = readdir (dir))) {
if (strncmp (dent->d_name, "cache-pop:__", 12) != 0)
continue;
@@ -1971,13 +1956,14 @@ em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex)
/* strip the trailing '_' */
g_string_truncate (newpath, newpath->len - 1);
- if (camel_mkdir (newpath->str, 0777) == -1) {
- g_warning ("cannot create `%s': %s", newpath->str, strerror (errno));
- continue;
+ if (camel_mkdir (newpath->str, 0777) == -1
+ || cp(oldpath->str, (g_string_append(newpath, "/uid-cache"))->str, FALSE, CP_UNIQUE)) {
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
+ _("Unable to copy POP3 keep-on-server data `%s': %s"),
+ oldpath->str, g_strerror(errno));
+ res = -1;
}
-
- g_string_append (newpath, "/uid-cache");
- cp (oldpath->str, newpath->str, FALSE);
+
}
g_string_free (oldpath, TRUE);
@@ -1985,7 +1971,7 @@ em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex)
closedir (dir);
- return 0;
+ return res;
}
static int
@@ -2003,7 +1989,7 @@ em_migrate_imap_caches_1_4 (const char *evolution_dir, CamelException *ex)
dest = g_build_filename (evolution_dir, "mail", "imap", NULL);
/* we don't care if this fails, it's only a cache... */
- cp_r (src, dest, "summary");
+ cp_r (src, dest, "summary", CP_OVERWRITE);
g_free (dest);
g_free (src);
@@ -2031,12 +2017,9 @@ em_migrate_folder_expand_state_1_4 (const char *evolution_dir, CamelException *e
destpath = g_string_new (evolution_dir);
g_string_append (destpath, "/mail/config");
if (camel_mkdir (destpath->str, 0777) == -1 || !(dir = opendir (srcpath->str))) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to migrate folder expand state: %s"), g_strerror (errno));
- g_warning ("Failed to migrate folder expand state: %s", g_strerror (errno));
g_string_free (destpath, TRUE);
g_string_free (srcpath, TRUE);
- return -1;
+ return 0;
}
g_string_append (srcpath, "/et-expanded-");
@@ -2097,7 +2080,7 @@ em_migrate_folder_expand_state_1_4 (const char *evolution_dir, CamelException *e
g_string_append (destpath, filename);
g_free (buf);
- cp (srcpath->str, destpath->str, FALSE);
+ cp (srcpath->str, destpath->str, FALSE, CP_UNIQUE);
g_string_truncate (srcpath, slen);
g_string_truncate (destpath, dlen);
@@ -2132,12 +2115,9 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
destpath = g_string_new (evolution_dir);
g_string_append (destpath, "/mail/views");
if (camel_mkdir (destpath->str, 0777) == -1 || !(dir = opendir (srcpath->str))) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to migrate folder expand state: %s"), g_strerror (errno));
- g_warning ("Failed to migrate folder expand state: %s", g_strerror (errno));
g_string_free (destpath, TRUE);
g_string_free (srcpath, TRUE);
- return -1;
+ return 0;
}
g_string_append_c (srcpath, '/');
@@ -2222,7 +2202,7 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
g_string_append (destpath, filename);
g_free (buf);
- cp (srcpath->str, destpath->str, FALSE);
+ cp (srcpath->str, destpath->str, FALSE, CP_UNIQUE);
g_string_truncate (srcpath, slen);
g_string_truncate (destpath, dlen);
@@ -2323,18 +2303,18 @@ em_migrate_1_4 (const char *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders
char *path;
path = g_build_filename (evolution_dir, "mail", NULL);
-
+
camel_init (path, TRUE);
session = (EMMigrateSession *) em_migrate_session_new (path);
g_free (path);
- session->srcdir = g_build_filename (g_get_home_dir (), "evolution", "local", NULL);
+ session->srcdir = g_build_filename (g_get_home_dir (), "evolution", "local", NULL);
path = g_strdup_printf ("mbox:%s/.evolution/mail/local", g_get_home_dir ());
if (stat (path + 5, &st) == -1) {
if (errno != ENOENT || camel_mkdir (path + 5, 0777) == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to create directory `%s': %s"),
+ _("Failed to create local mail storage `%s': %s"),
path + 5, g_strerror (errno));
g_free (session->srcdir);
camel_object_unref (session);
@@ -2346,7 +2326,7 @@ em_migrate_1_4 (const char *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders
camel_exception_init (&lex);
if (!(session->store = camel_session_get_store ((CamelSession *) session, path, &lex))) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to open store for `%s': %s"),
+ _("Failed to create local mail storage `%s': %s"),
path, lex.desc);
g_free (session->srcdir);
camel_object_unref (session);
@@ -2356,28 +2336,26 @@ em_migrate_1_4 (const char *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders
}
g_free (path);
- em_migrate_local_folders_1_4 (session);
+ if (em_migrate_local_folders_1_4 (session, ex) == -1)
+ return -1;
camel_object_unref (session->store);
g_free (session->srcdir);
camel_object_unref (session);
- if (em_upgrade_accounts_1_4 () == -1)
- return -1;
-
- if (em_upgrade_xml_1_4 (filters, FALSE) == -1)
- return -1;
+ em_upgrade_accounts_1_4();
- if (em_upgrade_xml_1_4 (vfolders, TRUE) == -1)
- return -1;
+ upgrade_xml_uris(filters, upgrade_xml_uris_1_4);
+ upgrade_vfolder_sources_1_4(vfolders);
+ upgrade_xml_uris(vfolders, upgrade_xml_uris_1_4);
path = g_build_filename (g_get_home_dir (), "evolution", "searches.xml", NULL);
if (stat (path, &st) == 0 && S_ISREG (st.st_mode)) {
char *dest;
dest = g_build_filename (evolution_dir, "mail", "searches.xml", NULL);
- cp (path, dest, FALSE);
+ cp (path, dest, FALSE, CP_UNIQUE);
g_free (dest);
}
g_free (path);
@@ -2385,10 +2363,9 @@ em_migrate_1_4 (const char *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders
if (em_migrate_pop_uid_caches_1_4 (evolution_dir, ex) == -1)
return -1;
- if (em_migrate_imap_caches_1_4 (evolution_dir, ex) == -1)
- return -1;
-
/* these are non-fatal */
+ em_migrate_imap_caches_1_4 (evolution_dir, ex);
+ camel_exception_clear(ex);
em_migrate_folder_expand_state_1_4 (evolution_dir, ex);
camel_exception_clear(ex);
em_migrate_folder_view_settings_1_4 (evolution_dir, ex);
@@ -2437,18 +2414,12 @@ emm_setup_initial(const char *evolution_dir)
DIR *dir;
struct dirent *d;
struct stat st;
- char *base, *local, *lang;
+ const GList *l;
+ char *local, *base;
/* special-case - this means brand new install of evolution */
/* FIXME: create default folders and stuff... */
- base = (char *) e_iconv_locale_language ();
- if (base) {
- lang = g_alloca(strlen(base)+1);
- strcpy(lang, base);
- } else
- lang = NULL;
-
d(printf("Setting up initial mail tree\n"));
base = g_build_filename(evolution_dir, "/mail/local", NULL);
@@ -2458,16 +2429,14 @@ emm_setup_initial(const char *evolution_dir)
}
/* e.g. try en-AU then en, etc */
- while (lang != NULL) {
- local = g_build_filename(EVOLUTION_PRIVDATADIR "/default", lang, "mail/local", NULL);
+ for (l = gnome_i18n_get_language_list("LC_MESSAGES");
+ l != NULL;
+ l = g_list_next(l)) {
+ local = g_build_filename(EVOLUTION_PRIVDATADIR "/default", (char *)l->data, "mail/local", NULL);
if (stat(local, &st) == 0)
goto gotlocal;
g_free(local);
- if (strlen(lang)>2 && lang[2] == '-')
- lang[2] = 0;
- else
- lang = NULL;
}
local = g_build_filename(EVOLUTION_PRIVDATADIR "/default/C/mail/local", NULL);
@@ -2484,7 +2453,7 @@ gotlocal:
src = g_build_filename(local, d->d_name, NULL);
dest = g_build_filename(base, d->d_name, NULL);
- cp(src, dest, FALSE);
+ cp(src, dest, FALSE, CP_UNIQUE);
g_free(dest);
g_free(src);
}
@@ -2508,7 +2477,7 @@ em_migrate (const char *evolution_dir, int major, int minor, int revision, Camel
if (stat (path, &st) == -1) {
if (errno != ENOENT || camel_mkdir (path, 0777) == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to create directory `%s': %s"),
+ _("Unable to create local mail folders at `%s': %s"),
path, g_strerror (errno));
g_free (path);
return -1;
@@ -2526,12 +2495,8 @@ em_migrate (const char *evolution_dir, int major, int minor, int revision, Camel
path = g_build_filename (g_get_home_dir (), "evolution", NULL);
if (minor <= 2 && !(config_xmldb = emm_load_xml (path, "config.xmldb"))) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Cannot migrate mail settings/data from Evolution %d.%d.%d: "
- "~/evolution/config.xmldb doesn't exist or is corrupt!",
- major, minor, revision);
- g_warning ("Cannot migrate mail settings/data from Evolution %d.%d.%d: "
- "~/evolution/config.xmldb doesn't exist or is corrupt!",
- major, minor, revision);
+ _("Unable to read settings from previous Evolution install, "
+ "`evolution/config.xmldb' does not exist or is corrupt."));
g_free (path);
return -1;
}
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 87b0d9b899..ca082a8423 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1461,18 +1461,22 @@ char *em_uri_from_camel(const char *curi)
const char *uid, *path;
char *euri, *tmp;
CamelProvider *provider;
+ CamelException ex;
/* Easiest solution to code that shouldnt be calling us */
if (!strncmp(curi, "email:", 6))
return g_strdup(curi);
- provider = camel_provider_get(curi, NULL);
+ camel_exception_init(&ex);
+ provider = camel_provider_get(curi, &ex);
if (provider == NULL) {
+ camel_exception_clear(&ex);
d(printf("em uri from camel failed '%s'\n", curi));
return g_strdup(curi);
}
- curl = camel_url_new(curi, NULL);
+ curl = camel_url_new(curi, &ex);
+ camel_exception_clear(&ex);
if (curl == NULL)
return g_strdup(curi);
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
index 8b2b5a8861..bf5b265aab 100644
--- a/mail/mail-account-editor.c
+++ b/mail/mail-account-editor.c
@@ -109,7 +109,7 @@ apply_changes (MailAccountEditor *editor)
if (page != -1) {
gtk_notebook_set_current_page (editor->notebook, page);
gtk_widget_grab_focus (incomplete);
- e_error_run(editor, "mail:account-incomplete", NULL);
+ e_error_run((GtkWindow *)editor, "mail:account-incomplete", NULL);
return FALSE;
}
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 71b82f89fd..f4296fb9a4 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -742,22 +742,25 @@ impl_sendAndReceive (PortableServer_Servant servant, CORBA_Environment *ev)
mail_send_receive ();
}
-static CORBA_boolean
+static void
impl_upgradeFromVersion (PortableServer_Servant servant, const short major, const short minor, const short revision, CORBA_Environment *ev)
{
MailComponent *component;
CamelException ex;
- int ok;
component = mail_component_peek ();
camel_exception_init (&ex);
- ok = em_migrate (component->priv->base_directory, major, minor, revision, &ex) != -1;
+ if (em_migrate (component->priv->base_directory, major, minor, revision, &ex) == -1) {
+ GNOME_Evolution_Component_UpgradeFailed *failedex;
- /* FIXME: report errors? */
- camel_exception_clear (&ex);
+ failedex = GNOME_Evolution_Component_UpgradeFailed__alloc();
+ failedex->what = CORBA_string_dup(_("Failed upgrading Mail settings or folders."));
+ failedex->why = CORBA_string_dup(ex.desc);
+ CORBA_exception_set(ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Component_UpgradeFailed, failedex);
+ }
- return ok;
+ camel_exception_clear (&ex);
}
/* Initialization. */
diff --git a/mail/mail-errors.xml b/mail/mail-errors.xml
new file mode 100644
index 0000000000..1b6582e7e1
--- /dev/null
+++ b/mail/mail-errors.xml
@@ -0,0 +1,298 @@
+<?xml version="1.0"?>
+<error-list domain="mail">
+
+ <error id="camel-service-auth-invalid" type="warning">
+ <primary>Invalid authentication</primary>
+ <secondary>This server does not support this type of authentication and may not support authentication at all.</secondary>
+ </error>
+
+ <error id="camel-service-auth-failed" type="warning">
+ <primary>Your login to your server &quot;{0}&quot; as &quot;{0}&quot; failed.</primary>
+ <secondary>Check to make sure your password is spelled correctly. Remember that many passwords are case sensitive; your caps lock might be on.</secondary>
+ </error>
+
+ <error id="ask-send-html" type="question" default="GTK_RESPONSE_YES">
+ <primary>Are you sure you want to send a message in HTML format?</primary>
+ <secondary>Please make sure the following recipients are willing and able to receive HTML email:
+{0}
+Send anyway?</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button label="_Send" response="GTK_RESPONSE_YES"/>
+ </error>
+
+ <error id="ask-send-no-subject" type="question" default="GTK_RESPONSE_YES">
+ <primary>Are you sure you want to send a message without a subject?</primary>
+ <secondary>Adding a meaningful Subject line to your messages will give your recipients an idea of what your mail is about.</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button label="_Send" response="GTK_RESPONSE_YES"/>
+ </error>
+
+ <error id="ask-send-only-bcc-contact" type="question" default="GTK_RESPONSE_YES">
+ <primary>Are you sure you want to send a message with only BCC recipients?</primary>
+ <secondary>The contact list you are sending to is configured to hide list recipients.
+
+Many email systems add an Apparently-To header to messages that only have BCC recipients. This header, if added, will list all of your recipients in your message. To avoid this, you should add at least one To: or CC: recipient. </secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button label="_Send" response="GTK_RESPONSE_YES"/>
+ </error>
+
+ <error id="ask-send-only-bcc" type="warning" default="GTK_RESPONSE_YES">
+ <primary>Are you sure you want to send a message with only BCC recipients?</primary>
+ <secondary>Many email systems add an Apparently-To header to messages that only have BCC recipients. This header, if added, will list all of your recipients to your message anyway. To avoid this, you should add at least one To: or CC: recipient.</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button label="_Send" response="GTK_RESPONSE_YES"/>
+ </error>
+
+ <error id="send-no-recipients" type="warning">
+ <primary>This message cannot be sent because you have not specified any Recipients</primary>
+ <secondary>Please enter a valid email address in the To: field. You can search for email addresses by clicking on the To: button next to the entry box.</secondary>
+ </error>
+
+ <error id="ask-default-drafts" type="question" default="GTK_RESPONSE_YES">
+ <primary>Use default drafts folder?</primary>
+ <secondary>Unable to open the drafts folder for this account. Use the system drafts folder instead?</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button label="Use _Default" response="GTK_RESPONSE_YES"/>
+ </error>
+
+ <error id="ask-expunge" type="question" default="GTK_RESPONSE_CANCEL">
+ <primary>Are you sure you want to permanently remove all the deleted message in folder &quot;{0}&quot;?</primary>
+ <secondary>If you continue, you will not be able to recover these messages.</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button label="_Expunge" response="GTK_RESPONSE_YES"/>
+ </error>
+
+ <error id="ask-empty-trash" type="warning" default="GTK_RESPONSE_CANCEL">
+ <primary>Are you sure you want to permanently remove all the deleted messages in all folders?</primary>
+ <secondary>If you continue, you will not be able to recover these messages.</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button label="_Empty Trash" response="GTK_RESPONSE_YES"/>
+ </error>
+
+ <error id="exit-unsaved" type="warning" default="GTK_RESPONSE_NO">
+ <primary>You have unsent messages, do you wish to quit anyway?</primary>
+ <secondary>If you quit, these messages will not be sent until Evolution is started again.</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_NO"/>
+ <button stock="gtk-quit" response="GTK_RESPONSE_YES"/>
+ </error>
+
+ <error id="camel-exception" type="warning">
+ <primary>Your message message, with the subject &quot;{0}&quot; was not delivered.</primary>
+ <secondary>The message was sent via the &quot;sendmail&quot; external application. Sendmail reports the following error: status 67: mail not sent.
+The message is stored in the Outbox folder. Check the message for errors and resend.</secondary>
+ </error>
+
+ <error id="async-error" type="error">
+ <primary>Error while {0}.</primary>
+ <secondary>{1}.</secondary>
+ </error>
+
+ <error id="async-error-nodescribe" type="error">
+ <primary>Error while performing operation.</primary>
+ <secondary>{0}.</secondary>
+ </error>
+
+ <error id="session-message-info" type="info">
+ <secondary>{0}</secondary>
+ </error>
+
+ <error id="session-message-info-cancel" type="info" default="GTK_RESPONSE_CANCEL">
+ <secondary>{0}</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button stock="gtk-ok" response="GTK_RESPONSE_OK"/>
+ </error>
+
+ <error id="session-message-warning" type="warning">
+ <secondary>{0}</secondary>
+ </error>
+
+ <error id="session-message-warning-cancel" type="warning" default="GTK_RESPONSE_CANCEL">
+ <secondary>{0}</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button stock="gtk-ok" response="GTK_RESPONSE_OK"/>
+ </error>
+
+ <error id="session-message-error" type="info">
+ <secondary>{0}</secondary>
+ </error>
+
+ <error id="session-message-error-cancel" type="info" default="GTK_RESPONSE_CANCEL">
+ <secondary>{0}</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button stock="gtk-ok" response="GTK_RESPONSE_OK"/>
+ </error>
+
+ <error id="ask-session-password" type="question" default="GTK_RESPONSE_OK">
+ <primary>Enter password.</primary>
+ <secondary>{0}</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button stock="gtk-ok" response="GTK_RESPONSE_OK"/>
+ </error>
+
+ <error id="filter-load-error" type="error">
+ <primary>Error loading filter definitions.</primary>
+ <secondary>{0}</secondary>
+ </error>
+
+ <error id="no-save-path" type="error">
+ <primary>Cannot save to directory &quot;{0}&quot;.</primary>
+ <secondary>{1}</secondary>
+ </error>
+
+ <error id="no-create-path" type="error">
+ <primary>Cannot save to file &quot;{0}&quot;.</primary>
+ <secondary>Cannot create the save directory, because &quot;{1}&quot;</secondary>
+ </error>
+
+ <error id="no-create-tmp-path" type="error">
+ <primary>Cannot create temporary save directory.</primary>
+ <secondary>Because &quot;{1}&quot;.</secondary>
+ </error>
+
+ <error id="no-write-path-exists" type="error">
+ <primary>Cannot save to file &quot;{0}&quot;.</primary>
+ <secondary>File exists but cannot overwrite it.</secondary>
+ </error>
+
+ <error id="no-write-path-notfile" type="error">
+ <primary>Cannot save to file &quot;{0}&quot;.</primary>
+ <secondary>File exists but is not a regular file.</secondary>
+ </error>
+
+ <error id="no-delete-folder" type="error">
+ <primary>Cannot delete folder &quot;{0}&quot;.</primary>
+ <secondary>Because &quot;{1}&quot;.</secondary>
+ </error>
+
+ <error id="no-delete-spethal-folder" type="error">
+ <primary>Cannot delete system folder &quot;{0}&quot;.</primary>
+ <secondary>System folders are required for Ximian Evolution to function correctly and cannot be renamed, moved, or deleted.</secondary>
+ </error>
+
+ <error id="no-rename-spethal-folder" type="error">
+ <primary>Cannot rename or move system folder &quot;{0}&quot;.</primary>
+ <secondary>System folders are required for Ximian Evolution to function correctly and cannot be renamed, moved, or deleted.</secondary>
+ </error>
+
+ <error id="ask-delete-folder" type="question" default="GTK_RESPONSE_CANCEL">
+ <title>Delete &quot;{0}&quot;?</title>
+ <primary>Really delete folder &quot;{0}&quot; and all of its subfolders?</primary>
+ <secondary>If you delete the folder, all of its contents and its subfolders contents will be deleted permanently.</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button stock="gtk-delete" response="GTK_RESPONSE_OK"/>
+ </error>
+
+ <error id="no-rename-folder-exists" type="error">
+ <primary>Cannot rename &quot;{0}&quot; to &quot;{1}&quot;.</primary>
+ <secondary>A folder named &quot;{1}&quot; already exists. Please use a different name.</secondary>
+ </error>
+
+ <error id="no-rename-folder" type="error">
+ <primary>Cannot rename &quot;{0}&quot; to &quot;{1}&quot;.</primary>
+ <secondary>Because &quot;{2}&quot;.</secondary>
+ </error>
+
+ <error id="no-move-folder-nostore" type="error">
+ <primary>Cannot move folder &quot;{0}&quot; to &quot;{1}&quot;.</primary>
+ <secondary>Cannot open source &quot;{2}&quot;.</secondary>
+ </error>
+
+ <error id="no-move-folder-to-nostore" type="error">
+ <primary>Cannot move folder &quot;{0}&quot; to &quot;{1}&quot;.</primary>
+ <secondary>Cannot open target &quot;{2}&quot;.</secondary>
+ </error>
+
+ <error id="no-copy-folder-nostore" type="error">
+ <primary>Cannot copy folder &quot;{0}&quot; to &quot;{1}&quot;.</primary>
+ <secondary>Cannot open source &quot;{2}&quot;.</secondary>
+ </error>
+
+ <error id="no-copy-folder-to-nostore" type="error">
+ <primary>Cannot copy folder &quot;{0}&quot; to &quot;{1}&quot;.</primary>
+ <secondary>Cannot open target &quot;{2}&quot;.</secondary>
+ </error>
+
+ <error id="no-create-folder-nostore" type="error">
+ <primary>Cannot create folder &quot;{0}&quot;.</primary>
+ <secondary>Cannot open source &quot;{1}&quot;</secondary>
+ </error>
+
+ <error id="account-incomplete" type="error">
+ <primary>Cannot save changes to account.</primary>
+ <secondary>You have not filled in all of the required information.</secondary>
+ </error>
+
+ <error id="account-notunique" type="error">
+ <primary>Cannot save changes to account.</primary>
+ <secondary>You may not create two accounts with the same name.</secondary>
+ </error>
+
+ <error id="ask-delete-account" type="question" default="GTK_RESPONSE_NO" modal="true">
+ <title>Delete account?</title>
+ <primary>Are you sure you want to delete this account?</primary>
+ <secondary>If you proceed, the account information will be deleted permanently.</secondary>
+ <button stock="gtk-delete" response="GTK_RESPONSE_YES"/>
+ <button stock="gtk-no" label="Don't delete" response="GTK_RESPONSE_NO"/>
+ </error>
+
+ <error id="no-save-signature" type="error">
+ <primary>Could not save signature file.</primary>
+ <secondary>Because &quot;{0}&quot;.</secondary>
+ </error>
+
+ <error id="signature-notscript" type="error">
+ <primary>Cannot set signature script &quot;{0}&quot;.</primary>
+ <secondary>The script file must exist and be executable.</secondary>
+ </error>
+
+ <error id="ask-signature-changed" type="question" default="GTK_RESPONSE_YES">
+ <title>Discard changed?</title>
+ <primary>Do you wish to save your changes?</primary>
+ <secondary>This signature has been changed, but has not been saved.</secondary>
+ <button label="_Discard changes" response="GTK_RESPONSE_NO"/>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button stock="gtk-save" response="GTK_RESPONSE_YES"/>
+ </error>
+
+ <error id="vfolder-notexist" type="error">
+ <primary>Cannot edit vFolder &quot;{0}&quot; as it does not exist.</primary>
+ <secondary>This folder may have been added implictly, go to the virtual folder editor to add it explictly, if required.</secondary>
+ </error>
+
+ <error id="vfolder-notunique" type="error">
+ <primary>Cannot add vFolder &quot;{0}&quot;.</primary>
+ <secondary>A folder named &quot;{1}&quot; already exists. Please use a different name.</secondary>
+ </error>
+
+ <error id="vfolder-updated" type="info">
+ <primary>vFolders automatically updated.</primary>
+ <secondary>The following vFolder(s):
+{0}
+Used the now removed folder:
+ &quot;{1}&quot;
+And have been updated.</secondary>
+ </error>
+
+ <error id="filter-updated" type="info">
+ <primary>Mail filters automatically updated.</primary>
+ <secondary>The following filter rule(s):
+{0}
+Used the now removed folder:
+ &quot;{1}&quot;
+And have been updated.</secondary>
+ </error>
+
+ <error id="ask-migrate-existing" type="question" default="GTK_RESPONSE_CANCEL">
+ <primary>Problem migrating old mail folder &quot;{0}&quot;.</primary>
+ <secondary>A non-empty folder at &quot;{1}&quot; already exists.
+
+You can choose to ignore this folder, overwrite or append its contents, or quit.
+</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button label="Ignore" response="GTK_RESPONSE_REJECT"/>
+ <button stock="gtk-delete" label="_Overwrite" response="GTK_RESPONSE_ACCEPT"/>
+ <button label="_Append" response="GTK_RESPONSE_OK"/>
+ </error>
+
+</error-list>
+
diff --git a/mail/mail-errors.xml.h b/mail/mail-errors.xml.h
new file mode 100644
index 0000000000..2f6b7461a9
--- /dev/null
+++ b/mail/mail-errors.xml.h
@@ -0,0 +1,218 @@
+/* mail:camel-service-auth-invalid primary */
+char *s = N_("Invalid authentication");
+/* mail:camel-service-auth-invalid secondary */
+char *s = N_("This server does not support this type of authentication and may not support authentication at all.");
+/* mail:camel-service-auth-failed primary */
+char *s = N_("Your login to your server \"{0}\" as \"{0}\" failed.");
+/* mail:camel-service-auth-failed secondary */
+char *s = N_("Check to make sure your password is spelled correctly. Remember that many passwords are case sensitive; your caps lock might be on.");
+/* mail:ask-send-html primary */
+char *s = N_("Are you sure you want to send a message in HTML format?");
+/* mail:ask-send-html secondary */
+char *s = N_("Please make sure the following recipients are willing and able to receive HTML email:\n"
+ "{0}\n"
+ "Send anyway?");
+char *s = N_("_Send");
+/* mail:ask-send-no-subject primary */
+char *s = N_("Are you sure you want to send a message without a subject?");
+/* mail:ask-send-no-subject secondary */
+char *s = N_("Adding a meaningful Subject line to your messages will give your recipients an idea of what your mail is about.");
+char *s = N_("_Send");
+/* mail:ask-send-only-bcc-contact primary */
+char *s = N_("Are you sure you want to send a message with only BCC recipients?");
+/* mail:ask-send-only-bcc-contact secondary */
+char *s = N_("The contact list you are sending to is configured to hide list recipients.\n"
+ "\n"
+ "Many email systems add an Apparently-To header to messages that only have BCC recipients. This header, if added, will list all of your recipients in your message. To avoid this, you should add at least one To: or CC: recipient. ");
+char *s = N_("_Send");
+/* mail:ask-send-only-bcc primary */
+char *s = N_("Are you sure you want to send a message with only BCC recipients?");
+/* mail:ask-send-only-bcc secondary */
+char *s = N_("Many email systems add an Apparently-To header to messages that only have BCC recipients. This header, if added, will list all of your recipients to your message anyway. To avoid this, you should add at least one To: or CC: recipient.");
+char *s = N_("_Send");
+/* mail:send-no-recipients primary */
+char *s = N_("This message cannot be sent because you have not specified any Recipients");
+/* mail:send-no-recipients secondary */
+char *s = N_("Please enter a valid email address in the To: field. You can search for email addresses by clicking on the To: button next to the entry box.");
+/* mail:ask-default-drafts primary */
+char *s = N_("Use default drafts folder?");
+/* mail:ask-default-drafts secondary */
+char *s = N_("Unable to open the drafts folder for this account. Use the system drafts folder instead?");
+char *s = N_("Use _Default");
+/* mail:ask-expunge primary */
+char *s = N_("Are you sure you want to permanently remove all the deleted message in folder \"{0}\"?");
+/* mail:ask-expunge secondary */
+char *s = N_("If you continue, you will not be able to recover these messages.");
+char *s = N_("_Expunge");
+/* mail:ask-empty-trash primary */
+char *s = N_("Are you sure you want to permanently remove all the deleted messages in all folders?");
+/* mail:ask-empty-trash secondary */
+char *s = N_("If you continue, you will not be able to recover these messages.");
+char *s = N_("_Empty Trash");
+/* mail:exit-unsaved primary */
+char *s = N_("You have unsent messages, do you wish to quit anyway?");
+/* mail:exit-unsaved secondary */
+char *s = N_("If you quit, these messages will not be sent until Evolution is started again.");
+/* mail:camel-exception primary */
+char *s = N_("Your message message, with the subject \"{0}\" was not delivered.");
+/* mail:camel-exception secondary */
+char *s = N_("The message was sent via the \"sendmail\" external application. Sendmail reports the following error: status 67: mail not sent.\n"
+ "The message is stored in the Outbox folder. Check the message for errors and resend.");
+/* mail:async-error primary */
+char *s = N_("Error while {0}.");
+/* mail:async-error secondary */
+char *s = N_("{1}.");
+/* mail:async-error-nodescribe primary */
+char *s = N_("Error while performing operation.");
+/* mail:async-error-nodescribe secondary */
+char *s = N_("{0}.");
+/* mail:session-message-info secondary */
+char *s = N_("{0}");
+/* mail:session-message-info-cancel secondary */
+char *s = N_("{0}");
+/* mail:session-message-warning secondary */
+char *s = N_("{0}");
+/* mail:session-message-warning-cancel secondary */
+char *s = N_("{0}");
+/* mail:session-message-error secondary */
+char *s = N_("{0}");
+/* mail:session-message-error-cancel secondary */
+char *s = N_("{0}");
+/* mail:ask-session-password primary */
+char *s = N_("Enter password.");
+/* mail:ask-session-password secondary */
+char *s = N_("{0}");
+/* mail:filter-load-error primary */
+char *s = N_("Error loading filter definitions.");
+/* mail:filter-load-error secondary */
+char *s = N_("{0}");
+/* mail:no-save-path primary */
+char *s = N_("Cannot save to directory \"{0}\".");
+/* mail:no-save-path secondary */
+char *s = N_("{1}");
+/* mail:no-create-path primary */
+char *s = N_("Cannot save to file \"{0}\".");
+/* mail:no-create-path secondary */
+char *s = N_("Cannot create the save directory, because \"{1}\"");
+/* mail:no-create-tmp-path primary */
+char *s = N_("Cannot create temporary save directory.");
+/* mail:no-create-tmp-path secondary */
+char *s = N_("Because \"{1}\".");
+/* mail:no-write-path-exists primary */
+char *s = N_("Cannot save to file \"{0}\".");
+/* mail:no-write-path-exists secondary */
+char *s = N_("File exists but cannot overwrite it.");
+/* mail:no-write-path-notfile primary */
+char *s = N_("Cannot save to file \"{0}\".");
+/* mail:no-write-path-notfile secondary */
+char *s = N_("File exists but is not a regular file.");
+/* mail:no-delete-folder primary */
+char *s = N_("Cannot delete folder \"{0}\".");
+/* mail:no-delete-folder secondary */
+char *s = N_("Because \"{1}\".");
+/* mail:no-delete-spethal-folder primary */
+char *s = N_("Cannot delete system folder \"{0}\".");
+/* mail:no-delete-spethal-folder secondary */
+char *s = N_("System folders are required for Ximian Evolution to function correctly and cannot be renamed, moved, or deleted.");
+/* mail:no-rename-spethal-folder primary */
+char *s = N_("Cannot rename or move system folder \"{0}\".");
+/* mail:no-rename-spethal-folder secondary */
+char *s = N_("System folders are required for Ximian Evolution to function correctly and cannot be renamed, moved, or deleted.");
+/* mail:ask-delete-folder title */
+char *s = N_("Delete \"{0}\"?");
+/* mail:ask-delete-folder primary */
+char *s = N_("Really delete folder \"{0}\" and all of its subfolders?");
+/* mail:ask-delete-folder secondary */
+char *s = N_("If you delete the folder, all of its contents and its subfolders contents will be deleted permanently.");
+/* mail:no-rename-folder-exists primary */
+char *s = N_("Cannot rename \"{0}\" to \"{1}\".");
+/* mail:no-rename-folder-exists secondary */
+char *s = N_("A folder named \"{1}\" already exists. Please use a different name.");
+/* mail:no-rename-folder primary */
+char *s = N_("Cannot rename \"{0}\" to \"{1}\".");
+/* mail:no-rename-folder secondary */
+char *s = N_("Because \"{2}\".");
+/* mail:no-move-folder-nostore primary */
+char *s = N_("Cannot move folder \"{0}\" to \"{1}\".");
+/* mail:no-move-folder-nostore secondary */
+char *s = N_("Cannot open source \"{2}\".");
+/* mail:no-move-folder-to-nostore primary */
+char *s = N_("Cannot move folder \"{0}\" to \"{1}\".");
+/* mail:no-move-folder-to-nostore secondary */
+char *s = N_("Cannot open target \"{2}\".");
+/* mail:no-copy-folder-nostore primary */
+char *s = N_("Cannot copy folder \"{0}\" to \"{1}\".");
+/* mail:no-copy-folder-nostore secondary */
+char *s = N_("Cannot open source \"{2}\".");
+/* mail:no-copy-folder-to-nostore primary */
+char *s = N_("Cannot copy folder \"{0}\" to \"{1}\".");
+/* mail:no-copy-folder-to-nostore secondary */
+char *s = N_("Cannot open target \"{2}\".");
+/* mail:no-create-folder-nostore primary */
+char *s = N_("Cannot create folder \"{0}\".");
+/* mail:no-create-folder-nostore secondary */
+char *s = N_("Cannot open source \"{1}\"");
+/* mail:account-incomplete primary */
+char *s = N_("Cannot save changes to account.");
+/* mail:account-incomplete secondary */
+char *s = N_("You have not filled in all of the required information.");
+/* mail:account-notunique primary */
+char *s = N_("Cannot save changes to account.");
+/* mail:account-notunique secondary */
+char *s = N_("You may not create two accounts with the same name.");
+/* mail:ask-delete-account title */
+char *s = N_("Delete account?");
+/* mail:ask-delete-account primary */
+char *s = N_("Are you sure you want to delete this account?");
+/* mail:ask-delete-account secondary */
+char *s = N_("If you proceed, the account information will be deleted permanently.");
+char *s = N_("Don't delete");
+/* mail:no-save-signature primary */
+char *s = N_("Could not save signature file.");
+/* mail:no-save-signature secondary */
+char *s = N_("Because \"{0}\".");
+/* mail:signature-notscript primary */
+char *s = N_("Cannot set signature script \"{0}\".");
+/* mail:signature-notscript secondary */
+char *s = N_("The script file must exist and be executable.");
+/* mail:ask-signature-changed title */
+char *s = N_("Discard changed?");
+/* mail:ask-signature-changed primary */
+char *s = N_("Do you wish to save your changes?");
+/* mail:ask-signature-changed secondary */
+char *s = N_("This signature has been changed, but has not been saved.");
+char *s = N_("_Discard changes");
+/* mail:vfolder-notexist primary */
+char *s = N_("Cannot edit vFolder \"{0}\" as it does not exist.");
+/* mail:vfolder-notexist secondary */
+char *s = N_("This folder may have been added implictly, go to the virtual folder editor to add it explictly, if required.");
+/* mail:vfolder-notunique primary */
+char *s = N_("Cannot add vFolder \"{0}\".");
+/* mail:vfolder-notunique secondary */
+char *s = N_("A folder named \"{1}\" already exists. Please use a different name.");
+/* mail:vfolder-updated primary */
+char *s = N_("vFolders automatically updated.");
+/* mail:vfolder-updated secondary */
+char *s = N_("The following vFolder(s):\n"
+ "{0}\n"
+ "Used the now removed folder:\n"
+ " \"{1}\"\n"
+ "And have been updated.");
+/* mail:filter-updated primary */
+char *s = N_("Mail filters automatically updated.");
+/* mail:filter-updated secondary */
+char *s = N_("The following filter rule(s):\n"
+ "{0}\n"
+ "Used the now removed folder:\n"
+ " \"{1}\"\n"
+ "And have been updated.");
+/* mail:ask-migrate-existing primary */
+char *s = N_("Problem migrating old mail folder \"{0}\".");
+/* mail:ask-migrate-existing secondary */
+char *s = N_("A non-empty folder at \"{1}\" already exists.\n"
+ "\n"
+ "You can choose to ignore this folder, overwrite or append its contents, or quit.\n"
+ "");
+char *s = N_("Ignore");
+char *s = N_("_Overwrite");
+char *s = N_("_Append");
diff --git a/mail/mail-errors.xml.in b/mail/mail-errors.xml.in
deleted file mode 100644
index 1292d25e70..0000000000
--- a/mail/mail-errors.xml.in
+++ /dev/null
@@ -1,286 +0,0 @@
-<?xml version="1.0"?>
-<error-list domain="mail">
-
- <error id="camel-service-auth-invalid" type="warning">
- <_primary>Invalid authentication</_primary>
- <_secondary>This server does not support this type of authentication and may not support authentication at all.</_secondary>
- </error>
-
- <error id="camel-service-auth-failed" type="warning">
- <_primary>Your login to your server &quot;{0}&quot; as &quot;{0}&quot; failed.</_primary>
- <_secondary>Check to make sure your password is spelled correctly. Remember that many passwords are case sensitive; your caps lock might be on.</_secondary>
- </error>
-
- <error id="ask-send-html" type="question" default="GTK_RESPONSE_YES">
- <_primary>Are you sure you want to send a message in HTML format?</_primary>
- <_secondary>Please make sure the following recipients are willing and able to receive HTML email:
-{0}
-Send anyway?</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button _label="_Send" response="GTK_RESPONSE_YES"/>
- </error>
-
- <error id="ask-send-no-subject" type="question" default="GTK_RESPONSE_YES">
- <_primary>Are you sure you want to send a message without a subject?</_primary>
- <_secondary>Adding a meaningful Subject line to your messages will give your recipients an idea of what your mail is about.</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button _label="_Send" response="GTK_RESPONSE_YES"/>
- </error>
-
- <error id="ask-send-only-bcc-contact" type="question" default="GTK_RESPONSE_YES">
- <_primary>Are you sure you want to send a message with only BCC recipients?</_primary>
- <_secondary>The contact list you are sending to is configured to hide list recipients.
-
-Many email systems add an Apparently-To header to messages that only have BCC recipients. This header, if added, will list all of your recipients in your message. To avoid this, you should add at least one To: or CC: recipient. </_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button _label="_Send" response="GTK_RESPONSE_YES"/>
- </error>
-
- <error id="ask-send-only-bcc" type="warning" default="GTK_RESPONSE_YES">
- <_primary>Are you sure you want to send a message with only BCC recipients?</_primary>
- <_secondary>Many email systems add an Apparently-To header to messages that only have BCC recipients. This header, if added, will list all of your recipients to your message anyway. To avoid this, you should add at least one To: or CC: recipient.</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button _label="_Send" response="GTK_RESPONSE_YES"/>
- </error>
-
- <error id="send-no-recipients" type="warning">
- <_primary>This message cannot be sent because you have not specified any Recipients</_primary>
- <_secondary>Please enter a valid email address in the To: field. You can search for email addresses by clicking on the To: button next to the entry box.</_secondary>
- </error>
-
- <error id="ask-default-drafts" type="question" default="GTK_RESPONSE_YES">
- <_primary>Use default drafts folder?</_primary>
- <_secondary>Unable to open the drafts folder for this account. Use the system drafts folder instead?</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button _label="Use _Default" response="GTK_RESPONSE_YES"/>
- </error>
-
- <error id="ask-expunge" type="question" default="GTK_RESPONSE_CANCEL">
- <_primary>Are you sure you want to permanently remove all the deleted message in folder &quot;{0}&quot;?</_primary>
- <_secondary>If you continue, you will not be able to recover these messages.</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button _label="_Expunge" response="GTK_RESPONSE_YES"/>
- </error>
-
- <error id="ask-empty-trash" type="warning" default="GTK_RESPONSE_CANCEL">
- <_primary>Are you sure you want to permanently remove all the deleted messages in all folders?</_primary>
- <_secondary>If you continue, you will not be able to recover these messages.</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button _label="_Empty Trash" response="GTK_RESPONSE_YES"/>
- </error>
-
- <error id="exit-unsaved" type="warning" default="GTK_RESPONSE_NO">
- <_primary>You have unsent messages, do you wish to quit anyway?</_primary>
- <_secondary>If you quit, these messages will not be sent until Evolution is started again.</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_NO"/>
- <button stock="gtk-quit" response="GTK_RESPONSE_YES"/>
- </error>
-
- <error id="camel-exception" type="warning">
- <_primary>Your message message, with the subject &quot;{0}&quot; was not delivered.</_primary>
- <_secondary>The message was sent via the &quot;sendmail&quot; external application. Sendmail reports the following error: status 67: mail not sent.
-The message is stored in the Outbox folder. Check the message for errors and resend.</_secondary>
- </error>
-
- <error id="async-error" type="error">
- <_primary>Error while {0}.</_primary>
- <_secondary>{1}.</_secondary>
- </error>
-
- <error id="async-error-nodescribe" type="error">
- <_primary>Error while performing operation.</_primary>
- <_secondary>{0}.</_secondary>
- </error>
-
- <error id="session-message-info" type="info">
- <_secondary>{0}</_secondary>
- </error>
-
- <error id="session-message-info-cancel" type="info" default="GTK_RESPONSE_CANCEL">
- <_secondary>{0}</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button stock="gtk-ok" response="GTK_RESPONSE_OK"/>
- </error>
-
- <error id="session-message-warning" type="warning">
- <_secondary>{0}</_secondary>
- </error>
-
- <error id="session-message-warning-cancel" type="warning" default="GTK_RESPONSE_CANCEL">
- <_secondary>{0}</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button stock="gtk-ok" response="GTK_RESPONSE_OK"/>
- </error>
-
- <error id="session-message-error" type="info">
- <_secondary>{0}</_secondary>
- </error>
-
- <error id="session-message-error-cancel" type="info" default="GTK_RESPONSE_CANCEL">
- <_secondary>{0}</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button stock="gtk-ok" response="GTK_RESPONSE_OK"/>
- </error>
-
- <error id="ask-session-password" type="question" default="GTK_RESPONSE_OK">
- <_primary>Enter password.</_primary>
- <_secondary>{0}</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button stock="gtk-ok" response="GTK_RESPONSE_OK"/>
- </error>
-
- <error id="filter-load-error" type="error">
- <_primary>Error loading filter definitions.</_primary>
- <_secondary>{0}</_secondary>
- </error>
-
- <error id="no-save-path" type="error">
- <_primary>Cannot save to directory &quot;{0}&quot;.</_primary>
- <_secondary>{1}</_secondary>
- </error>
-
- <error id="no-create-path" type="error">
- <_primary>Cannot save to file &quot;{0}&quot;.</_primary>
- <_secondary>Cannot create the save directory, because &quot;{1}&quot;</_secondary>
- </error>
-
- <error id="no-create-tmp-path" type="error">
- <_primary>Cannot create temporary save directory.</_primary>
- <_secondary>Because &quot;{1}&quot;.</_secondary>
- </error>
-
- <error id="no-write-path-exists" type="error">
- <_primary>Cannot save to file &quot;{0}&quot;.</_primary>
- <_secondary>File exists but cannot overwrite it.</_secondary>
- </error>
-
- <error id="no-write-path-notfile" type="error">
- <_primary>Cannot save to file &quot;{0}&quot;.</_primary>
- <_secondary>File exists but is not a regular file.</_secondary>
- </error>
-
- <error id="no-delete-folder" type="error">
- <_primary>Cannot delete folder &quot;{0}&quot;.</_primary>
- <_secondary>Because &quot;{1}&quot;.</_secondary>
- </error>
-
- <error id="no-delete-spethal-folder" type="error">
- <_primary>Cannot delete system folder &quot;{0}&quot;.</_primary>
- <_secondary>System folders are required for Ximian Evolution to function correctly and cannot be renamed, moved, or deleted.</_secondary>
- </error>
-
- <error id="no-rename-spethal-folder" type="error">
- <_primary>Cannot rename or move system folder &quot;{0}&quot;.</_primary>
- <_secondary>System folders are required for Ximian Evolution to function correctly and cannot be renamed, moved, or deleted.</_secondary>
- </error>
-
- <error id="ask-delete-folder" type="question" default="GTK_RESPONSE_CANCEL">
- <_title>Delete &quot;{0}&quot;?</_title>
- <_primary>Really delete folder &quot;{0}&quot; and all of its subfolders?</_primary>
- <_secondary>If you delete the folder, all of its contents and its subfolders contents will be deleted permanently.</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button stock="gtk-delete" response="GTK_RESPONSE_OK"/>
- </error>
-
- <error id="no-rename-folder-exists" type="error">
- <_primary>Cannot rename &quot;{0}&quot; to &quot;{1}&quot;.</_primary>
- <_secondary>A folder named &quot;{1}&quot; already exists. Please use a different name.</_secondary>
- </error>
-
- <error id="no-rename-folder" type="error">
- <_primary>Cannot rename &quot;{0}&quot; to &quot;{1}&quot;.</_primary>
- <_secondary>Because &quot;{2}&quot;.</_secondary>
- </error>
-
- <error id="no-move-folder-nostore" type="error">
- <_primary>Cannot move folder &quot;{0}&quot; to &quot;{1}&quot;.</_primary>
- <_secondary>Cannot open source &quot;{2}&quot;.</_secondary>
- </error>
-
- <error id="no-move-folder-to-nostore" type="error">
- <_primary>Cannot move folder &quot;{0}&quot; to &quot;{1}&quot;.</_primary>
- <_secondary>Cannot open target &quot;{2}&quot;.</_secondary>
- </error>
-
- <error id="no-copy-folder-nostore" type="error">
- <_primary>Cannot copy folder &quot;{0}&quot; to &quot;{1}&quot;.</_primary>
- <_secondary>Cannot open source &quot;{2}&quot;.</_secondary>
- </error>
-
- <error id="no-copy-folder-to-nostore" type="error">
- <_primary>Cannot copy folder &quot;{0}&quot; to &quot;{1}&quot;.</_primary>
- <_secondary>Cannot open target &quot;{2}&quot;.</_secondary>
- </error>
-
- <error id="no-create-folder-nostore" type="error">
- <_primary>Cannot create folder &quot;{0}&quot;.</_primary>
- <_secondary>Cannot open source &quot;{1}&quot;</_secondary>
- </error>
-
- <error id="account-incomplete" type="error">
- <_primary>Cannot save changes to account.</_primary>
- <_secondary>You have not filled in all of the required information.</_secondary>
- </error>
-
- <error id="account-notunique" type="error">
- <_primary>Cannot save changes to account.</_primary>
- <_secondary>You may not create two accounts with the same name.</_secondary>
- </error>
-
- <error id="ask-delete-account" type="question" default="GTK_RESPONSE_NO" modal="true">
- <_title>Delete account?</_title>
- <_primary>Are you sure you want to delete this account?</_primary>
- <_secondary>If you proceed, the account information will be deleted permanently.</_secondary>
- <button stock="gtk-delete" response="GTK_RESPONSE_YES"/>
- <button stock="gtk-no" _label="Don't delete" response="GTK_RESPONSE_NO"/>
- </error>
-
- <error id="no-save-signature" type="error">
- <_primary>Could not save signature file.</_primary>
- <_secondary>Because &quot;{0}&quot;.</_secondary>
- </error>
-
- <error id="signature-notscript" type="error">
- <_primary>Cannot set signature script &quot;{0}&quot;.</_primary>
- <_secondary>The script file must exist and be executable.</_secondary>
- </error>
-
- <error id="ask-signature-changed" type="question" default="GTK_RESPONSE_YES">
- <_title>Discard changed?</_title>
- <_primary>Do you wish to save your changes?</_primary>
- <_secondary>This signature has been changed, but has not been saved.</_secondary>
- <button _label="_Discard changes" response="GTK_RESPONSE_NO"/>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button stock="gtk-save" response="GTK_RESPONSE_YES"/>
- </error>
-
- <error id="vfolder-notexist" type="error">
- <_primary>Cannot edit vFolder &quot;{0}&quot; as it does not exist.</_primary>
- <_secondary>This folder may have been added implictly, go to the virtual folder editor to add it explictly, if required.</_secondary>
- </error>
-
- <error id="vfolder-notunique" type="error">
- <_primary>Cannot add vFolder &quot;{0}&quot;.</_primary>
- <_secondary>A folder named &quot;{1}&quot; already exists. Please use a different name.</_secondary>
- </error>
-
- <error id="vfolder-updated" type="info">
- <_primary>vFolders automatically updated.</_primary>
- <_secondary>The following vFolder(s):
-{0}
-Used the now removed folder:
- &quot;{1}&quot;
-And have been updated.</_secondary>
- </error>
-
- <error id="filter-updated" type="info">
- <_primary>Mail filters automatically updated.</_primary>
- <_secondary>The following filter rule(s):
-{0}
-Used the now removed folder:
- &quot;{1}&quot;
-And have been updated.</_secondary>
- </error>
-
-</error-list>
-
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index e53e6172bd..5a6f13d5a4 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -46,8 +46,6 @@
#include <filter/filter-option.h>
#include <filter/filter-input.h>
-#include "e-util/e-meta.h"
-
#include "mail-component.h"
#include "mail-session.h"
#include "mail-config.h"