2004-08-21 [colin] 0.9.12cvs74.1
authorColin Leroy <colin@colino.net>
Sat, 21 Aug 2004 16:13:55 +0000 (16:13 +0000)
committerColin Leroy <colin@colino.net>
Sat, 21 Aug 2004 16:13:55 +0000 (16:13 +0000)
* ChangeLog.claws
* src/compose.c
* src/summaryview.c
* src/toolbar.c
Sync with HEAD

ChangeLog-gtk2.claws
ChangeLog.claws
PATCHSETS
configure.ac
src/compose.c
src/summaryview.c
src/toolbar.c

index 2e8d8218de9ddb9b7dec2387edb9c0459ef70656..6f2a24f29341a5c79c883515608537d3e16dd9a8 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-21 [colin]     0.9.12cvs74.1
+
+       * ChangeLog.claws
+       * src/compose.c
+       * src/summaryview.c
+       * src/toolbar.c
+               Sync with HEAD
+
 2004-08-21 [colin]     0.9.12cvs70.1
 
        * src/compose.c
index 67633d301d912d628786873e36e3e9152925e582..daefdd0ddecc0297694454378d51c74c56d9c3fb 100644 (file)
@@ -1,3 +1,27 @@
+2004-08-21 [colin]     0.9.12cvs74
+
+       * src/compose.c
+               Fix bug 576 (Duplicate auto-bcc on reedit)
+
+2004-08-21 [colin]     0.9.12cvs73
+
+       * src/toolbar.c
+               Grey out Redirect in the toolbar when selection is
+               multiple. Fixes bug 520
+
+2004-08-21 [colin]     0.9.12cvs72
+
+       * src/compose.c
+               Save Sign, Encrypt and Mode status when drafting or queuing
+               Fixes bug 502 (drafted message does not keep sign / encrypt 
+               state)
+
+2004-08-21 [colin]     0.9.12cvs71
+
+       * src/summaryview.c
+               Fix bug 494 (Messages are always opened in summary 
+               view when right clicked.) Also fixes bug 508.
+
 2004-08-21 [colin]     0.9.12cvs70
 
        * src/compose.c
index 7e581afa367584c7c8204dd31e738ba08fa29c21..531fe9366087a306ed129ebf51781c8c3d3c9f19 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.40 -r 1.382.2.41 src/compose.c; cvs diff -u -r 1.65.2.11 -r 1.65.2.12 src/codeconv.c; ) > 0.9.12cvs66.3.patchset
 ( cvs diff -u -r 1.274.2.17 -r 1.274.2.18 src/mainwindow.c; cvs diff -u -r 1.94.2.29 -r 1.94.2.30 src/messageview.c; cvs diff -u -r 1.5.2.9 -r 1.5.2.10 src/gtk/menu.c; cvs diff -u -r 1.23.2.4 -r 1.23.2.5 src/plugins/spamassassin/spamassassin_gtk.c; ) > 0.9.12cvs66.4.patchset
 ( cvs diff -u -r 1.2504.2.14 -r 1.2504.2.15 ChangeLog.claws; cvs diff -u -r 1.382.2.41 -r 1.382.2.42 src/compose.c; cvs diff -u -r 1.274.2.18 -r 1.274.2.19 src/mainwindow.c; ) > 0.9.12cvs70.1.patchset
+( cvs diff -u -r 1.2504.2.15 -r 1.2504.2.16 ChangeLog.claws; cvs diff -u -r 1.382.2.42 -r 1.382.2.43 src/compose.c; cvs diff -u -r 1.395.2.27 -r 1.395.2.28 src/summaryview.c; cvs diff -u -r 1.43.2.8 -r 1.43.2.9 src/toolbar.c; ) > 0.9.12cvs74.1.patchset
index 5e36b0608f947d61bc6bdd3236475295d83d8295..1b078146ab1c984acec8b1cf3eb0a94f24cee676 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=70
+EXTRA_VERSION=74
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=.1
 
