aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-folder-cache.c
diff options
context:
space:
mode:
authorJason Leach <jleach@ximian.com>2001-08-07 00:39:15 +0800
committerJacob Leach <jleach@src.gnome.org>2001-08-07 00:39:15 +0800
commitc4ea7875dc2905496ad07b493ef21242d3443ef8 (patch)
tree066f4d9ba852ecf8fb139c00a5208784a208b2e6 /mail/mail-folder-cache.c
parentc56fade286a72588d221535739afa798d88af634 (diff)
downloadgsoc2013-evolution-c4ea7875dc2905496ad07b493ef21242d3443ef8.tar
gsoc2013-evolution-c4ea7875dc2905496ad07b493ef21242d3443ef8.tar.gz
gsoc2013-evolution-c4ea7875dc2905496ad07b493ef21242d3443ef8.tar.bz2
gsoc2013-evolution-c4ea7875dc2905496ad07b493ef21242d3443ef8.tar.lz
gsoc2013-evolution-c4ea7875dc2905496ad07b493ef21242d3443ef8.tar.xz
gsoc2013-evolution-c4ea7875dc2905496ad07b493ef21242d3443ef8.tar.zst
gsoc2013-evolution-c4ea7875dc2905496ad07b493ef21242d3443ef8.zip
Removed this function, it's not needed anymore.
2001-08-06 Jason Leach <jleach@ximian.com> * mail-folder-cache.c (make_folder_name): Removed this function, it's not needed anymore. (mail_folder_cache_note_folderinfo): Initialize mfi->unread to 0 always, so the shell won't get sent a random int for vtrash or potentially other folders. svn path=/trunk/; revision=11699
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r--mail/mail-folder-cache.c34
1 files changed, 5 insertions, 29 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 6c71762dbe..208b231e40 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -132,30 +132,6 @@ get_folder_info (const gchar *uri)
/* call with the folders locked */
static gchar *
-make_folder_name (mail_folder_info *mfi)
-{
- GString *work;
- gchar *ret;
-
- work = g_string_new (mfi->name);
-
- /* the way the logic is now, an outbox folder simply doesn't have
- * its unread count displayed. Makes sense to me at the moment. */
-
- if (mfi->flags & MAIL_FIF_FOLDER_VALID && mfi->folder == outbox_folder &&
- mfi->flags & MAIL_FIF_TOTAL_VALID && mfi->total) {
- g_string_sprintfa (work, " (%d unsent)", mfi->total);
- } else if (mfi->flags & MAIL_FIF_UNREAD_VALID && mfi->unread)
- g_string_sprintfa (work, " (%d)", mfi->unread);
-
- ret = work->str;
- g_string_free (work, FALSE);
- return ret;
-}
-
-/* call with the folders locked */
-
-static gchar *
make_folder_status (mail_folder_info *mfi)
{
gboolean set_one = FALSE;
@@ -197,7 +173,7 @@ static gboolean
update_idle (gpointer user_data)
{
mail_folder_info *mfi = (mail_folder_info *) user_data;
- gchar *f_name, *f_status;
+ gchar *f_status;
gchar *uri, *path;
mfiui info;
mfium mode;
@@ -226,7 +202,6 @@ update_idle (gpointer user_data)
/* Get the display string */
- f_name = make_folder_name (mfi);
f_status = make_folder_status (mfi);
/* Set the value */
@@ -306,9 +281,7 @@ update_idle (gpointer user_data)
/* Cleanup */
g_free (uri);
- if (path)
- g_free (path);
- g_free (f_name);
+ g_free (path);
g_free (f_status);
return FALSE;
}
@@ -686,6 +659,9 @@ mail_folder_cache_note_folderinfo (const gchar *uri, CamelFolderInfo *fi)
mfi->unread = fi->unread_message_count;
mfi->flags |= MAIL_FIF_UNREAD_VALID;
}
+ else {
+ mfi->unread = 0;
+ }
if (!(mfi->flags & MAIL_FIF_NAME_VALID)) {
d(g_message("-> setting name %s", fi->name));