aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-12-01 04:53:49 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-12-01 04:53:49 +0800
commitbef182255624468737832990a344cd31a82dc9d9 (patch)
treea17a1a861f2370df8d21a179fbc3afea22b795e9 /mail
parent5f2ba41078c760533e5650752dc6f8712e864ddc (diff)
downloadgsoc2013-evolution-bef182255624468737832990a344cd31a82dc9d9.tar
gsoc2013-evolution-bef182255624468737832990a344cd31a82dc9d9.tar.gz
gsoc2013-evolution-bef182255624468737832990a344cd31a82dc9d9.tar.bz2
gsoc2013-evolution-bef182255624468737832990a344cd31a82dc9d9.tar.lz
gsoc2013-evolution-bef182255624468737832990a344cd31a82dc9d9.tar.xz
gsoc2013-evolution-bef182255624468737832990a344cd31a82dc9d9.tar.zst
gsoc2013-evolution-bef182255624468737832990a344cd31a82dc9d9.zip
Remove all the syncFolder stuff since it's not in the Component interface
* mail-offline-handler.c: Remove all the syncFolder stuff since it's not in the Component interface anymore. * mail-mt.c: Remove declaration for global_shell_client. #if 0 all the code that uses that. * mail-component-factory.c: Remove declaration for global_shell_client. * mail-vfolder.c: Remove declaration for global_shell_client. svn path=/trunk/; revision=23506
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog13
-rw-r--r--mail/mail-component-factory.c4
-rw-r--r--mail/mail-mt.c12
-rw-r--r--mail/mail-offline-handler.c97
-rw-r--r--mail/mail-vfolder.c2
5 files changed, 20 insertions, 108 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 78bf24d035..251746b626 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,16 @@
+2003-11-30 Ettore Perazzoli <ettore@ximian.com>
+
+ * mail-offline-handler.c: Remove all the syncFolder stuff since
+ it's not in the Component interface anymore.
+
+ * mail-mt.c: Remove declaration for global_shell_client. #if 0
+ all the code that uses that.
+
+ * mail-component-factory.c: Remove declaration for
+ global_shell_client.
+
+ * mail-vfolder.c: Remove declaration for global_shell_client.
+
2003-11-26 JP Rosevear <jpr@ximian.com>
* Makefile.am: turn on deprecated Gtk stuff
diff --git a/mail/mail-component-factory.c b/mail/mail-component-factory.c
index 326f9177db..b779329926 100644
--- a/mail/mail-component-factory.c
+++ b/mail/mail-component-factory.c
@@ -54,10 +54,6 @@
#define WIZARD_ID "OAFIID:GNOME_Evolution_Mail_Wizard"
-/* EPFIXME: This stuff is here just to get it to compile, it should be moved
- out of the way (was originally in component-factory.c). */
-EvolutionShellClient *global_shell_client = NULL;
-
static BonoboObject *
factory (BonoboGenericFactory *factory,
const char *component_id,
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index b9e0df4cb8..21903061a9 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -42,7 +42,6 @@ static void mail_operation_status(struct _CamelOperation *op, const char *what,
#define MAIL_MT_LOCK(x) pthread_mutex_lock(&x)
#define MAIL_MT_UNLOCK(x) pthread_mutex_unlock(&x)
#endif
-extern EvolutionShellClient *global_shell_client;
/* background operation status stuff */
struct _mail_msg_priv {
@@ -797,8 +796,7 @@ static int busy_state;
static void do_set_busy(struct _mail_msg *mm)
{
- if (global_shell_client)
- set_stop(busy_state > 0);
+ set_stop(busy_state > 0);
}
struct _mail_msg_op set_busy_op = {
@@ -814,7 +812,7 @@ void mail_enable_stop(void)
MAIL_MT_LOCK(status_lock);
busy_state++;
- if (busy_state == 1 && global_shell_client) {
+ if (busy_state == 1) {
m = mail_msg_new(&set_busy_op, NULL, sizeof(*m));
e_msgport_put(mail_gui_port, (EMsg *)m);
}
@@ -827,7 +825,7 @@ void mail_disable_stop(void)
MAIL_MT_LOCK(status_lock);
busy_state--;
- if (busy_state == 0 && global_shell_client) {
+ if (busy_state == 0) {
m = mail_msg_new(&set_busy_op, NULL, sizeof(*m));
e_msgport_put(mail_gui_port, (EMsg *)m);
}
@@ -860,6 +858,7 @@ static void do_op_status(struct _mail_msg *mm)
msg = g_hash_table_lookup (mail_msg_active_table, m->data);
+#if 0
/* shortcut processing, i.e. if we have no global_shell_client and no activity, we can't create one */
if (msg == NULL || (msg->priv->activity == NULL && global_shell_client == NULL)) {
MAIL_MT_UNLOCK (mail_msg_lock);
@@ -949,6 +948,7 @@ static void do_op_status(struct _mail_msg *mm)
} else {
MAIL_MT_UNLOCK (mail_msg_lock);
}
+#endif
}
static void
@@ -973,6 +973,7 @@ mail_operation_status (struct _CamelOperation *op, const char *what, int pc, voi
d(printf("got operation statys: %s %d%%\n", what, pc));
+#if 0
if (global_shell_client == NULL)
return;
@@ -990,6 +991,7 @@ mail_operation_status (struct _CamelOperation *op, const char *what, int pc, voi
m->pc = pc;
m->data = data;
e_msgport_put(mail_gui_port, (EMsg *)m);
+#endif
}
/* ******************** */
diff --git a/mail/mail-offline-handler.c b/mail/mail-offline-handler.c
index 85161a8f8e..6613391a7b 100644
--- a/mail/mail-offline-handler.c
+++ b/mail/mail-offline-handler.c
@@ -114,7 +114,6 @@ impl_prepareForOffline (PortableServer_Servant servant,
struct _sync_info {
char *uri; /* uri of folder being synced */
CamelOperation *cancel; /* progress report/cancellation object */
- GNOME_Evolution_SyncFolderProgressListener listener;
int pc; /* percent complete (0-100) */
int lastpc; /* last percent reported, so we dont overreport */
int id; /* timeout id */
@@ -122,100 +121,6 @@ struct _sync_info {
};
static void
-impl_cancelSyncFolder (PortableServer_Servant servant,
- const GNOME_Evolution_Folder *folder,
- CORBA_Environment *ev)
-{
- MailOfflineHandler *offline_handler;
- MailOfflineHandlerPrivate *priv;
- struct _sync_info *info;
-
- offline_handler = MAIL_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- priv = offline_handler->priv;
-
- info = g_hash_table_lookup(priv->sync_table, folder->physicalUri);
- if (info)
- camel_operation_cancel(info->cancel);
- else
- g_warning("Shell tried to cancel sync of '%s': no such folder", folder->physicalUri);
-}
-
-static int sync_timeout(struct _sync_info *info)
-{
- CORBA_Environment ev;
-
- if (info->pc != info->lastpc) {
- CORBA_exception_init(&ev);
- GNOME_Evolution_SyncFolderProgressListener_updateProgress(info->listener, info->pc/100.0, &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- g_warning("Error updating offline progress");
- CORBA_exception_free(&ev);
- info->lastpc = info->pc;
- }
-
- return TRUE;
-}
-
-static void sync_status(CamelOperation *op, const char *what, int pc, void *data)
-{
- struct _sync_info *info = data;
-
- if (pc == CAMEL_OPERATION_START)
- pc = 0;
- else if (pc == CAMEL_OPERATION_END)
- pc = 100;
-
- info->pc = pc;
-}
-
-static void
-sync_done(const char *uri, void *crap)
-{
- CORBA_Environment ev;
- struct _sync_info *info = crap;
-
- g_source_remove(info->id);
-
- CORBA_exception_init(&ev);
- GNOME_Evolution_SyncFolderProgressListener_reportSuccess(info->listener, &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- g_warning("Error sending offline completion: hang likely");
- CORBA_Object_release(info->listener, &ev);
- CORBA_exception_free(&ev);
-
- g_hash_table_remove (info->table, info->uri);
- g_free(info->uri);
- camel_operation_unref(info->cancel);
- g_free(info);
-}
-
-static void
-impl_syncFolder (PortableServer_Servant servant,
- const GNOME_Evolution_Folder *folder,
- const GNOME_Evolution_SyncFolderProgressListener progress_listener,
- CORBA_Environment *ev)
-{
- MailOfflineHandler *offline_handler;
- MailOfflineHandlerPrivate *priv;
- struct _sync_info *info;
-
- offline_handler = MAIL_OFFLINE_HANDLER(bonobo_object_from_servant (servant));
- priv = offline_handler->priv;
-
- info = g_malloc(sizeof(*info));
- info->listener = CORBA_Object_duplicate(progress_listener, ev);
- info->pc = 0;
- info->uri = g_strdup(folder->physicalUri);
- info->id = g_timeout_add(500, (GSourceFunc)sync_timeout, info);
- info->cancel = camel_operation_new(sync_status, info);
- info->table = priv->sync_table;
-
- g_hash_table_insert(priv->sync_table, info->uri, info);
-
- mail_prep_offline(info->uri, info->cancel, sync_done, info);
-}
-
-static void
went_offline (CamelStore *store, void *data)
{
CORBA_Environment ev;
@@ -323,8 +228,6 @@ mail_offline_handler_class_init (MailOfflineHandlerClass *klass)
epv = & klass->epv;
epv->_get_isOffline = impl__get_isOffline;
epv->prepareForOffline = impl_prepareForOffline;
- epv->syncFolder = impl_syncFolder;
- epv->cancelSyncFolder = impl_cancelSyncFolder;
epv->goOffline = impl_goOffline;
epv->goOnline = impl_goOnline;
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index b3acc7f650..23b52789b4 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -61,8 +61,6 @@ static GList *source_folders_remote; /* list of source folder uri's - remote one
static GList *source_folders_local; /* list of source folder uri's - local ones */
static GHashTable *vfolder_hash;
-extern EvolutionShellClient *global_shell_client;
-
/* more globals ... */
extern CamelSession *session;