File 0001-Jump-into-the-first-column-with-results-when-navigat.patch of Package plasma5-desktop.openSUSE_13.2_Update
From d53ae685e13c4789bc41b753a4f1c9ea40bc045b Mon Sep 17 00:00:00 2001
From: Eike Hein <hein@kde.org>
Date: Sat, 4 Apr 2015 18:32:25 +0200
Subject: [PATCH 1/4] Jump into the first column with results when navigating
away from the search field.
Or do nothing, which fixes
BUG:345843
---
.../kicker/package/contents/ui/FullRepresentation.qml | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/applets/kicker/package/contents/ui/FullRepresentation.qml b/applets/kicker/package/contents/ui/FullRepresentation.qml
index 124c2a895a23cfb5b1bc54fc15e387aa482a4d30..bdfbfb7df5a88ac0c2744ac9bccf2cd3a6685bfb 100644
--- a/applets/kicker/package/contents/ui/FullRepresentation.qml
+++ b/applets/kicker/package/contents/ui/FullRepresentation.qml
@@ -385,24 +385,32 @@ FocusScope {
Keys.onPressed: {
if (event.key == Qt.Key_Up) {
- if (rootList.visible) {
+ if (rootList.visible && rootList.count) {
rootList.showChildDialogs = false;
rootList.currentIndex = rootList.model.count - 1;
rootList.showChildDialogs = true;
}
if (runnerColumns.visible) {
- runnerColumnsRepeater.itemAt(0).currentIndex = runnerModel.modelForRow(0).count - 1;
+ for (var i = 0; i < runnerModel.count; ++i) {
+ if (runnerModel.modelForRow(i).count) {
+ runnerColumnsRepeater.itemAt(i).currentIndex = runnerModel.modelForRow(i).count - 1;
+ }
+ }
}
} else if (event.key == Qt.Key_Down) {
- if (rootList.visible) {
+ if (rootList.visible && rootList.count) {
rootList.showChildDialogs = false;
rootList.currentIndex = 0;
rootList.showChildDialogs = true;
}
if (runnerColumns.visible) {
- runnerColumnsRepeater.itemAt(0).currentIndex = 0;
+ for (var i = 0; i < runnerModel.count; ++i) {
+ if (runnerModel.modelForRow(i).count) {
+ runnerColumnsRepeater.itemAt(i).currentIndex = 0;
+ }
+ }
}
} else if (event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
if (runnerColumns.visible && runnerModel.modelForRow(0).count) {
--
2.3.4