From: Colin Leroy Date: Sat, 21 Aug 2004 13:23:25 +0000 (+0000) Subject: 2004-08-21 [colin] 0.9.12cvs70.1 X-Git-Tag: gtk2_win32_last_merge~212 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=6f01a603df213afbca31ec32e8005aa682f4ab31 2004-08-21 [colin] 0.9.12cvs70.1 * src/compose.c * src/mainwindow.c Sync with HEAD 0.9.12cvs70 --- diff --git a/ChangeLog-gtk2.claws b/ChangeLog-gtk2.claws index 3dde2d289..2e8d8218d 100644 --- a/ChangeLog-gtk2.claws +++ b/ChangeLog-gtk2.claws @@ -1,3 +1,10 @@ +2004-08-21 [colin] 0.9.12cvs70.1 + + * src/compose.c + * src/mainwindow.c + Sync with HEAD 0.9.12cvs70 + + 2004-08-21 [paul] 0.9.12cvs66.4 * src/mainwindow.c diff --git a/ChangeLog.claws b/ChangeLog.claws index c3d863fd1..67633d301 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,39 @@ +2004-08-21 [colin] 0.9.12cvs70 + + * src/compose.c + When using inline encryption, don't use QP or Base64: + the mail will be encrypted to a 7bit string. + Fixes bug 197 + +2004-08-21 [colin] 0.9.12cvs69 + + * src/compose.c + Fix inline-signing with 8bit chars: data must be + converted to Quoted-printable before signing. + +2004-08-21 [colin] 0.9.12cvs68 + + * src/compose.c + Remove 'Message/Save to draft folder' + and 'Message/Save and keep editing' to + put a single 'File/Save' command. + Fixes bug 224 + +2004-08-21 [colin] 0.9.12cvs67 + + * src/mainwindow.c + Fix bug 222 (Summary view state not retained between sessions) + +2004-08-20 [colin] 0.9.12cvs66 + + * src/codeconv.c + Fix bug 574 (empty cur_locale is not enough) + +2004-08-20 [paul] + + * src/plugins/pgpmime/plugin.c + modify PGP/MIME plugin's description + 2004-08-16 [colin] 0.9.12cvs65 * src/common/ssl.c diff --git a/PATCHSETS b/PATCHSETS index 6a6f5549e..7e581afa3 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -125,3 +125,4 @@ ( cvs diff -u -r 1.105.2.7 -r 1.105.2.8 src/prefs_account.c; ) > 0.9.12cvs66.2.patchset ( 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 diff --git a/configure.ac b/configure.ac index ce432a414..5e36b0608 100644 --- a/configure.ac +++ b/configure.ac @@ -11,9 +11,9 @@ MINOR_VERSION=9 MICRO_VERSION=12 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=66 +EXTRA_VERSION=70 EXTRA_RELEASE= -EXTRA_GTK2_VERSION=.4 +EXTRA_GTK2_VERSION=.1 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION} diff --git a/src/compose.c b/src/compose.c index 7af02f18c..9f807f887 100644 --- a/src/compose.c +++ b/src/compose.c @@ -513,6 +513,9 @@ static GtkItemFactoryEntry compose_popup_entries[] = static GtkItemFactoryEntry compose_entries[] = { {N_("/_File"), NULL, NULL, 0, ""}, + {N_("/_File/_Save"), + "S", compose_draft_cb, 1, NULL}, + {N_("/_File/---"), NULL, NULL, 0, ""}, {N_("/_File/_Attach file"), "M", compose_attach_cb, 0, NULL}, {N_("/_File/_Insert file"), "I", compose_insert_file_cb, 0, NULL}, {N_("/_File/Insert si_gnature"), "G", compose_insert_sig_cb, 0, NULL}, @@ -646,11 +649,6 @@ static GtkItemFactoryEntry compose_entries[] = compose_send_cb, 0, NULL}, {N_("/_Message/Send _later"), "S", compose_send_later_cb, 0, NULL}, - {N_("/_Message/---"), NULL, NULL, 0, ""}, - {N_("/_Message/Save to _draft folder"), - "D", compose_draft_cb, 0, NULL}, - {N_("/_Message/Save and _keep editing"), - "S", compose_draft_cb, 1, NULL}, #if 0 /* NEW COMPOSE GUI */ {N_("/_Message/---"), NULL, NULL, 0, ""}, {N_("/_Message/_To"), NULL, compose_toggle_to_cb , 0, ""}, @@ -1378,12 +1376,11 @@ Compose *compose_redirect(PrefsAccount *account, MsgInfo *msginfo) menu_set_sensitive(ifactory, "/Property...", FALSE); ifactory = gtk_item_factory_from_widget(compose->menubar); + menu_set_sensitive(ifactory, "/File/Save", FALSE); menu_set_sensitive(ifactory, "/File/Insert file", FALSE); menu_set_sensitive(ifactory, "/File/Attach file", FALSE); menu_set_sensitive(ifactory, "/File/Insert signature", FALSE); menu_set_sensitive(ifactory, "/Edit", FALSE); - menu_set_sensitive(ifactory, "/Message/Save to draft folder", FALSE); - menu_set_sensitive(ifactory, "/Message/Save and keep editing", FALSE); #if USE_GPGME menu_set_sensitive(ifactory, "/Message/Sign", FALSE); menu_set_sensitive(ifactory, "/Message/Encrypt", FALSE); @@ -3693,6 +3690,7 @@ static gint compose_write_to_file(Compose *compose, const gchar *file, gchar *canon_buf; const gchar *out_codeset; EncodingType encoding; + gboolean already_encoded = FALSE; if ((fp = fopen(file, "wb")) == NULL) { FILE_OP_ERROR(file, "fopen"); @@ -3736,6 +3734,9 @@ static gint compose_write_to_file(Compose *compose, const gchar *file, compose->use_signing && !compose->gnupg_mode && encoding == ENC_8BIT) encoding = ENC_BASE64; + + if (compose->use_encryption && compose->gnupg_mode) + encoding = ENC_8BIT; /* this will be encrypted to a 7bit string */ #endif src_codeset = CS_UTF_8; @@ -3777,6 +3778,17 @@ static gint compose_write_to_file(Compose *compose, const gchar *file, #if USE_GPGME if (!is_draft && compose->use_signing && compose->gnupg_mode) { + gchar *outbuf; + + if (encoding == ENC_QUOTED_PRINTABLE) { + outbuf = g_malloc(strlen(buf) * 4); + qp_encode_line(outbuf, buf); + g_free(buf); + buf = g_strdup(outbuf); + already_encoded = TRUE; + g_free(outbuf); + } + if (compose_clearsign_text(compose, &buf) < 0) { g_warning("clearsign failed\n"); fclose(fp); @@ -3833,10 +3845,14 @@ static gint compose_write_to_file(Compose *compose, const gchar *file, } else if (encoding == ENC_QUOTED_PRINTABLE) { gchar *outbuf; size_t outlen; - - outbuf = g_malloc(len * 4); - qp_encode_line(outbuf, buf); - outlen = strlen(outbuf); + if (!already_encoded) { + outbuf = g_malloc(len * 4); + qp_encode_line(outbuf, buf); + outlen = strlen(outbuf); + } else { + outbuf = g_strdup(buf); + outlen = len; + } if (fwrite(outbuf, sizeof(gchar), outlen, fp) != outlen) { FILE_OP_ERROR(file, "fwrite"); fclose(fp); @@ -6355,8 +6371,6 @@ static void compose_set_ext_editor_sensitive(Compose *compose, menu_set_sensitive(ifactory, "/Message/Send", sensitive); menu_set_sensitive(ifactory, "/Message/Send later", sensitive); - menu_set_sensitive(ifactory, "/Message/Save to draft folder", - sensitive); menu_set_sensitive(ifactory, "/File/Insert file", sensitive); menu_set_sensitive(ifactory, "/File/Insert signature", sensitive); menu_set_sensitive(ifactory, "/Edit/Wrap current paragraph", sensitive); diff --git a/src/mainwindow.c b/src/mainwindow.c index bae439f14..7c65d6cd6 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -801,6 +801,7 @@ MainWindow *main_window_create(SeparateType type) GtkWidget *menuitem; gint i; guint n_menu_entries; + gboolean hide_messageview = FALSE; static GdkGeometry geometry; @@ -996,7 +997,8 @@ MainWindow *main_window_create(SeparateType type) debug_print("done.\n"); messageview->visible = prefs_common.msgview_visible; - + hide_messageview = !messageview->visible; + main_window_set_widgets(mainwin, type); g_signal_connect(G_OBJECT(window), "size_allocate", @@ -1092,6 +1094,9 @@ MainWindow *main_window_create(SeparateType type) if (prefs_common.work_offline) online_switch_clicked (GTK_BUTTON(online_switch), mainwin); + if (mainwin->type == SEPARATE_NONE && hide_messageview) + main_window_toggle_message_view(mainwin); + return mainwin; }