Checking Foreground Mailbox (Was: Deleting Mails and Syncing Folders to Disk)
- From: Ian Campbell <ijc25 cam ac uk>
- To: balsa-list gnome org
- Subject: Checking Foreground Mailbox (Was: Deleting Mails and Syncing Folders to Disk)
- Date: Sat, 29 Jan 2000 17:08:33 +0000
Well, I managed to solve this little problem I reckon.
It only happens with --enable-threads, the MSGMAILTHREAD_LOAD message
was causing load_messages to be called on inbox directly - not the
current foreground mailbox.
The patch is quite simple, I have attached it...
Cheers,
Ian.
On Fri, 28 Jan 2000 20:19:12 David Pickens wrote:
>
> On Fri, 28 Jan 2000, I.J. Campbell wrote:
>
> > I have also noticed that balsa doesn't always (more like never I think)
> > notice new messages (delivered using fetchmail/procmail), unless I
> > explicitly close the mailbox from the context menu and then re-open it,
> > which is a pain. It would be nice if the 'check new mail' button would see
> > if the foreground mailbox's disk file had been updated... I will try and
> > look into that at some point.
> >
> > Thanks,
> > Ian.
>
> This would /great/!
>
> David
>
>
>
>
> --
> FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
> To unsubscribe: mail balsa-list-request@gnome.org with
> "unsubscribe" as the Subject.
>
? check-mail.diff
? src/.libs
Index: libbalsa/mailbox.c
===================================================================
RCS file: /cvs/gnome/balsa/libbalsa/mailbox.c,v
retrieving revision 1.109
diff -u -r1.109 mailbox.c
--- libbalsa/mailbox.c 1999/12/30 21:14:14 1.109
+++ libbalsa/mailbox.c 2000/01/29 16:42:06
@@ -669,7 +669,7 @@
}
else if (i == M_NEW_MAIL || i == M_REOPENED)
{
- // g_print ("got new mail! yippie!\n");
+ /* g_print ("got new mail! yippie!\n"); */
mailbox->new_messages = CLIENT_CONTEXT (mailbox)->msgcount - mailbox->messages;
if (mailbox->new_messages > 0)
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/balsa/src/Makefile.am,v
retrieving revision 1.66
diff -u -r1.66 Makefile.am
--- src/Makefile.am 1999/12/22 06:20:48 1.66
+++ src/Makefile.am 2000/01/29 16:42:09
@@ -70,6 +70,8 @@
$(top_builddir)/libmutt/libmutt.a \
$(top_builddir)/libinit_balsa/libinit_balsa.a
+EXTRA_DIST = arrow.xpm
+
dist-hook:
mkdir $(distdir)/pixmaps
cp $(srcdir)/pixmaps/*.xpm $(distdir)/pixmaps
Index: src/main-window.c
===================================================================
RCS file: /cvs/gnome/balsa/src/main-window.c,v
retrieving revision 1.237
diff -u -r1.237 main-window.c
--- src/main-window.c 2000/01/12 00:39:44 1.237
+++ src/main-window.c 2000/01/29 16:42:09
@@ -869,20 +869,20 @@
*/
MailThreadMessage *threadmessage;
- MSGMAILTHREAD( threadmessage, MSGMAILTHREAD_SOURCE, "POP3",0,0 );
+ MSGMAILTHREAD( threadmessage, MSGMAILTHREAD_SOURCE, NULL, "POP3", 0, 0);
check_all_pop3_hosts (balsa_app.inbox, balsa_app.inbox_input);
- MSGMAILTHREAD( threadmessage, MSGMAILTHREAD_SOURCE, "IMAP",0,0 );
+ MSGMAILTHREAD( threadmessage, MSGMAILTHREAD_SOURCE, NULL, "IMAP", 0, 0);
check_all_imap_hosts (balsa_app.inbox, balsa_app.inbox_input);
- MSGMAILTHREAD( threadmessage, MSGMAILTHREAD_SOURCE, "Local Mail",0,0 );
+ MSGMAILTHREAD( threadmessage, MSGMAILTHREAD_SOURCE, NULL, "Local Mail", 0,0);
if( CLIENT_CONTEXT_OPEN(mbox)) {
mailbox_check_new_messages( mbox );
- MSGMAILTHREAD( threadmessage, MSGMAILTHREAD_LOAD, mbox->name,0,0 );
+ MSGMAILTHREAD( threadmessage, MSGMAILTHREAD_LOAD, mbox, mbox->name, 0,0 );
}
- MSGMAILTHREAD( threadmessage, MSGMAILTHREAD_FINISHED, "Finished",0,0 );
+ MSGMAILTHREAD( threadmessage, MSGMAILTHREAD_FINISHED, NULL, "Finished", 0, 0 );
pthread_mutex_lock( &mailbox_lock );
checking_mail = 0;
@@ -968,9 +968,9 @@
MAILBOX_POP3(threadmessage->mailbox)->mailbox.name );
break;
case MSGMAILTHREAD_LOAD:
- LOCK_MAILBOX (balsa_app.inbox);
- load_messages (balsa_app.inbox, 1);
- UNLOCK_MAILBOX (balsa_app.inbox);
+ LOCK_MAILBOX(threadmessage->mailbox);
+ load_messages(threadmessage->mailbox, 1);
+ UNLOCK_MAILBOX(threadmessage->mailbox);
break;
case MSGMAILTHREAD_PROGRESS:
percent = (gfloat)threadmessage->num_bytes/
Index: src/threads.h
===================================================================
RCS file: /cvs/gnome/balsa/src/threads.h,v
retrieving revision 1.7
diff -u -r1.7 threads.h
--- src/threads.h 1999/12/15 04:30:23 1.7
+++ src/threads.h 2000/01/29 16:42:10
@@ -51,9 +51,10 @@
* string is string to send
*/
-#define MSGMAILTHREAD( message, type, string, num, tot) \
+#define MSGMAILTHREAD( message, type, mbox, string, num, tot) \
message = malloc( sizeof( MailThreadMessage )); \
message->message_type = type; \
+ message->mailbox = mbox; \
strncpy( message->message_string, string, strlen(string) + 1 ); \
message->num_bytes=num;\
message->tot_bytes=tot;\
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]