[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-381-g4697baf02

paul at claws-mail.org paul at claws-mail.org
Fri Dec 3 16:01:05 CET 2021


The branch, gtk3 has been updated
       via  4697baf0231fb2055e8dd8d724f2e6c98301e190 (commit)
      from  72872323034e04b9568aab8f0b85f769a847cdff (commit)

Summary of changes:
 src/messageview.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)


- Log -----------------------------------------------------------------
commit 4697baf0231fb2055e8dd8d724f2e6c98301e190
Author: paul <paul at claws-mail.org>
Date:   Fri Dec 3 15:01:01 2021 +0000

    in separate msgview Enter key opens currently selected msg
    
    also modify when to automatically show the next msg or not when moving/deleting current msg

diff --git a/src/messageview.c b/src/messageview.c
index 65a8ae479..8f15eece7 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2021 the Claws Mail team and Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -1853,6 +1853,13 @@ static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event,
 	if (event && (event->state & GDK_SHIFT_MASK) && event->keyval != GDK_KEY_space) 
 		return FALSE;
 
+	if (event && (event->keyval == GDK_KEY_KP_Enter || event->keyval ==  GDK_KEY_Return) &&
+	    messageview->window) {
+		MsgInfo *new_msginfo = summary_get_selected_msg(messageview->mainwin->summaryview);
+		messageview_show(messageview, new_msginfo, messageview->all_headers);
+		return FALSE;
+	}
+
 	return mimeview_pass_key_press_event(messageview->mimeview, event);
 }
 
@@ -2943,8 +2950,7 @@ static gboolean messageview_update_msg(gpointer source, gpointer data)
 		return FALSE;
 
 	if ((msginfo_update->flags & MSGINFO_UPDATE_DELETED) ||
-	    MSG_IS_DELETED(old_msginfo->flags))
-	{
+	    MSG_IS_DELETED(old_msginfo->flags)) {
 		if (messageview->new_window) {
 			if (old_msginfo->folder && old_msginfo->folder->total_msgs == 0) {
 				messageview_clear(messageview);
@@ -2953,20 +2959,19 @@ static gboolean messageview_update_msg(gpointer source, gpointer data)
 				return FALSE;
 			}
 			
-			if (!prefs_common.always_show_msg) {
-				messageview_clear(messageview);
-				textview_show_info(messageview->mimeview->textview,
-					MSG_IS_DELETED(old_msginfo->flags) ?
-					_("\n  Message has been deleted") :
-					_("\n  Message has been deleted or moved to another folder"));
+ 			if (!OPEN_SELECTED_ON_DELETEMOVE && !OPEN_SELECTED_ON_PREVNEXT) {
+ 				messageview_clear(messageview);
+  				textview_show_info(messageview->mimeview->textview,
+  					MSG_IS_DELETED(old_msginfo->flags) ?
+  					_("\n  Message has been deleted") :
+  					_("\n  Message has been deleted or moved to another folder"));
 			} else
 				messageview->update_needed = TRUE;
-
 		} else {
 			messageview_clear(messageview);
 			messageview_update(messageview, old_msginfo);
 		}
-	} 
+	}
 
 	return FALSE;
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list