evolution r36079 - branches/mail-dbus-remoting/mail
- From: psankar svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r36079 - branches/mail-dbus-remoting/mail
- Date: Tue, 26 Aug 2008 11:06:37 +0000 (UTC)
Author: psankar
Date: Tue Aug 26 11:06:37 2008
New Revision: 36079
URL: http://svn.gnome.org/viewvc/evolution?rev=36079&view=rev
Log:
Make CamelStore->flags compilable with new CamelStoreRemote
Do not expect evo to launch properly etc.
Modified:
branches/mail-dbus-remoting/mail/camel-store-remote.h
branches/mail-dbus-remoting/mail/em-folder-browser.c
branches/mail-dbus-remoting/mail/em-folder-properties.c
branches/mail-dbus-remoting/mail/em-popup.c
branches/mail-dbus-remoting/mail/mail-component.c
branches/mail-dbus-remoting/mail/mail-component.h
branches/mail-dbus-remoting/mail/mail-vfolder.c
Modified: branches/mail-dbus-remoting/mail/camel-store-remote.h
==============================================================================
--- branches/mail-dbus-remoting/mail/camel-store-remote.h (original)
+++ branches/mail-dbus-remoting/mail/camel-store-remote.h Tue Aug 26 11:06:37 2008
@@ -3,6 +3,9 @@
*
* */
+#ifndef CAMEL_STORE_REMOTE_H
+#define CAMEL_STORE_REMOTE_H
+
#include <camel/camel.h>
typedef struct {
@@ -46,3 +49,4 @@
guint32 camel_store_get_flags_remote(CamelStoreRemote * store);
void camel_store_set_mode_remote(CamelStoreRemote * store, guint32 mode);
void camel_store_set_flags_remote(CamelStoreRemote * store, guint32 mode);
+#endif
Modified: branches/mail-dbus-remoting/mail/em-folder-browser.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-folder-browser.c (original)
+++ branches/mail-dbus-remoting/mail/em-folder-browser.c Tue Aug 26 11:06:37 2008
@@ -1157,6 +1157,8 @@
if (!efb->account_search_vf) {
store = emfv->folder->parent_store;
+ #warning DAMN WRONG. You must be a moron to leave this. Fix it soon.
+ /*
if (store->folders) {
folders = camel_object_bag_list(store->folders);
for (i=0;i<folders->len;i++) {
@@ -1164,6 +1166,7 @@
folder_list_account = g_list_append(folder_list_account, folder);
}
}
+ */
/* Create a camel vee folder */
storeuri = g_strdup_printf("vfolder:%s/vfolder", mail_component_peek_base_directory (mail_component_peek ()));
Modified: branches/mail-dbus-remoting/mail/em-folder-properties.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-folder-properties.c (original)
+++ branches/mail-dbus-remoting/mail/em-folder-properties.c Tue Aug 26 11:06:37 2008
@@ -30,6 +30,7 @@
#include <gconf/gconf-client.h>
#include <camel/camel-store.h>
+#include <camel-store-remote.h>
#include <camel/camel-folder.h>
#include <camel/camel-vtrash-folder.h>
#include <camel/camel-vee-folder.h>
@@ -298,6 +299,7 @@
GConfClient *gconf;
CamelStore *store;
char *uri = (char *)data;
+ guint32 store_flags;
if (folder == NULL) {
g_free (uri);
@@ -321,10 +323,12 @@
gconf = mail_config_get_gconf_client ();
hide_deleted = !gconf_client_get_bool(gconf, "/apps/evolution/mail/display/show_deleted", NULL);
+ store_flags = camel_store_get_flags_remote (store);
+
/*
Do the calculation only for those accounts that support VTRASHes
*/
- if (store->flags & CAMEL_STORE_VTRASH) {
+ if (store_flags & CAMEL_STORE_VTRASH) {
if (CAMEL_IS_VTRASH_FOLDER(folder))
prop_data->total += deleted;
else if (!hide_deleted && deleted > 0)
@@ -334,7 +338,7 @@
/*
* If the ffolder is junk folder, get total number of mails.
*/
- if (store->flags & CAMEL_STORE_VJUNK) {
+ if (store_flags & CAMEL_STORE_VJUNK) {
camel_object_get (folder, NULL, CAMEL_FOLDER_TOTAL, &prop_data->total, NULL);
}
Modified: branches/mail-dbus-remoting/mail/em-popup.c
==============================================================================
--- branches/mail-dbus-remoting/mail/em-popup.c (original)
+++ branches/mail-dbus-remoting/mail/em-popup.c Tue Aug 26 11:06:37 2008
@@ -38,6 +38,7 @@
#include "em-utils.h"
#include "em-composer-utils.h"
+#include <camel-store-remote.h>
#include <camel/camel-store.h>
#include <camel/camel-folder.h>
#include <camel/camel-mime-message.h>
@@ -211,7 +212,7 @@
else
mask &= ~EM_POPUP_SELECT_MARK_READ;
- if ((store->flags & CAMEL_STORE_VJUNK) && !draft_or_outbox) {
+ if ((camel_store_get_flags_remote (store) & CAMEL_STORE_VJUNK) && !draft_or_outbox) {
if ((flags & CAMEL_MESSAGE_JUNK))
mask &= ~EM_POPUP_SELECT_NOT_JUNK;
else
Modified: branches/mail-dbus-remoting/mail/mail-component.c
==============================================================================
--- branches/mail-dbus-remoting/mail/mail-component.c (original)
+++ branches/mail-dbus-remoting/mail/mail-component.c Tue Aug 26 11:06:37 2008
@@ -91,6 +91,7 @@
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-widget.h>
+#include <camel-store-remote.h>
#include "mail-dbus.h"
#define d(x)
@@ -171,6 +172,7 @@
store_info_new(CamelStore *store, const char *name)
{
struct _store_info *si;
+ int store_flags;
si = g_malloc0(sizeof(*si));
si->ref_count = 1;
@@ -180,11 +182,14 @@
si->name = g_strdup(name);
si->store = store;
camel_object_ref(store);
+
+ store_flags = camel_store_get_flags_remote (store);
+
/* If these are vfolders then they need to be opened now,
* otherwise they wont keep track of all folders */
- if ((store->flags & CAMEL_STORE_VTRASH) != 0)
+ if ((store_flags & CAMEL_STORE_VTRASH) != 0)
si->vtrash = camel_store_get_trash(store, NULL);
- if ((store->flags & CAMEL_STORE_VJUNK) != 0)
+ if ((store_flags & CAMEL_STORE_VJUNK) != 0)
si->vjunk = camel_store_get_junk(store, NULL);
return si;
Modified: branches/mail-dbus-remoting/mail/mail-component.h
==============================================================================
--- branches/mail-dbus-remoting/mail/mail-component.h (original)
+++ branches/mail-dbus-remoting/mail/mail-component.h Tue Aug 26 11:06:37 2008
@@ -30,6 +30,8 @@
#include "shell/evolution-component.h"
#include "Evolution-Mail.h"
+#include <camel-store-remote.h>
+
struct _CamelStore;
#define MAIL_TYPE_COMPONENT (mail_component_get_type ())
Modified: branches/mail-dbus-remoting/mail/mail-vfolder.c
==============================================================================
--- branches/mail-dbus-remoting/mail/mail-vfolder.c (original)
+++ branches/mail-dbus-remoting/mail/mail-vfolder.c Tue Aug 26 11:06:37 2008
@@ -28,6 +28,7 @@
#include <glib/gi18n.h>
+#include <camel-store-remote.h>
#include <camel/camel-vee-folder.h>
#include <camel/camel-vee-store.h>
#include <camel/camel-vtrash-folder.h>
@@ -63,7 +64,7 @@
static GHashTable *vfolder_hash;
/* This is a slightly hacky solution to shutting down, we poll this variable in various
loops, and just quit processing if it is set. */
-static volatile int shutdown; /* are we shutting down? */
+static volatile int vshutdown; /* are we shutting down? */
/* more globals ... */
extern CamelSession *session;
@@ -100,7 +101,7 @@
camel_vee_folder_set_expression((CamelVeeFolder *)m->folder, m->query);
l = m->sources_uri;
- while (l && !shutdown) {
+ while (l && !vshutdown) {
d(printf(" Adding uri: %s\n", (char *)l->data));
folder = mail_tool_uri_to_folder (l->data, 0, &m->base.ex);
if (folder) {
@@ -113,14 +114,14 @@
}
l = m->sources_folder;
- while (l && !shutdown) {
+ while (l && !vshutdown) {
d(printf(" Adding folder: %s\n", ((CamelFolder *)l->data)->full_name));
camel_object_ref(l->data);
list = g_list_append(list, l->data);
l = l->next;
}
- if (!shutdown)
+ if (!vshutdown)
camel_vee_folder_set_folders((CamelVeeFolder *)m->folder, list);
l = list;
@@ -248,7 +249,7 @@
GList *l;
CamelFolder *folder = NULL;
- if (shutdown)
+ if (vshutdown)
return;
d(printf("%s uri to vfolder: %s\n", m->remove?"Removing":"Adding", m->uri));
@@ -265,7 +266,7 @@
if (folder != NULL) {
l = m->folders;
- while (l && !shutdown) {
+ while (l && !vshutdown) {
if (m->remove)
camel_vee_folder_remove_folder((CamelVeeFolder *)l->data, folder);
else
@@ -389,9 +390,13 @@
CamelURL *url;
int res;
+ guint32 store_flags;
+
+ store_flags = camel_store_get_flags_remote (store);
+
/* This is a bit of a hack, but really the only way it can be done at the moment. */
- if ((store->flags & (CAMEL_STORE_VTRASH|CAMEL_STORE_VJUNK)) == 0)
+ if ((store_flags & (CAMEL_STORE_VTRASH|CAMEL_STORE_VJUNK)) == 0)
return FALSE;
url = camel_url_new(uri, NULL);
@@ -400,15 +405,15 @@
/* don't use strcasecmp here */
if (url->fragment) {
- res = (((store->flags & CAMEL_STORE_VTRASH)
+ res = (((store_flags & CAMEL_STORE_VTRASH)
&& strcmp(url->fragment, CAMEL_VTRASH_NAME) == 0)
- || ((store->flags & CAMEL_STORE_VJUNK)
+ || ((store_flags & CAMEL_STORE_VJUNK)
&& strcmp(url->fragment, CAMEL_VJUNK_NAME) == 0));
} else {
res = url->path
- && (((store->flags & CAMEL_STORE_VTRASH)
+ && (((store_flags & CAMEL_STORE_VTRASH)
&& strcmp(url->path, "/" CAMEL_VTRASH_NAME) == 0)
- || ((store->flags & CAMEL_STORE_VJUNK)
+ || ((store_flags & CAMEL_STORE_VJUNK)
&& strcmp(url->path, "/" CAMEL_VJUNK_NAME) == 0));
}
@@ -1214,7 +1219,7 @@
void
mail_vfolder_shutdown (void)
{
- shutdown = 1;
+ vshutdown = 1;
if (vfolder_hash) {
g_hash_table_foreach (vfolder_hash, vfolder_foreach_cb, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]