Commit graph

189 commits

Author SHA1 Message Date
Ivailo Monev
8c8855d9a6 generic: drop temporary file option
any program launched with temporary file (as per the spec) argument
(because it does not support %u or %U) should not be responsible for
deleting the file, klauncher already handles that thus the option is
redundant. I don't know how other implemenatations (of program launchers)
do it but I cannot say I care either

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-16 01:37:20 +03:00
Ivailo Monev
3dc31e41cb kdeui: KToolInvocation review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 15:22:30 +03:00
Ivailo Monev
ae72f73768 kdeui: simplify KToolInvocation::invokeMailer()
thunderbird for one accepts a single URL (which probably is split into bits
and checked for query items). it does not have "t", "s", etc. placeholders
in its .desktop file so that whole map thing is not really working well

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 15:04:52 +03:00
Ivailo Monev
b90f90905b kio: move most of the KRun bits to KLauncher
two things doing the same thing - one has to go away. also KRun does not
fork and the launched service/application lifetime was bound to the
process launching it, that is not the case with klauncher - it is bound
to the session (in the usual case)

a few things on the TODO list but mostly for services/applications
lacking features

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 03:21:17 +03:00
Ivailo Monev
a8080b7dde kdeui: setup the session config instance for saving
comes with a warning, session management is tricky but it works like a
charm now

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 06:23:55 +03:00
Ivailo Monev
d79faf5d2e kdeui: do not ask top-level widgets for close twice
it could happen because after session management is done klauncher sends
SIGTERM to the programs (the session manager does not close the
applications)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 03:26:40 +03:00
Ivailo Monev
957f5be670 generic: remove session management support leftovers
the X11 bits anyway. bye, bye broken session management

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-09 08:47:21 +03:00
Ivailo Monev
0e0db0b815 kdeui: move session management to KApplicaiton
every comment about X11 and session management in general claims it was
broken, not going to claim otherwise. everything that does not use
KApplication shall not be involved into session management now and gets
the middle finger (SIGTERM or SIGKILL) after 5 sec by klauncher when the
session is done

also session management has to be explicitly enabled by applications
now, disabled by default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-09 08:29:51 +03:00
Ivailo Monev
ec7b5bd959 kdeui: new KDebugger class
I've had the idea about it in my head for years

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-26 07:43:17 +03:00
Ivailo Monev
d74d369e5e kdeui: simplify KActionCollection settings reading and writing
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 23:10:57 +03:00
Ivailo Monev
91751cc302 kdeui: read actions collections settings once application has started
and since this is done by KApplication it is bound to it, finally shortcuts
are saved and restored tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 03:28:47 +03:00
Ivailo Monev
cf229be24d kdeui: drop KCheckAccelerators
already have an idea about something like it but better

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 10:59:28 +03:00
Ivailo Monev
c31499dd07 generic: drop messages handler support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 20:17:56 +03:00
Ivailo Monev
4f55f6b021 kdeui: drop bogus WheelMouseZooms config option
no GUI interface to control that, kate also zooms (increases or decreases
the font size) with control modifier. for fast scrolling the shift modifier
is checked for by kate

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-06 21:49:09 +03:00
Ivailo Monev
72daced852 kdeui: replace KColorDialog with QColorDialog
same reason as KFontDialog

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-03 10:44:38 +03:00
Ivailo Monev
0c5d00727e generic: remove redundant Q_OS_UNIX definition checks
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-15 09:28:30 +02:00
Ivailo Monev
73b09f4bc7 kdeui: remove build-time warning about non-existing signal
I redid the tray - it is independant of X11, does not require D-Bus
glue-code (the status notifier and menu import/export) and is now entirely
plasma applets based

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-11-05 00:33:07 +02:00
Ivailo Monev
fbfb374b9c generic: drop scripting and tray support
after changes to multiple sub-projects (Katie, kdelibs, kde-workspace
and kde-extraapps) that finally happened, can write lots about it but I
will keep it short - by rewriting parts that were using js/qml (e.g. the
plasma applets) the desktop startup was reduced to half, also the legacy
tray thing shall be no more (anything that needs tray icon shall be a
plasma applet now) thus some applications and features will be dropped
aswell. see all repositories for the changes done

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-21 08:06:58 +03:00
Ivailo Monev
8ac9b27855 generic: don't sleep while waiting for D-Bus replies
waiting for D-Bus replies to finish is enough business

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 21:44:47 +03:00
Ivailo Monev
d03b3a3f47 kdeui: do not create startup ID from KToolInvocation
KToolInvocation does not check if the application/service that is to be
started actually supports startup notification, it is done by KLauncher and
KRun tho (as it should be)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 01:46:51 +03:00
Ivailo Monev
1969c7c22a kdeui: drop bogus multihead support
tottaly a hack, restoring applications on specific display will not work
either (not as long as it is possible to start session on any display, i.e.
restoring on specific display is unreliable)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-01 16:19:18 +03:00
Ivailo Monev
387bdaa93f generic: drop support for BrowserApplication config option
browser shall be determinted by the preferred service for "text/html",
"application/xhtml+xml" or any other MIME type for it (that includes
scheme handlers)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 21:22:56 +03:00
Ivailo Monev
9338606754 kdeui: fix possible double-free in KApplicationPrivate::parseCommandLine()
could happen only if "waitforwm" command line argument was passed and there
was no window manager

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-28 15:11:56 +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
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
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
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
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
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
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
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
1d2947b476 kdeui: KStartupInfoId::timestamp() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 01:02:48 +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
Ivailo Monev
32ac1e19f9 kdeui: drop now redundant KApplication hack
see the following commit in the Katie repo:
198625f679aabbe25097884ec0029bc55e0a84b8

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 00:40:20 +03:00
Ivailo Monev
09763a2377 kdeui: create the _NET_SUPPORTED atom on demand
fixes the "waitforwm" command line option
(KApplicationPrivate::parseCommandLine() was called before the X11 atom was
created and atom was invalid) and doubles as optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 00:27:11 +03:00
Ivailo Monev
d278c3c63c kdeui: new KDE_DEFAULT_CURSOR_THEME
to make it easy to change the default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 02:38:45 +03:00
Ivailo Monev
d41b63de00 kdeui: initialize KUniqueApplication::Private member in the constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 11:49:05 +03:00
Ivailo Monev
c0379cc431 kdeui: remove unused KGlobalSettings methods
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 11:46:24 +03:00
Ivailo Monev
bd063c8b56 generic: remove dead and irrelevant links references
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 14:26:19 +03:00
Ivailo Monev
be9d8967f7 kdeui: remove redundant KGlobalSettings::desktopGeometry() methods
QDesktopWidget is Xinerama aware and it can be disabled because I
implemented option for that, see the following commit in the Katie repo:
b7e4bae65f0cae7f3029b98980f638c077ecfc22

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