Commit graph

38 commits

Author SHA1 Message Date
Ivailo Monev
2bfcabb4a4 kdeui: remove unused header inclusion
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-24 13:31:59 +03:00
Ivailo Monev
f9d58bcec1 kdeui: send notifications to plasma-windowed from KNotificationManager
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-24 13:30:03 +03:00
Ivailo Monev
704967c1b7 kdeui: remove unused KPlasmaJobTracker and KNotification data
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 06:42:36 +03:00
Ivailo Monev
a613f682f9 kdeui: correct connection in KNotificationManager::send()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-29 06:11:18 +03:00
Ivailo Monev
8869b0c019 kdeui: do not send configurable data from KNotification
it can safely be assumed that events send via KNotification are
configurable now

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-08 20:04:18 +03:00
Ivailo Monev
4b1f8441b9 kdeui: update KNotification documentation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-08 19:59:29 +03:00
Ivailo Monev
a4724b9d3a kdeui: do not send timeout data to the plasma applet
it is not matter of timeout, it is matter of the KNotification instance
being around for the actions. once it is not the notification actions
become non-operational. other than that notification stay indefinetly
in the notification area

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-08 19:50:02 +03:00
Ivailo Monev
99b8103de8 kdeui: cache some KNotification string objects
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-08 13:04:23 +03:00
Ivailo Monev
c46a4464b5 kdeui: break once notification is found in KNotificationManager
assuming pointers to KNotification are unique then there should be only
one entry

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-08 12:56:42 +03:00
Ivailo Monev
0ac04f8e9f kdeui: rework notification to use custom interface
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-08 10:15:29 +03:00
Ivailo Monev
095fd83c9b kdeui: increase automatic KNotification close delay to 1sec
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-15 05:27:18 +02:00
Ivailo Monev
bc8e0c451e kdeui: fix KNotification sound notification feature
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-19 19:53:55 +03:00
Ivailo Monev
cc6903476e kdecore: new KDirWatch methods to get and set the poll interval
requires the following commit from the Katie repo:
4795a577bff4f9db89c77195df763575a602bcc3

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-28 20:58:06 +03:00
Ivailo Monev
8703b0b0d5 kdeui: plug KNotificationManager memory leak
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-28 19:48:24 +03:00
Ivailo Monev
d6e335dbc6 kdeui: watch the notification configs for changes and lock KNotificationManager for thread-safety
in the old implementation KNotificationManager was not locked but it is
global static so it is subject to thread-safety issues thus it has to be
mutex-locked

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-28 19:41:37 +03:00
Ivailo Monev
e99b1b6e32 kdeui: round-trip to the event loop from KNotification::event() again
compat for ksmserver..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-27 02:03:29 +03:00
Ivailo Monev
eef26737e5 kdeui: use the global group comment as application name for the notification
questionable but the old implementation was doing it, as for why it is
questionable - it is more like a description rather than application name
(e.g. "Crash notifier" rather than "kcrash")

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-27 01:20:16 +03:00
Ivailo Monev
ed513261b3 kdeui: correct x-kde-appname notification hint
while in most cases it is the same as the main component name the always
correct value (now anyway) is the main group which is part of the event ID

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-27 01:05:14 +03:00
Ivailo Monev
bd07b86156 kdeui: do not return the created KNotification from KNotification::event()
to prevent stupidity, fixing issues is piece of cake when compatibility is
not concern

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 20:55:22 +03:00
Ivailo Monev
288d07c31d kdeui: delay the automatic deletion of non-persistent notifications by 500ms
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 20:41:03 +03:00
Ivailo Monev
37a2c8db4a kdeui: implement option to select any standard sound file for notifications
because the old KNotification implementation did not look for sounds
recursively it was not possible to set a relative sound file that is
supposed to not be in one of the main sound directories (e.g a sound in a
sub-directory like /usr/share/sounds/freedesktop/stereo/message.oga, for
such files the full path had to be set in the notification config but no
more)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 07:55:22 +03:00
Ivailo Monev
16bc82add7 kdeui: ensure the initial event ID is zero in KNotificationManager::send()
knowing how memory randomization and initialization works..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 03:20:28 +03:00
Ivailo Monev
031cc87d96 kdeui: implement save for KNotificationConfigWidget
another rewrite of bits dating back to 1997 done:
https://ibb.co/5GKtQT1

while working on it the idea of writing custom widget that will act as
checkbox but look something like a slider and using that instead of tables
popped up (the widget design itself is not new but using the widget in new
UIs will be).

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-25 23:12:14 +03:00
Ivailo Monev
5d5087023c kdeui: use the default player ID for KNotification sounds
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-25 22:10:53 +03:00
Ivailo Monev
54bacc25d2 kdeui: stub KNotificationConfigWidget UI
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-25 19:11:07 +03:00
Ivailo Monev
450120097d kdeui: reimplement KNotification
cleaning up the mess, everything but KNotificationConfigWidget is
implemented.

not only does it not require additional D-Bus service (knotify) to
function but also does not transmit pixmaps over D-Bus, the features
to execute command or log to file are dropped and will not be
implemented.

also about markup support in notifications - if the server does not
support markup then it is supposed to strip it, see the spec:
https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#backwards-compat
meaning nothing should be done by KNotification itself because it is not
a server, it is just a proxy.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-25 09:01:39 +03:00
Ivailo Monev
efe1b03f30 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 16:10:08 +03:00
Ivailo Monev
f672dcd69c kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 16:02:24 +03:00
Ivailo Monev
d51ed7beb4 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 15:53:28 +03:00
Ivailo Monev
51a8d308a1 kdeui: format notification source and header files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-27 10:10:44 +03:00
Ivailo Monev
36472304d8 kdeui: format knotification source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-27 09:49:21 +03:00
Ivailo Monev
3e64cf90bd generic: misc cleanups
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-06-03 22:16:21 +00:00
Ivailo Monev
76b834d054 generic: remove redundant KHBox and KVBox headers inclusions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-04-18 18:42:39 +00:00
Ivailo Monev
b451b9602e generic: misc cleanups 2015-09-22 10:34:04 +00:00
Ivailo Monev
a45755d5a1 generic: misc cleanups 2015-09-04 21:57:46 +00:00
Ivailo Monev
82fc15f54b generic: use CMake moc instead of automoc4 by default
for compatibilty reasons automoc4 support is not removed but it
shall be in the future. automoc4 has not been maintained for a
while (last commit is from 2011) and the stable release is from
2009.

CMake version >= 2.8.6 provides the functionality for mocking so
I see no reason to not make use of it.
2015-02-27 07:40:26 +00:00
Ivailo Monev
c7a2a17692 yet more windows and mac code remove 2014-11-19 15:30:39 +00:00
Ivailo Monev
814163a8dc initial import 2014-11-13 01:04:59 +02:00