This commit is contained in:
parent
3811492898
commit
9fc2ffa91e
@ -0,0 +1,64 @@
|
||||
From a3b79c165ae69abb9b390a5c657fc1db483a1e0d Mon Sep 17 00:00:00 2001
|
||||
From: Kai Uwe Broulik <kde@privat.broulik.de>
|
||||
Date: Sun, 26 Apr 2015 19:06:21 +0200
|
||||
Subject: [PATCH 01/12] Disable indeterminate animation for suspended jobs
|
||||
|
||||
Since they're not doing anything there's no need for an animation. Also simplify
|
||||
jobstate handling, we're only ever interested in the suspended state.
|
||||
---
|
||||
applets/notifications/package/contents/ui/JobDelegate.qml | 13 ++++++++-----
|
||||
1 file changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/applets/notifications/package/contents/ui/JobDelegate.qml b/applets/notifications/package/contents/ui/JobDelegate.qml
|
||||
index f3f091d7a98b940c6bbc76aa881efee8371fa05e..67418893a98997a3c90f17ba5de843f8eff48d69 100644
|
||||
--- a/applets/notifications/package/contents/ui/JobDelegate.qml
|
||||
+++ b/applets/notifications/package/contents/ui/JobDelegate.qml
|
||||
@@ -34,11 +34,12 @@ Column {
|
||||
readonly property int layoutSpacing: units.largeSpacing / 4
|
||||
readonly property int animationDuration: units.shortDuration * 2
|
||||
|
||||
+ readonly property string infoMessage: getData(jobsSource.data, "infoMessage", '')
|
||||
readonly property string labelName0: getData(jobsSource.data, "labelName0", '')
|
||||
readonly property string labelName1: getData(jobsSource.data, "labelName1", '')
|
||||
readonly property string label0: getData(jobsSource.data, "label0", '')
|
||||
readonly property string label1: getData(jobsSource.data, "label1", '')
|
||||
- readonly property string jobstate: getData(jobsSource.data, "state", '')
|
||||
+ readonly property bool isSuspended: getData(jobsSource.data, "state", '') === "suspended"
|
||||
|
||||
function getData(data, name, defaultValue) {
|
||||
return data[modelData] ? (data[modelData][name] ? data[modelData][name] : defaultValue) : defaultValue;
|
||||
@@ -49,7 +50,7 @@ Column {
|
||||
width: parent.width
|
||||
opacity: 0.6
|
||||
level: 3
|
||||
- text: getData(jobsSource.data, "infoMessage", '')
|
||||
+ text: infoMessage
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
@@ -149,17 +150,19 @@ Column {
|
||||
maximumValue: 100
|
||||
//percentage doesn't always exist, so doesn't get in the model
|
||||
value: getData(jobsSource.data, "percentage", 0)
|
||||
- indeterminate: plasmoid.expanded && jobsSource.data[modelData] && typeof jobsSource.data[modelData]["percentage"] === "undefined"
|
||||
+ indeterminate: plasmoid.expanded && jobsSource.data[modelData]
|
||||
+ && typeof jobsSource.data[modelData]["percentage"] === "undefined"
|
||||
+ && !jobItem.isSuspended
|
||||
}
|
||||
|
||||
PlasmaComponents.ToolButton {
|
||||
id: pauseButton
|
||||
- iconSource: jobItem.jobstate == "suspended" ? "media-playback-start" : "media-playback-pause"
|
||||
+ iconSource: jobItem.isSuspended ? "media-playback-start" : "media-playback-pause"
|
||||
visible: getData(jobsSource.data, "suspendable", 0)
|
||||
|
||||
onClicked: {
|
||||
var operationName = "suspend"
|
||||
- if (jobItem.jobstate == "suspended") {
|
||||
+ if (jobItem.isSuspended) {
|
||||
operationName = "resume"
|
||||
}
|
||||
var service = jobsSource.serviceForSource(modelData)
|
||||
--
|
||||
2.3.5
|
||||
|
@ -0,0 +1,34 @@
|
||||
From d95c4b850b03776c95efd04baad8c92864c42a3d Mon Sep 17 00:00:00 2001
|
||||
From: Martin Klapetek <mklapetek@kde.org>
|
||||
Date: Mon, 27 Apr 2015 14:33:42 +0200
|
||||
Subject: [PATCH 03/12] [notifications] Replace ' with ' as ' is not
|
||||
supported by StyledText
|
||||
|
||||
QtQuick's Text with StyledFormat supports only html3.2 subset of stuff.
|
||||
' is html4 and as such gets removed altogther, which is obviously
|
||||
unwanted.
|
||||
|
||||
Reviewed-by: Kai Uwe Broulik
|
||||
BUG: 346710
|
||||
FIXED-IN: 5.3.1
|
||||
---
|
||||
dataengines/notifications/notificationsengine.cpp | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/dataengines/notifications/notificationsengine.cpp b/dataengines/notifications/notificationsengine.cpp
|
||||
index 6a417294c65c71960f1c1ba022e8c2976a0b9464..37a11dd1f70bc7692112be1d51918a39682969d9 100644
|
||||
--- a/dataengines/notifications/notificationsengine.cpp
|
||||
+++ b/dataengines/notifications/notificationsengine.cpp
|
||||
@@ -232,6 +232,9 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
|
||||
// text where it finds a stray ampersand.
|
||||
// Only &{apos, quot, gt, lt, amp}; as well as { character references will be allowed
|
||||
bodyFinal.replace(QRegularExpression("&(?!(?:apos|quot|[gl]t|amp);|#)"), QLatin1String("&"));
|
||||
+ // The Text.StyledText format handles only html3.2 stuff and ' is html4 stuff
|
||||
+ // so we need to replace it here otherwise it will not render at all.
|
||||
+ bodyFinal.replace(QLatin1String("'"), QChar('\''));
|
||||
|
||||
Plasma::DataEngine::Data notificationData;
|
||||
notificationData.insert("id", QString::number(id));
|
||||
--
|
||||
2.3.5
|
||||
|
@ -0,0 +1,28 @@
|
||||
From f0d0518a70417b35124c0089325b32a6e6bf8f5e Mon Sep 17 00:00:00 2001
|
||||
From: David Edmundson <kde@davidedmundson.co.uk>
|
||||
Date: Sun, 26 Apr 2015 13:37:29 +0200
|
||||
Subject: [PATCH 04/12] Match window switch dialog borders with
|
||||
addwidgets/switch activity
|
||||
|
||||
BUG: 345614
|
||||
REVIEW: 123506
|
||||
---
|
||||
lookandfeel/contents/windowswitcher/WindowSwitcher.qml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lookandfeel/contents/windowswitcher/WindowSwitcher.qml b/lookandfeel/contents/windowswitcher/WindowSwitcher.qml
|
||||
index e4a46366c2a4e157860f55d2cb0e3781a239cb66..63799e12ae439e0a3ffd1d51b304fea0bf918f4b 100644
|
||||
--- a/lookandfeel/contents/windowswitcher/WindowSwitcher.qml
|
||||
+++ b/lookandfeel/contents/windowswitcher/WindowSwitcher.qml
|
||||
@@ -41,7 +41,7 @@ KWin.Switcher {
|
||||
|
||||
PlasmaCore.Dialog {
|
||||
id: dialog
|
||||
- location: PlasmaCore.Types.Floating
|
||||
+ location: PlasmaCore.Types.LeftEdge
|
||||
visible: tabBox.visible
|
||||
flags: Qt.X11BypassWindowManagerHint
|
||||
x: screenGeometry.x
|
||||
--
|
||||
2.3.5
|
||||
|
135
0005-Manually-keep-track-of-jobs-sources.patch
Normal file
135
0005-Manually-keep-track-of-jobs-sources.patch
Normal file
@ -0,0 +1,135 @@
|
||||
From bc5c47537f3bbb706b3fe7af66508f5ef2fadc6e Mon Sep 17 00:00:00 2001
|
||||
From: Kai Uwe Broulik <kde@privat.broulik.de>
|
||||
Date: Mon, 27 Apr 2015 20:09:14 +0200
|
||||
Subject: [PATCH 05/12] Manually keep track of jobs sources
|
||||
|
||||
DataSources source is a QStringList property which means changes within cannot be tracked
|
||||
causing all the job delegates to be destroyed and re-created when sourcesChanged is emitted.
|
||||
This is pretty wasteful and also causes the delegates to lose their state (eg. details expanded)
|
||||
|
||||
REVIEW: 123502
|
||||
BUG: 346673
|
||||
FIXED-IN: 5.3.1
|
||||
---
|
||||
.../package/contents/ui/JobDelegate.qml | 11 +++++----
|
||||
applets/notifications/package/contents/ui/Jobs.qml | 27 ++++++++++++++--------
|
||||
2 files changed, 24 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/applets/notifications/package/contents/ui/JobDelegate.qml b/applets/notifications/package/contents/ui/JobDelegate.qml
|
||||
index 67418893a98997a3c90f17ba5de843f8eff48d69..4717d49a8b3c1719d84fe7577b9b0b2d72f75873 100644
|
||||
--- a/applets/notifications/package/contents/ui/JobDelegate.qml
|
||||
+++ b/applets/notifications/package/contents/ui/JobDelegate.qml
|
||||
@@ -42,7 +42,8 @@ Column {
|
||||
readonly property bool isSuspended: getData(jobsSource.data, "state", '') === "suspended"
|
||||
|
||||
function getData(data, name, defaultValue) {
|
||||
- return data[modelData] ? (data[modelData][name] ? data[modelData][name] : defaultValue) : defaultValue;
|
||||
+ var source = model.name
|
||||
+ return data[source] ? (data[source][name] ? data[source][name] : defaultValue) : defaultValue;
|
||||
}
|
||||
|
||||
PlasmaExtras.Heading {
|
||||
@@ -150,8 +151,8 @@ Column {
|
||||
maximumValue: 100
|
||||
//percentage doesn't always exist, so doesn't get in the model
|
||||
value: getData(jobsSource.data, "percentage", 0)
|
||||
- indeterminate: plasmoid.expanded && jobsSource.data[modelData]
|
||||
- && typeof jobsSource.data[modelData]["percentage"] === "undefined"
|
||||
+ indeterminate: plasmoid.expanded && jobsSource.data[model.name]
|
||||
+ && typeof jobsSource.data[model.name]["percentage"] === "undefined"
|
||||
&& !jobItem.isSuspended
|
||||
}
|
||||
|
||||
@@ -165,7 +166,7 @@ Column {
|
||||
if (jobItem.isSuspended) {
|
||||
operationName = "resume"
|
||||
}
|
||||
- var service = jobsSource.serviceForSource(modelData)
|
||||
+ var service = jobsSource.serviceForSource(model.name)
|
||||
var operation = service.operationDescription(operationName)
|
||||
service.startOperationCall(operation)
|
||||
}
|
||||
@@ -177,7 +178,7 @@ Column {
|
||||
visible: getData(jobsSource.data, "killable", 0)
|
||||
|
||||
onClicked: {
|
||||
- var service = jobsSource.serviceForSource(modelData)
|
||||
+ var service = jobsSource.serviceForSource(model.name)
|
||||
var operation = service.operationDescription("stop")
|
||||
service.startOperationCall(operation)
|
||||
}
|
||||
diff --git a/applets/notifications/package/contents/ui/Jobs.qml b/applets/notifications/package/contents/ui/Jobs.qml
|
||||
index 6ecf3669147d5dcc4ff9d4a94db7cc47408c3495..3307d38b9a1ea54b075b61f023b083eae08428ac 100644
|
||||
--- a/applets/notifications/package/contents/ui/Jobs.qml
|
||||
+++ b/applets/notifications/package/contents/ui/Jobs.qml
|
||||
@@ -28,21 +28,34 @@ Column {
|
||||
id: jobsRoot
|
||||
width: parent.width
|
||||
|
||||
- property alias count: jobsRepeater.count
|
||||
+ property alias count: jobs.count
|
||||
+
|
||||
+ ListModel {
|
||||
+ id: jobs
|
||||
+ }
|
||||
|
||||
PlasmaCore.DataSource {
|
||||
id: jobsSource
|
||||
|
||||
- property variant runningJobs: ({})
|
||||
+ property var runningJobs: ({})
|
||||
|
||||
engine: "applicationjobs"
|
||||
interval: 0
|
||||
|
||||
onSourceAdded: {
|
||||
connectSource(source)
|
||||
+ jobs.append({name: source})
|
||||
}
|
||||
|
||||
onSourceRemoved: {
|
||||
+ // remove source from jobs model
|
||||
+ for (var i = 0, len = jobs.count; i < len; ++i) {
|
||||
+ if (jobs.get(i).name === source) {
|
||||
+ jobs.remove(i)
|
||||
+ break
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (!notifications) {
|
||||
return
|
||||
}
|
||||
@@ -84,9 +97,7 @@ Column {
|
||||
}
|
||||
|
||||
onNewData: {
|
||||
- var jobs = runningJobs
|
||||
- jobs[sourceName] = data
|
||||
- runningJobs = jobs
|
||||
+ runningJobs[sourceName] = data
|
||||
}
|
||||
|
||||
onDataChanged: {
|
||||
@@ -107,7 +118,7 @@ Column {
|
||||
}
|
||||
|
||||
Item {
|
||||
- visible: jobsRepeater.count > 3
|
||||
+ visible: jobs.count > 3
|
||||
|
||||
PlasmaComponents.ProgressBar {
|
||||
anchors {
|
||||
@@ -123,9 +134,7 @@ Column {
|
||||
}
|
||||
|
||||
Repeater {
|
||||
- id: jobsRepeater
|
||||
-
|
||||
- model: jobsSource.sources
|
||||
+ model: jobs
|
||||
delegate: JobDelegate {}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.3.5
|
||||
|
26
0006-Fix-running-applet-calculation.patch
Normal file
26
0006-Fix-running-applet-calculation.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 2b7d3c4bc5b126111fec6b3ff3046b16541329a6 Mon Sep 17 00:00:00 2001
|
||||
From: Kai Uwe Broulik <kde@privat.broulik.de>
|
||||
Date: Mon, 27 Apr 2015 23:23:48 +0200
|
||||
Subject: [PATCH 06/12] Fix running applet calculation
|
||||
|
||||
We get an int rather than a bool :)
|
||||
---
|
||||
components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp b/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
|
||||
index 376dd4c0d35082197c409aa5f041e871ad79ac79..99e9add0fd06b415e23c96ce8773ca8b639cd195 100644
|
||||
--- a/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
|
||||
+++ b/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
|
||||
@@ -277,7 +277,7 @@ void PlasmaAppletItemModel::setRunningApplets(const QHash<QString, int> &apps)
|
||||
PlasmaAppletItem *p = dynamic_cast<PlasmaAppletItem *>(i);
|
||||
|
||||
if (p) {
|
||||
- const bool running = apps.value(p->pluginName());
|
||||
+ const int running = apps.value(p->pluginName());
|
||||
p->setRunning(running);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.3.5
|
||||
|
40
0008-Only-restart-Timer-when-the-dialog-is-visible.patch
Normal file
40
0008-Only-restart-Timer-when-the-dialog-is-visible.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 710837e3f82e1dc9e3a12f1dcb285c831ae5f74b Mon Sep 17 00:00:00 2001
|
||||
From: Kai Uwe Broulik <kde@privat.broulik.de>
|
||||
Date: Tue, 28 Apr 2015 20:46:14 +0200
|
||||
Subject: [PATCH 08/12] Only restart Timer when the dialog is visible
|
||||
|
||||
Otherwise the Timer might fire when there are no notification properties
|
||||
causing warnings.
|
||||
|
||||
Reviewed-by: mklapetek
|
||||
---
|
||||
applets/notifications/package/contents/ui/NotificationPopup.qml | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/applets/notifications/package/contents/ui/NotificationPopup.qml b/applets/notifications/package/contents/ui/NotificationPopup.qml
|
||||
index 01ac2a1458c5298bf03b2f322352ce3fb710b5ce..415a125e532ba3da6414ad40ebecfb290c075b3a 100644
|
||||
--- a/applets/notifications/package/contents/ui/NotificationPopup.qml
|
||||
+++ b/applets/notifications/package/contents/ui/NotificationPopup.qml
|
||||
@@ -42,7 +42,9 @@ PlasmaCore.Dialog {
|
||||
}
|
||||
|
||||
onYChanged: {
|
||||
- notificationTimer.restart();
|
||||
+ if (visible) {
|
||||
+ notificationTimer.restart();
|
||||
+ }
|
||||
}
|
||||
|
||||
function populatePopup(notification) {
|
||||
@@ -108,7 +110,7 @@ PlasmaCore.Dialog {
|
||||
}
|
||||
|
||||
textItem: PlasmaComponents.Label {
|
||||
- wrapMode: Text.WordWrap
|
||||
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Text.AlignTop
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
--
|
||||
2.3.5
|
||||
|
30
0009-check-for-model-existence.patch
Normal file
30
0009-check-for-model-existence.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From a234c0923767649cc6545866a563ffc4dba58de2 Mon Sep 17 00:00:00 2001
|
||||
From: Marco Martin <notmart@gmail.com>
|
||||
Date: Wed, 29 Apr 2015 09:28:11 +0200
|
||||
Subject: [PATCH 09/12] check for model existence
|
||||
|
||||
BUG:346870
|
||||
---
|
||||
wallpapers/image/image.cpp | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/wallpapers/image/image.cpp b/wallpapers/image/image.cpp
|
||||
index a3b9c1028947dbb69c6e22e1584137912525ae8f..f5920bf9bfa1d4746d634a48163064a056867433 100644
|
||||
--- a/wallpapers/image/image.cpp
|
||||
+++ b/wallpapers/image/image.cpp
|
||||
@@ -799,6 +799,12 @@ void Image::removeWallpaper(QString name)
|
||||
|
||||
void Image::commitDeletion()
|
||||
{
|
||||
+ //This is invokable from qml, so at any moment
|
||||
+ //we can't be sure the model exists
|
||||
+ if (!m_model) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
for (const QString wallpaperCandidate : m_model->wallpapersAwaitingDeletion()) {
|
||||
removeWallpaper(wallpaperCandidate);
|
||||
}
|
||||
--
|
||||
2.3.5
|
||||
|
@ -0,0 +1,30 @@
|
||||
From 08cbba07eb8927ce3a0f864eda8dfe1f8f1a6e44 Mon Sep 17 00:00:00 2001
|
||||
From: Emmanuel Pescosta <emmanuelpescosta099@gmail.com>
|
||||
Date: Wed, 29 Apr 2015 12:28:50 +0200
|
||||
Subject: [PATCH 10/12] Fix a crash in
|
||||
PowermanagementEngine::populateApplicationData when the given name is empty.
|
||||
|
||||
Use QString::section instead of QString::split + QList::last (which requires
|
||||
a non empty list) to prevent the crash.
|
||||
|
||||
REVIEW: 123555
|
||||
---
|
||||
dataengines/powermanagement/powermanagementengine.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dataengines/powermanagement/powermanagementengine.cpp b/dataengines/powermanagement/powermanagementengine.cpp
|
||||
index 2fbf23fb9cc1df8ae45d2cb68f7145642996c149..ca8d77d3537f12d45526c1aed55b44b6e29394bc 100644
|
||||
--- a/dataengines/powermanagement/powermanagementengine.cpp
|
||||
+++ b/dataengines/powermanagement/powermanagementengine.cpp
|
||||
@@ -647,7 +647,7 @@ void PowermanagementEngine::populateApplicationData(const QString &name, QString
|
||||
m_applicationInfo.insert(name, qMakePair(*prettyName, *icon));
|
||||
} else {
|
||||
*prettyName = name;
|
||||
- *icon = name.split(QLatin1Char('/'), QString::SkipEmptyParts).last().toLower();
|
||||
+ *icon = name.section(QLatin1Char('/'), -1).toLower();
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.3.5
|
||||
|
@ -0,0 +1,81 @@
|
||||
From 83ec35b632ee495df4b3c6f33f7ca33bca398a8f Mon Sep 17 00:00:00 2001
|
||||
From: Martin Klapetek <mklapetek@kde.org>
|
||||
Date: Fri, 1 May 2015 14:51:37 +0200
|
||||
Subject: [PATCH 11/12] [notifications] Always check first if the dispatch
|
||||
timer isn't running already
|
||||
|
||||
That should prevent various mis-queueings. If the timer is running, the
|
||||
queue will get processed once the timer times out.
|
||||
|
||||
CCBUG: 342605
|
||||
---
|
||||
.../notifications/plugin/notificationshelper.cpp | 25 +++++++++++++++++-----
|
||||
1 file changed, 20 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/applets/notifications/plugin/notificationshelper.cpp b/applets/notifications/plugin/notificationshelper.cpp
|
||||
index 37375d01b09ed399a4f0fe01c60821bc53f7f151..b56e3933bc5ee23bb53892126c5af91caee74cc6 100644
|
||||
--- a/applets/notifications/plugin/notificationshelper.cpp
|
||||
+++ b/applets/notifications/plugin/notificationshelper.cpp
|
||||
@@ -164,7 +164,9 @@ void NotificationsHelper::processShow()
|
||||
repositionPopups();
|
||||
QTimer::singleShot(300, popup, SLOT(show()));
|
||||
|
||||
- m_dispatchTimer->start();
|
||||
+ if (!m_dispatchTimer->isActive()) {
|
||||
+ m_dispatchTimer->start();
|
||||
+ }
|
||||
}
|
||||
|
||||
void NotificationsHelper::processHide()
|
||||
@@ -204,7 +206,9 @@ void NotificationsHelper::processHide()
|
||||
repositionPopups();
|
||||
}
|
||||
|
||||
- m_dispatchTimer->start();
|
||||
+ if (!m_dispatchTimer->isActive()) {
|
||||
+ m_dispatchTimer->start();
|
||||
+ }
|
||||
}
|
||||
|
||||
void NotificationsHelper::displayNotification(const QVariantMap ¬ificationData)
|
||||
@@ -243,7 +247,12 @@ void NotificationsHelper::displayNotification(const QVariantMap ¬ificationDat
|
||||
m_showQueue.append(notificationData);
|
||||
m_mutex->unlock();
|
||||
|
||||
- processQueues();
|
||||
+ if (!m_dispatchTimer->isActive()) {
|
||||
+ // If the dispatch timer is not already running, process
|
||||
+ // the queues directly, that should cut the time between
|
||||
+ // notification emitting the event and popup displaying
|
||||
+ processQueues();
|
||||
+ }
|
||||
}
|
||||
|
||||
void NotificationsHelper::closePopup(const QString &sourceName)
|
||||
@@ -258,7 +267,10 @@ void NotificationsHelper::closePopup(const QString &sourceName)
|
||||
m_mutex->lockForWrite();
|
||||
m_hideQueue.append(popup);
|
||||
m_mutex->unlock();
|
||||
- processQueues();
|
||||
+
|
||||
+ if (!m_dispatchTimer->isActive()) {
|
||||
+ processQueues();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,7 +286,10 @@ void NotificationsHelper::onPopupClosed()
|
||||
m_mutex->lockForWrite();
|
||||
m_hideQueue << popup;
|
||||
m_mutex->unlock();
|
||||
- processQueues();
|
||||
+
|
||||
+ if (!m_dispatchTimer->isActive()) {
|
||||
+ processQueues();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.3.5
|
||||
|
@ -0,0 +1,47 @@
|
||||
From af3081abe2337c691cd2d310951ffd20f21da00d Mon Sep 17 00:00:00 2001
|
||||
From: Martin Klapetek <mklapetek@kde.org>
|
||||
Date: Fri, 1 May 2015 14:54:47 +0200
|
||||
Subject: [PATCH 12/12] [notifications] Clear notification from show queue if
|
||||
it's closed before it's shown
|
||||
|
||||
It can happen that a notification is placed in the show queue and then
|
||||
it's closed (eg. programatically) before it was even shown. In this case
|
||||
the notification must be cleared from the show queue otherwise it will
|
||||
get displayed and hidden but the popup is never freed for reuse,
|
||||
resulting in notificaions starting at higher position from the panel.
|
||||
|
||||
BUG: 342605
|
||||
---
|
||||
applets/notifications/plugin/notificationshelper.cpp | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/applets/notifications/plugin/notificationshelper.cpp b/applets/notifications/plugin/notificationshelper.cpp
|
||||
index b56e3933bc5ee23bb53892126c5af91caee74cc6..e2880eb235d99f2a9930d648d3ccc5a296c4c354 100644
|
||||
--- a/applets/notifications/plugin/notificationshelper.cpp
|
||||
+++ b/applets/notifications/plugin/notificationshelper.cpp
|
||||
@@ -263,6 +263,22 @@ void NotificationsHelper::closePopup(const QString &sourceName)
|
||||
bool shouldQueue = popup && !m_hideQueue.contains(popup);
|
||||
m_mutex->unlock();
|
||||
|
||||
+ // Make sure the notification that was closed (programatically)
|
||||
+ // is not in the show queue. This is important otherwise that
|
||||
+ // notification will be shown and then never closed (because
|
||||
+ // the close event arrives here, before it's even shown)
|
||||
+ QMutableListIterator<QVariantMap> i(m_showQueue);
|
||||
+ while (i.hasNext()) {
|
||||
+ if (i.next().value("source") == sourceName) {
|
||||
+ qDebug() << "########|" << " (locking mutex for write)";
|
||||
+ m_mutex->lockForWrite();
|
||||
+ qDebug() << "########|" << "Removing old data" << i.value().value("summary").toString();
|
||||
+ i.remove();
|
||||
+ m_mutex->unlock();
|
||||
+ qDebug() << "########|" << " (unlocking mutex)";
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (shouldQueue) {
|
||||
m_mutex->lockForWrite();
|
||||
m_hideQueue.append(popup);
|
||||
--
|
||||
2.3.5
|
||||
|
@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat May 2 10:20:55 UTC 2015 - hrvoje.senjan@gmail.com
|
||||
|
||||
- Added patches from upstream:
|
||||
0001-Disable-indeterminate-animation-for-suspended-jobs.patch,
|
||||
0003-notifications-Replace-apos-with-as-apos-is-not-suppo.patch
|
||||
(kde#346710),
|
||||
0004-Match-window-switch-dialog-borders-with-addwidgets-s.patch
|
||||
(kde#345614),
|
||||
0005-Manually-keep-track-of-jobs-sources.patch (kde#346673),
|
||||
0006-Fix-running-applet-calculation.patch,
|
||||
0008-Only-restart-Timer-when-the-dialog-is-visible.patch,
|
||||
0009-check-for-model-existence.patch (kde#346870),
|
||||
0010-Fix-a-crash-in-PowermanagementEngine-populateApplica.patch,
|
||||
0011-notifications-Always-check-first-if-the-dispatch-tim.patch
|
||||
and 0012-notifications-Clear-notification-from-show-queue-if-.patch
|
||||
(kde#342605)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 23 13:27:33 UTC 2015 - hrvoje.senjan@gmail.com
|
||||
|
||||
|
@ -34,6 +34,16 @@ Patch1: create_kdehome.patch
|
||||
# PATCH-FIX_OPENSUSE 0003-Remove-export-of-QT_PLUGIN_PATH.patch -- we install plugins to directory known to Qt5, so export just pollutes both Qt4 and Qt5 plugins
|
||||
Patch2: 0003-Remove-export-of-QT_PLUGIN_PATH.patch
|
||||
# PATCHES 100-200 and above are from upstream 5.3 branch
|
||||
Patch100: 0001-Disable-indeterminate-animation-for-suspended-jobs.patch
|
||||
Patch101: 0003-notifications-Replace-apos-with-as-apos-is-not-suppo.patch
|
||||
Patch102: 0004-Match-window-switch-dialog-borders-with-addwidgets-s.patch
|
||||
Patch103: 0005-Manually-keep-track-of-jobs-sources.patch
|
||||
Patch104: 0006-Fix-running-applet-calculation.patch
|
||||
Patch105: 0008-Only-restart-Timer-when-the-dialog-is-visible.patch
|
||||
Patch106: 0009-check-for-model-existence.patch
|
||||
Patch107: 0010-Fix-a-crash-in-PowermanagementEngine-populateApplica.patch
|
||||
Patch108: 0011-notifications-Always-check-first-if-the-dispatch-tim.patch
|
||||
Patch109: 0012-notifications-Clear-notification-from-show-queue-if-.patch
|
||||
# PATCHES 201-300 and above are from upstream master/5.4 branch
|
||||
BuildRequires: alsa-devel
|
||||
BuildRequires: baloo5-devel >= %{version}
|
||||
@ -191,6 +201,16 @@ workspace. Development files.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
%patch104 -p1
|
||||
%patch105 -p1
|
||||
%patch106 -p1
|
||||
%patch107 -p1
|
||||
%patch108 -p1
|
||||
%patch109 -p1
|
||||
|
||||
%build
|
||||
%cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=share/locale/kf5
|
||||
|
Loading…
x
Reference in New Issue
Block a user