public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michael Palimaka" <kensington@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/plasma/files/, kde-frameworks/plasma/
Date: Thu, 17 Nov 2016 11:35:34 +0000 (UTC)	[thread overview]
Message-ID: <1479382520.0897f2e61539f7256c5663c3184950aeaa3b195c.kensington@gentoo> (raw)

commit:     0897f2e61539f7256c5663c3184950aeaa3b195c
Author:     Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Tue Nov 15 23:55:22 2016 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Nov 17 11:35:20 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0897f2e6

kde-frameworks/plasma: Backport activationTogglesExpanded

New API to fix e.g. Meta key toggle behaviour. plasma-desktop-5.8.3 is
already able to make use of it and fix KDE Bug 367685:

https://bugs.kde.org/show_bug.cgi?id=367685

See also https://git.reviewboard.kde.org/r/129204/

Package-Manager: portage-2.3.0

 .../plasma-5.26.0-activationTogglesExpanded.patch  | 124 +++++++++++++++++++++
 kde-frameworks/plasma/plasma-5.26.0-r1.ebuild      |  70 ++++++++++++
 kde-frameworks/plasma/plasma-5.27.0-r1.ebuild      |  70 ++++++++++++
 3 files changed, 264 insertions(+)

diff --git a/kde-frameworks/plasma/files/plasma-5.26.0-activationTogglesExpanded.patch b/kde-frameworks/plasma/files/plasma-5.26.0-activationTogglesExpanded.patch
new file mode 100644
index 00000000..f32f2b4
--- /dev/null
+++ b/kde-frameworks/plasma/files/plasma-5.26.0-activationTogglesExpanded.patch
@@ -0,0 +1,124 @@
+commit 65706d3878d556c7a1eac18984ec41b1a1d96d56
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Wed Oct 19 18:51:15 2016 +0200
+
+    New bool to use activated signal as toggle of expanded
+    
+    The launcher applets couldn't be closed with Meta alone and on Wayland
+    in general by any global shortcut, since we used for that the focusOutEvent
+    triggered only on X and only on global shortcuts (on default Alt+F1).
+    
+    This patch introduces the new bool activationTogglesExpanded, which allowes
+    QML applets to decide if they wish to use the activated signal also to end
+    their expanded state.
+    
+    The default value is false, in order to not break any legacy applets.
+    
+    REVIEW: 129204
+    BUG: 367685
+
+diff --git a/src/plasmaquick/appletquickitem.cpp b/src/plasmaquick/appletquickitem.cpp
+index ce2b82a..e2fd40e 100644
+--- a/src/plasmaquick/appletquickitem.cpp
++++ b/src/plasmaquick/appletquickitem.cpp
+@@ -48,7 +48,8 @@ AppletQuickItemPrivate::AppletQuickItemPrivate(Plasma::Applet *a, AppletQuickIte
+       switchWidth(-1),
+       switchHeight(-1),
+       applet(a),
+-      expanded(false)
++      expanded(false),
++      activationTogglesExpanded(false)
+ {
+ }
+ 
+@@ -727,6 +728,20 @@ void AppletQuickItem::setExpanded(bool expanded)
+     emit expandedChanged(expanded);
+ }
+ 
++bool AppletQuickItem::isActivationTogglesExpanded() const
++{
++    return d->activationTogglesExpanded;
++}
++
++void AppletQuickItem::setActivationTogglesExpanded(bool activationTogglesExpanded)
++{
++    if (d->activationTogglesExpanded == activationTogglesExpanded) {
++        return;
++    }
++    d->activationTogglesExpanded = activationTogglesExpanded;
++    emit activationTogglesExpandedChanged(activationTogglesExpanded);
++}
++
+ ////////////Internals
+ 
+ KDeclarative::QmlObject *AppletQuickItem::qmlObject()
+diff --git a/src/plasmaquick/appletquickitem.h b/src/plasmaquick/appletquickitem.h
+index 943e227..7df364d 100644
+--- a/src/plasmaquick/appletquickitem.h
++++ b/src/plasmaquick/appletquickitem.h
+@@ -81,6 +81,12 @@ class PLASMAQUICK_EXPORT AppletQuickItem : public QQuickItem
+     Q_PROPERTY(bool expanded WRITE setExpanded READ isExpanded NOTIFY expandedChanged)
+ 
+     /**
++     * True when the applet wants the activation signal act in toggle mode, i.e. while being expanded
++     * the signal shrinks the applet to its not exanded state instead of reexpanding it.
++     */
++    Q_PROPERTY(bool activationTogglesExpanded WRITE setActivationTogglesExpanded READ isActivationTogglesExpanded NOTIFY activationTogglesExpandedChanged)
++
++    /**
+      * the applet root QML item: sometimes is the same as fullRepresentationItem
+      * if a fullrepresentation was not declared explicitly
+      */
+@@ -126,6 +132,9 @@ public:
+     bool isExpanded() const;
+     void setExpanded(bool expanded);
+ 
++    bool isActivationTogglesExpanded() const;
++    void setActivationTogglesExpanded(bool activationTogglesExpanded);
++
+ ////NEEDED BY QML TO CREATE ATTACHED PROPERTIES
+     static AppletQuickItem *qmlAttachedProperties(QObject *object);
+ 
+@@ -135,6 +144,7 @@ Q_SIGNALS:
+     void switchHeightChanged(int height);
+ 
+     void expandedChanged(bool expanded);
++    void activationTogglesExpandedChanged(bool activationTogglesExpanded);
+ 
+     void compactRepresentationChanged(QQmlComponent *compactRepresentation);
+     void fullRepresentationChanged(QQmlComponent *fullRepresentation);
+diff --git a/src/plasmaquick/private/appletquickitem_p.h b/src/plasmaquick/private/appletquickitem_p.h
+index 1436935..ffd2bf2 100644
+--- a/src/plasmaquick/private/appletquickitem_p.h
++++ b/src/plasmaquick/private/appletquickitem_p.h
+@@ -104,6 +104,7 @@ public:
+     Plasma::Package containmentPackage;
+ 
+     bool expanded : 1;
++    bool activationTogglesExpanded : 1;
+ 
+     static QHash<QObject *, AppletQuickItem *> s_rootObjects;
+ };
+diff --git a/src/scriptengines/qml/plasmoid/appletinterface.cpp b/src/scriptengines/qml/plasmoid/appletinterface.cpp
+index 1cd6934..f24bc51 100644
+--- a/src/scriptengines/qml/plasmoid/appletinterface.cpp
++++ b/src/scriptengines/qml/plasmoid/appletinterface.cpp
+@@ -142,11 +142,16 @@ void AppletInterface::init()
+     emit busyChanged();
+ 
+     applet()->updateConstraints(Plasma::Types::UiReadyConstraint);
++
+     connect(applet(), &Plasma::Applet::activated,
+     [ = ]() {
+-        setExpanded(true);
++        // in case the applet doesn't want to get shrinked on reactivation,
++        // we always expand it again (only in order to conform with legacy behaviour)
++        bool activate = !( isExpanded() && isActivationTogglesExpanded() );
++
++        setExpanded(activate);
+         if (QQuickItem *i = qobject_cast<QQuickItem *>(fullRepresentationItem())) {
+-            i->setFocus(true, Qt::ShortcutFocusReason);
++            i->setFocus(activate, Qt::ShortcutFocusReason);
+         }
+     });
+ 

