msgview stays open if msgs are deleted
authorOliver Haertel <o.h.a@gmx.net>
Fri, 29 Nov 2002 16:55:03 +0000 (16:55 +0000)
committerOliver Haertel <o.h.a@gmx.net>
Fri, 29 Nov 2002 16:55:03 +0000 (16:55 +0000)
ChangeLog.claws
configure.in
src/toolbar.c

index a71db9d0b7c20a76f21d4617e808b7513e367128..6f36979dcd75e16f8109fdd41a9b8fd180c87eb2 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-29 [oliver]    0.8.6claws38
+
+       * src/toolbar.c 
+               remove not needed variables and includes
+               make messageview stay opened and move to next when msgs are deleted 
+
 2002-11-29 [oliver]    0.8.6claws37
        
        * src/toolbar.c 
index fc69c00a4c8a93365da09731c3b4cc37bb262da4..aa2c16c480d814d4497aa0a7ff7d81206b244d51 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws37
+EXTRA_VERSION=claws38
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 49d06fb85086212b5bbbe2ce3adb807262bff1b3..be2a3a602b2a6eafd537cfd91f664b167f7ab3ba 100644 (file)
@@ -40,7 +40,6 @@
 #include "xml.h"
 #include "mgutils.h"
 #include "prefs.h"
-#include "folder.h"
 #include "codeconv.h"
 #include "stock_pixmap.h"
 #include "mainwindow.h"
@@ -660,27 +659,29 @@ void common_toolbar_delete_cb(GtkWidget     *widget,
        ToolbarParent *parent = (ToolbarParent*)data;
        MainWindow *mainwin;
        MessageView *msgview;
-       GList *cur;
-       GtkCTreeNode *sel_last = NULL;
-       GtkCTreeNode *node;
-       MsgInfo *msginfo;
-       SummaryView *summaryview;
 
        g_return_if_fail(parent != NULL);
        
        switch (parent->type) {
        case TOOLBAR_MSGVIEW:
                msgview = (MessageView*)parent->data;
-               summaryview = msgview->mainwin->summaryview;
-               summary_delete(summaryview);    
+               summary_delete(msgview->mainwin->summaryview);  
                /* do we really want to close the widget ? 
                   I`d rather have it staying open and moving to next msg 
-                  in summaryview ... - oha
-               */
-               toolbar_clear_list(TOOLBAR_MSGVIEW);
-               TOOLBAR_DESTROY_ITEMS(msgview->toolbar->item_list);     
-               TOOLBAR_DESTROY_ACTIONS(msgview->toolbar->action_list);
-               gtk_widget_destroy(msgview->window);
+                  in summaryview ... - oha */
+               /* following code is already used somewhere else, perhaps wrap it in a function ? */
+               if (msgview->mainwin->summaryview->selected) {
+                       GtkCTree *ctree = GTK_CTREE(msgview->mainwin->summaryview->ctree);
+                       MsgInfo * msginfo = gtk_ctree_node_get_row_data(ctree, 
+                                                                       msgview->mainwin->summaryview->selected);
+                       messageview_show(msgview, msginfo, 
+                                        msgview->all_headers);
+               } else {
+                       toolbar_clear_list(TOOLBAR_MSGVIEW);
+                       TOOLBAR_DESTROY_ITEMS(msgview->toolbar->item_list);     
+                       TOOLBAR_DESTROY_ACTIONS(msgview->toolbar->action_list);
+                       gtk_widget_destroy(msgview->window);
+               }
                break;
         case TOOLBAR_MAIN:
                mainwin = (MainWindow*)parent->data;