2005-04-12 [paul] 1.0.4cvs5
authorPaul Mangan <paul@claws-mail.org>
Tue, 12 Apr 2005 07:39:23 +0000 (07:39 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 12 Apr 2005 07:39:23 +0000 (07:39 +0000)
backported from GTK2...

* src/account.c
Add account preference to queue message in a certain
folder.
* src/compose.c
Always connect the "None" privacy system; the
static boolean was probably there to avoid
reconnecting twice in the same compose window,
but as the parent function is only called once
per compose, it's only a bug - as a static is
initialized once per application instance.
Also, don't uncheck Sign and Encrypt when
selecting None as privacy system; just ignore
them when sending/queuing.
Should fix bug #695
* src/filtering.c
Copy score when copying FilteringActions
Fix bug #674
* src/inc.c
Make Message -> Receive -> Cancel cancel
incorporation on all accounts. Fixes bug #693
if the recv dialog is visible, Cancel only
cancels the current account
* src/prefs_account.c
* src/prefs_account.h
Add account preference to queue message in a certain
folder.
Update Privacy checkbuttons status based
on the selected privacy system

ChangeLog.claws
PATCHSETS
configure.ac
src/account.c
src/compose.c
src/filtering.c
src/inc.c
src/prefs_account.c
src/prefs_account.h

index 65229f1..34f2c98 100644 (file)
@@ -1,3 +1,36 @@
+2005-04-12 [paul]      1.0.4cvs5
+       
+       backported from GTK2...
+
+       * src/account.c
+               Add account preference to queue message in a certain
+               folder.
+       * src/compose.c
+               Always connect the "None" privacy system; the
+               static boolean was probably there to avoid
+               reconnecting twice in the same compose window,
+               but as the parent function is only called once
+               per compose, it's only a bug - as a static is
+               initialized once per application instance.
+               Also, don't uncheck Sign and Encrypt when
+               selecting None as privacy system; just ignore
+               them when sending/queuing.
+               Should fix bug #695
+       * src/filtering.c
+               Copy score when copying FilteringActions
+               Fix bug #674
+       * src/inc.c
+               Make Message -> Receive -> Cancel cancel 
+               incorporation on all accounts. Fixes bug #693
+               if the recv dialog is visible, Cancel only
+               cancels the current account
+       * src/prefs_account.c
+       * src/prefs_account.h
+               Add account preference to queue message in a certain
+               folder.
+               Update Privacy checkbuttons status based
+               on the selected privacy system
+
 2005-04-06 [paul]      1.0.4cvs4
 
        * ChangeLog
index ff496a0..506cfe7 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.16 -r 1.17 src/common/socket.c; cvs diff -u -r 1.209 -r 1.210 src/imap.c; ) > 1.0.4cvs2.patchset
 ( cvs diff -u -r 1.88 -r 1.89 src/mh.c; ) > 1.0.4cvs3.patchset
 ( cvs diff -u -r 1.460 -r 1.461 ChangeLog; cvs diff -u -r 1.455 -r 1.456 ChangeLog.jp; cvs diff -u -r 1.20 -r 1.21 src/send_message.c; cvs diff -u -r 1.17 -r 1.18 src/common/socket.c; ) > 1.0.4cvs4.patchset
+( cvs diff -u -r 1.78 -r 1.79 src/account.c; cvs diff -u -r 1.482 -r 1.483 src/compose.c; cvs diff -u -r 1.72 -r 1.73 src/filtering.c; cvs diff -u -r 1.179 -r 1.180 src/inc.c; cvs diff -u -r 1.124 -r 1.125 src/prefs_account.c; cvs diff -u -r 1.57 -r 1.58 src/prefs_account.h; ) > 1.0.4cvs5.patchset
index 6d1084e..2a19f99 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=4
+EXTRA_VERSION=5
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index 10b6933..aac0696 100644 (file)
@@ -484,10 +484,16 @@ FolderItem *account_get_special_folder(PrefsAccount *ac_prefs,
                }
                break;
        case F_QUEUE:
-               if (ac_prefs->folder)
-                       item = FOLDER(ac_prefs->folder)->queue;
-               if (!item)
-                       item = folder_get_default_queue();
+               if (ac_prefs->set_queue_folder && ac_prefs->queue_folder) {
+                       item = folder_find_item_from_identifier
+                               (ac_prefs->queue_folder);
+               }
+               if (!item) {
+                       if (ac_prefs->folder)
+                               item = FOLDER(ac_prefs->folder)->queue;
+                       if (!item)
+                               item = folder_get_default_queue();
+               }
                break;
        case F_TRASH:
                if (ac_prefs->set_trash_folder && ac_prefs->trash_folder) {
index 66a90cf..4492481 100644 (file)
@@ -5056,11 +5056,7 @@ static void compose_set_privacy_system_cb(GtkWidget *widget, gpointer data)
 
        ifactory = gtk_item_factory_from_widget(compose->menubar);
        menu_set_sensitive(ifactory, "/Options/Sign", can_sign);
-       if (!can_sign)
-               menu_set_active(ifactory, "/Options/Sign", FALSE);
        menu_set_sensitive(ifactory, "/Options/Encrypt", can_encrypt);
-       if (!can_encrypt)
-               menu_set_active(ifactory, "/Options/Encrypt", FALSE);
 }
 
 static void compose_update_privacy_system_menu_item(Compose * compose)
