sync with 0.8.2cvs8
[claws.git] / src / summaryview.c
index 98c22d34081ee1141aeaf3185450fe0d27b5281f..7d590c120613c4647c039a63fd22736c8de9cccd 100644 (file)
@@ -4456,6 +4456,8 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
 {
        GtkCTree *ctree = GTK_CTREE(widget);
        GtkCTreeNode *node;
 {
        GtkCTree *ctree = GTK_CTREE(widget);
        GtkCTreeNode *node;
+       MessageView *messageview;
+       TextView *textview;
 
        if (summary_is_locked(summaryview)) return;
        if (!event) return;
 
        if (summary_is_locked(summaryview)) return;
        if (!event) return;
@@ -4477,6 +4479,14 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                        return;
        }
 
                        return;
        }
 
+       messageview = summaryview->messageview;
+       if (messageview->type == MVIEW_MIME &&
+           gtk_notebook_get_current_page
+               (GTK_NOTEBOOK(messageview->mimeview->notebook)) == 1)
+               textview = messageview->mimeview->textview;
+       else
+               textview = messageview->textview;
+
        switch (event->keyval) {
        case GDK_space:         /* Page down or go to the next */
                if (summaryview->displayed != summaryview->selected) {
        switch (event->keyval) {
        case GDK_space:         /* Page down or go to the next */
                if (summaryview->displayed != summaryview->selected) {
@@ -4484,12 +4494,11 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                            summaryview->selected);
                        break;
                }
                                            summaryview->selected);
                        break;
                }
-               if (!textview_scroll_page(summaryview->messageview->textview,
-                                         FALSE))
+               if (!textview_scroll_page(textview, FALSE))
                        summary_select_next_unread(summaryview);
                break;
        case GDK_BackSpace:     /* Page up */
                        summary_select_next_unread(summaryview);
                break;
        case GDK_BackSpace:     /* Page up */
-               textview_scroll_page(summaryview->messageview->textview, TRUE);
+               textview_scroll_page(textview, TRUE);
                break;
        case GDK_Return:        /* Scroll up/down one line */
                if (summaryview->displayed != summaryview->selected) {
                break;
        case GDK_Return:        /* Scroll up/down one line */
                if (summaryview->displayed != summaryview->selected) {
@@ -4497,8 +4506,8 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                            summaryview->selected);
                        break;
                }
                                            summaryview->selected);
                        break;
                }
-               textview_scroll_one_line(summaryview->messageview->textview,
-                                        (event->state & GDK_MOD1_MASK) != 0);
+               textview_scroll_one_line
+                       (textview, (event->state & GDK_MOD1_MASK) != 0);
                break;
        case GDK_asterisk:      /* Mark */
                summary_mark(summaryview);
                break;
        case GDK_asterisk:      /* Mark */
                summary_mark(summaryview);