diff --git a/kde-frameworks/plasma/plasma-5.26.0-r1.ebuild b/kde-frameworks/plasma/plasma-5.26.0-r1.ebuild
new file mode 100644
index 00000000..7d45721
--- /dev/null
+++ b/kde-frameworks/plasma/plasma-5.26.0-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+KMNAME="${PN}-framework"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Plasma framework"
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="egl gles2 X"
+
+COMMON_DEPEND="
+	$(add_frameworks_dep kactivities)
+	$(add_frameworks_dep karchive)
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kconfigwidgets)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep kdeclarative)
+	$(add_frameworks_dep kglobalaccel)
+	$(add_frameworks_dep kguiaddons)
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kio)
+	$(add_frameworks_dep knotifications)
+	$(add_frameworks_dep kpackage)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep kwindowsystem)
+	$(add_frameworks_dep kxmlgui)
+	$(add_qt_dep qtdbus)
+	$(add_qt_dep qtdeclarative)
+	$(add_qt_dep qtgui 'gles2=')
+	$(add_qt_dep qtquickcontrols)
+	$(add_qt_dep qtsql)
+	$(add_qt_dep qtsvg)
+	$(add_qt_dep qtwidgets)
+	egl? ( media-libs/mesa[egl] )
+	!gles2? ( virtual/opengl )
+	X? (
+		$(add_qt_dep qtx11extras)
+		x11-libs/libX11
+		x11-libs/libxcb
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	$(add_frameworks_dep kdoctools)
+	X? ( x11-proto/xproto )
+"
+RDEPEND="${COMMON_DEPEND}
+	!<kde-apps/kapptemplate-15.08.3-r1:5
+	!<kde-plasma/kdeplasma-addons-5.4.3-r1:5
+"
+
+RESTRICT+=" test"
+
+PATCHES=( "${FILESDIR}/${PN}-5.26.0-activationTogglesExpanded.patch" )
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake-utils_use_find_package egl EGL)
+		$(cmake-utils_use_find_package !gles2 OpenGL)
+		$(cmake-utils_use_find_package X X11)
+		$(cmake-utils_use_find_package X XCB)
+	)
+
+	kde5_src_configure
+}