index 9f807f887e6184f024a885d70e624773f32d4f63..20ddcc3d699ee3a61f2d7f12b161df50badee57d 100644 (file)
@@ -422,6 +422,8 @@ static void compose_set_gnupg_mode_cb       (gpointer        data,
 static void compose_update_gnupg_mode_menu_item(Compose * compose);
 static void activate_gnupg_mode        (Compose *compose, 
                                         PrefsAccount *account);
+static void compose_use_signing(Compose *compose, gboolean use_signing);
+static void compose_use_encryption(Compose *compose, gboolean use_encryption);
 #endif
 static void compose_toggle_return_receipt_cb(gpointer data, guint action,
                                             GtkWidget *widget);
@@ -1227,34 +1229,62 @@ void compose_reedit(MsgInfo *msginfo)
        GtkTextIter iter;
        FILE *fp;
        gchar buf[BUFFSIZE];
+#ifdef USE_GPGME
+       gboolean use_signing = FALSE;
+       gboolean use_encryption = FALSE;
+       gboolean gnupg_mode = FALSE;
+#endif
 
        g_return_if_fail(msginfo != NULL);
        g_return_if_fail(msginfo->folder != NULL);
 
         if (msginfo->folder->stype == F_QUEUE || msginfo->folder->stype == F_DRAFT) {
                gchar queueheader_buf[BUFFSIZE];
-               gint id;
+               gint id, param;
 
                /* Select Account from queue headers */
                if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
                                             sizeof(queueheader_buf), "X-Sylpheed-Account-Id:")) {
-                       id = atoi(&queueheader_buf[22]);
+                       id = atoi(&queueheader_buf[strlen("X-Sylpheed-Account-Id:")]);
                        account = account_find_from_id(id);
                }
                if (!account && !procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
                                             sizeof(queueheader_buf), "NAID:")) {
-                       id = atoi(&queueheader_buf[5]);
+                       id = atoi(&queueheader_buf[strlen("NAID:")]);
                        account = account_find_from_id(id);
                }
                if (!account && !procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
                                                    sizeof(queueheader_buf), "MAID:")) {
-                       id = atoi(&queueheader_buf[5]);
+                       id = atoi(&queueheader_buf[strlen("MAID:")]);
                        account = account_find_from_id(id);
                }
                if (!account && !procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
                                                                sizeof(queueheader_buf), "S:")) {
                        account = account_find_from_address(queueheader_buf);
                }
+#ifdef USE_GPGME               
+               if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
+                                            sizeof(queueheader_buf), "X-Sylpheed-Sign:")) {
+                       param = atoi(&queueheader_buf[strlen("X-Sylpheed-Sign:")]);
+                       use_signing = param;
+                       
+               }
+               if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
+                                            sizeof(queueheader_buf), "X-Sylpheed-Encrypt:")) {
+                       param = atoi(&queueheader_buf[strlen("X-Sylpheed-Encrypt:")]);
+                       use_encryption = param;
+               }
+               if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
+                                            sizeof(queueheader_buf), "X-Sylpheed-Gnupg-Mode:")) {
+                       param = atoi(&queueheader_buf[strlen("X-Sylpheed-Gnupg-Mode:")]);
+                       gnupg_mode = param;
+               }
+#endif         
+               if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
+                                            sizeof(queueheader_buf), "X-Priority: ")) {
+                       param = atoi(&queueheader_buf[strlen("X-Priority: ")]); /* mind the space */
+                       compose->priority = param;
+               }
        } else 
                account = msginfo->folder->folder->account;
 
@@ -1269,6 +1299,11 @@ void compose_reedit(MsgInfo *msginfo)
        g_return_if_fail(account != NULL);
 
        compose = compose_create(account, COMPOSE_REEDIT);
+#ifdef USE_GPGME
+       compose->gnupg_mode = gnupg_mode;
+       compose_use_signing(compose, use_signing);
+       compose_use_encryption(compose, use_encryption);
+#endif
        compose->targetinfo = procmsg_msginfo_copy(msginfo);
 
         if (msginfo->folder->stype == F_QUEUE
@@ -2274,6 +2309,21 @@ static void compose_use_signing(Compose *compose, gboolean use_signing)
                                       use_signing);
        compose_update_gnupg_mode_menu_item(compose);
 }
