[evolution] Remove "type" parameter from mail_async_event_emit().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Remove "type" parameter from mail_async_event_emit().
- Date: Thu, 30 Sep 2010 17:56:03 +0000 (UTC)
commit fc2c71593a190a0742639cd1f22664aecdc0d05d
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Sep 30 09:39:25 2010 -0400
Remove "type" parameter from mail_async_event_emit().
All remaining cases use MAIL_ASYNC_GUI, so remove mail_async_event_t
altogether.
mail/em-folder-tree-model.c | 10 +++++-----
mail/mail-folder-cache.c | 5 ++---
mail/mail-mt.c | 16 +++++-----------
mail/mail-mt.h | 7 +------
mail/message-list.c | 2 +-
5 files changed, 14 insertions(+), 26 deletions(-)
---
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 62e8e1b..a7386b5 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 78cd647..1b32198 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 60938ab..45ab9a4 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 de00eec..823f627 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 c6a8092..3bd2413 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]