Merged notzed-eplugin-2-branch to head.
authorMichael Zucci <zucchi@src.gnome.org>
Mon, 20 Sep 2004 05:59:54 +0000 (05:59 +0000)
committerMichael Zucci <zucchi@src.gnome.org>
Mon, 20 Sep 2004 05:59:54 +0000 (05:59 +0000)
75 files changed:
addressbook/libebook/e-destination.c
camel/ChangeLog
camel/Makefile.am
camel/camel-cipher-context.c
camel/camel-data-cache.c
camel/camel-disco-diary.c
camel/camel-disco-folder.c
camel/camel-disco-store.c
camel/camel-filter-driver.c
camel/camel-filter-search.c
camel/camel-folder-search.c
camel/camel-folder.c
camel/camel-gpg-context.c
camel/camel-list-utils.c [new file with mode: 0644]
camel/camel-list-utils.h [new file with mode: 0644]
camel/camel-movemail.c
camel/camel-multipart-encrypted.c
camel/camel-multipart-signed.c
camel/camel-object.c
camel/camel-object.h
camel/camel-provider.c
camel/camel-provider.h
camel/camel-sasl-anonymous.c
camel/camel-sasl-cram-md5.c
camel/camel-sasl-digest-md5.c
camel/camel-sasl-login.c
camel/camel-sasl-ntlm.c
camel/camel-sasl-plain.c
camel/camel-sasl-popb4smtp.c
camel/camel-search-private.c
camel/camel-service.c
camel/camel-session.c
camel/camel-smime-context.c
camel/camel-store.c
camel/camel-tcp-stream-ssl.c
camel/camel-url.c
camel/camel-vee-folder.c
camel/camel-vee-store.c
camel/camel-vtrash-folder.c
camel/providers/groupwise/camel-groupwise-provider.c
camel/providers/imap/camel-imap-command.c
camel/providers/imap/camel-imap-folder.c
camel/providers/imap/camel-imap-message-cache.c
camel/providers/imap/camel-imap-provider.c
camel/providers/imap/camel-imap-store.c
camel/providers/imapp/camel-imapp-provider.c
camel/providers/imapp/camel-imapp-store.c
camel/providers/local/camel-local-folder.c
camel/providers/local/camel-local-provider.c
camel/providers/local/camel-local-store.c
camel/providers/local/camel-local-summary.c
camel/providers/local/camel-maildir-folder.c
camel/providers/local/camel-maildir-store.c
camel/providers/local/camel-maildir-summary.c
camel/providers/local/camel-mbox-folder.c
camel/providers/local/camel-mbox-store.c
camel/providers/local/camel-mbox-summary.c
camel/providers/local/camel-mh-folder.c
camel/providers/local/camel-mh-store.c
camel/providers/local/camel-mh-summary.c
camel/providers/local/camel-spool-folder.c
camel/providers/local/camel-spool-store.c
camel/providers/local/camel-spool-summary.c
camel/providers/nntp/camel-nntp-folder.c
camel/providers/nntp/camel-nntp-provider.c
camel/providers/nntp/camel-nntp-store.c
camel/providers/nntp/camel-nntp-summary.c
camel/providers/pop3/camel-pop3-engine.c
camel/providers/pop3/camel-pop3-folder.c
camel/providers/pop3/camel-pop3-provider.c
camel/providers/pop3/camel-pop3-store.c
camel/providers/sendmail/camel-sendmail-provider.c
camel/providers/sendmail/camel-sendmail-transport.c
camel/providers/smtp/camel-smtp-provider.c
camel/providers/smtp/camel-smtp-transport.c

index d81cbd7..3b72ee8 100644 (file)
@@ -61,6 +61,7 @@
 
 #include <glib.h>
 #include <libxml/xmlmemory.h>
+#include <libgnome/gnome-i18n.h>
 #include <camel/camel-internet-address.h>
 
 #define d(x)
index f2e820a..cb8f2ad 100644 (file)
        CAMEL_GROUPWISE_CFLAGS.
        (libcamelgroupwise_la_LIBADD): use CAMEL_GROUPWISE_LIBS.
 
+2004-09-07  Not Zed  <NotZed@Ximian.com>
+
+       * providers/groupwise/camel-groupwise-provider.c: put the options
+       in their own section.
+
+2004-09-06  Not Zed  <NotZed@Ximian.com>
+
+       * camel-search-private.c (utf8_get): remove this, and make the
+       code use camel_utf8_getc instead.  Quite a bit faster esp if
+       optimising with inlines.
+
+       * camel-object.c (check_magic_fail): change the check_magic code
+       to mostly run from a macro, its worth it.
+
+2004-09-04  Not Zed  <NotZed@Ximian.com>
+
+       * providers/local/camel-mbox-summary.c (message_info_new): fix
+       cast issue.
+
+       * providers/pop3/camel-pop3-engine.c (get_capabilities): remove
+       some unused variables.
+
+       * camel-object.h: remove camel-i18n.h, fixed all c files where
+       appropriate.
+
+2004-08-25  Not Zed  <NotZed@Ximian.com>
+
+       * camel-list-utils.[ch]: Copied e_dlist* stuff to here, part of
+       removing e-util dependency on camel.
+
+2004-08-05  Not Zed  <NotZed@Ximian.com>
+
+       * providers/local/camel-local-provider.c: same.
+
+       * providers/imap/camel-imap-provider.c: put the extra stuff into a
+       'general' section.
+
+       * providers/imapp/camel-imapp-provider.c: same.
+
+       * providers/pop3/camel-pop3-provider.c: make sure each section
+       start has a name.
+
+2004-08-03  Not Zed  <NotZed@Ximian.com>
+
+       * camel-url.c (camel_url_set_param): when clearing a param, use
+       remove_data instead of set_data_full.  craptatious glib at it
+       again.
+
+       * providers/nntp/camel-nntp-provider.c: turn on ssl option.
+
+2004-07-07  Not Zed  <NotZed@Ximian.com>
+
+       * camel-folder.c: removed filter-rule.h  ugh.
+
 2004-07-02  Christian Neumair  <chris@gnome-de.org>
 
        * camel-smime-context.c: s/Can't/Cannot/.
index 2811d95..51ec97c 100644 (file)
@@ -76,6 +76,7 @@ libcamel_la_SOURCES =                                 \
        camel-multipart.c                       \
        camel-multipart-encrypted.c             \
        camel-multipart-signed.c                \
+       camel-list-utils.c                      \
        camel-object.c                          \
        camel-operation.c                       \
        camel-partition-table.c                 \
@@ -181,6 +182,7 @@ libcamelinclude_HEADERS =                   \
        camel-multipart.h                       \
        camel-multipart-encrypted.h             \
        camel-multipart-signed.h                \
+       camel-list-utils.h                      \
        camel-object.h                          \
        camel-operation.h                       \
        camel-partition-table.h                 \
index f2c017e..212120a 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <glib.h>
 
+#include "camel-i18n.h"
 #include "camel-cipher-context.h"
 #include "camel-stream.h"
 #include "camel-operation.h"
index 3a2586e..c531741 100644 (file)
@@ -34,6 +34,7 @@
 #include <alloca.h>
 #endif
 
+#include "camel-i18n.h"
 #include "camel-data-cache.h"
 #include "camel-exception.h"
 #include "camel-stream-fs.h"
index 5080dde..b7bc3d1 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <errno.h>
 
+#include "camel-i18n.h"
 #include "camel-disco-diary.h"
 #include "camel-disco-folder.h"
 #include "camel-disco-store.h"
