Re: IMAP check options



On 2001.08.15 07:10 Peter Bloomfield wrote:

[snip]

> I believe the new version of the imap_check_test function can also be
> used
> to simplify the current code--more later.
> 
> Peter

This seems to work (mbnode->dir is always just the imap path, w/o any {...}
prefix). This patch should be applied after balsa-imap-check-patch-LIBMUTT
(which is already in CVS) and balsa-imap-check-patch-2 (which probably
isn't).

Peter
diff -Nur balsa-work/src/main-window.c balsa-work2/src/main-window.c
--- balsa-work/src/main-window.c	Wed Aug 15 06:51:27 2001
+++ balsa-work2/src/main-window.c	Wed Aug 15 09:22:52 2001
@@ -1461,27 +1461,12 @@
 static void
 mailbox_check_func(GtkCTree * ctree, GtkCTreeNode * node, gpointer data)
 {
-    char *tmp;
-    
     BalsaMailboxNode *mbnode = gtk_ctree_node_get_row_data(ctree, node);
     g_return_if_fail(mbnode);
     
     if(mbnode->mailbox) { /* mailbox, not a folder */
-	if(balsa_app.check_imap || 
-	   !LIBBALSA_IS_MAILBOX_IMAP(mbnode->mailbox)) {
-	    if(LIBBALSA_IS_MAILBOX_IMAP(mbnode->mailbox)) {
-		tmp=LIBBALSA_MAILBOX_IMAP(mbnode->mailbox)->path;
-
-		/* Specs say there may be a {host:port} prefix */
-		/* Set the pointer to point past that to the real path */
-		if(strchr(tmp, '}'))
-		    tmp=strchr(tmp, '}')+1;
-
-		/* Melanie's Cyrus IMAP server uses UPPERCASE for INBOX */
-		/* FIXME: Check if that's true for all IMAP servers     */
-		if(balsa_app.check_imap_inbox && strcmp(tmp, "INBOX"))
-		    return;
-	    }
+	if (!LIBBALSA_IS_MAILBOX_IMAP(mbnode->mailbox) ||
+	    imap_check_test(mbnode->dir)) {
 	    gdk_threads_enter();
 	    libbalsa_mailbox_check(mbnode->mailbox);
 	    gdk_threads_leave();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]