+
+static void compose_use_encryption(Compose *compose, gboolean use_encryption)
+{
+       GtkItemFactory *ifactory;
+       GtkWidget *menuitem = NULL;
+
+       compose->use_encryption = use_encryption;
+       ifactory = gtk_item_factory_from_widget(compose->menubar);
+       menuitem = gtk_item_factory_get_item
+               (ifactory, "/Message/Encrypt");
+
+       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), 
+                                      use_encryption);
+       compose_update_gnupg_mode_menu_item(compose);
+}
 #endif /* USE_GPGME */
 
 #define NEXT_PART_NOT_CHILD(info)  \
@@ -4147,6 +4197,12 @@ static gint compose_queue_sub(Compose *compose, gint *msgnum, FolderItem **item,
        if (newsac) {
                fprintf(fp, "NAID:%d\n", newsac->account_id);
        }
+#ifdef USE_GPGME
+       fprintf(fp, "X-Sylpheed-Sign:%d\n", compose->use_signing);
+       fprintf(fp, "X-Sylpheed-Encrypt:%d\n", compose->use_encryption);
+       fprintf(fp, "X-Sylpheed-Gnupg-Mode:%d\n", compose->gnupg_mode);
+#endif
+
        /* Save copy folder */
        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(compose->savemsg_checkbtn))) {
                gchar *savefolderid;
@@ -4418,6 +4474,11 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
                        fprintf(fp, "SCF:%s\n", savefolderid);
                        g_free(savefolderid);
                }
+#ifdef USE_GPGME
+               fprintf(fp, "X-Sylpheed-Sign:%d\n", compose->use_signing);
+               fprintf(fp, "X-Sylpheed-Encrypt:%d\n", compose->use_encryption);
+               fprintf(fp, "X-Sylpheed-Gnupg-Mode:%d\n", compose->gnupg_mode);
+#endif
                fprintf(fp, "\n");
        }
 
@@ -5488,7 +5549,7 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
        if (account->set_autocc && account->auto_cc && mode != COMPOSE_REEDIT)
                compose_entry_append(compose, account->auto_cc, COMPOSE_CC);
 
-       if (account->set_autobcc) 
+       if (account->set_autobcc && account->auto_bcc && mode != COMPOSE_REEDIT
                compose_entry_append(compose, account->auto_bcc, COMPOSE_BCC);
        
        if (account->set_autoreplyto && account->auto_replyto && mode != COMPOSE_REEDIT)
index ab686a03d3d131730fac3fd70602db0359ea1eed..1fe32b6ddc2594ce752e7a359c5d85b24cecedf2 100644 (file)
@@ -4287,12 +4287,12 @@ static gboolean summary_button_pressed(GtkWidget *ctree, GdkEventButton *event,
        if (!event) return FALSE;
 
        if (event->button == 3) {
-               summaryview->display_msg = TRUE;
+               summaryview->display_msg = messageview_is_visible(summaryview->messageview);
                /* right clicked */
                gtk_menu_popup(GTK_MENU(summaryview->popupmenu), NULL, NULL,
                               NULL, NULL, event->button, event->time);
        } else if (event->button == 2) {
-               summaryview->display_msg = TRUE;
+               summaryview->display_msg = messageview_is_visible(summaryview->messageview);
        } else if (event->button == 1) {
                if (!prefs_common.emulate_emacs &&
                    messageview_is_visible(summaryview->messageview))
index 429c5b74f61bd37571f682d395f439e5b795bf08..85269b3208e1973cbcab021b442901264d637b13 100644 (file)
@@ -1683,6 +1683,10 @@ void toolbar_main_set_sensitive(gpointer data)
        if (toolbar->fwd_btn)
                SET_WIDGET_COND(GTK_WIDGET_PTR(toolbar->fwd_combo),
                        M_HAVE_ACCOUNT|M_TARGET_EXIST); 
+       if (toolbar->fwd_combo) {
+               GtkWidget *submenu = gtk_item_factory_get_widget(toolbar->fwd_combo->factory, _("/Redirect"));
+               SET_WIDGET_COND(submenu, M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST); 
+       }
 
        if (prefs_common.next_unread_msg_dialog == NEXTUNREADMSGDIALOG_ASSUME_NO) {
                SET_WIDGET_COND(toolbar->next_btn, M_MSG_EXIST);