fix select_all and copy in multipart messages
authorThorsten Maerz <torte@netztorte.de>
Sun, 12 May 2002 22:21:42 +0000 (22:21 +0000)
committerThorsten Maerz <torte@netztorte.de>
Sun, 12 May 2002 22:21:42 +0000 (22:21 +0000)
ChangeLog.claws
configure.in
src/mainwindow.c
src/messageview.c

index 8f3ee7f..a781abb 100644 (file)
@@ -1,3 +1,10 @@
+2002-05-13 [thorsten]  0.7.5claws25
+
+       * src/messageview.c
+               fix select_all and copy in multipart messages
+       * src/mainwindow.c
+               fix select_all and copy in multipart messages
+
 2002-05-12 [paul]      0.7.5claws24
 
        * src/summaryview.c
index a8fb71e..17f02b4 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws24
+EXTRA_VERSION=claws25
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index a5e5747..902771e 100644 (file)
@@ -3002,8 +3002,11 @@ static void allsel_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
 {
        if (GTK_WIDGET_HAS_FOCUS(mainwin->summaryview->ctree))
                summary_select_all(mainwin->summaryview);
-       else if (mainwin->summaryview->msg_is_toggled_on &&
-                GTK_WIDGET_HAS_FOCUS(mainwin->messageview->textview->text))
+       else if (mainwin->summaryview->msg_is_toggled_on && (
+                GTK_WIDGET_HAS_FOCUS(mainwin->messageview->textview->text) ||
+                GTK_WIDGET_HAS_FOCUS(mainwin->messageview->mimeview->ctree) ||
+                GTK_WIDGET_HAS_FOCUS(mainwin->messageview->mimeview->notebook) ||
+                GTK_WIDGET_HAS_FOCUS(mainwin->messageview->mimeview->textview->text)))
                messageview_select_all(mainwin->messageview);
 }
 
index 4c5e5f6..68f2515 100644 (file)
@@ -506,7 +506,14 @@ void messageview_set_font(MessageView *messageview)
 
 void messageview_copy_clipboard(MessageView *messageview)
 {
-       switch (messageview->type) {
+       gint displaytype = /* force MVIEV_TEXT on first page */
+               ((messageview->type == MVIEW_MIME)
+               && (gtk_notebook_get_current_page(GTK_NOTEBOOK(
+                               messageview->mimeview->notebook)) > 0))
+               ? MVIEW_MIME
+               : MVIEW_TEXT;
+
+       switch (displaytype) {
        case MVIEW_TEXT:
                gtk_editable_copy_clipboard(GTK_EDITABLE(messageview->textview->text));
                break;
@@ -520,7 +527,14 @@ void messageview_copy_clipboard(MessageView *messageview)
 
 void messageview_select_all(MessageView *messageview)
 {
-       switch (messageview->type) {
+       gint displaytype = /* force MVIEV_TEXT on first page */
+               ((messageview->type == MVIEW_MIME)
+               && (gtk_notebook_get_current_page(GTK_NOTEBOOK(
+                               messageview->mimeview->notebook)) > 0))
+               ? MVIEW_MIME
+               : MVIEW_TEXT;
+
+       switch (displaytype) {
        case MVIEW_TEXT:
                gtk_editable_select_region(GTK_EDITABLE(messageview->textview->text), 0, -1);
                break;