evolution-exchange r1840 - in trunk: . camel
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-exchange r1840 - in trunk: . camel
- Date: Thu, 20 Nov 2008 10:22:02 +0000 (UTC)
Author: mcrha
Date: Thu Nov 20 10:22:01 2008
New Revision: 1840
URL: http://svn.gnome.org/viewvc/evolution-exchange?rev=1840&view=rev
Log:
2008-11-20 Milan Crha <mcrha redhat com>
** Part of fix for bug #558883
* camel/camel-exchange-folder.h:
* camel/camel-exchange-folder.c:
* camel/camel-exchange-store.c:
Revert related parts from bug #336074, which caused slow start up.
Modified:
trunk/ChangeLog
trunk/camel/camel-exchange-folder.c
trunk/camel/camel-exchange-folder.h
trunk/camel/camel-exchange-store.c
Modified: trunk/camel/camel-exchange-folder.c
==============================================================================
--- trunk/camel/camel-exchange-folder.c (original)
+++ trunk/camel/camel-exchange-folder.c Thu Nov 20 10:22:01 2008
@@ -50,10 +50,6 @@
static CamelOfflineFolderClass *parent_class = NULL;
-static CamelProperty exchange_property_list[] = {
- { CAMEL_EXCHANGE_FOLDER_CHECK_FOLDER, "check_folder", N_("Always check for new mail in this folder") },
-};
-
/* Returns the class for a CamelFolder */
#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
@@ -90,9 +86,6 @@
static void refresh_info (CamelFolder *folder, CamelException *ex);
static void exchange_sync (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static int exchange_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args);
-static int exchange_setv (CamelObject *object, CamelException *ex, CamelArgV *args);
-
static void
class_init (CamelFolderClass *camel_folder_class)
{
@@ -111,9 +104,6 @@
camel_folder_class->transfer_messages_to = transfer_messages_to;
camel_folder_class->refresh_info = refresh_info;
camel_folder_class->sync = exchange_sync;
-
- ((CamelObjectClass *)camel_folder_class)->getv = exchange_getv;
- ((CamelObjectClass *)camel_folder_class)->setv = exchange_setv;
}
#define CAMEL_EXCHANGE_SERVER_FLAGS \
@@ -155,8 +145,6 @@
static CamelType camel_exchange_folder_type = CAMEL_INVALID_TYPE;
if (camel_exchange_folder_type == CAMEL_INVALID_TYPE) {
- int i;
-
camel_exchange_folder_type = camel_type_register (
camel_offline_folder_get_type (),
"CamelExchangeFolder",
@@ -166,10 +154,6 @@
NULL,
(CamelObjectInitFunc) init,
(CamelObjectFinalizeFunc) finalize );
-
- /* only localize here, do not create GSList, we do not want to leak */
- for (i = 0; i < sizeof (exchange_property_list)/sizeof (exchange_property_list [0]); i++)
- exchange_property_list [i].description = _(exchange_property_list [i].description);
}
return camel_exchange_folder_type;
@@ -1143,78 +1127,3 @@
camel_folder_summary_save_to_db (folder->summary, ex);
}
-
-static int
-exchange_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args)
-{
- int i, count=0;
- guint32 tag;
-
- for (i = 0; i < args->argc; i++) {
- CamelArgGet *arg = &args->argv[i];
-
- tag = arg->tag;
-
- switch (tag & CAMEL_ARG_TAG) {
- case CAMEL_OBJECT_ARG_PERSISTENT_PROPERTIES:
- case CAMEL_FOLDER_ARG_PROPERTIES: {
- CamelArgGetV props;
- int i;
-
- props.argc = 1;
- props.argv[0] = *arg;
- ((CamelObjectClass *)parent_class)->getv(object, ex, &props);
-
- for (i = 0; i < sizeof (exchange_property_list)/sizeof (exchange_property_list [0]); i++)
- *arg->ca_ptr = g_slist_append (*arg->ca_ptr, &exchange_property_list[i]);
- break; }
- /* exchange args */
- case CAMEL_EXCHANGE_FOLDER_ARG_CHECK_FOLDER:
- *arg->ca_int = ((CamelExchangeFolder *)object)->check_folder;
- break;
- default:
- count++;
- continue;
- }
-
- arg->tag = (tag & CAMEL_ARG_TYPE) | CAMEL_ARG_IGNORE;
- }
-
- if (count)
- return ((CamelObjectClass *)parent_class)->getv (object, ex, args);
-
- return 0;
-}
-
-static int
-exchange_setv (CamelObject *object, CamelException *ex, CamelArgV *args)
-{
- int save = 0;
- int i;
- guint32 tag;
-
- for (i = 0; i < args->argc; i++) {
- CamelArg *arg = &args->argv[i];
-
- tag = arg->tag;
-
- switch (tag & CAMEL_ARG_TAG) {
- case CAMEL_EXCHANGE_FOLDER_ARG_CHECK_FOLDER:
- if (((CamelExchangeFolder *)object)->check_folder != arg->ca_int) {
- ((CamelExchangeFolder *)object)->check_folder = arg->ca_int;
- save = 1;
- }
- break;
- default:
- continue;
- }
-
- arg->tag = (tag & CAMEL_ARG_TYPE) | CAMEL_ARG_IGNORE;
- }
-
- if (save)
- camel_object_state_write (object);
-
- return ((CamelObjectClass *)parent_class)->setv (object, ex, args);
-}
-
Modified: trunk/camel/camel-exchange-folder.h
==============================================================================
--- trunk/camel/camel-exchange-folder.h (original)
+++ trunk/camel/camel-exchange-folder.h Thu Nov 20 10:22:01 2008
@@ -24,15 +24,6 @@
#define CAMEL_EXCHANGE_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_EXCHANGE_FOLDER_TYPE, CamelExchangeFolderClass))
#define CAMEL_IS_EXCHANGE_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_EXCHANGE_FOLDER_TYPE))
-enum {
- CAMEL_EXCHANGE_FOLDER_ARG_CHECK_FOLDER = CAMEL_OFFLINE_FOLDER_ARG_LAST,
- CAMEL_EXCHANGE_FOLDER_ARG_LAST = CAMEL_OFFLINE_FOLDER_ARG_LAST + 0x100
-};
-
-enum {
- CAMEL_EXCHANGE_FOLDER_CHECK_FOLDER = CAMEL_EXCHANGE_FOLDER_ARG_CHECK_FOLDER | CAMEL_ARG_BOO,
-};
-
typedef struct {
CamelOfflineFolder parent_object;
@@ -42,7 +33,6 @@
char *source;
GHashTable *thread_index_to_message_id;
- unsigned int check_folder:1;
} CamelExchangeFolder;
typedef struct {
Modified: trunk/camel/camel-exchange-store.c
==============================================================================
--- trunk/camel/camel-exchange-store.c (original)
+++ trunk/camel/camel-exchange-store.c Thu Nov 20 10:22:01 2008
@@ -1194,13 +1194,5 @@
res = CAMEL_STORE_CLASS(parent_class)->can_refresh_folder (store, info, ex) ||
(camel_url_get_param (((CamelService *)store)->url, "check_all") != NULL);
- if (!res && !camel_exception_is_set (ex)) {
- CamelFolder *folder;
-
- folder = camel_store_get_folder (store, info->full_name, 0, ex);
- if (folder && CAMEL_IS_EXCHANGE_FOLDER (folder))
- res = CAMEL_EXCHANGE_FOLDER (folder)->check_folder;
- }
-
return res;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]