Re: Patch to use gnome-config



Hey,

I had a chance to look very briefly at the patch.  I've tested the
save/load stuff for pop3 and it seems to work well here.  There were two
small issues and I attached a patch (to the patch) to fix them.

1)
As I'm sure you know -- when you first load this version and setup the
name/mailbox info, the main window appears without any mail folders.  I
also noticed that if you add a pop3 mail account /before/ exiting and
re-starting it will not be properly restored.

It's a bit of a hack, but I thought that placing a config_load after the
config_save in balsa_init might force it read all the config stuff back
out and setup the mailboxes -- and it seems to work.  (The mail folders
will be visible when the program is run for the first time, and users can
add pop3 mailboxes without restarting.)

2) This breaks my earlier patch to avoid retrieving POP mail from the
server more than once (by tracking UIDs) -- so I slipped in a couple of
lines to save and load the 'last_popped_uid' string using a 'lastuid' key.  
(Unless you deliberately moved it from save-restore, in which case I'll
have to figure out how/where to store it.)


Here's the diff (against the CVS patched with my thread stuff and your
config code).

David

PS - I'd still love to hear from anyone who might have figured out how to
get the progress dialog to update the label as the mail thread is
retrieving messages.

diff -u -r /opt/david/balsa/src/balsa-init.c mybalsa/src/balsa-init.c
--- /opt/david/balsa/src/balsa-init.c	Mon Oct  4 22:33:17 1999
+++ mybalsa/src/balsa-init.c	Tue Oct  5 00:07:30 1999
@@ -674,6 +674,7 @@
   mailbox_free (mailbox);
 
   config_global_save ();
+  config_load( BALSA_CONFIG_FILE );
 
   gtk_widget_destroy (prefs->real_name);
   gtk_widget_destroy (prefs->email);
diff -u -r /opt/david/balsa/src/save-restore.c mybalsa/src/save-restore.c
--- /opt/david/balsa/src/save-restore.c	Mon Oct  4 22:33:18 1999
+++ mybalsa/src/save-restore.c	Mon Oct  4 23:04:15 1999
@@ -331,6 +331,7 @@
     safe_get_string( "username", &( (MAILBOX_POP3( mb ))->user ), &okay );
     safe_get_pstring( "password", &( (MAILBOX_POP3( mb ))->passwd ), &okay );
     safe_get_string( "server", &( (MAILBOX_POP3( mb ))->server ), &okay );
+    safe_get_string( "lastuid", &( (MAILBOX_POP3( mb ))->last_popped_uid), &okay );
     get_dint( "check", 0, &( (MAILBOX_POP3( mb ))->check ), &okay );
     get_dint( "delete_from_server", 0, &( (MAILBOX_POP3( mb ))->delete_from_server ), &okay );
     
@@ -355,6 +356,7 @@
     gnome_config_set_string( "name", mbox->name );
     gnome_config_set_string( "username", mp->user );
     gnome_config_private_set_string( "password", mp->passwd );
+    gnome_config_set_string( "lastuid", mp->last_popped_uid );
     set_magic_box( mbox );
 }
 


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