aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-folder-cache.c
diff options
context:
space:
mode:
authorJohnny Jacob <jjohnny@src.gnome.org>2007-12-15 19:59:39 +0800
committerJohnny Jacob <jjohnny@src.gnome.org>2007-12-15 19:59:39 +0800
commit6cb13b10b6c87bd6fd89454049dd9b58c1f9808c (patch)
tree7c96fa9f180a0295eea711ecef359c635143033c /mail/mail-folder-cache.c
parent4f7d3decd1bb7f47e9d23c0514e82d002aaac752 (diff)
downloadgsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.tar
gsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.tar.gz
gsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.tar.bz2
gsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.tar.lz
gsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.tar.xz
gsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.tar.zst
gsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.zip
Part of fix for #492702 from Milan Crha : New mail notify and preferences ui movement.
svn path=/trunk/; revision=34702
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r--mail/mail-folder-cache.c67
1 files changed, 1 insertions, 66 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 5433616a1b..8d9b7a2fc9 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -123,15 +123,6 @@ static void folder_finalised(CamelObject *o, gpointer event_data, gpointer user_
static guint ping_id = 0;
static gboolean ping_cb (gpointer user_data);
-static guint notify_id = 0;
-static int notify_type = -1;
-
-static time_t last_notify = 0;
-static time_t last_newmail = 0;
-static guint notify_idle_id = 0;
-static gboolean notify_idle_cb (gpointer user_data);
-
-
/* Store to storeinfo table, active stores */
static GHashTable *stores = NULL;
@@ -155,43 +146,6 @@ free_update(struct _folder_update *up)
g_free(up);
}
-static gboolean
-notify_idle_cb (gpointer user_data)
-{
- GConfClient *gconf;
- char *filename;
-
- gconf = mail_config_get_gconf_client ();
-
- switch (notify_type) {
- case MAIL_CONFIG_NOTIFY_PLAY_SOUND:
- filename = gconf_client_get_string (gconf, "/apps/evolution/mail/notify/sound", NULL);
- if (filename != NULL) {
- gnome_sound_play (filename);
- g_free (filename);
- }
- break;
- case MAIL_CONFIG_NOTIFY_BEEP:
- gdk_beep ();
- break;
- default:
- break;
- }
-
- time (&last_notify);
-
- notify_idle_id = 0;
-
- return FALSE;
-}
-
-static void
-notify_type_changed (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer user_data)
-{
- notify_type = gconf_client_get_int (client, "/apps/evolution/mail/notify/type", NULL);
-}
-
static void
real_flush_updates(void *o, void *event_data, void *data)
{
@@ -230,21 +184,6 @@ real_flush_updates(void *o, void *event_data, void *data)
/* update unread counts */
em_folder_tree_model_set_unread_count (model, up->store, up->full_name, up->unread);
- /* new mail notification */
- if (notify_type == -1) {
- /* need to track the user's new-mail-notification settings... */
- GConfClient *gconf;
-
- gconf = mail_config_get_gconf_client ();
- gconf_client_add_dir (gconf, "/apps/evolution/mail/notify",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/notify",
- notify_type_changed, NULL, NULL, NULL);
- notify_type = gconf_client_get_int (gconf, "/apps/evolution/mail/notify/type", NULL);
- }
-
- if (notify_type != 0 && up->new && notify_idle_id == 0 && (last_newmail - last_notify >= NOTIFY_THROTTLE))
- notify_idle_id = g_idle_add_full (G_PRIORITY_LOW, notify_idle_cb, NULL, NULL);
if (up->uri) {
EMEvent *e = em_event_peek();
@@ -474,16 +413,12 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
flags = camel_message_info_flags (info);
if (((flags & CAMEL_MESSAGE_SEEN) == 0) &&
((flags & CAMEL_MESSAGE_JUNK) == 0) &&
- ((flags & CAMEL_MESSAGE_DELETED) == 0) &&
- (camel_message_info_date_received (info) > last_newmail))
+ ((flags & CAMEL_MESSAGE_DELETED) == 0))
new++;
}
}
}
- if (new > 0)
- time (&last_newmail);
-
LOCK(info_lock);
if (stores != NULL
&& (si = g_hash_table_lookup(stores, store)) != NULL