[evolution-data-server/camel-gobject: 16/19] Merge branch 'master' into camel-gobject.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/camel-gobject: 16/19] Merge branch 'master' into camel-gobject.
- Date: Sun, 4 Apr 2010 03:21:53 +0000 (UTC)
commit d665f21c2a27e14c553f54c654500144dcac178a
Merge: 3ad2bd1 6759a05
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Apr 2 20:42:20 2010 -0400
Merge branch 'master' into camel-gobject.
.gitignore | 1 +
ChangeLog | 4446 +----
Makefile.am | 18 +-
addressbook/ChangeLog | 5678 -----
addressbook/backends/google/util.c | 2 +-
.../backends/groupwise/e-book-backend-groupwise.c | 20 +-
addressbook/backends/ldap/e-book-backend-ldap.c | 20 +-
addressbook/libebook/Makefile.am | 2 +-
addressbook/libebook/e-book-query.c | 16 +-
addressbook/libedata-book/e-book-backend-sexp.c | 8 +-
addressbook/libedata-book/e-book-backend-summary.c | 4 +-
calendar/ChangeLog | 7249 -------
calendar/libedata-cal/e-cal-backend-sexp.c | 34 +-
camel/ChangeLog |10217 ---------
camel/ChangeLog.pre-1-4 |22083 --------------------
camel/Makefile.am | 1 -
camel/camel-db.c | 47 +-
camel/camel-filter-search.c | 30 +-
camel/camel-folder-search.c | 42 +-
camel/camel-folder.c | 6 +-
camel/camel-gpg-context.c | 30 +-
camel/camel-mempool.h | 4 +
camel/camel-net-utils-win32.h | 4 +-
camel/camel-search-sql-sexp.c | 12 +-
camel/camel-tcp-stream-ssl.h | 4 +
camel/providers/groupwise/ChangeLog | 1972 --
camel/providers/groupwise/camel-groupwise-folder.c | 4 +-
.../groupwise/camel-groupwise-store-summary.c | 2 +-
camel/providers/groupwise/camel-groupwise-store.c | 2 +-
.../providers/groupwise/camel-groupwise-summary.h | 2 +-
camel/providers/groupwise/camel-groupwise-utils.h | 4 +-
camel/providers/hula/ChangeLog | 12 -
camel/providers/imap/ChangeLog | 1373 --
camel/providers/imap/camel-imap-command.c | 2 +-
camel/providers/imap/camel-imap-folder.c | 2 +-
camel/providers/imap/camel-imap-folder.h | 2 +-
camel/providers/imap/camel-imap-search.c | 8 +-
camel/providers/imap/camel-imap-store-summary.c | 2 +-
camel/providers/imap/camel-imap-store-summary.h | 2 +-
camel/providers/imap/camel-imap-store.c | 25 +-
camel/providers/imap/camel-imap-types.h | 39 -
camel/providers/imap/camel-imap-utils.c | 13 +-
camel/providers/imap4/ChangeLog | 400 -
camel/providers/imapx/ChangeLog | 77 -
camel/providers/imapx/camel-imapx-exception.h | 4 +-
camel/providers/imapx/camel-imapx-folder.c | 10 -
camel/providers/imapx/camel-imapx-folder.h | 6 +-
camel/providers/imapx/camel-imapx-provider.c | 6 +-
camel/providers/imapx/camel-imapx-server.c | 22 +-
camel/providers/imapx/camel-imapx-server.h | 9 +-
camel/providers/imapx/camel-imapx-store-summary.c | 6 +-
camel/providers/imapx/camel-imapx-store-summary.h | 9 +-
camel/providers/imapx/camel-imapx-store.c | 16 +-
camel/providers/imapx/camel-imapx-store.h | 7 +-
camel/providers/imapx/camel-imapx-stream.c | 2 -
camel/providers/imapx/camel-imapx-stream.h | 8 +-
camel/providers/imapx/camel-imapx-summary.c | 7 -
camel/providers/imapx/camel-imapx-summary.h | 9 +-
camel/providers/imapx/camel-imapx-utils.c | 7 -
camel/providers/imapx/camel-imapx-utils.h | 8 +-
camel/providers/imapx/camel-imapx-view-summary.h | 6 +-
camel/providers/imapx/test-imapx.c | 1 -
camel/providers/local/ChangeLog | 649 -
camel/providers/local/camel-local-folder.c | 17 +-
camel/providers/local/camel-local-store.c | 2 -
camel/providers/local/camel-maildir-summary.c | 1 -
camel/providers/local/camel-maildir-summary.h | 2 -
camel/providers/local/camel-mbox-store.c | 2 -
camel/providers/local/camel-mh-summary.c | 2 +-
camel/providers/local/camel-mh-summary.h | 2 -
camel/providers/local/camel-spool-folder.h | 2 -
camel/providers/local/camel-spool-store.c | 2 -
camel/providers/nntp/ChangeLog | 233 -
camel/providers/nntp/camel-nntp-folder.c | 4 +-
camel/providers/nntp/camel-nntp-store-summary.c | 2 +-
camel/providers/nntp/camel-nntp-store.c | 2 +-
camel/providers/nntp/camel-nntp-summary.c | 3 +
camel/providers/pop3/ChangeLog | 264 -
camel/providers/pop3/camel-pop3-folder.c | 19 +-
camel/providers/pop3/camel-pop3-store.c | 3 +-
camel/providers/sendmail/ChangeLog | 21 -
camel/providers/smtp/ChangeLog | 122 -
camel/tests/ChangeLog | 47 -
libedataserver/e-sexp.c | 48 +-
libedataserver/e-sexp.h | 4 +-
libedataserverui/ChangeLog | 1670 --
libedataserverui/e-cell-renderer-color.c | 4 +-
po/ChangeLog | 4459 ----
po/POTFILES.in | 3 -
servers/google/libgdata-google/ChangeLog | 93 -
servers/google/libgdata/ChangeLog | 102 -
servers/groupwise/ChangeLog | 1826 --
92 files changed, 337 insertions(+), 63337 deletions(-)
---
diff --cc camel/camel-db.c
index 5862ce6,8aa64a3..d4619e5
--- a/camel/camel-db.c
+++ b/camel/camel-db.c
@@@ -28,9 -28,12 +28,11 @@@
#include <config.h>
- #include <string.h>
+ #include <ctype.h>
+ #include <stdio.h>
#include <stdlib.h>
+ #include <string.h>
-#include <glib.h>
#include <glib/gi18n-lib.h>
#include "camel-debug.h"
diff --cc camel/camel-filter-search.c
index a0ce715,ed76a38..0080d2d
--- a/camel/camel-filter-search.c
+++ b/camel/camel-filter-search.c
@@@ -275,11 -262,11 +275,11 @@@ header_regex (struct _ESExp *f, gint ar
if (argc > 1 && argv[0]->type == ESEXP_RES_STRING
&& (contents = camel_medium_get_header (CAMEL_MEDIUM (message), argv[0]->value.string))
- && camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc-1, argv+1, fms->ex) == 0) {
+ && camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc-1, argv+1, fms->error) == 0) {
- r->value.bool = regexec (&pattern, contents, 0, NULL, 0) == 0;
+ r->value.boolean = regexec (&pattern, contents, 0, NULL, 0) == 0;
regfree (&pattern);
} else
- r->value.bool = FALSE;
+ r->value.boolean = FALSE;
return r;
}
@@@ -332,10 -306,10 +332,10 @@@ header_full_regex (struct _ESExp *f, gi
gchar *contents;
if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_NEWLINE,
- argc, argv, fms->ex) == 0) {
+ argc, argv, fms->error) == 0) {
message = camel_filter_search_get_message (fms, f);
contents = get_full_header (message);
- r->value.bool = regexec (&pattern, contents, 0, NULL, 0) == 0;
+ r->value.boolean = regexec (&pattern, contents, 0, NULL, 0) == 0;
g_free (contents);
regfree (&pattern);
} else
@@@ -366,12 -340,12 +366,12 @@@ body_contains (struct _ESExp *f, gint a
CamelMimeMessage *message;
regex_t pattern;
- if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE, argc, argv, fms->ex) == 0) {
+ if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE, argc, argv, fms->error) == 0) {
message = camel_filter_search_get_message (fms, f);
- r->value.bool = camel_search_message_body_contains ((CamelDataWrapper *) message, &pattern);
+ r->value.boolean = camel_search_message_body_contains ((CamelDataWrapper *) message, &pattern);
regfree (&pattern);
} else
- r->value.bool = FALSE;
+ r->value.boolean = FALSE;
return r;
}
@@@ -384,12 -358,12 +384,12 @@@ body_regex (struct _ESExp *f, gint argc
regex_t pattern;
if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_NEWLINE,
- argc, argv, fms->ex) == 0) {
+ argc, argv, fms->error) == 0) {
message = camel_filter_search_get_message (fms, f);
- r->value.bool = camel_search_message_body_contains ((CamelDataWrapper *) message, &pattern);
+ r->value.boolean = camel_search_message_body_contains ((CamelDataWrapper *) message, &pattern);
regfree (&pattern);
} else
- r->value.bool = FALSE;
+ r->value.boolean = FALSE;
return r;
}
diff --cc camel/camel-folder-search.c
index 702ac25,5428696..bff5cb4
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@@ -1247,13 -1201,13 +1247,13 @@@ search_header_regex (struct _ESExp *f,
if (argc > 1 && argv[0]->type == ESEXP_RES_STRING
&& (contents = camel_medium_get_header (CAMEL_MEDIUM (msg), argv[0]->value.string))
- && camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc-1, argv+1, search->priv->ex) == 0) {
+ && camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc-1, argv+1, search->priv->error) == 0) {
- r->value.bool = regexec (&pattern, contents, 0, NULL, 0) == 0;
+ r->value.boolean = regexec (&pattern, contents, 0, NULL, 0) == 0;
regfree (&pattern);
} else
- r->value.bool = FALSE;
+ r->value.boolean = FALSE;
- camel_object_unref (msg);
+ g_object_unref (msg);
} else {
r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
r->value.ptrarray = g_ptr_array_new();
@@@ -1319,9 -1260,9 +1319,9 @@@ search_header_full_regex (struct _ESEx
g_free (contents);
regfree (&pattern);
} else
- r->value.bool = FALSE;
+ r->value.boolean = FALSE;
- camel_object_unref (msg);
+ g_object_unref (msg);
} else {
r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
r->value.ptrarray = g_ptr_array_new();
@@@ -1626,13 -1557,13 +1626,13 @@@ search_body_regex (struct _ESExp *f, gi
r = e_sexp_result_new (f, ESEXP_RES_BOOL);
- if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_NEWLINE, argc, argv, search->priv->ex) == 0) {
+ if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_NEWLINE, argc, argv, search->priv->error) == 0) {
- r->value.bool = camel_search_message_body_contains ((CamelDataWrapper *) msg, &pattern);
+ r->value.boolean = camel_search_message_body_contains ((CamelDataWrapper *) msg, &pattern);
regfree (&pattern);
} else
- r->value.bool = FALSE;
+ r->value.boolean = FALSE;
- camel_object_unref (msg);
+ g_object_unref (msg);
} else {
regex_t pattern;
diff --cc camel/camel-folder.c
index 0e5f826,841264b..c88e413
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@@ -2112,17 -1937,18 +2112,17 @@@ filter_filter (CamelSession *session, C
gint i, status = 0;
CamelURL *uri;
gchar *source_url;
- CamelException ex = CAMEL_EXCEPTION_INITIALISER;
CamelJunkPlugin *csp = ((CamelService *)m->folder->parent_store)->session->junk_plugin;
+ GError *local_error = NULL;
if (m->junk) {
- camel_operation_start (NULL, _("Learning junk"));
+ camel_operation_start (NULL, ngettext ("Learning new spam message", "Learning new spam messages", m->junk->len));
for (i = 0; i < m->junk->len; i ++) {
- CamelMimeMessage *msg = camel_folder_get_message(m->folder, m->junk->pdata[i], &ex);
+ CamelMimeMessage *msg = camel_folder_get_message (m->folder, m->junk->pdata[i], NULL);
gint pc = 100 * i / m->junk->len;
- camel_exception_clear (&ex);
- camel_operation_progress(NULL, pc);
+ camel_operation_progress (NULL, pc);
if (msg) {
camel_junk_plugin_report_junk (csp, msg);
@@@ -2133,12 -1959,13 +2133,12 @@@
}
if (m->notjunk) {
- camel_operation_start (NULL, _("Learning non-junk"));
+ camel_operation_start (NULL, ngettext ("Learning new ham message", "Learning new ham messages", m->notjunk->len));
for (i = 0; i < m->notjunk->len; i ++) {
- CamelMimeMessage *msg = camel_folder_get_message(m->folder, m->notjunk->pdata[i], &ex);
+ CamelMimeMessage *msg = camel_folder_get_message (m->folder, m->notjunk->pdata[i], NULL);
gint pc = 100 * i / m->notjunk->len;
- camel_exception_clear (&ex);
- camel_operation_progress(NULL, pc);
+ camel_operation_progress (NULL, pc);
if (msg) {
camel_junk_plugin_report_notjunk (csp, msg);
@@@ -2152,20 -1979,20 +2152,20 @@@
camel_junk_plugin_commit_reports (csp);
if (m->driver && m->recents) {
- camel_operation_start (NULL, _("Filtering new message (s)"));
- camel_operation_start(NULL, ngettext ("Filtering new message", "Filtering new messages", m->recents->len));
++ camel_operation_start (NULL, ngettext ("Filtering new message", "Filtering new messages", m->recents->len));
- source_url = camel_service_get_url((CamelService *)m->folder->parent_store);
- uri = camel_url_new(source_url, NULL);
- g_free(source_url);
+ source_url = camel_service_get_url ((CamelService *)m->folder->parent_store);
+ uri = camel_url_new (source_url, NULL);
+ g_free (source_url);
if (m->folder->full_name && m->folder->full_name[0] != '/') {
- gchar *tmp = alloca(strlen(m->folder->full_name)+2);
+ gchar *tmp = alloca (strlen (m->folder->full_name)+2);
- sprintf(tmp, "/%s", m->folder->full_name);
- camel_url_set_path(uri, tmp);
+ sprintf (tmp, "/%s", m->folder->full_name);
+ camel_url_set_path (uri, tmp);
} else
- camel_url_set_path(uri, m->folder->full_name);
- source_url = camel_url_to_string(uri, CAMEL_URL_HIDE_ALL);
- camel_url_free(uri);
+ camel_url_set_path (uri, m->folder->full_name);
+ source_url = camel_url_to_string (uri, CAMEL_URL_HIDE_ALL);
+ camel_url_free (uri);
for (i=0;status == 0 && i<m->recents->len;i++) {
gchar *uid = m->recents->pdata[i];
diff --cc camel/camel-gpg-context.c
index 9d0f32f,d9c83aa..ba706e3
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@@ -1057,13 -1057,11 +1056,12 @@@ gpg_ctx_op_cancel (struct _GpgCtx *gpg
sleep (1);
waitpid (gpg->pid, &status, WNOHANG);
}
- }
-
#endif
+ }
static gint
-gpg_ctx_op_step (struct _GpgCtx *gpg, CamelException *ex)
+gpg_ctx_op_step (struct _GpgCtx *gpg,
+ GError **error)
{
#ifndef G_OS_WIN32
GPollFD polls[6];
@@@ -1411,8 -1387,10 +1409,10 @@@ gpg_sign (CamelCipherContext *context
}
while (!gpg_ctx_op_complete (gpg)) {
- if (gpg_ctx_op_step (gpg, error) == -1)
- if (gpg_ctx_op_step (gpg, ex) == -1) {
++ if (gpg_ctx_op_step (gpg, error) == -1) {
+ gpg_ctx_op_cancel (gpg);
goto fail;
+ }
}
if (gpg_ctx_op_wait (gpg) != 0) {
@@@ -1671,8 -1632,10 +1671,10 @@@ gpg_verify (CamelCipherContext *context
}
while (!gpg_ctx_op_complete (gpg)) {
- if (gpg_ctx_op_step (gpg, error) == -1)
- if (gpg_ctx_op_step (gpg, ex) == -1) {
++ if (gpg_ctx_op_step (gpg, error) == -1) {
+ gpg_ctx_op_cancel (gpg);
goto exception;
+ }
}
/* report error only when no data or didn't found signature */
@@@ -1781,8 -1733,10 +1783,10 @@@ gpg_encrypt (CamelCipherContext *contex
/* FIXME: move this to a common routine */
while (!gpg_ctx_op_complete(gpg)) {
- if (gpg_ctx_op_step (gpg, error) == -1)
- if (gpg_ctx_op_step (gpg, ex) == -1) {
++ if (gpg_ctx_op_step (gpg, error) == -1) {
+ gpg_ctx_op_cancel (gpg);
goto fail;
+ }
}
if (gpg_ctx_op_wait (gpg) != 0) {
@@@ -1923,8 -1865,10 +1927,10 @@@ gpg_decrypt (CamelCipherContext *contex
}
while (!gpg_ctx_op_complete (gpg)) {
- if (gpg_ctx_op_step (gpg, error) == -1)
- if (gpg_ctx_op_step (gpg, ex) == -1) {
++ if (gpg_ctx_op_step (gpg, error) == -1) {
+ gpg_ctx_op_cancel (gpg);
goto fail;
+ }
}
if (gpg_ctx_op_wait (gpg) != 0) {
@@@ -2020,8 -1962,10 +2026,10 @@@ gpg_import_keys (CamelCipherContext *co
}
while (!gpg_ctx_op_complete (gpg)) {
- if (gpg_ctx_op_step (gpg, error) == -1)
- if (gpg_ctx_op_step (gpg, ex) == -1) {
++ if (gpg_ctx_op_step (gpg, error) == -1) {
+ gpg_ctx_op_cancel (gpg);
goto fail;
+ }
}
if (gpg_ctx_op_wait (gpg) != 0) {
@@@ -2070,8 -2009,10 +2078,10 @@@ gpg_export_keys (CamelCipherContext *co
}
while (!gpg_ctx_op_complete (gpg)) {
- if (gpg_ctx_op_step (gpg, error) == -1)
- if (gpg_ctx_op_step (gpg, ex) == -1) {
++ if (gpg_ctx_op_step (gpg, error) == -1) {
+ gpg_ctx_op_cancel (gpg);
goto fail;
+ }
}
if (gpg_ctx_op_wait (gpg) != 0) {
diff --cc camel/camel-net-utils-win32.h
index b177de5,b1b7322..313e8b5
--- a/camel/camel-net-utils-win32.h
+++ b/camel/camel-net-utils-win32.h
@@@ -3,13 -3,8 +3,13 @@@
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
-#ifndef CAMEL_NET_UTILS_WIN32_H_
-#define CAMEL_NET_UTILS_WIN32_H_
+
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
- #ifndef _CAMEL_NET_UTILS_WIN32_H_
- #define _CAMEL_NET_UTILS_WIN32_H_
++#ifndef CAMEL_NET_UTILS_WIN32_H
++#define CAMEL_NET_UTILS_WIN32_H
#include <stdio.h>
#include <stdlib.h>
diff --cc camel/providers/groupwise/camel-groupwise-utils.h
index 42f3672,1eed1a2..f6f30fc
--- a/camel/providers/groupwise/camel-groupwise-utils.h
+++ b/camel/providers/groupwise/camel-groupwise-utils.h
@@@ -17,8 -17,8 +17,8 @@@
* Boston, MA 02110-1301, USA.
*/
- #ifndef CAMEL_GROUPWISE_UTILS__
- #define CAMEL_GROUPWISE_UTILS__
-#ifndef CAMEL_GROUPWISE_UTILS
-#define CAMEL_GROUPWISE_UTILS
++#ifndef CAMEL_GROUPWISE_UTILS_H
++#define CAMEL_GROUPWISE_UTILS_H
#include <camel/camel.h>
#include <e-gw-connection.h>
diff --cc camel/providers/imap/camel-imap-store-summary.h
index 039b34a,fff3c3c..ad31198
--- a/camel/providers/imap/camel-imap-store-summary.h
+++ b/camel/providers/imap/camel-imap-store-summary.h
@@@ -22,26 -22,11 +22,26 @@@
#ifndef CAMEL_IMAP_STORE_SUMMARY_H
#define CAMEL_IMAP_STORE_SUMMARY_H
- #include <camel.h>
+ #include <camel/camel.h>
-#define CAMEL_IMAP_STORE_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_imap_store_summary_get_type (), CamelImapStoreSummary)
-#define CAMEL_IMAP_STORE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imap_store_summary_get_type (), CamelImapStoreSummaryClass)
-#define CAMEL_IS_IMAP_STORE_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_imap_store_summary_get_type ())
+/* Standard GObject macros */
+#define CAMEL_TYPE_IMAP_STORE_SUMMARY \
+ (camel_imap_store_summary_get_type ())
+#define CAMEL_IMAP_STORE_SUMMARY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), CAMEL_TYPE_IMAP_STORE_SUMMARY, CamelImapStoreSummary))
+#define CAMEL_IMAP_STORE_SUMMARY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), CAMEL_TYPE_IMAP_STORE_SUMMARY, CamelImapStoreSummaryClass))
+#define CAMEL_IS_IMAP_STORE_SUMMARY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), CAMEL_TYPE_IMAP_STORE_SUMMARY))
+#define CAMEL_IS_IMAP_STORE_SUMMARY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), CAMEL_TYPE_IMAP_STORE_SUMMARY))
+#define CAMEL_IMAP_STORE_SUMMARY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), CAMEL_TYPE_IMAP_STORE_SUMMARY, CamelImapStoreSummaryClass))
G_BEGIN_DECLS
diff --cc camel/providers/imap/camel-imap-store.c
index 5abfb54,9d0f6d6..b0545ab
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@@ -2255,6 -2216,28 +2254,28 @@@ rename_folder (CamelStore *store
oldpath, newpath, g_strerror (errno));
}
+ if (CAMEL_STORE (imap_store)->folders) {
+ CamelFolder *folder;
+
+ folder = camel_object_bag_get (CAMEL_STORE (imap_store)->folders, old_name);
+ if (folder) {
+ CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
+
+ if (imap_folder && imap_folder->journal) {
+ gchar *folder_dir = imap_path_to_physical (storage_path, new_name_in);
+ gchar *path = g_strdup_printf ("%s/journal", folder_dir);
+
+ camel_offline_journal_set_filename (imap_folder->journal, path);
+
+ g_free (path);
+ g_free (folder_dir);
+ }
+
- camel_object_unref (folder);
++ g_object_unref (folder);
+ }
+ }
+
+ g_free (storage_path);
g_free (oldpath);
g_free (newpath);
fail:
diff --cc camel/providers/imapx/camel-imapx-stream.h
index eaab31e,0416c56..e39aad5
--- a/camel/providers/imapx/camel-imapx-stream.h
+++ b/camel/providers/imapx/camel-imapx-stream.h
@@@ -76,20 -76,20 +76,20 @@@ gint camel_imapx_stream_getl (CamelI
/* all throw IO,PARSE exceptions */
/* gets an atom, upper-cases */
-gint camel_imapx_stream_atom (CamelIMAPXStream *is, guchar **start, guint *len, CamelException *ex);
+gint camel_imapx_stream_atom (CamelIMAPXStream *is, guchar **start, guint *len, GError **error);
/* gets an atom or string */
-gint camel_imapx_stream_astring (CamelIMAPXStream *is, guchar **start, CamelException *ex);
+gint camel_imapx_stream_astring (CamelIMAPXStream *is, guchar **start, GError **error);
/* gets a NIL or a string, start==NULL if NIL */
-gint camel_imapx_stream_nstring (CamelIMAPXStream *is, guchar **start, CamelException *ex);
+gint camel_imapx_stream_nstring (CamelIMAPXStream *is, guchar **start, GError **error);
/* gets a NIL or string into a stream, stream==NULL if NIL */
-gint camel_imapx_stream_nstring_stream(CamelIMAPXStream *is, CamelStream **stream, CamelException *ex);
+gint camel_imapx_stream_nstring_stream(CamelIMAPXStream *is, CamelStream **stream, GError **error);
/* gets 'text' */
-gint camel_imapx_stream_text (CamelIMAPXStream *is, guchar **text, CamelException *ex);
+gint camel_imapx_stream_text (CamelIMAPXStream *is, guchar **text, GError **error);
/* gets a 'number' */
-guint32 camel_imapx_stream_number(CamelIMAPXStream *is, CamelException *ex);
+guint32 camel_imapx_stream_number(CamelIMAPXStream *is, GError **error);
/* skips the rest of a line, including literals, etc */
-gint camel_imapx_stream_skip(CamelIMAPXStream *is, CamelException *ex);
+gint camel_imapx_stream_skip(CamelIMAPXStream *is, GError **error);
- #endif /* _CAMEL_IMAPX_STREAM_H */
+ #endif /* CAMEL_IMAPX_STREAM_H */
diff --cc camel/providers/local/camel-maildir-summary.h
index 3faf340,3840cff..5523062
--- a/camel/providers/local/camel-maildir-summary.h
+++ b/camel/providers/local/camel-maildir-summary.h
@@@ -21,28 -21,11 +21,26 @@@
#ifndef CAMEL_MAILDIR_SUMMARY_H
#define CAMEL_MAILDIR_SUMMARY_H
- #include <camel/camel.h>
-
#include "camel-local-summary.h"
-#define CAMEL_MAILDIR_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_maildir_summary_get_type (), CamelMaildirSummary)
-#define CAMEL_MAILDIR_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_maildir_summary_get_type (), CamelMaildirSummaryClass)
-#define CAMEL_IS_MAILDIR_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_maildir_summary_get_type ())
+/* Standard GObject macros */
+#define CAMEL_TYPE_MAILDIR_SUMMARY \
+ (camel_maildir_summary_get_type ())
+#define CAMEL_MAILDIR_SUMMARY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), CAMEL_TYPE_MAILDIR_SUMMARY, CamelMaildirSummary))
+#define CAMEL_MAILDIR_SUMMARY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), CAMEL_TYPE_MAILDIR_SUMMARY, CamelMaildirSummaryClass))
+#define CAMEL_IS_MAILDIR_SUMMARY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), CAMEL_TYPE_MAILDIR_SUMMARY))
+#define CAMEL_IS_MAILDIR_SUMMARY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), CAMEL_TYPE_MAILDIR_SUMMARY))
+#define CAMEL_MAILDIR_SUMMARY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), CAMEL_TYPE_MAILDIR_SUMMARY, CamelMaildirSummaryClass))
G_BEGIN_DECLS
diff --cc camel/providers/local/camel-mh-summary.h
index 568f98a,b778a73..9f211d2
--- a/camel/providers/local/camel-mh-summary.h
+++ b/camel/providers/local/camel-mh-summary.h
@@@ -21,28 -21,11 +21,26 @@@
#ifndef CAMEL_MH_SUMMARY_H
#define CAMEL_MH_SUMMARY_H
- #include <camel/camel.h>
-
#include "camel-local-summary.h"
-#define CAMEL_MH_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_mh_summary_get_type (), CamelMhSummary)
-#define CAMEL_MH_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mh_summary_get_type (), CamelMhSummaryClass)
-#define CAMEL_IS_MH_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_mh_summary_get_type ())
+/* Standard GObject macros */
+#define CAMEL_TYPE_MH_SUMMARY \
+ (camel_mh_summary_get_type ())
+#define CAMEL_MH_SUMMARY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), CAMEL_TYPE_MH_SUMMARY, CamelMhSummary))
+#define CAMEL_MH_SUMMARY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), CAMEL_TYPE_MH_SUMMARY, CamelMhSummaryClass))
+#define CAMEL_IS_MH_SUMMARY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), CAMEL_TYPE_MH_SUMMARY))
+#define CAMEL_IS_MH_SUMMARY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), CAMEL_TYPE_MH_SUMMARY))
+#define CAMEL_MH_SUMMARY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), CAMEL_TYPE_MH_SUMMARY, CamelMhSummaryClass))
G_BEGIN_DECLS
diff --cc camel/providers/nntp/camel-nntp-summary.c
index c8215bc,063eb52..11dde96
--- a/camel/providers/nntp/camel-nntp-summary.c
+++ b/camel/providers/nntp/camel-nntp-summary.c
@@@ -231,17 -258,19 +231,20 @@@ add_range_xover (CamelNNTPSummary *cns
GHashTable *summary_table;
s = (CamelFolderSummary *)cns;
- summary_table = camel_folder_summary_get_hashtable(s);
+ summary_table = camel_folder_summary_get_hashtable (s);
- camel_operation_start(NULL, _("%s: Scanning new messages"), ((CamelService *)store)->url->host);
+ camel_operation_start (NULL, _("%s: Scanning new messages"), ((CamelService *)store)->url->host);
- ret = camel_nntp_raw_command_auth (store, ex, &line, "over %r", low, high);
+ ret = camel_nntp_raw_command_auth (store, error, &line, "xover %r", low, high);
+ if (ret != 224)
- ret = camel_nntp_raw_command_auth (store, ex, &line, "xover %r", low, high);
++ ret = camel_nntp_raw_command_auth (store, error, &line, "xover %r", low, high);
+
if (ret != 224) {
- camel_operation_end(NULL);
+ camel_operation_end (NULL);
if (ret != -1)
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Unexpected server response from xover: %s"), line);
+ g_set_error (
+ error, CAMEL_ERROR, CAMEL_ERROR_SYSTEM,
+ _("Unexpected server response from xover: %s"), line);
return -1;
}
diff --cc camel/providers/pop3/camel-pop3-folder.c
index dddfd10,733d89d..9d70ee2
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@@ -426,7 -417,16 +427,16 @@@ camel_pop3_delete_old (CamelFolder *fol
fi = pop3_folder->uids->pdata[i];
d(printf("%s(%d): fi->uid=[%s]\n", __FILE__, __LINE__, fi->uid));
- if (pop3_get_message_time_from_cache (folder, fi->uid, &message_time)) {
+ if (!pop3_get_message_time_from_cache (folder, fi->uid, &message_time)) {
+ d(printf("could not get message time from cache, trying from pop3\n"));
- message = pop3_get_message (folder, fi->uid, ex);
++ message = pop3_get_message (folder, fi->uid, error);
+ if (message) {
+ message_time = message->date + message->date_offset;
- camel_object_unref(message);
++ g_object_unref(message);
+ }
+ }
+
+ if (message_time) {
gdouble time_diff = difftime(temp,message_time);
gint day_lag = time_diff/(60*60*24);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]