kde-plasma/plasma-workspace: Backport upstream fixes
authorAndreas Sturmlechner <asturm@gentoo.org>
Wed, 2 Aug 2017 22:07:26 +0000 (00:07 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 2 Aug 2017 23:17:15 +0000 (01:17 +0200)
Package-Manager: Portage-2.3.6, Repoman-2.3.1

kde-plasma/plasma-workspace/files/plasma-workspace-5.10.4-ghns-https.patch [new file with mode: 0644]
kde-plasma/plasma-workspace/files/plasma-workspace-5.10.4-notifications.patch [new file with mode: 0644]
kde-plasma/plasma-workspace/plasma-workspace-5.10.4-r2.ebuild

diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.10.4-ghns-https.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.10.4-ghns-https.patch
new file mode 100644 (file)
index 0000000..2a805e3
--- /dev/null
@@ -0,0 +1,34 @@
+commit ae943198bf74d563adcb1f3d36ee4ba1b7b274a9
+Author: Aleix Pol <aleixpol@kde.org>
+Date:   Fri Jul 28 13:21:38 2017 +0200
+
+    Prefer using https for kns providers
+    
+    CCBUG: 382820
+
+diff --git a/components/shellprivate/widgetexplorer/plasmoids.knsrc b/components/shellprivate/widgetexplorer/plasmoids.knsrc
+index c683a257..03c7de0e 100644
+--- a/components/shellprivate/widgetexplorer/plasmoids.knsrc
++++ b/components/shellprivate/widgetexplorer/plasmoids.knsrc
+@@ -36,7 +36,7 @@ Name[x-test]=xxPlasma Widgetsxx
+ Name[zh_CN]=Plasma 部件
+ Name[zh_TW]=Plasma 元件
+-ProvidersUrl=http://download.kde.org/ocs/providers.xml
++ProvidersUrl=https://download.kde.org/ocs/providers.xml
+ Categories=Plasma 5 Plasmoid
+ StandardResource=tmp
+ InstallationCommand=kpackagetool5 --install %f --type Plasma/Applet
+diff --git a/wallpapers/image/wallpaper.knsrc b/wallpapers/image/wallpaper.knsrc
+index 4a0cf2d6..2decc7e7 100644
+--- a/wallpapers/image/wallpaper.knsrc
++++ b/wallpapers/image/wallpaper.knsrc
+@@ -36,7 +36,7 @@ Name[x-test]=xxWallpapersxx
+ Name[zh_CN]=壁纸
+ Name[zh_TW]=桌布
+-ProvidersUrl=http://download.kde.org/ocs/providers.xml
++ProvidersUrl=https://download.kde.org/ocs/providers.xml
+ Categories=KDE Wallpaper 800x600,KDE Wallpaper 1024x768,KDE Wallpaper 1280x1024,KDE Wallpaper 1440x900,KDE Wallpaper 1600x1200,KDE Wallpaper (other)
+ StandardResource=wallpaper
+ Uncompress=archive
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.10.4-notifications.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.10.4-notifications.patch
new file mode 100644 (file)
index 0000000..e964eeb
--- /dev/null
@@ -0,0 +1,69 @@
+commit 7e2a29b0b18abe31df68c2f176124acfbc15c438
+Author: Kai Uwe Broulik <kde@privat.broulik.de>
+Date:   Tue Aug 1 12:53:38 2017 +0200
+
+    [Notifications] Improve mouse handling
+    
+    * Make links clickable again
+    * Don't pass visualParent to context menu as we already give it a position, fixes it being positioned incorrectly
+    * Open context menu on press already like is done everywhere else
+    * Give "Copy" the edit-copy icon
+    * Deselect text after copying again, otherwise it stays selected but the user cannot unselect it.
+    
+    BUG: 382263
+    FIXED-IN: 5.10.5
+    
+    Differential Revision: https://phabricator.kde.org/D7029
+
+diff --git a/applets/notifications/package/contents/ui/NotificationItem.qml b/applets/notifications/package/contents/ui/NotificationItem.qml
+index dabf1b90..c260d588 100644
+--- a/applets/notifications/package/contents/ui/NotificationItem.qml
++++ b/applets/notifications/package/contents/ui/NotificationItem.qml
+@@ -282,8 +282,6 @@ MouseArea {
+                     wrapMode: Text.Wrap
+                     textFormat: TextEdit.RichText
+-                    onLinkActivated: Qt.openUrlExternally(link)
+-
+                     // ensure selecting text scrolls the view as needed...
+                     onCursorRectangleChanged: {
+                         var flick = bodyTextScrollArea.flickableItem
+@@ -297,23 +295,33 @@ MouseArea {
+                         anchors.fill: parent
+                         acceptedButtons: Qt.RightButton | Qt.LeftButton
+-                        onClicked: {
+-                            if (mouse.button == Qt.RightButton)
++                        onPressed: {
++                            if (mouse.button === Qt.RightButton) {
+                                 contextMenu.open(mouse.x, mouse.y)
+-                            else {
+-                                notificationItem.clicked(mouse)
++                            }
++                        }
++
++                        onClicked: {
++                            if (mouse.button === Qt.LeftButton) {
++                                var link = bodyText.linkAt(mouse.x, mouse.y)
++                                if (link) {
++                                    Qt.openUrlExternally(link)
++                                } else {
++                                    notificationItem.clicked(mouse)
++                                }
+                             }
+                         }
+                         PlasmaComponents.ContextMenu {
+                             id: contextMenu
+-                            visualParent: parent
+                             PlasmaComponents.MenuItem {
+                                 text: i18n("Copy")
++                                icon: "edit-copy"
+                                 onClicked: {
+                                     bodyText.selectAll()
+                                     bodyText.copy()
++                                    bodyText.deselect()
+                                 }
+                             }
+                         }
index 9f18cb3c6c803967caa2ff5b8ece5eb41b094f35..939cbb96364296fa1092562a7cd2a21015c53c83 100644 (file)
@@ -122,6 +122,8 @@ DEPEND="${COMMON_DEPEND}
 PATCHES=(
        "${FILESDIR}/${PN}-5.4-startkde-script.patch"
        "${FILESDIR}/${PN}-5.10-startplasmacompositor-script.patch"
+       "${FILESDIR}/${P}-ghns-https.patch"
+       "${FILESDIR}/${P}-notifications.patch"
        "${FILESDIR}/${P}-unused-dep.patch"
 )