[Xfce4-commits] <postler:master> Always sanitize [Google Mail] to [Gmail]
Christian Dywan
noreply at xfce.org
Thu Dec 16 18:54:03 CET 2010
Updating branch refs/heads/master
to 9d9ba8af6367af3b7ab3364a29224ad8e49159c9 (commit)
from da47e0a200e29d3eed1ec4f18fc979fa83ca1f24 (commit)
commit 9d9ba8af6367af3b7ab3364a29224ad8e49159c9
Author: Christian Dywan <christian at twotoasts.de>
Date: Thu Dec 16 18:53:06 2010 +0100
Always sanitize [Google Mail] to [Gmail]
Apparently the variants also appear with different localised
accounts, so we always replace it and assume [Gmail] afterwards.
postler/postler-accounts.vala | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/postler/postler-accounts.vala b/postler/postler-accounts.vala
index 065a4da..b7c2bdd 100644
--- a/postler/postler-accounts.vala
+++ b/postler/postler-accounts.vala
@@ -35,26 +35,22 @@ namespace Postler {
}
const string[] sent_folders = {
- "[Gmail]~-Sent Mail", "[Google Mail]~-Sent Mail",
- "[Google Mail]~-Gesendet", "Gesendet"
+ "[Gmail]~-Sent Mail", "[Gmail]~-Gesendet", "Gesendet"
};
const string[] drafts_folders = {
- "[Gmail]~-Drafts", "[Google Mail]~-Drafts",
- "[Google Mail]~-Entw&APw-rfe", "Entwurf"
+ "[Gmail]~-Drafts", "[Gmail]~-Entw&APw-rfe", "Entwurf"
};
const string[] queue_folders = {
"Postausgang"
};
const string[] trash_folders = {
- "[Gmail]~-Trash", "[Google Mail]~-Trash",
- "[Google Mail]~-Papierkorb", "Papierkorb"
+ "[Gmail]~-Trash", "[Gmail]~-Papierkorb", "Papierkorb"
};
const string[] archive_folders = {
- "[Gmail]~-All Mail", "[Google Mail]~-All Mail",
- "[Google Mail]~-Alle Nachrichten"
+ "[Gmail]~-All Mail", "[Gmail]~-Alle Nachrichten"
};
const string[] junk_folders = {
- "[Gmail]~-Spam", "[Google Mail]~-Spam"
+ "[Gmail]~-Spam"
};
/* The length values must be in the array to work around Vala mistakenly
@@ -94,12 +90,13 @@ namespace Postler {
}
public unowned MailFolder get_localized_folder (string folder_name) {
+ string sane_name = folder_name.replace ("[Google Mail]", "[Gmail]");
for (int type = 0; type < FolderType.MAX; type++)
- if (this.folders[type] == folder_name)
+ if (this.folders[type] == sane_name)
return localized_folders[type];
for (int type = 0; type < FolderType.MAX; type++) {
if (this.folders[type] == null
- && folder_name in localized_folders[type].localized) {
+ && sane_name in localized_folders[type].localized) {
this.folders[type] = folder_name;
unowned string? role = localized_folders[type].role;
if (role != null && !this.hide.contains (role))
More information about the Xfce4-commits
mailing list