fix segfault on Re-edit
authorPaul Mangan <paul@claws-mail.org>
Fri, 31 Aug 2001 09:22:09 +0000 (09:22 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 31 Aug 2001 09:22:09 +0000 (09:22 +0000)
ChangeLog.claws
src/compose.c
src/summaryview.c

index a8bba4fc113ffa54ad00b285bd8b8e64af10da49..24929fb3a9de48da28db0898340e5859d059e42b 100644 (file)
@@ -11,6 +11,9 @@
        * po/POTFILES.in
                add 'src/prefs_templates.c'
 
+       * src/compose.c, src/summaryview.c
+               fix segfault on 'Re_edit'               
+
 2001-08-30 [alfons]
 
        * configure.in, Makefile.am
index e0cfea7218893e4b1fee00b01406f15e04d361d5..2e09465ca7a740217d9c345af9f77174c7654d52 100644 (file)
@@ -1080,6 +1080,8 @@ void compose_reedit(MsgInfo *msginfo)
        g_return_if_fail(msginfo != NULL);
        g_return_if_fail(msginfo->folder != NULL);
 
+        account = msginfo->folder->folder->account;
+
         if(!account&& prefs_common.reedit_account_autosel) {
                        gchar from[BUFFSIZE];
                if(!get_header_from_msginfo(msginfo,from,sizeof(from),"FROM:")){ /* Found a FROM header */
index 81b6faa6249a3acf0472c3a7cc408eedf74f4a91..e73fa76cbf138f75e4c7f10e7f76af276bcab37f 100644 (file)
@@ -760,7 +760,8 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item,
        STATUSBAR_POP(summaryview->mainwin);
 
        is_refresh = (!prefs_common.open_inbox_on_inc &&
-                     item == summaryview->folder_item) ? TRUE : FALSE;
+                     item == summaryview->folder_item &&
+                     update_cache == FALSE) ? TRUE : FALSE;
        if (is_refresh) {
                selected_msgnum = summary_get_msgnum(summaryview,
                                                     summaryview->selected);
@@ -3859,7 +3860,9 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
 
 static void summary_open_row(GtkSCTree *sctree, SummaryView *summaryview)
 {
-       if (summaryview->folder_item->stype == F_DRAFT)
+       if (summaryview->folder_item->stype == F_DRAFT  ||
+           summaryview->folder_item->stype == F_OUTBOX ||
+            summaryview->folder_item->stype == F_QUEUE)
                summary_reedit(summaryview);
        else
                summary_open_msg(summaryview);