+2005-02-14 Jeffrey Stedfast <fejj@novell.com>
+
+ * camel-imap4-store-summary.c (store_info_to_folder_info):
+ Translate name of Inbox and also set flags as torkel's previous
+ fix.
+
+ * camel-imap4-store.c (imap4_build_folder_info): Translate the
+ name of Inbox.
+
+2005-02-13 Björn Torkelsson <torkel@acc.umu.se>
+
+ * camel-imap4-store.c (imap4_build_folder_info): Add flags if it
+ is inbox.
+
2005-02-10 Jeffrey Stedfast <fejj@novell.com>
* camel-imap4-search.c (imap4_body_contains): If we're in offline
#include <unistd.h>
#include <errno.h>
+#include <camel/camel-i18n.h>
#include <camel/camel-store.h>
#include <camel/camel-file-utils.h>
store_info_to_folder_info (CamelStoreSummary *s, CamelStoreInfo *si)
{
CamelFolderInfo *fi;
+ const char *name;
fi = g_malloc0 (sizeof (CamelFolderInfo));
fi->full_name = g_strdup (camel_store_info_path (s, si));
- fi->name = g_strdup (camel_store_info_name (s, si));
fi->uri = g_strdup (camel_store_info_uri (s, si));
fi->flags = si->flags;
fi->unread = si->unread;
fi->total = si->total;
+ name = camel_store_info_name (s, si);
+ if (!g_ascii_strcasecmp (fi->full_name, "INBOX")) {
+ fi->flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_INBOX;
+ fi->name = g_strdup (_("Inbox"));
+ } else {
+ fi->name = g_strdup (name);
+ }
+
return fi;
}
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Camel
- * Copyright (C) 1999-2004 Jeffrey Stedfast
+/*
+ * Authors: Jeffrey Stedfast <fejj@novell.com>
+ *
+ * Copyright 2005 Novell, Inc. (www.novell.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ *
*/
fi->unread = -1;
fi->total = -1;
+ if (!g_ascii_strcasecmp (fi->full_name, "INBOX"))
+ fi->flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_INBOX;
+
/* SELECTED folder, just get it from the folder */
if (folder && !strcmp (folder->full_name, fi->full_name)) {
camel_object_get (folder, NULL, CAMEL_FOLDER_TOTAL, &fi->total, CAMEL_FOLDER_UNREAD, &fi->unread, 0);
if (!(fi->flags & CAMEL_FOLDER_SUBSCRIBED))
imap4_subscription_info (store, fi);
- g_free (list->name);
- g_free (list);
-
array->pdata[i] = fi;
camel_imap4_store_summary_note_info (((CamelIMAP4Store *) store)->summary, fi);
+
+ if (!g_ascii_strcasecmp (fi->full_name, "INBOX")) {
+ g_free (fi->name);
+ fi->name = g_strdup (_("Inbox"));
+ }
+
+ g_free (list->name);
+ g_free (list);
}
fi = camel_folder_info_build (array, top, '/', TRUE);