Commit graph

4752 commits

Author SHA1 Message Date
Ivailo Monev
4a15907fbb kdeui: remove unused static g_bMacLabels variable
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 21:03:04 +03:00
Ivailo Monev
217c3c1f66 kdeui: remove unused Mod, SymVariation and SymName structs
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 21:00:39 +03:00
Ivailo Monev
f1d3035572 kdeui: initialize static variables in kkeyserver_x11
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 20:56:34 +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
856b853b89 kutils: de-duplicate KAudioPlayerModule code
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 20:15:29 +03:00
Ivailo Monev
1efda255a2 kdeui: KKeyServer::modToString() function optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 19:56:21 +03:00
Ivailo Monev
bdcac11bc5 kdeui: initialize static variables in kkeyserver source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 19:54:22 +03:00
Ivailo Monev
8994ef1ef3 kdeui: remove unused variable in KKeyServer::stringUserToMod() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 19:53:07 +03:00
Ivailo Monev
0f6d7ebd2d kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 19:52:23 +03:00
Ivailo Monev
4a40419a35 kutils: disable copying of KAudioPlayer, KMediaPlayer and KMediaWidget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 17:15:38 +03:00
Ivailo Monev
95d6bcb64b kdeui: const-ify variable in KNotificationConfigWidget::save()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 17:15:15 +03:00
Ivailo Monev
a1ff789266 kdeui: save and restore the size of the KNotificationConfigWidget dialog
another thing that was not done in the old implementation

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 16:32:54 +03:00
Ivailo Monev
4444517cfd kdeui: sort the sounds list in KNotificationConfigWidget::setNotification()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 16:25:09 +03:00
Ivailo Monev
930066e070 kdecore: KTimeZone documentation review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 08:42:49 +03:00
Ivailo Monev
079825586f kdeui: setup internal KNotificationConfigWidget widget header once
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 08:31:28 +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
0bb76f27f9 kdecore: KService::mimeTypes() and KServicePrivate::serviceTypes() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 04:55:42 +03:00
Ivailo Monev
a65161f7b0 kdeui: mark the sound action as unavailable when no sound has been specified
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 04:11:05 +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
d3133731f5 kdeui: remove unused variable in KNotificationConfigWidget::setNotification()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 02:21:37 +03:00
Ivailo Monev
4285a34acf kdeui: stretch the event header index of KNotificationConfigWidget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 02:07:56 +03:00
Ivailo Monev
78493ea034 kdecore: USB IDs database update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 01:18:31 +03:00
Ivailo Monev
a7a8eab1a6 kdeui: typo
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-25 23:48:26 +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
11f6e4b586 kutils: set the ID of the KAudioPlayer from the KDED module
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-25 22:08:15 +03:00
Ivailo Monev
9a8f057278 kdeui: semi-working KNotificationConfigWidget
read-only, save not implemented yet

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-25 22:06:17 +03:00
Ivailo Monev
5cc7e3255b kdecore: log debug message from KDBusConnectionPool::isServiceRegistered() when service is registered
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-25 20:33:41 +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
80d185a980 kio: rename X-KDE-SysTray to X-KDE-HasTrayOption
the tray feature of KApplication works like a charm:
https://ibb.co/sbqxjVr

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-24 16:30:40 +03:00
Ivailo Monev
8b3009ac6a kdeui: fix KApplication status notifier item actions shortcut conflict
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-24 15:43:03 +03:00
Ivailo Monev
35871587b5 kdeui: remove unused and redundant KStatusNotifierItem::showMessage() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-24 04:56:03 +03:00
Ivailo Monev
4b632fcae6 kdeui: implement status notifier for any KApplication instance
optional feature that requires "-tray" command line argument and replaces
what the `ksystraycmd` program was doing. requires "X-KDE-SysTray" entry
in the desktop file as indicator that the application supports "-tray"
argument, unlike `ksystraycmd` does not spawn extra process and even
session management will work properly for it (the argument is manually
added to the restart command)

the feature is very much tide to KMainWindow (and derived classes) but the
overhead is next to none when the "-tray" argument is not specified (the
status notifier is not created in such case) however if created an
expensive tooltip update is done whenever a window changes (may have to
look into optimizing it but then again - most of the code does nothing
unless the "-tray" argument is specified)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-24 01:41:02 +03:00
Ivailo Monev
6fe3dbfa76 kdecore: remove reference to non-existing command line options
KUniqueApplication no longer has additional command line options

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 21:58:05 +03:00
Ivailo Monev
c5521e791f kdeui: add scaled-down pixmap from KStatusNotifierItemPrivate::iconToVector() as fallback
because the status notifier data engine (see
kde-workspace/plasma/dataengines/statusnotifieritem/statusnotifieritemsource.cpp)
assumes that pixmaps are not larger than KIconLoader::SizeLarge

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 21:12:24 +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
35d700e9b6 kdeui: assume that the platform plugin has set the starting drag distance
the default of the platform plugin is QApplication::startDragDistance() too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 05:01:28 +03:00
Ivailo Monev
7408814734 kdeui: cache some fonts via QApplication
bonus points for setting fixed font for QTextEdit and QPlainTextEdit by
default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 04:42:50 +03:00
Ivailo Monev
696545b1ac kdeui: skip KColorButton tests if 40.color file is not found
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 02:02:20 +03:00
Ivailo Monev
79b9c8d634 kutils: check if there is plugin for the images from the KExiv2 test
fixes test failures in case the jpg plugin is not installed

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 01:43:38 +03:00
Ivailo Monev
6f106c7068 kdeui: check aliases from KImageIO::isSupported()
because MIME strings (those from shared-mime-info package for example)
tend to change and exact MIME string match is unreliable

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 01:14:44 +03:00
Ivailo Monev
fa0eed0087 kdeui: do not set icons for separators from KDBusMenuImporter
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 00:57:07 +03:00
Ivailo Monev
1f2f01be55 kdeui: better KIconEngine::availableSizes()
expensive as it may be it is more reliable check if the icon is actually
available than QIcon::isNull() (for system icons anyway)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 22:43:10 +03:00
Ivailo Monev
3b5777a92a kdeclarative: KIconProvider::requestPixmap() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 22:11:37 +03:00
Ivailo Monev
0834b257bf kdeclarative: fix possible crash
in case the id is not valid

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 21:54:22 +03:00
Ivailo Monev
ba2d781573 kdeui: implement availableSizes() for KIcon
it is actually implemented in the underlaying icon engine (KIconEngine)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 20:50:09 +03:00