summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2016-12-05 15:00:14 +0100
committerKai Uwe Broulik <[email protected]>2016-12-05 15:00:14 +0100
commitb97fdfa293dd4de59046c19f08aa6a3b940a790c (patch)
treef32a6ae0a24d59605728bc278972d98e36a067c6
parent6c7a2a65c1b7953d322d1d4740c0ed4329257380 (diff)
[Notifications] Never manually hide() the NotificationPopup
Otherwise the positioner will get completely confused. When a notification is closed, the popup will already be closed in response to sourceRemoved. Also, when triggering an action, call closePopup instead of hiding the popup. Differential Revision: https://phabricator.kde.org/D3594
-rw-r--r--applets/notifications/package/contents/ui/NotificationPopup.qml11
-rw-r--r--applets/notifications/package/contents/ui/Notifications.qml3
2 files changed, 6 insertions, 8 deletions
diff --git a/applets/notifications/package/contents/ui/NotificationPopup.qml b/applets/notifications/package/contents/ui/NotificationPopup.qml
index 15a0d2f..979d34b 100644
--- a/applets/notifications/package/contents/ui/NotificationPopup.qml
+++ b/applets/notifications/package/contents/ui/NotificationPopup.qml
@@ -90,7 +90,7 @@ PlasmaCore.Dialog {
}
closeNotification(notificationProperties.source)
- notificationPopup.hide()
+ // the popup will be closed in response to sourceRemoved
}
onContainsMouseChanged: {
if (containsMouse) {
@@ -126,22 +126,19 @@ PlasmaCore.Dialog {
onClose: {
closeNotification(notificationProperties.source)
- notificationPopup.hide()
+ // the popup will be closed in response to sourceRemoved
}
onConfigure: {
configureNotification(notificationProperties.appRealName, notificationProperties.eventId)
- notificationPopup.hide()
+ notificationPositioner.closePopup(notificationProperties.source);
}
onAction: {
executeAction(notificationProperties.source, actionId)
actions.clear()
- notificationPopup.hide()
}
onOpenUrl: {
Qt.openUrlExternally(url)
- // we want to close the notification popup when opening a URL but
- // it should not be removed from the history, hence pretending it expired
- notificationTimer.triggered()
+ notificationPositioner.closePopup(notificationProperties.source);
}
}
}
diff --git a/applets/notifications/package/contents/ui/Notifications.qml b/applets/notifications/package/contents/ui/Notifications.qml
index 6826938..d0f2534 100644
--- a/applets/notifications/package/contents/ui/Notifications.qml
+++ b/applets/notifications/package/contents/ui/Notifications.qml
@@ -89,8 +89,9 @@ Column {
//try to open the id as url
} else if (id.indexOf("jobUrl#") !== -1) {
Qt.openUrlExternally(id.slice(7));
- notificationPositioner.closePopup(source);
}
+
+ notificationPositioner.closePopup(source);
}
function configureNotification(appRealName, eventId) {