@@ -5142,7 +5138,6 @@ void compose_update_actions_menu(Compose *compose)
 void compose_update_privacy_systems_menu(Compose *compose)
 {
        static gchar *branch_path = "/Options/Privacy System";
-       static gboolean connected = FALSE;
        GtkItemFactory *ifactory;
        GtkWidget *menuitem;
        GSList *systems, *cur;
@@ -5166,11 +5161,10 @@ void compose_update_privacy_systems_menu(Compose *compose)
 
        system_none = gtk_item_factory_get_widget(ifactory,
                "/Options/Privacy System/None");
-       if (!connected) {
-               gtk_signal_connect(GTK_OBJECT(system_none), "activate",
-                       GTK_SIGNAL_FUNC(compose_set_privacy_system_cb), compose);
-               connected = TRUE;
-       }
+
+       gtk_signal_connect(GTK_OBJECT(system_none), "activate",
+                          GTK_SIGNAL_FUNC(compose_set_privacy_system_cb),
+                          compose);
 
        systems = privacy_get_system_ids();
        for (cur = systems; cur != NULL; cur = g_slist_next(cur)) {
index f8b5957..43ffbec 100644 (file)
@@ -106,6 +106,7 @@ static FilteringAction * filteringaction_copy(FilteringAction * src)
        else 
                new->destination = NULL;
        new->labelcolor = src->labelcolor;
+       new->score = src->score;
 
         return new;
 }
index 99f1f89..797ec9c 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -501,6 +501,7 @@ static gint inc_start(IncProgressDialog *inc_dialog)
        FolderItem *processing, *inbox;
        MsgInfo *msginfo;
        GSList *msglist, *msglist_element;
+       gboolean cancelled = FALSE;
 
        qlist = inc_dialog->queue_list;
        while (qlist != NULL) {
@@ -548,7 +549,7 @@ static gint inc_start(IncProgressDialog *inc_dialog)
        gtk_clist_set_text(clist, inc_dialog->cur_row, 2, str);            \
 }
 
-       for (; inc_dialog->queue_list != NULL; inc_dialog->cur_row++) {
+       for (; inc_dialog->queue_list != NULL && !cancelled; inc_dialog->cur_row++) {
                session = inc_dialog->queue_list->data;
                pop3_session = POP3_SESSION(session->session);
 
@@ -605,6 +606,8 @@ static gint inc_start(IncProgressDialog *inc_dialog)
                        break;
                case INC_CANCEL:
                        SET_PIXMAP_AND_TEXT(okxpm, okxpmmask, _("Cancelled"));
+                       if (!inc_dialog->show_dialog)
+                               cancelled = TRUE;
                        break;
                default:
                        break;
index 7cbbe28..ca31596 100644 (file)
@@ -196,6 +196,8 @@ static struct Advanced {
 
        GtkWidget *sent_folder_chkbtn;
        GtkWidget *sent_folder_entry;
+       GtkWidget *queue_folder_chkbtn;
+       GtkWidget *queue_folder_entry;
        GtkWidget *draft_folder_chkbtn;
        GtkWidget *draft_folder_entry;
        GtkWidget *trash_folder_chkbtn;
@@ -286,7 +288,7 @@ static PrefParam param[] = {
        {"password", NULL, &tmp_ac_prefs.passwd, P_PASSWORD,
         &basic.pass_entry, prefs_set_data_from_entry, prefs_set_entry},
 
-       {"inbox", "inbox", &tmp_ac_prefs.inbox, P_STRING,
+       {"inbox", "#mh/Mailbox/inbox", &tmp_ac_prefs.inbox, P_STRING,
         &receive.inbox_entry, prefs_set_data_from_entry, prefs_set_entry},
 
        /* Receive */
@@ -514,6 +516,13 @@ static PrefParam param[] = {
         &advanced.sent_folder_entry,
         prefs_set_data_from_entry, prefs_set_entry},
 
+       {"set_queue_folder", "FALSE", &tmp_ac_prefs.set_queue_folder, P_BOOL,
+        &advanced.queue_folder_chkbtn,
+        prefs_set_data_from_toggle, prefs_set_toggle},
+       {"queue_folder", NULL, &tmp_ac_prefs.queue_folder, P_STRING,
+        &advanced.queue_folder_entry,
+        prefs_set_data_from_entry, prefs_set_entry},
+
        {"set_draft_folder", "FALSE", &tmp_ac_prefs.set_draft_folder, P_BOOL,
         &advanced.draft_folder_chkbtn,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -571,6 +580,20 @@ typedef struct AccountPage
 
 static AccountPage account_page;
 
+static void privacy_system_activated(GtkMenuItem *menuitem)
+{
+       const gchar* system_id;
+       gboolean privacy_enabled = FALSE;
+       
+       system_id = gtk_object_get_user_data(GTK_OBJECT(menuitem));
+       
+       privacy_enabled = strcmp(system_id, "");
+
+       gtk_widget_set_sensitive (privacy.default_encrypt_chkbtn, privacy_enabled);
+       gtk_widget_set_sensitive (privacy.default_sign_chkbtn, privacy_enabled);
+       gtk_widget_set_sensitive (privacy.save_clear_text_chkbtn, privacy_enabled);
+}
+
 void update_privacy_system_menu() {
        GtkWidget *menu;
        GtkWidget *menuitem;
@@ -583,6 +606,10 @@ void update_privacy_system_menu() {
        gtk_object_set_data(GTK_OBJECT(menuitem), "user_data", "");
        gtk_menu_append(GTK_MENU(menu), menuitem);
 
+       gtk_signal_connect(GTK_OBJECT(menuitem), "activate",
+                          GTK_SIGNAL_FUNC(privacy_system_activated),
+                          NULL);
+
        system_ids = privacy_get_system_ids();
        for (cur = system_ids; cur != NULL; cur = g_slist_next(cur)) {
                gchar *id = (gchar *) cur->data;
@@ -593,6 +620,10 @@ void update_privacy_system_menu() {
                gtk_widget_show(menuitem);
                gtk_object_set_data_full(GTK_OBJECT(menuitem), "user_data", id, g_free);
                gtk_menu_append(GTK_MENU(menu), menuitem);
+
+               gtk_signal_connect(GTK_OBJECT(menuitem), "activate",
+                                  GTK_SIGNAL_FUNC(privacy_system_activated),
+                                  NULL);
        }
 
        gtk_option_menu_set_menu(GTK_OPTION_MENU(privacy.default_privacy_system), menu);
@@ -2123,6 +2154,8 @@ static void prefs_account_advanced_create(void)
        GtkWidget *table;
        GtkWidget *sent_folder_chkbtn;
        GtkWidget *sent_folder_entry;
+       GtkWidget *queue_folder_chkbtn;
+       GtkWidget *queue_folder_entry;
        GtkWidget *draft_folder_chkbtn;
        GtkWidget *draft_folder_entry;
        GtkWidget *trash_folder_chkbtn;
@@ -2228,7 +2261,7 @@ static void prefs_account_advanced_create(void)
        gtk_container_add (GTK_CONTAINER (folder_frame), vbox3);
        gtk_container_set_border_width (GTK_CONTAINER (vbox3), 8);
 
-       table = gtk_table_new (3, 3, FALSE);
+       table = gtk_table_new (4, 3, FALSE);
        gtk_widget_show (table);
        gtk_container_add (GTK_CONTAINER (vbox3), table);
        gtk_table_set_row_spacings (GTK_TABLE (table), VSPACING_NARROW_2);
@@ -2264,10 +2297,12 @@ static void prefs_account_advanced_create(void)
 
        SET_CHECK_BTN_AND_ENTRY(_("Put sent messages in"),
                                sent_folder_chkbtn, sent_folder_entry, 0);
+       SET_CHECK_BTN_AND_ENTRY(_("Put queued messages in"),
+                               queue_folder_chkbtn, queue_folder_entry, 1);
        SET_CHECK_BTN_AND_ENTRY(_("Put draft messages in"),
-                               draft_folder_chkbtn, draft_folder_entry, 1);
+                               draft_folder_chkbtn, draft_folder_entry, 2);
        SET_CHECK_BTN_AND_ENTRY(_("Put deleted messages in"),
-                               trash_folder_chkbtn, trash_folder_entry, 2);
+                               trash_folder_chkbtn, trash_folder_entry, 3);
 
        advanced.smtpport_chkbtn        = checkbtn_smtpport;
        advanced.smtpport_entry         = entry_smtpport;
@@ -2292,6 +2327,8 @@ static void prefs_account_advanced_create(void)
 
        advanced.sent_folder_chkbtn  = sent_folder_chkbtn;
        advanced.sent_folder_entry   = sent_folder_entry;
+       advanced.queue_folder_chkbtn  = queue_folder_chkbtn;
+       advanced.queue_folder_entry   = queue_folder_entry;
        advanced.draft_folder_chkbtn = draft_folder_chkbtn;
        advanced.draft_folder_entry  = draft_folder_entry;
        advanced.trash_folder_chkbtn = trash_folder_chkbtn;
index 01130d0..30ff8ba 100644 (file)
@@ -163,6 +163,8 @@ struct _PrefsAccount
 
        gboolean set_sent_folder;
        gchar *sent_folder;
+       gboolean set_queue_folder;
+       gchar *queue_folder;
        gboolean set_draft_folder;
        gchar *draft_folder;
        gboolean set_trash_folder;