Commit graph

4876 commits

Author SHA1 Message Date
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
Ivailo Monev
0f50ef0a87 kdeui: KIconEngine::pixmap() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 20:48:55 +03:00
Ivailo Monev
58dfa5c884 kdeui: keep reference to the QByteArray object in x11SetCursorName() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 05:44:17 +03:00
Ivailo Monev
b4657deb95 kdeui: new KGlobalSettings signal and enum for global config change
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 04:28:15 +03:00
Ivailo Monev
d281fc7b64 kdecore: create the initial KTimeZone transition date in UTC spec
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 00:15:19 +07:00
Ivailo Monev
24f8640acd kdeui: simplify KGlobaSettings and do not setup mouse from it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 23:32:43 +07:00
Ivailo Monev
948a17ffb0 kdeui: partially revert 3dbd7b1da9
lots of work to be done on that one so for now just apply the palette

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 08:48:21 +07:00
Ivailo Monev
e741648f6e kded: do not assume prefixing the menu with XDG_MENU_PREFIX will result in valid menu file
if the menu file is uninstalled for example but XDG_MENU_PREFIX is still
set the menu becomes invalid

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 08:41:27 +07:00
Ivailo Monev
535ac857be kdeui: do not prefix the KDBusMenuImporter virtual method calls
otherwise the (possible) reimplementation is not called

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 18:56:43 +03:00
Ivailo Monev
3dbd7b1da9 kdeui: do not apply style and palette from KGlobalSettings
palette and style shall be applied by the platform plugin, the font is
independant of the full Katana session (look for
KGlobalSettings::generalFont() for example, font from config is used here
and there because the config and thus KGlobalSettings offer fine grained
font selection for different purposes)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 17:42:31 +03:00
Ivailo Monev
c1015be8c8 kdeui: remove reference to non-existing kDebugCleanup() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:51:53 +03:00
Ivailo Monev
791e27f106 kdeui: sync getKLauncherError() with KLauncher
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:46:08 +03:00
Ivailo Monev
a68302abc1 kdeui: do not change the cursor theme from KGlobalSettings
in full Katana session it is done by the input KCM and even by the
`startkde` script (so that cursor theme applies for any error messages
shown via `xmessage`). as for changing after startup it is again done by
the input KCM (via `XFixesChangeCursorByName()` calls and other stuff), the
change even applies when not in Katana session (i.e. `systemsettings`
changes the cursor theme even if not in Katana session) so it is redundant
to do it from KGlobalSettings and only the notification signal has to be
emitted

on a side note style and palette are applied by the platform plugin (see
kde-workspace/qguiplatformplugin_kde/qguiplatformplugin_kde.cpp) when in
full Katana session meaning style and palette also do not have to
applied by KGlobalSettings but that is for another commit because there
are some other things to take in account (such as style override via
command line argument and initializing plugin paths early, before
KApplication is constructed)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:28:01 +03:00
Ivailo Monev
73717efd83 kdeui: apply double-click, drag, scroll, etc. settings on KGlobalSettings::SETTINGS_MOUSE notification
the input KCM (which changes mouse settings) emits that change so it makes
sense to apply mouse-related settings to the application when it is
emitted. also notfication for KGlobalSettings::SETTINGS_QT was never
emitted

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:18:06 +03:00
Ivailo Monev
6ace1d4cae kdeui: KGlobalSettings and KApplication friendship has been broken
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:14:38 +03:00
Ivailo Monev
0dd60b4e64 kdeui: deal with TODO related to KGlobalSettings::activate()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:02:41 +03:00
Ivailo Monev
ee6cd48109 kdeui: remove unused KGlobalSettings::SettingsCategory::SETTINGS_POPUPMENU enum
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 15:53:07 +03:00
Ivailo Monev
998d57874d kio: use QString instead of KUrl as argument for KFileMetaDataPlugin::metaData()
for performance reasons (to not convert KUrl to QString from each plugin)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 00:34:54 +03:00
Ivailo Monev
762d5413a0 generic: change the home, bug report and help URLs
fortunately I've made it that easy

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 20:01:46 +03:00
Ivailo Monev
7694eb70ba kdecore: bump ksycoca version
because a50c72de91

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 19:30:40 +03:00
Ivailo Monev
8bc18c9962 kdecore: do not output entities from KCmdLineArgsStatic::parseAllArgs()
the output goes to the TTY and there is no rich text handler there, note
that the plain format for the "email" tag also contained entities (even
before the KuitSemantics reimplementation)

because the plain format for the "email" tag

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 19:20:12 +03:00
Ivailo Monev
2e0b2056c8 generic: update KDELibs4Config documentation, remove unused variables
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 18:22:52 +03:00
Ivailo Monev
14b62a7d3d kio: implement interface to change the "StartupWMClass" key of .desktop files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 03:03:09 +03:00
Ivailo Monev
1d2947b476 kdeui: KStartupInfoId::timestamp() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 01:02:48 +03:00
Ivailo Monev
f56c50e41a kdecore: drop redundant "emphasis" markup tag
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 23:28:54 +03:00
Ivailo Monev
f8e1de3728 kio: reimplement KService::DBusUnique
by using properties defined in the spec (see
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html)
what KService::DBusUnique (or X-DBUS-ServiceName and X-DBUS-StartupType)
was used for can be implemented but the difference is now standard
properties can be filled (with values that are correct) and (ab)used for
the same purpose, bonus points?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 22:34:44 +03:00
Ivailo Monev
a50c72de91 generic: drop support for startup notification via D-Bus service
just another way to do what ASN does, the KService::DBusWait mode was
not used too. with this change however all of the process setup code is
moved to a seperate class and the responsibility of KLauncher about ASN
is reduced (ASN now works better for process that fork but if application
claims ASN support and does not send ASN finish then the timeout will be
reached)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 19:53:14 +03:00