index d45a4da..7e4e653 100644 (file)
@@ -30,6 +30,7 @@
 #include "camel-exception.h"
 
 #include "camel-session.h"
+#include "camel-i18n.h"
 
 #define CF_CLASS(o) (CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS (o)))
 #define CDF_CLASS(o) (CAMEL_DISCO_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS (o)))
index a4e2e49..c602c1c 100644 (file)
@@ -32,6 +32,7 @@
 #include "camel-disco-folder.h"
 #include "camel-exception.h"
 #include "camel-session.h"
+#include "camel-i18n.h"
 
 #define d(x) 
 
index fb54e4a..cf98894 100644 (file)
@@ -44,8 +44,8 @@
 #include "camel-stream-fs.h"
 #include "camel-stream-mem.h"
 #include "camel-mime-message.h"
-
 #include "camel-debug.h"
+#include "camel-i18n.h"
 
 #include "e-util/e-sexp.h"
 #include "e-util/e-memory.h"
index a279b9d..2d057ef 100644 (file)
@@ -55,7 +55,7 @@
 #include "camel-stream-mem.h"
 #include "camel-stream-fs.h"
 #include "camel-search-private.h"
-
+#include "camel-i18n.h"
 #include "camel-url.h"
 
 #define d(x)
index ab901f3..bb570b8 100644 (file)
@@ -45,6 +45,7 @@
 #include "camel-stream-mem.h"
 #include "e-util/e-memory.h"
 #include "camel-search-private.h"
+#include "camel-i18n.h"
 
 #define d(x) 
 #define r(x) 
index b7b01ed..30e5ab6 100644 (file)
 #include "camel-store.h"
 #include "camel-mime-message.h"
 #include "camel-debug.h"
-
 #include "e-util/e-memory.h"
 #include "camel-operation.h"
-
 #include "camel-session.h"
 #include "camel-filter-driver.h"
 #include "camel-private.h"
 #include "camel-vtrash-folder.h"
-#include "filter/filter-rule.h"
+#include "camel-i18n.h"
 
 #define d(x) 
 #define w(x)
