From cbc8811e8fe7907db2142a54e0fa5d85f9c6740d Mon Sep 17 00:00:00 2001 From: Alfons Hoogervorst Date: Sun, 21 Jul 2002 19:03:10 +0000 Subject: [PATCH] o fix bug notice view being displayed when going to empty folder (noticed by Christoph) o allow RRR to be sent when restarting sylpheed, or changing folder (noticed by Thorsten) --- ChangeLog.claws | 10 +++++++++- configure.in | 2 +- src/messageview.c | 26 ++++++++++++++++++++------ src/noticeview.c | 5 +++++ src/noticeview.h | 1 + 5 files changed, 36 insertions(+), 8 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 1a82037fe..83ad1ff7d 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,10 +1,18 @@ +2002-07-21 [alfons] 0.7.8claws90 + + * src/messageview.c + * src/noticeview.[ch] + o fix bug notice view being displayed when going to empty folder + (noticed by Christoph) + o allow RRR to be sent when restarting sylpheed, or changing folder + (noticed by Thorsten) + 2002-07-21 [thorsten] 0.7.8claws89 * src/mimeview.c Included save_all patch from Xaview FACQ added support for pathnames - 2002-07-21 [alfons] 0.7.8claws88 * po/POTFILES.in diff --git a/configure.in b/configure.in index 258060437..874d96ac4 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ MINOR_VERSION=7 MICRO_VERSION=8 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws89 +EXTRA_VERSION=claws90 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/messageview.c b/src/messageview.c index 9b55234ec..8c81c71c8 100644 --- a/src/messageview.c +++ b/src/messageview.c @@ -290,11 +290,9 @@ static gint disposition_notification_send(MsgInfo * msginfo) gchar * to; if ((!msginfo->returnreceiptto) && - (!msginfo->dispositionnotificationto)) + (!msginfo->dispositionnotificationto)) return -1; - procmsg_msginfo_unset_flags(msginfo, MSG_RETRCPT_PENDING, 0); - /* write to temporary file */ g_snprintf(tmp, sizeof(tmp), "%s%ctmpmsg%d", get_rc_dir(), G_DIR_SEPARATOR, (gint)msginfo); @@ -334,7 +332,6 @@ static gint disposition_notification_send(MsgInfo * msginfo) notification_convert_header(buf, sizeof(buf), msginfo->subject, strlen("Subject: ")); fprintf(fp, "Subject: Disposition notification: %s\n", buf); - debug_print("HEADER: Subject Disposition notification: %s\n", buf); if (fclose(fp) == EOF) { FILE_OP_ERROR(tmp, "fclose"); @@ -390,7 +387,7 @@ void messageview_show(MessageView *messageview, MsgInfo *msginfo, file = procmsg_get_message_file_path(msginfo); if (!file) { - g_warning("can't get message file path.\n"); + g_warning(_("can't get message file path.\n")); procmime_mimeinfo_free(mimeinfo); return; } @@ -460,6 +457,7 @@ void messageview_clear(MessageView *messageview) headerview_clear(messageview->headerview); textview_clear(messageview->textview); imageview_clear(messageview->imageview); + noticeview_hide(messageview->noticeview); } void messageview_destroy(MessageView *messageview) @@ -472,6 +470,7 @@ void messageview_destroy(MessageView *messageview) textview_destroy(messageview->textview); imageview_destroy(messageview->imageview); mimeview_destroy(messageview->mimeview); + noticeview_destroy(messageview->noticeview); g_free(messageview); @@ -620,8 +619,23 @@ static void return_receipt_show(NoticeView *noticeview, MsgInfo *msginfo) static void return_receipt_send_clicked(NoticeView *noticeview, MsgInfo *msginfo) { - if (disposition_notification_send(msginfo) >= 0) + MsgInfo *tmpmsginfo; + gchar *file; + + file = procmsg_get_message_file_path(msginfo); + if (!file) { + g_warning(_("can't get message file path.\n")); + return; + } + + tmpmsginfo = procheader_parse_file(file, msginfo->flags, TRUE, TRUE); + if (disposition_notification_send(tmpmsginfo) >= 0) { + procmsg_msginfo_unset_flags(msginfo, MSG_RETRCPT_PENDING, 0); noticeview_hide(noticeview); + } + + procmsg_msginfo_free(tmpmsginfo); + g_free(file); } diff --git a/src/noticeview.c b/src/noticeview.c index 76cc6b9f7..0e36e1319 100644 --- a/src/noticeview.c +++ b/src/noticeview.c @@ -103,6 +103,11 @@ NoticeView *noticeview_create(void) return noticeview; } +void noticeview_destroy(NoticeView *noticeview) +{ + g_free(noticeview); +} + gboolean noticeview_is_visible(NoticeView *noticeview) { return noticeview->visible; diff --git a/src/noticeview.h b/src/noticeview.h index 0dde29422..b64449d67 100644 --- a/src/noticeview.h +++ b/src/noticeview.h @@ -36,6 +36,7 @@ struct _NoticeView }; NoticeView *noticeview_create (void); +void noticeview_destroy (NoticeView *noticeview); void noticeview_init (NoticeView *noticeview); void noticeview_set_icon (NoticeView *noticeview, GtkWidget *icon); -- 2.25.1