-/* FIXME: move these to TnyMail */
-enum {
-
- TNY_MSG_FOLDER_TYPE_NOTES = TNY_MSG_FOLDER_TYPE_SENT + 1, /* urgh */
- TNY_MSG_FOLDER_TYPE_DRAFTS,
- TNY_MSG_FOLDER_TYPE_CONTACTS,
- TNY_MSG_FOLDER_TYPE_CALENDAR
-};
-
-static TnyMsgFolderType
-guess_folder_type (const gchar* name)
-{
- TnyMsgFolderType type;
- gchar *folder;
-
- g_return_val_if_fail (name, TNY_MSG_FOLDER_TYPE_NORMAL);
-
- type = TNY_MSG_FOLDER_TYPE_NORMAL;
- folder = g_utf8_strdown (name, strlen(name));
-
- if (strcmp (folder, "inbox") == 0 ||
- strcmp (folder, _("inbox")) == 0)
- type = TNY_MSG_FOLDER_TYPE_INBOX;
- else if (strcmp (folder, "outbox") == 0 ||
- strcmp (folder, _("outbox")) == 0)
- type = TNY_MSG_FOLDER_TYPE_OUTBOX;
- else if (g_str_has_prefix(folder, "junk") ||
- g_str_has_prefix(folder, _("junk")))
- type = TNY_MSG_FOLDER_TYPE_JUNK;
- else if (g_str_has_prefix(folder, "trash") ||
- g_str_has_prefix(folder, _("trash")))
- type = TNY_MSG_FOLDER_TYPE_JUNK;
- else if (g_str_has_prefix(folder, "sent") ||
- g_str_has_prefix(folder, _("sent")))
- type = TNY_MSG_FOLDER_TYPE_SENT;
-
- /* these are not *really* TNY_ types */
- else if (g_str_has_prefix(folder, "draft") ||
- g_str_has_prefix(folder, _("draft")))
- type = TNY_MSG_FOLDER_TYPE_DRAFTS;
- else if (g_str_has_prefix(folder, "notes") ||
- g_str_has_prefix(folder, _("notes")))
- type = TNY_MSG_FOLDER_TYPE_NOTES;
- else if (g_str_has_prefix(folder, "contacts") ||
- g_str_has_prefix(folder, _("contacts")))
- type = TNY_MSG_FOLDER_TYPE_CONTACTS;
- else if (g_str_has_prefix(folder, "calendar") ||
- g_str_has_prefix(folder, _("calendar")))
- type = TNY_MSG_FOLDER_TYPE_CALENDAR;
-
- g_free (folder);
- return type;
-}