[kde-doc-english] [trojita] src/Gui: GUI: open the target message after pressing PgUp/PgDown/Home/End as well

Jan Kundrát jkt at flaska.net
Wed Apr 10 08:18:34 UTC 2013


Git commit 98378df96120e47491f08898b8746cd44c18d007 by Jan Kundrát.
Committed on 10/04/2013 at 09:53.
Pushed by jkt into branch 'master'.

GUI: open the target message after pressing PgUp/PgDown/Home/End as well

Previsouly, only the up and down keys would trigger that. However, at least for
me it was rather counterintuitive having to press Enter after pressing End, so
let's give this a try.

M  +6    -4    src/Gui/MsgListView.cpp

http://commits.kde.org/trojita/98378df96120e47491f08898b8746cd44c18d007

diff --git a/src/Gui/MsgListView.cpp b/src/Gui/MsgListView.cpp
index 4857d74..860fb78 100644
--- a/src/Gui/MsgListView.cpp
+++ b/src/Gui/MsgListView.cpp
@@ -63,16 +63,18 @@ MsgListView::MsgListView(QWidget *parent): QTreeView(parent)
     connect (m_naviActivationTimer, SIGNAL(timeout()), SLOT(slotCurrentActivated()));
 }
 
-// up and down perform controlled selection, where PgUP, PgDown, Home and End jump to an
-// usually unknown destination (-> no activation intended?!)
 // left might collapse a thread, question is whether ending there (on closing the thread) should be
 // taken as mail loading request (i don't think so, but it's sth. that needs to be figured over time)
 // NOTICE: reasonably Triggers should be a (non strict) subset of Blockers (user changed his mind)
 
 // the list of key events which pot. lead to loading a new message.
-static QList<int> gs_naviActivationTriggers = QList<int>() << Qt::Key_Up << Qt::Key_Down;
+static QList<int> gs_naviActivationTriggers = QList<int>() << Qt::Key_Up << Qt::Key_Down
+                                                           << Qt::Key_PageUp << Qt::Key_PageDown
+                                                           << Qt::Key_Home << Qt::Key_End;
 // the list of key events which cancel naviActivationTrigger induced action.
-static QList<int> gs_naviActivationBlockers = QList<int>() << Qt::Key_Up << Qt::Key_Down << Qt::Key_Left;
+static QList<int> gs_naviActivationBlockers = QList<int>() << Qt::Key_Up << Qt::Key_Down << Qt::Key_Left
+                                                           << Qt::Key_PageUp << Qt::Key_PageDown
+                                                           << Qt::Key_Home << Qt::Key_End;
 
 
 void MsgListView::keyPressEvent(QKeyEvent *ke)



More information about the kde-doc-english mailing list