aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-30 21:39:25 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-01 01:55:39 +0800
commitfc2c71593a190a0742639cd1f22664aecdc0d05d (patch)
treee4a43f616d514c27c1fef35c4caef04e4830cfa6
parent8dd3119dadd898f5d401ad413593d05258131872 (diff)
downloadgsoc2013-evolution-fc2c71593a190a0742639cd1f22664aecdc0d05d.tar.gz
gsoc2013-evolution-fc2c71593a190a0742639cd1f22664aecdc0d05d.tar.zst
gsoc2013-evolution-fc2c71593a190a0742639cd1f22664aecdc0d05d.zip
Remove "type" parameter from mail_async_event_emit().
All remaining cases use MAIL_ASYNC_GUI, so remove mail_async_event_t altogether.
-rw-r--r--mail/em-folder-tree-model.c10
-rw-r--r--mail/mail-folder-cache.c5
-rw-r--r--mail/mail-mt.c16
-rw-r--r--mail/mail-mt.h7
-rw-r--r--mail/message-list.c2
5 files changed, 14 insertions, 26 deletions
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 62e8e1b468..a7386b5471 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -879,7 +879,7 @@ folder_subscribed_cb (CamelStore *store,
fi = camel_folder_info_clone (event_data);
mail_async_event_emit (
- mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)
+ mail_async_event, (MailAsyncFunc)
folder_subscribed, store, fi, model);
}
@@ -923,7 +923,7 @@ folder_unsubscribed_cb (CamelStore *store,
fi = camel_folder_info_clone (event_data);
mail_async_event_emit (
- mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)
+ mail_async_event, (MailAsyncFunc)
folder_unsubscribed, store, fi, model);
}
@@ -943,7 +943,7 @@ folder_created_cb (CamelStore *store,
fi = camel_folder_info_clone (event_data);
mail_async_event_emit (
- mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)
+ mail_async_event, (MailAsyncFunc)
folder_subscribed, store, fi, model);
}
@@ -963,7 +963,7 @@ folder_deleted_cb (CamelStore *store,
fi = camel_folder_info_clone (event_data);
mail_async_event_emit (
- mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)
+ mail_async_event, (MailAsyncFunc)
folder_unsubscribed_cb, store, fi, model);
}
@@ -1042,7 +1042,7 @@ folder_renamed_cb (CamelStore *store,
rinfo->new = camel_folder_info_clone (info);
mail_async_event_emit (
- mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)
+ mail_async_event, (MailAsyncFunc)
folder_renamed, store, rinfo, model);
}
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 78cd647283..1b32198f7f 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -218,9 +218,8 @@ flush_updates (MailFolderCache *self)
{
if (self->priv->update_id == -1 && !g_queue_is_empty (&self->priv->updates))
self->priv->update_id = mail_async_event_emit (
- mail_async_event, MAIL_ASYNC_GUI,
- (MailAsyncFunc) real_flush_updates,
- self, NULL, NULL);
+ mail_async_event, (MailAsyncFunc)
+ real_flush_updates, self, NULL, NULL);
}
/* This is how unread counts work (and don't work):
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 60938abc22..45ab9a4df6 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -583,7 +583,6 @@ struct _proxy_msg {
MailMsg base;
MailAsyncEvent *ea;
- mail_async_event_t type;
GThread *thread;
guint idle_id;
@@ -637,7 +636,6 @@ mail_async_event_new (void)
guint
mail_async_event_emit (MailAsyncEvent *ea,
- mail_async_event_t type,
MailAsyncFunc func,
gpointer o,
gpointer event_data,
@@ -654,7 +652,6 @@ mail_async_event_emit (MailAsyncEvent *ea,
m->event_data = event_data;
m->data = data;
m->ea = ea;
- m->type = type;
m->thread = NULL;
id = m->base.seq;
@@ -665,14 +662,11 @@ mail_async_event_emit (MailAsyncEvent *ea,
/* We use an idle function instead of our own message port only
* because the gui message ports's notification buffer might
* overflow and deadlock us. */
- if (type == MAIL_ASYNC_GUI) {
- if (mail_in_main_thread ())
- m->idle_id = g_idle_add (
- (GSourceFunc) idle_async_event, m);
- else
- mail_msg_main_loop_push (m);
- } else
- mail_msg_fast_ordered_push (m);
+ if (mail_in_main_thread ())
+ m->idle_id = g_idle_add (
+ (GSourceFunc) idle_async_event, m);
+ else
+ mail_msg_main_loop_push (m);
return id;
}
diff --git a/mail/mail-mt.h b/mail/mail-mt.h
index de00eec5a6..823f627b78 100644
--- a/mail/mail-mt.h
+++ b/mail/mail-mt.h
@@ -89,17 +89,12 @@ typedef struct _MailAsyncEvent {
GSList *tasks;
} MailAsyncEvent;
-typedef enum _mail_async_event_t {
- MAIL_ASYNC_GUI,
- MAIL_ASYNC_THREAD
-} mail_async_event_t;
-
typedef void (*MailAsyncFunc)(gpointer , gpointer , gpointer );
/* create a new async event handler */
MailAsyncEvent *mail_async_event_new (void);
/* forward a camel event (or other call) to the gui thread */
-guint mail_async_event_emit (MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, gpointer , gpointer , gpointer );
+guint mail_async_event_emit (MailAsyncEvent *ea, MailAsyncFunc func, gpointer , gpointer , gpointer );
/* wait for all outstanding async events to complete */
gint mail_async_event_destroy (MailAsyncEvent *ea);
diff --git a/mail/message-list.c b/mail/message-list.c
index c6a8092046..3bd2413d32 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -3693,7 +3693,7 @@ folder_changed (CamelFolder *folder,
}
mail_async_event_emit (
- ml->async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)
+ ml->async_event, (MailAsyncFunc)
main_folder_changed, folder, changes, ml);
}