2008-08-28 [wwp] 3.5.0cvs81
authorTristan Chabredier <wwp@claws-mail.org>
Thu, 28 Aug 2008 20:17:05 +0000 (20:17 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Thu, 28 Aug 2008 20:17:05 +0000 (20:17 +0000)
* src/account.c
* src/pop.c
* src/prefs_account.c
* src/prefs_account.h
Add finer granularity to the POP3's remove-after delay (now in
hours in addition to in days), patch by Paul Rolland.

ChangeLog
PATCHSETS
configure.ac
src/account.c
src/pop.c
src/prefs_account.c
src/prefs_account.h

index 424755b..4ed647c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-08-28 [wwp]       3.5.0cvs81
+
+       * src/account.c
+       * src/pop.c
+       * src/prefs_account.c
+       * src/prefs_account.h
+               Add finer granularity to the POP3's remove-after delay (now in
+               hours in addition to in days), patch by Paul Rolland.
+
 2008-08-28 [wwp]       3.5.0cvs80
 
        * src/gtk/combobox.c
index 1657a3c..3ea7f93 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.155.2.89 -r 1.155.2.90 src/Makefile.am;  cvs diff -u -r 1.61.2.81 -r 1.61.2.82 src/account.c;  cvs diff -u -r 1.382.2.470 -r 1.382.2.471 src/compose.c;  cvs diff -u -r 1.105.2.142 -r 1.105.2.143 src/prefs_account.c;  cvs diff -u -r 1.49.2.37 -r 1.49.2.38 src/prefs_account.h;  cvs diff -u -r 1.10.2.15 -r 1.10.2.16 src/privacy.c;  cvs diff -u -r 1.10.2.16 -r 1.10.2.17 src/privacy.h;  cvs diff -u -r 1.49.2.113 -r 1.49.2.114 src/procmime.c;  cvs diff -u -r 1.25.2.59 -r 1.25.2.60 src/stock_pixmap.c;  cvs diff -u -r 1.18.2.36 -r 1.18.2.37 src/stock_pixmap.h;  cvs diff -u -r 1.395.2.383 -r 1.395.2.384 src/summaryview.c;  diff -u /dev/null src/pixmaps/key_gpg_signed.xpm;  ) > 3.5.0cvs78.patchset
 ( cvs diff -u -r 1.61.2.82 -r 1.61.2.83 src/account.c;  cvs diff -u -r 1.60.2.61 -r 1.60.2.62 src/prefs_actions.c;  cvs diff -u -r 1.59.2.72 -r 1.59.2.73 src/prefs_filtering.c;  cvs diff -u -r 1.12.2.65 -r 1.12.2.66 src/prefs_template.c;  ) > 3.5.0cvs79.patchset
 ( cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/gtk/combobox.c;  ) > 3.5.0cvs80.patchset
+( cvs diff -u -r 1.61.2.83 -r 1.61.2.84 src/account.c;  cvs diff -u -r 1.56.2.62 -r 1.56.2.63 src/pop.c;  cvs diff -u -r 1.105.2.143 -r 1.105.2.144 src/prefs_account.c;  cvs diff -u -r 1.49.2.38 -r 1.49.2.39 src/prefs_account.h;  ) > 3.5.0cvs81.patchset
index 72dda34..cd86d81 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=80
+EXTRA_VERSION=81
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index ddfbc86..4a35a3d 100644 (file)
@@ -924,6 +924,7 @@ static void account_clone(GtkWidget *widget, gpointer data)
        ACP_FASSIGN(use_apop_auth);
        ACP_FASSIGN(rmmail);
        ACP_FASSIGN(msg_leave_time);
+       ACP_FASSIGN(msg_leave_hour);
        ACP_FASSIGN(recv_at_getall);
        ACP_FASSIGN(sd_rmmail_on_download);
        ACP_FASSIGN(enable_size_limit);
index 3780fec..968e951 100644 (file)
--- a/src/pop.c
+++ b/src/pop.c
@@ -822,7 +822,8 @@ static Pop3State pop3_lookup_next(Pop3Session *session)
                    msg->recv_time != RECV_TIME_KEEP &&
                    msg->partial_recv == POP3_TOTALLY_RECEIVED &&
                    session->current_time - msg->recv_time >=