diff --git a/kde-frameworks/plasma/plasma-5.27.0-r1.ebuild b/kde-frameworks/plasma/plasma-5.27.0-r1.ebuild
new file mode 100644
index 00000000..7d45721
--- /dev/null
+++ b/kde-frameworks/plasma/plasma-5.27.0-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+KMNAME="${PN}-framework"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Plasma framework"
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="egl gles2 X"
+
+COMMON_DEPEND="
+	$(add_frameworks_dep kactivities)
+	$(add_frameworks_dep karchive)
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kconfigwidgets)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep kdeclarative)
+	$(add_frameworks_dep kglobalaccel)
+	$(add_frameworks_dep kguiaddons)
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kio)
+	$(add_frameworks_dep knotifications)
+	$(add_frameworks_dep kpackage)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep kwindowsystem)
+	$(add_frameworks_dep kxmlgui)
+	$(add_qt_dep qtdbus)
+	$(add_qt_dep qtdeclarative)
+	$(add_qt_dep qtgui 'gles2=')
+	$(add_qt_dep qtquickcontrols)
+	$(add_qt_dep qtsql)
+	$(add_qt_dep qtsvg)
+	$(add_qt_dep qtwidgets)
+	egl? ( media-libs/mesa[egl] )
+	!gles2? ( virtual/opengl )
+	X? (
+		$(add_qt_dep qtx11extras)
+		x11-libs/libX11
+		x11-libs/libxcb
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	$(add_frameworks_dep kdoctools)
+	X? ( x11-proto/xproto )
+"
+RDEPEND="${COMMON_DEPEND}
+	!<kde-apps/kapptemplate-15.08.3-r1:5
+	!<kde-plasma/kdeplasma-addons-5.4.3-r1:5
+"
+
+RESTRICT+=" test"
+
+PATCHES=( "${FILESDIR}/${PN}-5.26.0-activationTogglesExpanded.patch" )
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake-utils_use_find_package egl EGL)
+		$(cmake-utils_use_find_package !gles2 OpenGL)
+		$(cmake-utils_use_find_package X X11)
+		$(cmake-utils_use_find_package X XCB)
+	)
+
+	kde5_src_configure
+}


             reply	other threads:[~2016-11-17 11:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17 11:35 Michael Palimaka [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-04-22 16:21 [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/plasma/files/, kde-frameworks/plasma/ Andreas Sturmlechner
2022-12-10 10:47 Andreas Sturmlechner
2022-11-16 19:17 Andreas Sturmlechner
2022-10-10  8:15 Andreas Sturmlechner
2022-09-24  8:53 Andreas Sturmlechner
2022-06-29 19:53 Andreas Sturmlechner
2022-05-14 11:33 Andreas Sturmlechner
2022-05-04 20:50 Andreas Sturmlechner
2022-04-09 16:07 Andreas Sturmlechner
2022-01-20 13:26 Andreas Sturmlechner
2021-12-15 11:28 Andreas Sturmlechner
2021-12-08 15:08 Andreas Sturmlechner
2021-09-04 21:01 Andreas Sturmlechner
2021-09-04 21:01 Andreas Sturmlechner
2020-09-29 12:49 Andreas Sturmlechner
2020-06-23 13:49 Andreas Sturmlechner
2020-06-23 13:49 Andreas Sturmlechner
2020-02-13 21:28 Andreas Sturmlechner
2019-12-31 20:09 Andreas Sturmlechner
2019-03-13 10:18 Andreas Sturmlechner
2017-03-13 21:00 Andreas Sturmlechner
2016-02-17 11:13 Michael Palimaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479382520.0897f2e61539f7256c5663c3184950aeaa3b195c.kensington@gentoo \
    --to=kensington@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox