* src/messageview.c
authorLuke Plant <L.Plant.98@cantab.net>
Sat, 2 Aug 2003 18:24:37 +0000 (18:24 +0000)
committerLuke Plant <L.Plant.98@cantab.net>
Sat, 2 Aug 2003 18:24:37 +0000 (18:24 +0000)
o fixed bug 4 - focus lost when changing messageview view type

src/messageview.c

index a7ba6f9..ef3ac3c 100644 (file)
@@ -674,6 +674,7 @@ static void messageview_change_view_type(MessageView *messageview,
 {
        TextView *textview = messageview->textview;
        MimeView *mimeview = messageview->mimeview;
+       gboolean hadfocus  = GTK_WIDGET_HAS_FOCUS(textview->text);
 
        if (messageview->type == type) return;
 
@@ -698,6 +699,7 @@ static void messageview_change_view_type(MessageView *messageview,
                                   GTK_WIDGET_PTR(textview), TRUE, TRUE, 0);
        } else
                return;
+       if (hadfocus) gtk_widget_grab_focus(textview->text);
 
        messageview->type = type;
 }