-                   ac->msg_leave_time * 24 * 60 * 60) {
+                    ((ac->msg_leave_time * 24 * 60 * 60) +
+                     (ac->msg_leave_hour * 60 * 60))) {
                        log_message(LOG_PROTOCOL, 
                                        _("POP3: Deleting expired message %d [%s]\n"),
                                        session->cur_msg, msg->uidl?msg->uidl:" ");
@@ -1069,6 +1070,7 @@ static gint pop3_session_recv_data_finished(Session *session, guchar *data,
 
                if (pop3_session->ac_prefs->rmmail &&
                    pop3_session->ac_prefs->msg_leave_time == 0 &&
+                   pop3_session->ac_prefs->msg_leave_hour == 0 &&
                    pop3_session->msg[pop3_session->cur_msg].recv_time
                    != RECV_TIME_KEEP)
                        pop3_delete_send(pop3_session);
index c93eee3..742eda8 100644 (file)
@@ -126,6 +126,7 @@ typedef struct ReceivePage
        GtkWidget *use_apop_checkbtn;
        GtkWidget *rmmail_checkbtn;
        GtkWidget *leave_time_spinbtn;
+       GtkWidget *leave_hour_spinbtn;
        GtkWidget *size_limit_checkbtn;
        GtkWidget *size_limit_spinbtn;
        GtkWidget *inbox_label;
@@ -440,6 +441,9 @@ static PrefParam receive_param[] = {
         &receive_page.leave_time_spinbtn,
         prefs_set_data_from_spinbtn, prefs_set_spinbtn},
 #endif
+       {"message_leave_hour", "0", &tmp_ac_prefs.msg_leave_hour, P_INT,
+        &receive_page.leave_hour_spinbtn,
+        prefs_set_data_from_spinbtn, prefs_set_spinbtn},
 
        {"enable_size_limit", "FALSE", &tmp_ac_prefs.enable_size_limit, P_BOOL,
         &receive_page.size_limit_checkbtn,
@@ -1333,6 +1337,8 @@ static void receive_create_widget_func(PrefsPage * _page,
        GtkWidget *hbox_spc;
        GtkWidget *leave_time_label;
        GtkWidget *leave_time_spinbtn;
+       GtkWidget *leave_hour_label;
+       GtkWidget *leave_hour_spinbtn;
        GtkWidget *hbox1;
        GtkWidget *size_limit_checkbtn;
        GtkWidget *size_limit_spinbtn;
@@ -1420,13 +1426,23 @@ static void receive_create_widget_func(PrefsPage * _page,
        leave_time_spinbtn = gtk_spin_button_new_with_range(0, 365, 1);
        gtk_widget_show (leave_time_spinbtn);
        CLAWS_SET_TIP(leave_time_spinbtn,
-                            _("0 days: remove immediately"));
+                            _("0 days and 0 hours : remove immediately"));
        gtk_box_pack_start (GTK_BOX (hbox1), leave_time_spinbtn, FALSE, FALSE, 0);
 
        leave_time_label = gtk_label_new (_("days"));
        gtk_widget_show (leave_time_label);
        gtk_box_pack_start (GTK_BOX (hbox1), leave_time_label, FALSE, FALSE, 0);
 
+       leave_hour_spinbtn = gtk_spin_button_new_with_range(0, 23, 1);
+       gtk_widget_show (leave_hour_spinbtn);
+       CLAWS_SET_TIP(leave_hour_spinbtn,
+                            _("0 days and 0 hours : remove immediately"));
+       gtk_box_pack_start (GTK_BOX (hbox1), leave_hour_spinbtn, FALSE, FALSE, 0);
+
+       leave_hour_label = gtk_label_new (_("hours"));
+       gtk_widget_show (leave_hour_label);
+       gtk_box_pack_start (GTK_BOX (hbox1), leave_hour_label, FALSE, FALSE, 0);
+
        SET_TOGGLE_SENSITIVITY (rmmail_checkbtn, hbox1);
 
        hbox1 = gtk_hbox_new (FALSE, 8);
@@ -1574,6 +1590,7 @@ static void receive_create_widget_func(PrefsPage * _page,
        page->use_apop_checkbtn          = use_apop_checkbtn;
        page->rmmail_checkbtn            = rmmail_checkbtn;
        page->leave_time_spinbtn         = leave_time_spinbtn;
+       page->leave_hour_spinbtn         = leave_hour_spinbtn;
        page->size_limit_checkbtn        = size_limit_checkbtn;
        page->size_limit_spinbtn         = size_limit_spinbtn;
        page->filter_on_recv_checkbtn    = filter_on_recv_checkbtn;
index bb5edc4..8770530 100644 (file)
@@ -93,6 +93,7 @@ struct _PrefsAccount
        gboolean use_apop_auth;
        gboolean rmmail;
        gint msg_leave_time;
+       gint msg_leave_hour;
        gboolean recv_at_getall;
        gboolean sd_rmmail_on_download;
        gboolean enable_size_limit;