2008-08-13 [colin] 3.5.0cvs58
authorColin Leroy <colin@colino.net>
Wed, 13 Aug 2008 16:03:12 +0000 (16:03 +0000)
committerColin Leroy <colin@colino.net>
Wed, 13 Aug 2008 16:03:12 +0000 (16:03 +0000)
* src/messageview.c
* src/messageview.h
* src/mimeview.c
Fix bug 1696, 'Viewing binary attachements
as text over 1 MB' (various buglets)

src/messageview.c
src/messageview.h
src/mimeview.c

index 28dcf7e..55d2a4f 100644 (file)
@@ -1672,8 +1672,10 @@ static void messageview_show_partial_display_cb(NoticeView *noticeview, MessageV
 {
        messageview->show_full_text = TRUE;
        main_window_cursor_wait(mainwindow_get_mainwindow());
+       noticeview_hide(messageview->noticeview);
+       messageview->partial_display_shown = FALSE;
        GTK_EVENTS_FLUSH();
-       messageview_show(messageview, messageview->msginfo, messageview->all_headers);
+       mimeview_handle_cmd(messageview->mimeview, "sc://display_as_text", NULL, NULL);
        main_window_cursor_normal(mainwindow_get_mainwindow());
 }
 
@@ -1689,6 +1691,7 @@ void messageview_show_partial_display(MessageView *messageview, MsgInfo *msginfo
                                             G_CALLBACK(messageview_show_partial_display_cb),
                                             (gpointer) messageview);
        noticeview_show(messageview->noticeview);
+       messageview->partial_display_shown = TRUE;
 }
 
 static void return_receipt_show(NoticeView *noticeview, MsgInfo *msginfo)
index 1005867..96e31a7 100644 (file)
@@ -76,6 +76,7 @@ struct _MessageView
        gboolean deferred_destroy;
        
        gboolean show_full_text;
+       gboolean partial_display_shown;
        GtkUIManager *ui_manager;
 };
 
index 04246b1..5fd54f7 100644 (file)
@@ -744,6 +744,11 @@ gboolean mimeview_show_part(MimeView *mimeview, MimeInfo *partinfo)
 {
        MimeViewer *viewer;
        
+       if (mimeview->messageview->partial_display_shown) {
+               noticeview_hide(mimeview->messageview->noticeview);
+               mimeview->messageview->partial_display_shown = FALSE;
+       }
+
        viewer = get_viewer_for_mimeinfo(mimeview, partinfo);
        if (viewer == NULL) {
                if (mimeview->mimeviewer != NULL)