aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJason Leach <jleach@ximian.com>2001-08-04 07:12:14 +0800
committerJacob Leach <jleach@src.gnome.org>2001-08-04 07:12:14 +0800
commit3732e11bafb7719d34919947938fb5ca7720813c (patch)
treebebb038a809d693bff7bc74b6a673133f617b77b /mail
parent3a3d80fa14de277592c8764699a9911ed837073c (diff)
downloadgsoc2013-evolution-3732e11bafb7719d34919947938fb5ca7720813c.tar
gsoc2013-evolution-3732e11bafb7719d34919947938fb5ca7720813c.tar.gz
gsoc2013-evolution-3732e11bafb7719d34919947938fb5ca7720813c.tar.bz2
gsoc2013-evolution-3732e11bafb7719d34919947938fb5ca7720813c.tar.lz
gsoc2013-evolution-3732e11bafb7719d34919947938fb5ca7720813c.tar.xz
gsoc2013-evolution-3732e11bafb7719d34919947938fb5ca7720813c.tar.zst
gsoc2013-evolution-3732e11bafb7719d34919947938fb5ca7720813c.zip
Updates for EvolutionStorage API changes.
2001-08-03 Jason Leach <jleach@ximian.com> * mail-folder-cache.c (update_idle): Updates for EvolutionStorage API changes. * mail-importer.c (mail_importer_create_folder): Ditto. * mail-local.c: Same here. svn path=/trunk/; revision=11636
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/mail-folder-cache.c33
-rw-r--r--mail/mail-folder-cache.h2
-rw-r--r--mail/mail-importer.c2
-rw-r--r--mail/mail-local.c38
-rw-r--r--mail/subscribe-dialog.h4
6 files changed, 46 insertions, 42 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index c06bf4077a..8ec376f443 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2001-08-03 Jason Leach <jleach@ximian.com>
+
+ * mail-folder-cache.c (update_idle): Updates for EvolutionStorage
+ API changes.
+
+ * mail-importer.c (mail_importer_create_folder): Ditto.
+
+ * mail-local.c: Same here.
+
2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
* mail-account-gui.c (build_auth_menu): Try to restore the choice
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index b2baf23f2c..6c71762dbe 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -62,7 +62,7 @@ typedef enum mail_folder_info_update_mode {
typedef union mail_folder_info_update_info {
EvolutionStorage *es;
- GNOME_Evolution_LocalStorage ls;
+ GNOME_Evolution_Storage ls;
} mfiui;
typedef struct _mail_folder_info {
@@ -198,7 +198,6 @@ update_idle (gpointer user_data)
{
mail_folder_info *mfi = (mail_folder_info *) user_data;
gchar *f_name, *f_status;
- gboolean bold;
gchar *uri, *path;
mfiui info;
mfium mode;
@@ -230,14 +229,6 @@ update_idle (gpointer user_data)
f_name = make_folder_name (mfi);
f_status = make_folder_status (mfi);
- /* bold? */
-
- if (mfi->flags & MAIL_FIF_UNREAD_VALID &&
- mfi->unread)
- bold = TRUE;
- else
- bold = FALSE;
-
/* Set the value */
/* Who knows how long these corba calls will take?
@@ -261,13 +252,12 @@ update_idle (gpointer user_data)
switch (mode) {
case MAIL_FIUM_LOCAL_STORAGE:
- d(g_message("Updating via LocalStorage"));
CORBA_exception_init (&ev);
- GNOME_Evolution_LocalStorage_updateFolder (info.ls,
- path,
- f_name,
- bold,
- &ev);
+ GNOME_Evolution_Storage_updateFolder (info.ls,
+ mfi->path,
+ mfi->name,
+ mfi->unread,
+ &ev);
if (BONOBO_EX (&ev))
g_warning ("Exception in local storage update: %s",
bonobo_exception_get_text (&ev));
@@ -277,8 +267,8 @@ update_idle (gpointer user_data)
d(g_message("Updating via EvolutionStorage"));
evolution_storage_update_folder_by_uri (info.es,
uri,
- f_name,
- bold);
+ mfi->name,
+ mfi->unread);
break;
case MAIL_FIUM_UNKNOWN:
default:
@@ -554,7 +544,8 @@ get_mail_info (CamelFolder *folder, mail_folder_info *mfi)
/* Public functions */
void
-mail_folder_cache_set_update_estorage (const gchar *uri, EvolutionStorage *estorage)
+mail_folder_cache_set_update_estorage (const gchar *uri,
+ EvolutionStorage *estorage)
{
mail_folder_info *mfi;
@@ -579,7 +570,9 @@ mail_folder_cache_set_update_estorage (const gchar *uri, EvolutionStorage *estor
}
void
-mail_folder_cache_set_update_lstorage (const gchar *uri, GNOME_Evolution_LocalStorage lstorage, const gchar *path)
+mail_folder_cache_set_update_lstorage (const gchar *uri,
+ GNOME_Evolution_Storage lstorage,
+ const gchar *path)
{
mail_folder_info *mfi;
diff --git a/mail/mail-folder-cache.h b/mail/mail-folder-cache.h
index f31593956e..a3dcec526b 100644
--- a/mail/mail-folder-cache.h
+++ b/mail/mail-folder-cache.h
@@ -42,7 +42,7 @@
void mail_folder_cache_set_update_estorage (const gchar *uri, EvolutionStorage *estorage);
void mail_folder_cache_set_update_lstorage (const gchar *uri,
- GNOME_Evolution_LocalStorage lstorage,
+ GNOME_Evolution_Storage lstorage,
const gchar *path);
/* We always update the shell view */
/*void mail_folder_cache_set_update_shellview (const gchar *uri);*/
diff --git a/mail/mail-importer.c b/mail/mail-importer.c
index 500897ea59..d32a2d0f12 100644
--- a/mail/mail-importer.c
+++ b/mail/mail-importer.c
@@ -44,7 +44,7 @@ static GList *importer_modules = NULL;
extern char *evolution_dir;
-static GNOME_Evolution_LocalStorage local_storage = NULL;
+static GNOME_Evolution_Storage local_storage = NULL;
/* Prototype */
diff --git a/mail/mail-local.c b/mail/mail-local.c
index 1999033964..6671087ea2 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -178,7 +178,8 @@ save_metainfo(struct _local_meta *meta)
typedef struct {
CamelStore parent_object;
- GNOME_Evolution_LocalStorage corba_local_storage;
+ EvolutionStorage *storage;
+ GNOME_Evolution_Storage corba_storage;
EvolutionStorageListener *local_storage_listener;
char *local_path;
@@ -245,7 +246,7 @@ mail_local_store_init (gpointer object, gpointer klass)
{
MailLocalStore *local_store = MAIL_LOCAL_STORE (object);
- local_store->corba_local_storage = CORBA_OBJECT_NIL;
+ local_store->corba_storage = CORBA_OBJECT_NIL;
}
static void
@@ -276,8 +277,8 @@ mail_local_store_finalize (gpointer object)
CORBA_Environment ev;
CORBA_exception_init (&ev);
- if (!CORBA_Object_is_nil (local_store->corba_local_storage, &ev))
- bonobo_object_release_unref (local_store->corba_local_storage, &ev);
+ if (!CORBA_Object_is_nil (local_store->corba_storage, &ev))
+ bonobo_object_release_unref (local_store->corba_storage, &ev);
CORBA_exception_free (&ev);
if (local_store->local_storage_listener)
@@ -369,7 +370,7 @@ init_trash (CamelStore *store)
/* would prefer not to special-case this, but... */
mail_folder_cache_note_folder ("vtrash:file:/", store->vtrash);
mail_folder_cache_set_update_lstorage ("vtrash:file:/",
- local_store->corba_local_storage,
+ local_store->corba_storage,
"/local/Trash");
}
}
@@ -512,7 +513,7 @@ register_folder_registered(struct _mail_msg *mm)
vfolder_register_source(local_folder->folder);
mail_folder_cache_set_update_lstorage (local_folder->uri,
- local_folder->local_store->corba_local_storage,
+ local_folder->local_store->corba_storage,
local_folder->path);
name = strrchr (local_folder->path, '/');
@@ -637,6 +638,7 @@ void
mail_local_storage_startup (EvolutionShellClient *shellclient,
const char *evolution_path)
{
+ EvolutionStorageListener *local_storage_listener;
GNOME_Evolution_StorageListener corba_local_storage_listener;
CORBA_Environment ev;
@@ -655,33 +657,33 @@ mail_local_storage_startup (EvolutionShellClient *shellclient,
g_warning ("No local store!");
return;
}
- local_store->corba_local_storage =
- evolution_shell_client_get_local_storage (shellclient);
- if (local_store->corba_local_storage == CORBA_OBJECT_NIL) {
+
+ local_store->corba_storage = evolution_shell_client_get_local_storage (shellclient);
+ if (local_store->corba_storage == CORBA_OBJECT_NIL) {
g_warning ("No local storage!");
camel_object_unref (CAMEL_OBJECT (local_store));
return;
}
- local_store->local_storage_listener =
- evolution_storage_listener_new ();
- corba_local_storage_listener =
- evolution_storage_listener_corba_objref (
- local_store->local_storage_listener);
+ local_storage_listener = evolution_storage_listener_new ();
+ corba_local_storage_listener = evolution_storage_listener_corba_objref (
+ local_storage_listener);
- gtk_signal_connect (GTK_OBJECT (local_store->local_storage_listener),
+ gtk_signal_connect (GTK_OBJECT (local_storage_listener),
"destroyed",
GTK_SIGNAL_FUNC (local_storage_destroyed_cb),
local_store);
- gtk_signal_connect (GTK_OBJECT (local_store->local_storage_listener),
+ gtk_signal_connect (GTK_OBJECT (local_storage_listener),
"new_folder",
GTK_SIGNAL_FUNC (local_storage_new_folder_cb),
local_store);
- gtk_signal_connect (GTK_OBJECT (local_store->local_storage_listener),
+ gtk_signal_connect (GTK_OBJECT (local_storage_listener),
"removed_folder",
GTK_SIGNAL_FUNC (local_storage_removed_folder_cb),
local_store);
+ local_store->local_storage_listener = local_storage_listener;
+
local_store->local_path = g_strdup_printf ("%s/local",
evolution_path);
local_store->local_pathlen = strlen (local_store->local_path);
@@ -689,7 +691,7 @@ mail_local_storage_startup (EvolutionShellClient *shellclient,
local_store->folders = g_hash_table_new (g_str_hash, g_str_equal);
CORBA_exception_init (&ev);
- GNOME_Evolution_Storage_addListener (local_store->corba_local_storage,
+ GNOME_Evolution_Storage_addListener (local_store->corba_storage,
corba_local_storage_listener, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("Cannot add a listener to the Local Storage.");
diff --git a/mail/subscribe-dialog.h b/mail/subscribe-dialog.h
index b25d76bb9a..2696acf2e2 100644
--- a/mail/subscribe-dialog.h
+++ b/mail/subscribe-dialog.h
@@ -40,9 +40,9 @@
#define IS_SUBSCRIBE_DIALOG_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SUBSCRIBE_DIALOG_TYPE))
struct _SubscribeDialog {
- GtkObject parent;
+ GtkObject parent;
- GNOME_Evolution_Shell shell;
+ GNOME_Evolution_Shell shell;
GtkWidget *app;