@@ -1822,7 +1820,7 @@ folder_changed (CamelObject *obj, gpointer event_data)
            && changed->uid_recent->len > 0)
                driver = camel_session_get_filter_driver(session,
                                                         (folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT) 
-                                                        ? FILTER_SOURCE_INCOMING : FILTER_SOURCE_JUNKTEST, NULL);
+                                                        ? "incoming":"junktest", NULL);
                
        if (driver) {
                recents = g_ptr_array_new();
index c03b095..5dee244 100644 (file)
@@ -56,9 +56,9 @@
 #include "camel-operation.h"
 #include "camel-mime-part.h"
 #include "camel-mime-filter-canon.h"
-
 #include "camel-multipart-signed.h"
 #include "camel-multipart-encrypted.h"
+#include "camel-i18n.h"
 
 #define d(x) 
 
diff --git a/camel/camel-list-utils.c b/camel/camel-list-utils.c
new file mode 100644 (file)
index 0000000..3681809
--- /dev/null
@@ -0,0 +1,271 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Authors: Michael Zucchi <notzed@ximian.com>
+ *
+ * Copyright 2004 Novell, Inc. (www.novell.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+
+#include "camel-list-utils.h"
+
+/**
+ * camel_dlist_init:
+ * @v: 
+ * 
+ * Initialise a double-linked list header.  All list headers must be
+ * initialised before use.
+ **/
+void camel_dlist_init(CamelDList *v)
+{
+        v->head = (CamelDListNode *)&v->tail;
+        v->tail = 0;
+        v->tailpred = (CamelDListNode *)&v->head;
+}
+
+/**
+ * camel_dlist_addhead:
+ * @l: An initialised list header.
+ * @n: A node, the next and prev pointers will be overwritten.
+ * 
+ * Add the list node @n to the head (start) of the list @l.
+ * 
+ * Return value: @n.
+ **/
+CamelDListNode *camel_dlist_addhead(CamelDList *l, CamelDListNode *n)
+{
+        n->next = l->head;
+        n->prev = (CamelDListNode *)&l->head;
+        l->head->prev = n;
+        l->head = n;
+        return n;
+}
+
+/**
+ * camel_dlist_addtail:
+ * @l: An intialised list header.
+ * @n: A node, the next and prev pointers will be overwritten.
+ * 
+ * Add the list onde @n to the tail (end) of the list @l.
+ * 
+ * Return value: @n.
+ **/
+CamelDListNode *camel_dlist_addtail(CamelDList *l, CamelDListNode *n)
+{
+        n->next = (CamelDListNode *)&l->tail;
+        n->prev = l->tailpred;
+        l->tailpred->next = n;
+        l->tailpred = n;
+        return n;
+}
+
+/**
+ * camel_dlist_remove:
+ * @n: A node which is part of a list.
+ * 
+ * Remove @n from the list it's in.  @n must belong to a list.
+ * 
+ * Return value: @n.
+ **/
+CamelDListNode *camel_dlist_remove(CamelDListNode *n)
+{
+        n->next->prev = n->prev;
+        n->prev->next = n->next;
+        return n;
+}
+
+/**
+ * camel_dlist_remhead:
+ * @l: An initialised list, maybe containing items.
+ * 
+ * Remove the head node (start) of the list.
+ * 
+ * xReturn value: The previously first-node in the list, or NULLif @l
+ * is an empty list.
+ **/
+CamelDListNode *camel_dlist_remhead(CamelDList *l)
+{
+       CamelDListNode *n, *nn;
+
+       n = l->head;
+       nn = n->next;
+       if (nn) {
+               nn->prev = n->prev;
+               l->head = nn;
+               return n;
+       }
+       return NULL;
+}
+
+/**
+ * camel_dlist_remtail:
+ * @l: An initialised list, maybe containing items.
+ * 
+ * Remove the last node in the list.
+ * 
+ * Return value: The previously last-node in the list, or NULL if @l
+ * is an empty list.
+ **/
+CamelDListNode *camel_dlist_remtail(CamelDList *l)
+{
+       CamelDListNode *n, *np;
+
+       n = l->tailpred;
+       np = n->prev;
+       if (np) {
+               np->next = n->next;
+               l->tailpred = np;
+               return n;
+       }
+       return NULL;
+}
+
+/**
+ * camel_dlist_empty:
+ * @l: An initialised list header.
+ * 
+ * Returns %TRUE if @l is an empty list.
+ * 
+ * Return value: %TRUE if @l is an empty list, %FALSE otherwise.
+ **/
+int camel_dlist_empty(CamelDList *l)
+{
+       return (l->head == (CamelDListNode *)&l->tail);
+}
+
+/**
+ * camel_dlist_length:
+ * @l: An initialised list header.
+ * 
+ * Returns the number of nodes in the list @l.
+ * 
+ * Return value: The number of nodes.
+ **/
+int camel_dlist_length(CamelDList *l)
+{
+       CamelDListNode *n, *nn;
+       int count = 0;
+
+       n = l->head;
+       nn = n->next;
+       while (nn) {
+               count++;
+               n = nn;
+               nn = n->next;
+       }
+
+       return count;
+}
+
+/* This is just for orthogonal completeness */
+
+void camel_slist_init(CamelSList *v)
+{
+       v->head = NULL;
+}
+
+CamelSListNode *camel_slist_addhead(CamelSList *l, CamelSListNode *n)
+{
+        n->next = l->head;
+       l->head = n;
+
+       return n;
+}
+
+CamelSListNode *camel_slist_addtail(CamelSList *l, CamelSListNode *n)
+{
+       CamelSListNode *p;
+
+       p = (CamelSListNode *)l;
+       while (p->next)
+               p = p->next;
+       n->next = NULL;
+       p->next = n;
+
+        return n;
+}
+
+CamelSListNode *camel_slist_remove(CamelSList *l, CamelSListNode *n)
+{
+       CamelSListNode *p, *q;
+
+       p = (CamelSListNode *)l;
+       while ( (q = p->next) ) {
+               if (q == n) {
+                       p->next = n->next;
+                       return n;
+               }
+               p = q;
+       }
+
+       g_warning("Trying to remove SList node not present in SList");
+
+       return NULL;
+}
+
+CamelSListNode *camel_slist_remhead(CamelSList *l)
+{
+       CamelSListNode *n;
+
+       n = l->head;
+       if (n)
+               l->head = n->next;
+
+       return n;
+}
+
+CamelSListNode *camel_slist_remtail(CamelSList *l)
+{
+       CamelSListNode *n, *p;
+
+       n = l->head;
+       if (l->head == NULL)
+               return NULL;
+       p = (CamelSListNode *)l;
+       while (n->next) {
+               p = n;
+               n = n->next;
+       }
+       p->next = NULL;
+
+       return n;
+}
+
+int camel_slist_empty(CamelSList *l)
+{
+       return (l->head == NULL);
+}
+
+int camel_slist_length(CamelSList *l)
+{
+       CamelSListNode *n;
+       int count = 0;
+
+       n = l->head;
+       while (n) {
+               count++;
+               n = n->next;
+       }
+
+       return count;
+}
+
diff --git a/camel/camel-list-utils.h b/camel/camel-list-utils.h
new file mode 100644 (file)
index 0000000..6613e15
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * Authors: Michael Zucchi <notzed@ximian.com>
+ *
+ * Copyright 2004 Novell, Inc. (www.novell.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef _CAMEL_LIST_UTILS_H
+#define _CAMEL_LIST_UTILS_H
+
+/* This is a copy of Amiga's Exec lists, the head and tail nodes are
+ * overlapped and merged into a single list header.  All operations
+ * are O(1), including node removal and addition from/to either end of
+ * the list.  It can be used to implement O(1) queues, fifo's and
+ * normal lists.  You don't need the list header to remove the node. */
+
+typedef struct _CamelDList CamelDList;
+typedef struct _CamelDListNode CamelDListNode;
+
+/**
+ * struct _CamelDListNode - A double-linked list node.
+ * 
+ * @next: The next node link.
+ * @prev: The previous node link.
+ * 
+ * A double-linked list node header.  Put this at the start of the
+ * list node structure.  Data is stored in the list by subclassing the
+ * node header rather than using a pointer.  Or more normally by just
+ * duplicating the next and previous pointers for better type safety.
+ **/
+struct _CamelDListNode {
+       struct _CamelDListNode *next;
+       struct _CamelDListNode *prev;
+};
+
+/**
+ * struct _CamelDList - A double-linked list header.
+ * 
+ * @head: The head node's next pointer.
+ * @tail: The tail node's next pointer.
+ * @tailpred: The previous node to the tail node.
+ * 
+ * This is the merging of two separate head and tail nodes into a
+ * single structure.  i.e. if you ahve a NULL terminated head and tail
+ * node such as head = { first, NULL } and tail = { NULL, last } then
+ * overlap them at the common NULL, you get this structure.
+ *
+ * The list header must be initialised with camel_dlist_init, or by
+ * using the static CAMEL_DLIST_INITIALISER macro.
+ **/
+struct _CamelDList {
+       struct _CamelDListNode *head;
+       struct _CamelDListNode *tail;
+       struct _CamelDListNode *tailpred;
+};
+
+#define CAMEL_DLIST_INITIALISER(l) { (CamelDListNode *)&l.tail, 0, (CamelDListNode *)&l.head }
+
+void camel_dlist_init(CamelDList *v);
+CamelDListNode *camel_dlist_addhead(CamelDList *l, CamelDListNode *n);
+CamelDListNode *camel_dlist_addtail(CamelDList *l, CamelDListNode *n);
+CamelDListNode *camel_dlist_remove(CamelDListNode *n);
+CamelDListNode *camel_dlist_remhead(CamelDList *l);
+CamelDListNode *camel_dlist_remtail(CamelDList *l);
+int camel_dlist_empty(CamelDList *l);
+int camel_dlist_length(CamelDList *l);
+
+/* This is provided mostly for orthogonality with the dlist structure.
+ * By making the nodes contain all of the data themselves it
+ * simplifies memory management.  Removing and adding from/to the head
+ * of the list is O(1), the rest of the operations are O(n). */
+
+typedef struct _CamelSListNode CamelSListNode;
+typedef struct _CamelSList CamelSList;
+
+/**
+ * struct _CamelSListNode - A single-linked list node.
+ * 
+ * @next: The next node in the list.
+ *
+ * A single-linked list node header.  Put this at hte start of the
+ * actual list node structure, or more commonly, just a next pointer.
+ * Data is stored in the list node by subclassing the node-header
+ * rather than using a pointer.
+ **/
+struct _CamelSListNode {
+       struct _CamelSListNode *next;
+};
+
+/**
+ * struct _CamelSList - A single-linked list header.
+ * 
+ * @head: The head of the list.
+ * 
+ * This is the header of a single-linked list.
+ **/
+struct _CamelSList {
+       struct _CamelSListNode *head;
+};
+
+#define CAMEL_SLIST_INITIALISER(l) { 0 }
+
+void camel_slist_init(CamelSList *l);
+CamelSListNode *camel_slist_addhead(CamelSList *l, CamelSListNode *n);
+CamelSListNode *camel_slist_addtail(CamelSList *l, CamelSListNode *n);
+CamelSListNode *camel_slist_remove(CamelSList *l, CamelSListNode *n);
+CamelSListNode *camel_slist_remhead(CamelSList *l);
+CamelSListNode *camel_slist_remtail(CamelSList *l);
+int camel_slist_empty(CamelSList *l);
+int camel_slist_length(CamelSList *l);
+
+#endif
index 7080719..521d21d 100644 (file)
 
 #include "camel-movemail.h"
 #include "camel-exception.h"
-
 #include "camel-mime-parser.h"
 #include "camel-mime-filter.h"
 #include "camel-mime-filter-from.h"
-
 #include "camel-lock-client.h"
+#include "camel-i18n.h"
 
 #define d(x)
 
index aa036be..44ff8a0 100644 (file)
@@ -35,6 +35,7 @@
 #include "camel-stream-fs.h"
 #include "camel-mime-utils.h"
 #include "camel-mime-part.h"
+#include "camel-i18n.h"
 
 static void camel_multipart_encrypted_class_init (CamelMultipartEncryptedClass *klass);
 static void camel_multipart_encrypted_init (gpointer object, gpointer klass);
index 5dca448..e25f1c4 100644 (file)
@@ -49,6 +49,7 @@
 #include "camel-seekable-substream.h"
 #include "camel-mime-filter-crlf.h"
 #include "camel-mime-filter-canon.h"
+#include "camel-i18n.h"
 
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))
               #include <stdio.h>;*/
index ed62737..a866ae9 100644 (file)
@@ -863,7 +863,7 @@ CamelType camel_name_to_type(const char *name)
 }
 
 static char *
