On teardown with the popup expanded, the cleanup handler might fire with us already having been deleted.
BUG: 397105
FIXED-IN: 5.12.7
Differential Revision: https://phabricator.kde.org/D14651
We don't merge URLs and it probably doesn't make sense with the way grouping is currently implemented.
BUG: 396741
FIXED-IN: 5.12.7
Differential Revision: https://phabricator.kde.org/D14287
Summary:
Qt labels support a HTML subset, using a completely internal parser in
QTextDocument.
The Notification spec support an even smaller subset of notification
elements.
It's important to strip out irrelevant tags that could potentially load
remote information without user interaction, such as img
src or even <b style="background:url...
But we want to maintain the basic rich text formatting of bold and
italics and links.
This parser iterates reads the XML, copying only permissable tags and
attributes.
A future obvious improvement would be to merge the original regular
expressions into this stream parser, but I'm trying to minimise
breakages to get this into 5.12.
Test Plan:
Moved code into it's own class for easy unit testing
Tried a bunch of things, including what the old regexes were doing
Also ran notify send with a few options to make sure things worked
Reviewers: #plasma, fvogt
Reviewed By: fvogt
Subscribers: aacid, fvogt, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10188
Summary:
When the service is regsitered we want to have all the internal routing
pre-configured. Otherwise pending calls (such as pending DBus activated
calls) can be processed before the path is registered and then fail with
an error that the path does not exist.
Also remove the fairly redundant check on registerObject. That can return
false if some object in this process has registered itself on that path; but in that
case, the very last thing we'd want to do is call unregisterService.
Test Plan:
Generated a load of notifications
Started plasma
Ouptut showed valid return on GetCapabilities, not an error on missing path
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7596
Now that we have "desktop-entry" available, expose this information in the data engine.
This could enable a notification implementation to show the application name or do smarter grouping.
The naming is somewhat suboptimal but "appName" and "appIcon" are already occupied and predate this.
I also didn't just want to overwrite the hints the application gives, especially not the "appIcon" which is used as notification icon.
Differential Revision: https://phabricator.kde.org/D6106
This will listen for a signal on the system DBus to show a notification to all
users on the current machine. This allows prettier and more versatile
notifications than using wall/write.
This is disabled by default but can be enabled in e.g. ~/.config/plasmashellrc
per user or /etc/xdg/plasmashellrc globally:
[Notifications]
ListenForBroadcasts=true
Differential Revision: https://phabricator.kde.org/D3606
Summary:
Sometimes we get notifications for events that are also displayed by
Plasma, giving us some rather annoying popups.
This patch provides a service on the notification dataengine so that
other plasmoids can block the notification applet from processing those
notifications.
Intended use case is for the network manager plasomid to not show a
notification whilst the dialog is open, as notifications come from kded.
However it's kept generic enough that other plasmoids can filter on
other hints, such as category or desktop file.
Test Plan:
Wrote relevant patch for plasma-nm
Didn't get notification toggling a network whilst the popup was open
Did after I closed the popup
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3589
Summary: BUG: 372112
Test Plan:
notify-send "This long title that goes on and on" - wrapped with no
title
notify-send "subject1" "msg1"
notify-send "subject1" "msg2" - appeared as one message with two lines
notify-send "subject2" "msg1"
notify-send "subject3" "msg2" - appeared as two notifications
Reviewers: #plasma
Subscribers: mart, broulik, apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3425
When a notification contains URLs, they will be shown as a large preview (in case of one
thumbnail) or multiple in a strip (similar to what Klipper does).
The previews can be clicked to open the file and can be dragged anywhere (e.g. to a
webbrowser or chat window).
Differential Revision: https://phabricator.kde.org/D3539
If an application explicitly requests a notification to replace another one (replaces_id set),
don't group it with another notification.
When creating a KNotification object and then updating it by calling e.g. setText it would
just append it to the already shown notification.
Differential Revision: https://phabricator.kde.org/D2954
Otherwise we end up with a huge notification containing all previously finished jobs.
BUG: 360156
FIXED-IN: 5.7.0
Differential Revision: https://phabricator.kde.org/D1478
It's nice that we offer to configure an application's notification settings
from a notification. Usually, however, you're lost in a dialog of notifications
and you have no idea which event you just saw.
CHANGELOG: When pressing the "configure" button on a notification, the actual
notification type will be pre-selected in the upcoming notifications list
REVIEW: 126570
If the timeout parameter is greater than 0, the notifications server
should honor that setting.
Reviewed-by: Kai Uwe Broulik
BUG: 350164
FIXED-IN: 5.4.0
This patch makes Plasma always be the Notification service provider if
that option is enabled in the applet settings and/or if the applet is
present somewhere (otherwise the dataengine is not loaded). On startup,
it will get the PID of the current Notifications service, send SIGTERM
to it and register its own service.
REVIEW: 124102
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
Even though the specification makes it perfectly clear that you should
query the notification server and only use supported hints, gnome and
libnotify does not.
Given the specification has changed in a non-compatiable way, this
causes image-data/image-path to break.
This patch supports 1.2 fields
Submitted by: Konstantin
BUG: 344885
Reviewed-by: David Edmundson
With this patch the text is first trimmed from whitespace at the
beginning and end, then all \ns are converted to <br/> (as before), then
the text replaces all remaining inner whitespace with single space and
finally, if there are two or more new lines in succession, it turns it
into just one.
REVIEW: 122314
BUG: 343532
Amarok sets "Now Playing" title for every notification, which made it
grouped rather than replaced, so group only if the app_name is not in
the "always replace" list.
Reviewed-by: Kai Uwe Broulik
This prevents some apps to spam lots of notifications when all it needs
is actually just one single notification.
Imagine you're switching songs in your playlist quickly and each song
change sends new notification, but when you get to the tenth song, you
still see the notification from the 3rd song (because timeouts) and you
don't really care about all those songs changes still in the queue as
you see it in the playlist anyway.
So this patch limits certain apps to have only one single notification
which is always updated. So far Clementine and Spotify is there.
Switching songs or changing playback status creates only one single
popup.
Additionally, the list gets added entries from a config file too.
REVIEW: 118796
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo kde-workspace, frameworks branch, at commit
049113e719dd2fc4446d054fa1a3aada330094f0