commit:     61c992359d353f5ccac8e997443991cbcb733e73
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 11 14:26:52 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Sep 11 16:23:50 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61c99235

kde-plasma/plasma-desktop: Improve arrow key nav. of kicker search

KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=397779
See also: https://phabricator.kde.org/D15286
Package-Manager: Portage-2.3.48, Repoman-2.3.10

 .../plasma-desktop-5.13.5-kickersearch-nav.patch   |  87 +++++++++++
 .../plasma-desktop/plasma-desktop-5.13.5-r1.ebuild | 168 +++++++++++++++++++++
 2 files changed, 255 insertions(+)

diff --git 
a/kde-plasma/plasma-desktop/files/plasma-desktop-5.13.5-kickersearch-nav.patch 
b/kde-plasma/plasma-desktop/files/plasma-desktop-5.13.5-kickersearch-nav.patch
new file mode 100644
index 00000000000..75b5bc27b2a
--- /dev/null
+++ 
b/kde-plasma/plasma-desktop/files/plasma-desktop-5.13.5-kickersearch-nav.patch
@@ -0,0 +1,87 @@
+From 1692ae244bc5229df78df2d5ba2e76418362cb50 Mon Sep 17 00:00:00 2001
+From: Eike Hein <h...@kde.org>
+Date: Wed, 5 Sep 2018 18:58:35 +0900
+Subject: Improve arrow key navigation of Kicker search results
+
+Summary:
+Kicker already makes sure the first search result is highlighted
+and actionable while searching. This patch makes arrow-down after
+typing move to the second search result instead of merely moving
+focus from the search field to the list, so the user doesn't have
+to press arrow-down twice anymore.
+
+It also allows using arrow-left/right to jump to the other result
+columns, when the cursor is at the start or end of the text field,
+respectively.
+
+BUG:397779
+
+Reviewers: ngraham
+
+Subscribers: plasma-devel
+
+Tags: #plasma
+
+Differential Revision: https://phabricator.kde.org/D15286
+---
+ .../package/contents/ui/MenuRepresentation.qml       | 20 +++++++++++++++++++-
+ .../kicker/package/contents/ui/RunnerResultsList.qml |  1 +
+ 2 files changed, 20 insertions(+), 1 deletion(-)
+
+diff --git a/applets/kicker/package/contents/ui/MenuRepresentation.qml 
b/applets/kicker/package/contents/ui/MenuRepresentation.qml
+index b70b76b..58cbf8d 100644
+--- a/applets/kicker/package/contents/ui/MenuRepresentation.qml
++++ b/applets/kicker/package/contents/ui/MenuRepresentation.qml
+@@ -393,7 +393,7 @@ FocusScope {
+             } else if (event.key == Qt.Key_Down) {
+                 if (rootList.visible) {
+                     rootList.showChildDialogs = false;
+-                    rootList.currentIndex = 0;
++                    rootList.currentIndex = Math.min(1, rootList.count);
+                     rootList.forceActiveFocus();
+                     rootList.showChildDialogs = true;
+                 }
+@@ -402,11 +402,29 @@ FocusScope {
+                     for (var i = 0; i < runnerModel.count; ++i) {
+                         if (runnerModel.modelForRow(i).count) {
+                             var targetList = runnerColumnsRepeater.itemAt(i);
++                            targetList.currentIndex = Math.min(1, 
targetList.count);
++                            targetList.forceActiveFocus();
++                            break;
++                        }
++                    }
++                }
++            } else if (event.key == Qt.Key_Left && cursorPosition == 0) {
++                    for (var i = runnerModel.count; i >= 0; --i) {
++                        if (runnerModel.modelForRow(i).count) {
++                            var targetList = runnerColumnsRepeater.itemAt(i);
+                             targetList.currentIndex = 0;
+                             targetList.forceActiveFocus();
+                             break;
+                         }
+                     }
++            } else if (event.key == Qt.Key_Right && cursorPosition == length) 
{
++                for (var i = 1; i < runnerModel.count; ++i) {
++                    if (runnerModel.modelForRow(i).count) {
++                        var targetList = runnerColumnsRepeater.itemAt(i);
++                        targetList.currentIndex = 0;
++                        targetList.forceActiveFocus();
++                        break;
++                    }
+                 }
+             } else if (event.key == Qt.Key_Enter || event.key == 
Qt.Key_Return) {
+                 if (runnerColumns.visible && 
runnerModel.modelForRow(0).count) {
+diff --git a/applets/kicker/package/contents/ui/RunnerResultsList.qml 
b/applets/kicker/package/contents/ui/RunnerResultsList.qml
+index 3627c2f..4e6dc2f 100644
+--- a/applets/kicker/package/contents/ui/RunnerResultsList.qml
++++ b/applets/kicker/package/contents/ui/RunnerResultsList.qml
+@@ -30,6 +30,7 @@ FocusScope {
+     signal keyNavigationAtListEnd
+ 
+     property alias currentIndex: runnerMatches.currentIndex
++    property alias count: runnerMatches.count
+     property alias containsMouse: runnerMatches.containsMouse
+ 
+     Accessible.name: header.text
+-- 
+cgit v0.11.2

diff --git a/kde-plasma/plasma-desktop/plasma-desktop-5.13.5-r1.ebuild 
b/kde-plasma/plasma-desktop/plasma-desktop-5.13.5-r1.ebuild
new file mode 100644
index 00000000000..06140e915b1
--- /dev/null
+++ b/kde-plasma/plasma-desktop/plasma-desktop-5.13.5-r1.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="forceoptional"
+KDE_TEST="true"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="KDE Plasma desktop"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="appstream +fontconfig ibus +mouse pulseaudio scim +semantic-desktop 
touchpad"
+
+COMMON_DEPEND="
+       $(add_frameworks_dep attica)
+       $(add_frameworks_dep kactivities)
+       $(add_frameworks_dep kactivities-stats)
+       $(add_frameworks_dep karchive)
+       $(add_frameworks_dep kauth)
+       $(add_frameworks_dep kbookmarks)
+       $(add_frameworks_dep kcmutils)
+       $(add_frameworks_dep kcodecs)
+       $(add_frameworks_dep kcompletion)
+       $(add_frameworks_dep kconfig)
+       $(add_frameworks_dep kconfigwidgets)
+       $(add_frameworks_dep kcoreaddons)
+       $(add_frameworks_dep kdbusaddons)
+       $(add_frameworks_dep kdeclarative)
+       $(add_frameworks_dep kded)
+       $(add_frameworks_dep kdelibs4support)
+       $(add_frameworks_dep kemoticons)
+       $(add_frameworks_dep kglobalaccel)
+       $(add_frameworks_dep kguiaddons)
+       $(add_frameworks_dep ki18n)
+       $(add_frameworks_dep kiconthemes)
+       $(add_frameworks_dep kio)
+       $(add_frameworks_dep kitemmodels)
+       $(add_frameworks_dep kitemviews)
+       $(add_frameworks_dep kjobwidgets)
+       $(add_frameworks_dep knewstuff)
+       $(add_frameworks_dep knotifications)
+       $(add_frameworks_dep knotifyconfig)
+       $(add_frameworks_dep kparts)
+       $(add_frameworks_dep kpeople)
+       $(add_frameworks_dep krunner)
+       $(add_frameworks_dep kservice)
+       $(add_frameworks_dep kwallet)
+       $(add_frameworks_dep kwidgetsaddons)
+       $(add_frameworks_dep kwindowsystem)
+       $(add_frameworks_dep kxmlgui)
+       $(add_frameworks_dep plasma)
+       $(add_frameworks_dep solid)
+       $(add_frameworks_dep sonnet)
+       $(add_plasma_dep kwin)
+       $(add_plasma_dep plasma-workspace)
+       $(add_qt_dep qtconcurrent)
+       $(add_qt_dep qtdbus)
+       $(add_qt_dep qtdeclarative)
+       $(add_qt_dep qtgui)
+       $(add_qt_dep qtnetwork)
+       $(add_qt_dep qtprintsupport)
+       $(add_qt_dep qtsql)
+       $(add_qt_dep qtsvg)
+       $(add_qt_dep qtwidgets)
+       $(add_qt_dep qtx11extras)
+       $(add_qt_dep qtxml)
+       media-libs/phonon[qt5(+)]
+       x11-libs/libX11
+       x11-libs/libXcursor
+       x11-libs/libXfixes
+       x11-libs/libXi
+       x11-libs/libxcb
+       x11-libs/libxkbfile
+       appstream? ( dev-libs/appstream[qt5] )
+       fontconfig? (
+               media-libs/fontconfig
+               media-libs/freetype
+               x11-libs/libXft
+               x11-libs/xcb-util-image
+       )
+       ibus? (
+               $(add_qt_dep qtx11extras)
+               app-i18n/ibus
+               dev-libs/glib:2
+               x11-libs/libxcb
+               x11-libs/xcb-util-keysyms
+       )
+       pulseaudio? (
+               dev-libs/glib:2
+               media-libs/libcanberra
+               media-sound/pulseaudio
+       )
+       scim? ( app-i18n/scim )
+       semantic-desktop? ( $(add_frameworks_dep baloo) )
+       touchpad? ( x11-drivers/xf86-input-synaptics )
+"
+DEPEND="${COMMON_DEPEND}
+       dev-libs/boost
+       x11-base/xorg-proto
+       fontconfig? ( x11-libs/libXrender )
+       mouse? (
+               x11-drivers/xf86-input-evdev
+               x11-drivers/xf86-input-libinput
+       )
+"
+RDEPEND="${COMMON_DEPEND}
+       $(add_frameworks_dep qqc2-desktop-style)
+       $(add_plasma_dep breeze)
+       $(add_plasma_dep kde-cli-tools)
+       $(add_plasma_dep oxygen)
+       $(add_qt_dep qtgraphicaleffects)
+       sys-apps/accountsservice
+       sys-apps/util-linux
+       x11-apps/setxkbmap
+       pulseaudio? ( $(add_plasma_dep plasma-pa ) )
+       !kde-apps/kcontrol
+       !<kde-apps/kde4-l10n-17.08.1-r1
+       !kde-apps/knetattach[handbook]
+       !kde-misc/kcm-touchpad
+       !kde-plasma/plasma-desktop:4
+       !kde-plasma/plasma-workspace:4
+       !kde-plasma/solid-actions-kcm:4
+       !kde-plasma/systemsettings:4
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-activityswitcher.patch"
+       "${FILESDIR}/${P}-kickersearch-nav.patch"
+)
+
+src_configure() {
+       local mycmakeargs=(
+               $(cmake-utils_use_find_package appstream AppStreamQt)
+               $(cmake-utils_use_find_package fontconfig Fontconfig)
+               $(cmake-utils_use_find_package ibus IBus)
+               $(cmake-utils_use_find_package mouse Evdev)
+               $(cmake-utils_use_find_package mouse XorgLibinput)
+               $(cmake-utils_use_find_package pulseaudio PulseAudio)
+               $(cmake-utils_use_find_package scim SCIM)
+               $(cmake-utils_use_find_package semantic-desktop KF5Baloo)
+               $(cmake-utils_use_find_package touchpad Synaptics)
+       )
+
+       kde5_src_configure
+}
+
+src_test() {
+       # parallel tests fail, foldermodeltest hangs, bug #646890
+       # needs D-Bus, bug #634166
+       local myctestargs=(
+               -j1
+               -E "(foldermodeltest|test_kio_fonts)"
+       )
+
+       kde5_src_test
+}
+
+pkg_postinst() {
+       kde5_pkg_postinst
+
+       if has_version "x11-libs/gtk+:2" && ! has_version 
"dev-libs/libappindicator:2"; then
+               elog "For GTK+2 applications legacy-systray support, please 
install dev-libs/libappindicator:2."
+       fi
+       if has_version "x11-libs/gtk+:3" && ! has_version 
"dev-libs/libappindicator:3"; then
+               elog "For GTK+3 applications legacy-systray support, please 
install dev-libs/libappindicator:3."
+       fi
+}

Reply via email to