-desc_data(CamelObject *o, int ok)
+desc_data(CamelObject *o, guint32 ok)
 {
        char *what;
 
@@ -885,17 +885,22 @@ desc_data(CamelObject *o, int ok)
        return what;
 }
 
+#define check_magic(o, ctype, omagic) \
+       ( ((CamelObject *)(o))->magic == (omagic) \
+       && (ctype)->magic == CAMEL_OBJECT_CLASS_MAGIC) \
+       ? 1 : check_magic_fail(o, ctype, omagic)
+
 static gboolean
-check_magic(void *o, CamelType ctype, int isob)
+check_magic_fail(void *o, CamelType ctype, guint32 omagic)
 {
        char *what, *to;
 
-       what = desc_data(o, isob?CAMEL_OBJECT_MAGIC:CAMEL_OBJECT_CLASS_MAGIC);
+       what = desc_data(o, omagic);
        to = desc_data((CamelObject *)ctype, CAMEL_OBJECT_CLASS_MAGIC);
 
        if (what || to) {
                if (what == NULL) {
-                       if (isob)
+                       if (omagic == CAMEL_OBJECT_MAGIC)
                                what = g_strdup_printf("OBJECT '%s'", ((CamelObject *)o)->klass->name);
                        else
                                what = g_strdup_printf("OBJECT '%s'", ((CamelObjectClass *)o)->name);
@@ -917,7 +922,7 @@ camel_object_is(CamelObject *o, CamelType ctype)
 {
        CamelObjectClass *k;
 
-       g_return_val_if_fail(check_magic(o, ctype, TRUE), FALSE);
+       g_return_val_if_fail(check_magic(o, ctype, CAMEL_OBJECT_MAGIC), FALSE);
 
        k = o->klass;
        while (k) {
@@ -932,7 +937,7 @@ camel_object_is(CamelObject *o, CamelType ctype)
 gboolean
 camel_object_class_is(CamelObjectClass *k, CamelType ctype)
 {
-       g_return_val_if_fail(check_magic(k, ctype, FALSE), FALSE);
+       g_return_val_if_fail(check_magic(k, ctype, CAMEL_OBJECT_CLASS_MAGIC), FALSE);
 
        while (k) {
                if (k == ctype)
@@ -948,7 +953,7 @@ camel_object_cast(CamelObject *o, CamelType ctype)
 {
        CamelObjectClass *k;
 
-       g_return_val_if_fail(check_magic(o, ctype, TRUE), NULL);
+       g_return_val_if_fail(check_magic(o, ctype, CAMEL_OBJECT_MAGIC), NULL);
 
        k = o->klass;
        while (k) {
@@ -967,7 +972,7 @@ camel_object_class_cast(CamelObjectClass *k, CamelType ctype)
 {
        CamelObjectClass *r = k;
 
-       g_return_val_if_fail(check_magic(k, ctype, FALSE), NULL);
+       g_return_val_if_fail(check_magic(k, ctype, CAMEL_OBJECT_CLASS_MAGIC), NULL);
 
        while (k) {
                if (k == ctype)
@@ -1330,6 +1335,55 @@ int camel_object_get(void *vo, CamelException *ex, ...)
        return ret;
 }
 
+void *camel_object_get_ptr(void *vo, CamelException *ex, int tag)
+{
+       CamelObject *o = vo;
+       CamelArgGetV args;
+       CamelObjectClass *klass = o->klass;
+       int ret = 0;
+       void *val = NULL;
+
+       g_return_val_if_fail(CAMEL_IS_OBJECT(o), NULL);
+       g_return_val_if_fail((tag & CAMEL_ARG_TYPE) == CAMEL_ARG_OBJ
+                            || (tag & CAMEL_ARG_TYPE) == CAMEL_ARG_STR
+                            || (tag & CAMEL_ARG_TYPE) == CAMEL_ARG_PTR, 0);
+
+       /* woefully inefficient, *shrug */
+       args.argc = 1;
+       args.argv[0].tag = tag;
+       args.argv[0].ca_ptr = &val;
+
+       ret = klass->getv(o, ex, &args);
+       if (ret != 0)
+               return NULL;
+       else
+               return val;
+}
+
+int camel_object_get_int(void *vo, CamelException *ex, int tag)
+{
+       CamelObject *o = vo;
+       CamelArgGetV args;
+       CamelObjectClass *klass = o->klass;
+       int ret = 0;
+       int val = 0;
+
+       g_return_val_if_fail(CAMEL_IS_OBJECT(o), 0);
+       g_return_val_if_fail((tag & CAMEL_ARG_TYPE) == CAMEL_ARG_INT
+                            || (tag & CAMEL_ARG_TYPE) == CAMEL_ARG_BOO, 0);
+
+       /* woefully inefficient, *shrug */
+       args.argc = 1;
+       args.argv[0].tag = tag;
+       args.argv[0].ca_int = &val;
+
+       ret = klass->getv(o, ex, &args);
+       if (ret != 0)
+               return 0;
+       else
+               return val;
+}
+
 int camel_object_getv(void *vo, CamelException *ex, CamelArgGetV *args)
 {
        g_return_val_if_fail(CAMEL_IS_OBJECT(vo), -1);
index cbdf9fd..9ee9c45 100644 (file)
@@ -39,9 +39,6 @@ extern "C" {
 #include <camel/camel-arg.h>
 #include <camel/camel-types.h> /* this is a @##$@#SF stupid header */
 
-/* this crap shouldn't be here */
-#include <camel/camel-i18n.h>
-
 /* turn on so that camel_object_class_dump_tree() dumps object instances as well */
 #define CAMEL_OBJECT_TRACK_INSTANCES
 
@@ -235,6 +232,10 @@ int camel_object_setv(void *obj, struct _CamelException *ex, CamelArgV *);
 int camel_object_get(void *obj, struct _CamelException *ex, ...);
 int camel_object_getv(void *obj, struct _CamelException *ex, CamelArgGetV *);
 
+/* not very efficient one-time calls */
+void *camel_object_get_ptr(void *vo, CamelException *ex, int tag);
+int camel_object_get_int(void *vo, CamelException *ex, int tag);
+
 /* meta-data for user-specific data */
 char *camel_object_meta_get(void *vo, const char * name);
 gboolean camel_object_meta_set(void *vo, const char * name, const char *value);
index e2cc715..889188f 100644 (file)
@@ -41,8 +41,8 @@
 #include "camel-exception.h"
 #include "camel-string-utils.h"
 #include "camel-vee-store.h"
-
 #include "e-util/e-msgport.h"
+#include "camel-i18n.h"
 
 /* table of CamelProviderModule's */
 static GHashTable *module_table;
index 46977d4..c613981 100644 (file)
@@ -160,6 +160,9 @@ typedef struct {
        
        /* Flags describing the provider, flags describing its URLs */
        int flags, url_flags;
+
+       /* The ConfEntry and AutoDetect functions will probably be
+        * DEPRECATED in a future release */
        
        /* Extra configuration information */
        CamelProviderConfEntry *extra_conf;
index 9b97fdb..c095783 100644 (file)
@@ -29,7 +29,7 @@
 #include "camel-sasl-anonymous.h"
 #include "camel-internet-address.h"
 #include <string.h>
-
+#include "camel-i18n.h"
 
 CamelServiceAuthType camel_sasl_anonymous_authtype = {
        N_("Anonymous"),
index f544d48..611c541 100644 (file)
@@ -30,6 +30,7 @@
 #include "camel-mime-utils.h"
 #include "camel-service.h"
 #include <e-util/md5-utils.h>
+#include "camel-i18n.h"
 
 CamelServiceAuthType camel_sasl_cram_md5_authtype = {
        N_("CRAM-MD5"),
index e421bd5..36fd2f5 100644 (file)
@@ -37,6 +37,7 @@
 #include "camel-charset-map.h"
 #include "camel-mime-utils.h"
 #include "camel-sasl-digest-md5.h"
+#include "camel-i18n.h"
 
 #define d(x)
 
index f6c3c9e..ffe8f64 100644 (file)
@@ -27,6 +27,7 @@
 #include <string.h>
 #include "camel-sasl-login.h"
 #include "camel-service.h"
+#include "camel-i18n.h"
 
 CamelServiceAuthType camel_sasl_login_authtype = {
        N_("Login"),
index ad34135..32c47ae 100644 (file)
 #include <config.h>
 #endif
 
-#include "camel-sasl-ntlm.h"
-
 #include <ctype.h>
 #include <string.h>
 
+#include "camel-sasl-ntlm.h"
+#include "camel-i18n.h"
+
 CamelServiceAuthType camel_sasl_ntlm_authtype = {
        N_("NTLM / SPA"),
 
index 48d1fc9..debff64 100644 (file)
@@ -27,6 +27,7 @@
 #include <string.h>
 #include "camel-sasl-plain.h"
 #include "camel-service.h"
+#include "camel-i18n.h"
 
 CamelServiceAuthType camel_sasl_plain_authtype = {
        N_("PLAIN"),
index fb940b0..6eebf58 100644 (file)
@@ -31,6 +31,7 @@
 #include "camel-sasl-popb4smtp.h"
 #include "camel-service.h"
 #include "camel-session.h"
+#include "camel-i18n.h"
 
 CamelServiceAuthType camel_sasl_popb4smtp_authtype = {
        N_("POP before SMTP"),
index 2ba908b..d3805f6 100644 (file)
 #include "camel-multipart.h"
 #include "camel-stream-mem.h"
 #include "e-util/e-sexp.h"
-
 #include "camel-search-private.h"
+#include "camel-i18n.h"
 
 #include <glib/gunicode.h>
 
 #define d(x)
 
+static inline guint32
+camel_utf8_getc(const unsigned char **ptr)
+{
+       register unsigned char *p = (unsigned char *)*ptr;
+       register unsigned char c, r;
+       register guint32 v, m;
+
+again:
+       r = *p++;
+loop:
+       if (r < 0x80) {
+               *ptr = p;
+               v = r;
+       } else if (r < 0xfe) { /* valid start char? */
+               v = r;
+               m = 0x7f80;     /* used to mask out the length bits */
+               do {
+                       c = *p++;
+                       if ((c & 0xc0) != 0x80) {
+                               r = c;
+                               goto loop;
+                       }
+                       v = (v<<6) | (c & 0x3f);
+                       r<<=1;
+                       m<<=5;
+               } while (r & 0x40);
+               
+               *ptr = p;
+
+               v &= ~m;
+       } else {
+               goto again;
+       }
+
+       return v;
+}
+
 /* builds the regex into pattern */
 /* taken from camel-folder-search, with added isregex & exception parameter */
 /* Basically, we build a new regex, either based on subset regex's, or substrings,
@@ -195,28 +232,12 @@ header_soundex (const char *header, const char *match)
        return truth;
 }
 
-/* FIXME: This is stupidly slow and needs to be removed */
-static gunichar
-utf8_get (const char **inp)
-{
-       const unsigned char *p = *inp;
-       gunichar c;
-
-       if (p == NULL)
-               return 0;
-       
-       c = g_utf8_get_char (p);
-       *inp = g_unichar_validate (c) ? g_utf8_next_char (p) : NULL;
-       
-       return c;
-}
-
 const char *
 camel_ustrstrcase (const char *haystack, const char *needle)
 {
        gunichar *nuni, *puni;
        gunichar u;
-       const char *p;
+       const unsigned char *p;
        
        g_return_val_if_fail (haystack != NULL, NULL);
        g_return_val_if_fail (needle != NULL, NULL);
@@ -229,25 +250,25 @@ camel_ustrstrcase (const char *haystack, const char *needle)
        puni = nuni = g_alloca (sizeof (gunichar) * strlen (needle));
        
        p = needle;
-       while ((u = utf8_get (&p)))
+       while ((u = camel_utf8_getc(&p)))
                *puni++ = g_unichar_tolower (u);
        
        /* NULL means there was illegal utf-8 sequence */
        if (!p)
                return NULL;
        
-       p = haystack;
-       while ((u = utf8_get (&p))) {
+       p = (const unsigned char *)haystack;
+       while ((u = camel_utf8_getc(&p))) {
                gunichar c;
                
                c = g_unichar_tolower (u);
                /* We have valid stripped char */
                if (c == nuni[0]) {
-                       const gchar *q = p;
+                       const unsigned char *q = p;
                        gint npos = 1;
                        
                        while (nuni + npos < puni) {
-                               u = utf8_get (&q);
+                               u = camel_utf8_getc(&q);
                                if (!q || !u)
                                        return NULL;
                                
@@ -283,8 +304,8 @@ camel_ustrcasecmp (const char *s1, const char *s2)
        
        CAMEL_SEARCH_COMPARE (s1, s2, NULL);
        
-       u1 = utf8_get (&s1);
-       u2 = utf8_get (&s2);
+       u1 = camel_utf8_getc((const unsigned char **)&s1);
+       u2 = camel_utf8_getc((const unsigned char **)&s2);
        while (u1 && u2) {
                u1 = g_unichar_tolower (u1);
                u2 = g_unichar_tolower (u2);
@@ -293,8 +314,8 @@ camel_ustrcasecmp (const char *s1, const char *s2)
                else if (u1 > u2)
                        return 1;
                
-               u1 = utf8_get (&s1);
-               u2 = utf8_get (&s2);
+               u1 = camel_utf8_getc((const unsigned char **)&s1);
+               u2 = camel_utf8_getc((const unsigned char **)&s2);
        }
        
        /* end of one of the strings ? */
@@ -313,8 +334,8 @@ camel_ustrncasecmp (const char *s1, const char *s2, size_t len)
        
        CAMEL_SEARCH_COMPARE (s1, s2, NULL);
        
-       u1 = utf8_get (&s1);
-       u2 = utf8_get (&s2);
+       u1 = camel_utf8_getc((const unsigned char **)&s1);
+       u2 = camel_utf8_getc((const unsigned char **)&s2);
        while (len > 0 && u1 && u2) {
                u1 = g_unichar_tolower (u1);
                u2 = g_unichar_tolower (u2);
@@ -324,8 +345,8 @@ camel_ustrncasecmp (const char *s1, const char *s2, size_t len)
                        return 1;
                
                len--;
-               u1 = utf8_get (&s1);
-               u2 = utf8_get (&s2);
+               u1 = camel_utf8_getc((const unsigned char **)&s1);
+               u2 = camel_utf8_getc((const unsigned char **)&s2);
        }
        
        if (len == 0)
@@ -344,7 +365,7 @@ camel_ustrncasecmp (const char *s1, const char *s2, size_t len)
 static int
 header_match(const char *value, const char *match, camel_search_match_t how)
 {
-       const char *p;
+       const unsigned char *p;
        int vlen, mlen;
        
        if (how == CAMEL_SEARCH_MATCH_SOUNDEX)
@@ -357,7 +378,7 @@ header_match(const char *value, const char *match, camel_search_match_t how)
        
        /* from dan the man, if we have mixed case, perform a case-sensitive match,
           otherwise not */
-       p = match;
+       p = (const unsigned char *)match;
        while (*p) {
                if (isupper(*p)) {
                        switch (how) {
@@ -495,43 +516,6 @@ camel_search_message_body_contains (CamelDataWrapper *object, regex_t *pattern)
        return truth;
 }
 
-static inline guint32
-camel_utf8_getc(const unsigned char **ptr)
-{
-       register unsigned char *p = (unsigned char *)*ptr;
-       register unsigned char c, r;
-       register guint32 v, m;
-
-again:
-       r = *p++;
-loop:
-       if (r < 0x80) {
-               *ptr = p;
-               v = r;
-       } else if (r < 0xfe) { /* valid start char? */
-               v = r;
-               m = 0x7f80;     /* used to mask out the length bits */
-               do {
-                       c = *p++;
-                       if ((c & 0xc0) != 0x80) {
-                               r = c;
-                               goto loop;
-                       }
-                       v = (v<<6) | (c & 0x3f);
-                       r<<=1;
-                       m<<=5;
-               } while (r & 0x40);
-               
-               *ptr = p;
-
-               v &= ~m;
-       } else {
-               goto again;
-       }
-
-       return v;
-}
-
 static void
 output_c(GString *w, guint32 c, int *type)
 {
index d108f12..11f97cd 100644 (file)
@@ -35,7 +35,6 @@
 #include <errno.h>
 
 #include "e-util/e-msgport.h"
-
 #include "e-util/e-host-utils.h"
 
 #include "camel-service.h"
@@ -43,6 +42,7 @@
 #include "camel-exception.h"
 #include "camel-operation.h"
 #include "camel-private.h"
+#include "camel-i18n.h"
 
 #define d(x)
 #define w(x)
index 5a1b879..73cfe72 100644 (file)
@@ -41,6 +41,7 @@
 #include "camel-file-utils.h"
 #include "camel-string-utils.h"
 #include "camel-url.h"
+#include "camel-i18n.h"
 
 #include "camel-private.h"
 
index 019d16d..d1c228a 100644 (file)
@@ -56,6 +56,7 @@
 
 #include "camel-smime-context.h"
 #include "camel-operation.h"
+#include "camel-i18n.h"
 
 #define d(x)
 
index 677e92a..4075170 100644 (file)
@@ -39,6 +39,7 @@
 #include "camel-vtrash-folder.h"
 #include "camel-exception.h"
 #include "camel-private.h"
+#include "camel-i18n.h"
 
 #define d(x)
 #define w(x)
index 7910831..ef89d8c 100644 (file)
@@ -61,6 +61,7 @@
 #include "camel-session.h"
 #include "camel-certdb.h"
 #include "camel-operation.h"
+#include "camel-i18n.h"
 
 /* from md5-utils.h */
 void md5_get_digest (const char *buffer, int buffer_size, unsigned char digest[16]);
index 7033913..4e3e600 100644 (file)
@@ -37,6 +37,7 @@
 #include "camel-mime-utils.h"
 #include "camel-object.h"
 #include "camel-string-utils.h"
+#include "camel-i18n.h"
 
 static void copy_param (GQuark key_id, gpointer data, gpointer user_data);
 static void output_param (GQuark key_id, gpointer data, gpointer user_data);
@@ -428,7 +429,10 @@ camel_url_set_port (CamelURL *url, int port)
 void
 camel_url_set_param (CamelURL *url, const char *name, const char *value)
 {
-       g_datalist_set_data_full (&url->params, name, value ? g_strdup (value) : NULL, g_free);
+       if (value)
+               g_datalist_set_data_full (&url->params, name, g_strdup(value), g_free);
+       else
+               g_datalist_remove_data(&url->params, name);
 }
 
 const char *
index c74b001..1475c1d 100644 (file)
@@ -38,6 +38,7 @@
 #include "camel-vee-store.h"   /* for open flags */
 #include "camel-private.h"
 #include "camel-debug.h"
+#include "camel-i18n.h"
 
 #include "e-util/md5-utils.h"
 
index d0ef62a..770a023 100644 (file)
@@ -27,6 +27,7 @@
 #include "camel-vee-folder.h"
 
 #include "camel-private.h"
+#include "camel-i18n.h"
 
 #include <string.h>
 
index 667b574..91e4b8a 100644 (file)
@@ -27,6 +27,7 @@
 #include "camel-store.h"
 #include "camel-vee-store.h"
 #include "camel-mime-message.h"
+#include "camel-i18n.h"
 
 #include <string.h>
 
index 4a426bc..cd6f2e8 100644 (file)
@@ -37,6 +37,7 @@
 #include "camel-url.h"
 #include "camel-sasl.h"
 #include "camel-gw-listener.h"
+#include "camel-i18n.h"
 
 static void add_hash (guint *hash, char *s);
 static guint groupwise_url_hash (gconstpointer key);
@@ -55,6 +56,7 @@ CamelProviderConfEntry groupwise_conf_entries[] = {
          N_("Check for new messages in all folders"), "1" },
        { CAMEL_PROVIDER_CONF_SECTION_END },
 
+       { CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
        { CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL,
          N_("Apply filters to new messages in Inbox on this server"), "0" },
        { CAMEL_PROVIDER_CONF_CHECKBOX, "filter_junk", NULL,
@@ -63,6 +65,7 @@ CamelProviderConfEntry groupwise_conf_entries[] = {
          N_("Only check for Junk messages in the INBOX folder"), "0" },
        { CAMEL_PROVIDER_CONF_CHECKBOX, "offline_sync", NULL,
          N_("Automatically synchronize remote mail locally"), "0" },
+       { CAMEL_PROVIDER_CONF_SECTION_END },
 
        /* extra Groupwise  configuration settings */
        {CAMEL_PROVIDER_CONF_SECTION_START, "soapport", NULL,
@@ -82,7 +85,6 @@ CamelProviderConfEntry groupwise_conf_entries[] = {
                
        { CAMEL_PROVIDER_CONF_SECTION_END }, 
 
-
        { CAMEL_PROVIDER_CONF_END }
 };
 
index e7cfc05..0e8db51 100644 (file)
@@ -43,7 +43,7 @@
 #include <camel/camel-private.h>
 #include <camel/camel-utf8.h>
 #include <camel/camel-session.h>
-
+#include "camel-i18n.h"
 
 extern int camel_verbose_debug;
 
index f7a33e6..5eaafcb 100644 (file)
@@ -23,7 +23,6 @@
  * USA
  */
 
-
 #ifdef HAVE_CONFIG_H
 #include <config.h> 
 #endif
@@ -70,6 +69,7 @@
 #include "camel-string-utils.h"
 #include "camel-file-utils.h"
 #include "camel-debug.h"
+#include "camel-i18n.h"
 
 #define d(x) x
 
index 559c6d2..17fa9ca 100644 (file)
@@ -36,6 +36,7 @@
 #include "camel-data-wrapper.h"
 #include "camel-exception.h"
 #include "camel-stream-fs.h"
+#include "camel-i18n.h"
 
 static void finalize (CamelImapMessageCache *cache);
 static void stream_finalize (CamelObject *stream, gpointer event_data, gpointer user_data);
index bef15f6..3539fa2 100644 (file)
@@ -32,6 +32,7 @@
 #include "camel-session.h"
 #include "camel-url.h"
 #include "camel-sasl.h"
+#include "camel-i18n.h"
 
 static void add_hash (guint *hash, char *s);
 static guint imap_url_hash (gconstpointer key);
@@ -60,6 +61,7 @@ CamelProviderConfEntry imap_conf_entries[] = {
        { CAMEL_PROVIDER_CONF_ENTRY, "namespace", "override_namespace",
          N_("Namespace") },
        { CAMEL_PROVIDER_CONF_SECTION_END },
+       { CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
        { CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL,
          N_("Apply filters to new messages in INBOX on this server"), "0" },
        { CAMEL_PROVIDER_CONF_CHECKBOX, "filter_junk", NULL,
@@ -68,6 +70,7 @@ CamelProviderConfEntry imap_conf_entries[] = {
          N_("Only check for Junk messages in the INBOX folder"), "0" },
        { CAMEL_PROVIDER_CONF_CHECKBOX, "offline_sync", NULL,
          N_("Automatically synchronize remote mail locally"), "0" },
+       { CAMEL_PROVIDER_CONF_SECTION_END },
        { CAMEL_PROVIDER_CONF_END }
 };
 
index af031bd..85e8b8f 100644 (file)
@@ -24,7 +24,6 @@
  *
  */
 
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 #include "camel-sasl.h"
 #include "camel-utf8.h"
 #include "camel-string-utils.h"
-
 #include "camel-imap-private.h"
 #include "camel-private.h"
-
 #include "camel-debug.h"
+#include "camel-i18n.h"
 
 #define d(x) 
 
index b8d6e53..21ec24c 100644 (file)
 #include "camel/camel-session.h"
 #include "camel/camel-url.h"
 #include "camel/camel-sasl.h"
+#include "camel/camel-i18n.h"
 
 #include "camel-imapp-store.h"
 
 CamelProviderConfEntry imapp_conf_entries[] = {
-       { CAMEL_PROVIDER_CONF_SECTION_START, NULL, NULL,
+       { CAMEL_PROVIDER_CONF_SECTION_START, "storage", NULL,
          N_("Message storage") },
        { CAMEL_PROVIDER_CONF_SECTION_END },
        { CAMEL_PROVIDER_CONF_END }
index 290d3c0..3c0dac5 100644 (file)
@@ -48,6 +48,7 @@
 #ifdef HAVE_SSL
 #include "camel/camel-tcp-stream-ssl.h"
 #endif
+#include "camel/camel-i18n.h"
 
 #include "camel-imapp-store-summary.h"
 #include "camel-imapp-store.h"
index 2f5cc53..f18e6c1 100644 (file)
@@ -48,6 +48,7 @@
 #include "camel-stream-filter.h"
 #include "camel-mime-filter-from.h"
 #include "camel-exception.h"
+#include "camel-i18n.h"
 
 #include "camel-local-private.h"
 
index 27fae76..7411d8f 100644 (file)
 #include "camel-mbox-store.h"
 #include "camel-maildir-store.h"
 #include "camel-spool-store.h"
+#include "camel-i18n.h"
 
 #define d(x)
 
 static CamelProviderConfEntry mh_conf_entries[] = {
        CAMEL_PROVIDER_CONF_DEFAULT_PATH,
+       { CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
        { CAMEL_PROVIDER_CONF_CHECKBOX, "dotfolders", NULL,
          N_("Use the `.folders' folder summary file (exmh)"), "0" },
+       { CAMEL_PROVIDER_CONF_SECTION_END },
        { CAMEL_PROVIDER_CONF_END }
 };
 
@@ -73,8 +76,10 @@ static CamelProvider mbox_provider = {
 
 static CamelProviderConfEntry maildir_conf_entries[] = {
        CAMEL_PROVIDER_CONF_DEFAULT_PATH,
+       { CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
        { CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL,
          N_("Apply filters to new messages in INBOX"), "0" },
+       { CAMEL_PROVIDER_CONF_SECTION_END },
        { CAMEL_PROVIDER_CONF_END }
 };
 
@@ -91,8 +96,10 @@ static CamelProvider maildir_provider = {
 
 static CamelProviderConfEntry spool_conf_entries[] = {
        CAMEL_PROVIDER_CONF_DEFAULT_PATH,
+       { CAMEL_PROVIDER_CONF_SECTION_START, "general", NULL, N_("Options") },
        { CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL, N_("Apply filters to new messages in INBOX"), "0" },
        { CAMEL_PROVIDER_CONF_CHECKBOX, "xstatus", NULL, N_("Store status headers in Elm/Pine/Mutt format"), "0" },
+       { CAMEL_PROVIDER_CONF_SECTION_END },
        { CAMEL_PROVIDER_CONF_END }
 };
 
index f39f597..a89fee1 100644 (file)
@@ -36,6 +36,7 @@
 #include "camel-local-store.h"
 #include "camel-exception.h"
 #include "camel-url.h"
+#include "camel-i18n.h"
 
 #include "camel-local-folder.h"
 #include <camel/camel-text-index.h>
index a1f4831..e515dd5 100644 (file)
@@ -35,6 +35,7 @@
 #include "camel/camel-mime-message.h"
 #include "camel/camel-stream-null.h"
 #include "camel/camel-file-utils.h"
+#include "camel/camel-i18n.h"
 
 #define w(x)
 #define io(x)
index 17bc081..bd38dcf 100644 (file)
@@ -39,6 +39,7 @@
 #include "camel-data-wrapper.h"
 #include "camel-mime-message.h"
 #include "camel-exception.h"
+#include "camel-i18n.h"
 
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
 
index 40cdc07..9c4097a 100644 (file)
@@ -37,6 +37,7 @@
 #include "camel-url.h"
 #include "camel-private.h"
 #include "camel-maildir-summary.h"
+#include "camel-i18n.h"
 
 #define d(x)
 
index edc81a5..8b15c2b 100644 (file)
@@ -42,6 +42,7 @@
 
 #include "camel-private.h"
 #include "e-util/e-memory.h"
+#include "camel-i18n.h"
 
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
 
@@ -279,7 +280,7 @@ static CamelMessageInfo *message_info_new(CamelFolderSummary * s, struct _camel_
                if (info) {
                        d(printf("already seen uid '%s', just summarising instead\n", uid));
                        camel_folder_summary_info_free(s, mi);
-                       mdi = (CamelMaildirMessageInfo *)mi = info;
+                       mdi = (CamelMaildirMessageInfo *)(mi = info);
                }
 
                /* with maildir we know the real received date, from the filename */
index 0d86b6d..a28db10 100644 (file)
@@ -42,6 +42,7 @@
 #include "camel-stream-filter.h"
 #include "camel-mime-filter-from.h"
 #include "camel-exception.h"
+#include "camel-i18n.h"
 
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
 
index a2bafd4..7681194 100644 (file)
@@ -37,6 +37,7 @@
 #include "camel-text-index.h"
 #include "camel-exception.h"
 #include "camel-url.h"
+#include "camel-i18n.h"
 
 #define d(x) 
 
index c34df06..60dcf34 100644 (file)
@@ -41,6 +41,7 @@
 #include "camel/camel-file-utils.h"
 #include "camel/camel-mime-message.h"
 #include "camel/camel-operation.h"
+#include "camel-i18n.h"
 
 #define io(x)
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
@@ -255,7 +256,7 @@ message_info_new(CamelFolderSummary *s, struct _camel_header_raw *h)
                                if ((info->flags & CAMEL_MESSAGE_FOLDER_NOTSEEN)) {
                                        info->flags &= ~CAMEL_MESSAGE_FOLDER_NOTSEEN;
                                        camel_folder_summary_info_free(s, mi);
-                                       mbi = (CamelMboxMessageInfo *)mi = info;
+                                       mbi = (CamelMboxMessageInfo *)(mi = info);
                                } else {
                                        add = 7;
                                        d(printf("seen '%s' before, adding anew\n", uid));
index 83a11e2..5f71ab0 100644 (file)
@@ -39,6 +39,7 @@
 #include "camel-data-wrapper.h"
 #include "camel-mime-message.h"
 #include "camel-exception.h"
+#include "camel-i18n.h"
 
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
 
index ee35d8e..cc2f3ce 100644 (file)
@@ -34,6 +34,7 @@
 #include "camel-exception.h"
 #include "camel-url.h"
 #include "camel-private.h"
+#include "camel-i18n.h"
 
 #include <camel/camel-stream-fs.h>
 #include <camel/camel-stream-buffer.h>
index 5dd26ac..d51bf7a 100644 (file)
@@ -40,6 +40,7 @@
 #include <camel/camel-mime-message.h>
 
 #include "camel-private.h"
+#include "camel-i18n.h"
 
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
 
index a1b1901..026d994 100644 (file)
 #include "camel-stream-filter.h"
 #include "camel-mime-filter-from.h"
 #include "camel-exception.h"
-
 #include "camel-lock-client.h"
-
 #include "camel-local-private.h"
+#include "camel-i18n.h"
 
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
 
index 96278bf..f1f715e 100644 (file)
@@ -41,6 +41,7 @@
 #include "camel-exception.h"
 #include "camel-url.h"
 #include "camel-private.h"
+#include "camel-i18n.h"
 
 #define d(x)
 
index 7991a88..3e4fb53 100644 (file)
@@ -38,6 +38,7 @@
 #include "camel-mime-message.h"
 #include "camel-file-utils.h"
 #include "camel-operation.h"
+#include "camel-i18n.h"
 
 #define io(x)
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
index 04855a2..40abfcf 100644 (file)
@@ -21,7 +21,6 @@
  * USA
  */
 
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -50,6 +49,7 @@
 #include "camel/camel-multipart.h"
 #include "camel/camel-mime-part.h"
 #include "camel/camel-stream-buffer.h"
+#include "camel/camel-i18n.h"
 
 #include "camel-nntp-summary.h"
 #include "camel-nntp-store.h"
index f2b4c1a..5780c41 100644 (file)
@@ -30,6 +30,7 @@
 #include "camel-nntp-store.h"
 #include "camel-provider.h"
 #include "camel-session.h"
+#include "camel-i18n.h"
 
 static void add_hash (guint *hash, char *s);
 static guint nntp_url_hash (gconstpointer key);
@@ -57,7 +58,7 @@ static CamelProvider news_provider = {
        "news",
 
        CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE |
-       CAMEL_PROVIDER_IS_STORAGE,
+       CAMEL_PROVIDER_IS_STORAGE | CAMEL_PROVIDER_SUPPORTS_SSL,
 
        CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_USER |
        CAMEL_URL_ALLOW_PASSWORD | CAMEL_URL_ALLOW_AUTH,
index 31048e7..6d8490d 100644 (file)
@@ -21,7 +21,6 @@
  * USA
  */
 
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -52,6 +51,7 @@
 #include "camel-nntp-folder.h"
 #include "camel-nntp-private.h"
 #include "camel-nntp-resp-codes.h"
+#include "camel-i18n.h"
 
 #define w(x)
 extern int camel_verbose_debug;
index d30fdc6..6a1d208 100644 (file)
@@ -36,6 +36,7 @@
 #include "camel/camel-stream-null.h"
 #include "camel/camel-operation.h"
 #include "camel/camel-data-cache.h"
+#include "camel/camel-i18n.h"
 
 #include "camel-nntp-summary.h"
 #include "camel-nntp-folder.h"
index 9c3f842..e79a382 100644 (file)
@@ -33,8 +33,9 @@
 
 #include "camel-pop3-engine.h"
 #include "camel-pop3-stream.h"
-#include <camel/camel-service.h>
-#include <camel/camel-sasl.h>
+#include "camel-service.h"
+#include "camel-sasl.h"
+#include "camel-i18n.h"
 
 /* max 'outstanding' bytes in output stream, so we can't deadlock waiting
    for the server to accept our data when pipelining */
@@ -224,8 +225,6 @@ static void
 get_capabilities(CamelPOP3Engine *pe)
 {
        CamelPOP3Command *pc;
-       unsigned char *line;
-       unsigned int len;
        
        if (!(pe->flags & CAMEL_POP3_ENGINE_DISABLE_EXTENSIONS)) {
                pc = camel_pop3_engine_command_new(pe, CAMEL_POP3_COMMAND_MULTI, cmd_capa, NULL, "CAPA\r\n");
index 1c17079..23a5bc7 100644 (file)
@@ -37,6 +37,7 @@
 #include "camel-mime-message.h"
 #include "camel-operation.h"
 #include "camel-data-cache.h"
+#include "camel-i18n.h"
 
 #include <e-util/md5-utils.h>
 
index 7c3db15..7253edf 100644 (file)
 #include "camel-session.h"
 #include "camel-url.h"
 #include "camel-sasl.h"
+#include "camel-i18n.h"
 
 CamelProviderConfEntry pop3_conf_entries[] = {
-       { CAMEL_PROVIDER_CONF_SECTION_START, NULL, NULL,
+       { CAMEL_PROVIDER_CONF_SECTION_START, "storage", NULL,
          N_("Message storage") },
        { CAMEL_PROVIDER_CONF_CHECKBOX, "keep_on_server", NULL,
          N_("Leave messages on server"), "0" },
index 96f9295..a63aa13 100644 (file)
@@ -54,6 +54,7 @@
 #ifdef HAVE_SSL
 #include "camel-tcp-stream-ssl.h"
 #endif
+#include "camel-i18n.h"
 
 /* Specified in RFC 1939 */
 #define POP3_PORT 110
index 36cbf88..0aeb367 100644 (file)
@@ -30,6 +30,7 @@
 #include "camel-sendmail-transport.h"
 #include "camel-session.h"
 #include "camel-url.h"
+#include "camel-i18n.h"
 
 static CamelProvider sendmail_provider = {
        "sendmail",
index fbf6f08..a776b97 100644 (file)
@@ -40,6 +40,7 @@
 #include "camel-data-wrapper.h"
 #include "camel-stream-fs.h"
 #include "camel-exception.h"
+#include "camel-i18n.h"
 
 static char *get_name (CamelService *service, gboolean brief);
 
index e9eff37..bff1d84 100644 (file)
@@ -31,6 +31,7 @@
 #include "camel-session.h"
 #include "camel-url.h"
 #include "camel-sasl.h"
+#include "camel-i18n.h"
 
 static CamelProvider smtp_provider = {
        "smtp",
index 3245cc6..53a2d2c 100644 (file)
@@ -55,7 +55,7 @@
 #include "camel-session.h"
 #include "camel-exception.h"
 #include "camel-sasl.h"
-
+#include "camel-i18n.h"
 
 extern int camel_verbose_debug;
 #define d(x) (camel_verbose_debug ? (x) : 0)