From 4370d47c8b50a04e5564577c2a980a368bd4d1d3 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 24 Oct 2009 07:04:22 -0400 Subject: Remove some unfinished / unwanted bits from mail-mt. --- mail/mail-mt.c | 68 +--------------------------------------------------------- mail/mail-mt.h | 9 -------- 2 files changed, 1 insertion(+), 76 deletions(-) (limited to 'mail') diff --git a/mail/mail-mt.c b/mail/mail-mt.c index aa7f5727e5..d3d1aa3737 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -46,7 +46,6 @@ /*#define MALLOC_CHECK*/ #define d(x) -static void set_stop(gint sensitive); static void mail_operation_status(CamelOperation *op, const gchar *what, gint pc, gpointer data); /* background operation status stuff */ @@ -462,11 +461,8 @@ mail_msg_proxy (MailMsg *msg) g_free (text); } - if (msg->info->exec != NULL) { - mail_enable_stop (); + if (msg->info->exec != NULL) msg->info->exec (msg); - mail_disable_stop (); - } if (msg->info->desc != NULL && msg->cancel) { camel_operation_end (msg->cancel); @@ -819,55 +815,6 @@ mail_call_main (mail_call_t type, MailMainFunc func, ...) return ret; } -/* ********************************************************************** */ -/* locked via status_lock */ -static gint busy_state; -G_LOCK_DEFINE_STATIC (busy_state); - -static void -do_set_busy(MailMsg *mm) -{ - set_stop(busy_state > 0); -} - -static MailMsgInfo set_busy_info = { - sizeof (MailMsg), - (MailMsgDescFunc) NULL, - (MailMsgExecFunc) do_set_busy, - (MailMsgDoneFunc) NULL, - (MailMsgFreeFunc) NULL -}; - -void mail_enable_stop(void) -{ - MailMsg *m; - - G_LOCK (busy_state); - - busy_state++; - if (busy_state == 1) { - m = mail_msg_new(&set_busy_info); - mail_msg_main_loop_push(m); - } - - G_UNLOCK (busy_state); -} - -void mail_disable_stop(void) -{ - MailMsg *m; - - G_LOCK (busy_state); - - busy_state--; - if (busy_state == 0) { - m = mail_msg_new(&set_busy_info); - mail_msg_main_loop_push(m); - } - - G_UNLOCK (busy_state); -} - /* ******************************************************************************** */ struct _op_status_msg { @@ -1019,16 +966,3 @@ mail_operation_status (CamelOperation *op, const gchar *what, gint pc, gpointer m->data = data; mail_msg_main_loop_push(m); } - -/* ******************** */ - -static void -set_stop (gint sensitive) -{ - static gint last = FALSE; - - if (last == sensitive) - return; - - last = sensitive; -} diff --git a/mail/mail-mt.h b/mail/mail-mt.h index 396eb77ad2..64641ee093 100644 --- a/mail/mail-mt.h +++ b/mail/mail-mt.h @@ -87,11 +87,6 @@ void mail_msg_set_cancelable (gpointer msg, gboolean status); gchar *mail_get_password (CamelService *service, const gchar *prompt, gboolean secret, gboolean *cache); -/* present information and get an ok (or possibly cancel) - * "type" is as for gnome_message_box_new(); - */ -gboolean mail_user_message (const gchar *type, const gchar *prompt, gboolean allow_cancel); - /* asynchronous event proxies */ typedef struct _MailAsyncEvent { GMutex *lock; @@ -126,10 +121,6 @@ typedef gpointer (*MailMainFunc)(); gpointer mail_call_main(mail_call_t type, MailMainFunc func, ...); -/* use with caution. only works with active message's anyway */ -void mail_enable_stop(void); -void mail_disable_stop(void); - /* A generic proxy event for anything that can be proxied during the life of the mailer (almost nothing) */ /* Note that almost all objects care about the lifecycle of their events, so this cannot be used */ extern MailAsyncEvent *mail_async_event; -- cgit v1.2.3