Commit graph

197 commits

Author SHA1 Message Date
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
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
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
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
07660bf9cd kio: drop support for X-KDE-WMClass and X-KDE-StartupNotify
see the following commit in kde-workspace repo:
f1f6ae7a3ec35e289df1f45cd47e71bd3c696fbe

on a side note the default for StartupNotify should probably be false as it
is unknown if the application actually supports startup notification is one
of the reasons why currently KLauncher does more than merely set an
environment variable and assume applications know what to do with it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 18:21:58 +03:00
Ivailo Monev
625373ffa8 kdecore: drop KDateTime
with the rewrite (see f452e2e50b),
KDateTime is just glue-code for compatibility now. the exception is
KDateTime::isNightTime() (written by me) which is used only in one place
(kde-workspace/plasma/dataengines/weather/ions/wetter.com/ion_wettercom.cpp)
and can be moved there

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-14 22:35:08 +03:00
Ivailo Monev
1177b5d671 kio: replace KFileMetaDataWidget::Private::initMetaInfoSettings() with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 04:49:10 +03:00
Ivailo Monev
7098b9d98e kio: remove unused and private KFileMetaDataWidget slots
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 04:46:07 +03:00
Ivailo Monev
964f78287f kio: call QMimeData constructor in KUrlDragPushButton::dragObject()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-29 20:54:14 +03:00
Ivailo Monev
1a45508306 kdecore: reimplement KLocale
by using QLocale in KLocale and separating the date, time and numbers
conversion from translation KLocale actually gets extended locale
support from QLocale (which uses CLDR data v43 currently). translation
remains unaffected. for comparison here is the result of two function
calls the result of which should explain the whole change:
KLocale::allLanguagesList().size() = 669
KLocale::installedLanguages().size() = 68

the first number is locales Katie supports, the second being the
number of languages Katana is translated into

KSwitchLanguageDialog needs a rewrite but that is on the TODO

also copyrighting KCatalog to me because I rewrote it, for reference:
881b47b8ea

KCalendarSystem gets the middle finger - batteries not included for date
and time. extra calendar systems can, but are unlikely to be, supported
in the future

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-26 23:50:18 +03:00
Ivailo Monev
53a5c81a3a kio: minor KRecentDocument::recentDocuments() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-21 01:46:20 +03:00
Ivailo Monev
a487c9edc6 kio: drop KFileItem metadata related getter and setter
first thing first - KFileMetaInfo does not support non-local files and
KFileItem is ment to be wrapper for both local and (most importantly)
remote (including virtual KIO) files. KIO::UDSEntry does not carry metadata
either so having a metadata getter and setter in KFileItem is simply
redundant, both are not tested and used only by plasma folderview applet
(see kde-workspace/plasma/applets/folderview/tooltipwidget.cpp)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-20 21:03:18 +03:00
Ivailo Monev
4e1fc45705 kio: remove unused KFileMetaInfo flags
when it comes to KFileMetaInfo its bottleneck is determening what plugin to
use for the given URL/path - determening MIME type, matching globs, etc.
and it still is quite fast to the point where the flags are simply
redundant

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-18 03:36:06 +03:00
Ivailo Monev
8e6b9e3b28 kio: do not set KFile::LocalOnly in KFileDialog::getExistingDirectoryUrl()
KFileDialog::getExistingDirectoryUrl() is used to get remote directories
too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 05:57:11 +03:00
Ivailo Monev
2e682648c9 kio: update comments about KFile::Mode enums
KFileWidget now handles directories properly - booyah!

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 06:24:48 +03:00
Ivailo Monev
74dc070da5 kfile: remove duplicate header inclusion
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 02:31:52 +03:00
Ivailo Monev
d45061c006 kio: remove redundant KRecentDocument::add() calls in KEncodingFileDialog methods
already done by KFileDialog, wasn't done by all KEncodingFileDialog methods
tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 11:42:19 +03:00
Ivailo Monev
85205ccecf kio: log KRecentDirs and KRecentDocument actions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 11:28:00 +03:00
Ivailo Monev
d965f23721 kio: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 10:03:53 +03:00
Ivailo Monev
4cc96022e8 generic: drop KFile::Tree and KFile::DetailTree modes
is interesting how things are all over kio and kfile for this

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 03:26:43 +03:00
Ivailo Monev
55458f706c kfile: purge KDirSelectDialog
that way file and directory dialogs will be consistent, not to mention
there were things that KDirSelectDialog was lacking such as resizable
places area.

more changes are needed to account for the directory mode
(KFile::Directory), currently for directory only mode the filter is set
to "All Folders" but it can be changed (the filter widget is not
disabled). also when an attempt to open non-existing directory by name
(via the name input widget) the error says "the file cannot be found"
- it should be "the directory cannot be found" for directory mode

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 03:25:54 +03:00
Ivailo Monev
ccd463e634 kio: adjust to desktop KIO slave removal
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-22 03:13:24 +03:00
Ivailo Monev
2db8c10c1c kio: minor KACLListViewItem::calcEffectiveRights() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-21 20:39:18 +03:00
Ivailo Monev
86e76231c7 kio: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-20 02:32:17 +03:00
Ivailo Monev
6141ff5771 kio: remove unused definition defined in config-kfile header
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-20 02:15:09 +03:00
Ivailo Monev
59b6598599 generic: remove bogus KMultiTabBarInternal and KACLListView reimplementations
there are no virtual QFrame::contentsMousePressEvent() and
QTreeWidget::contentsMousePressEvent() methods

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-20 01:49:01 +03:00
Ivailo Monev
9a27be0215 kio: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 06:05:10 +03:00
Ivailo Monev
e259bfaba9 kio: move KUrlPropsPluginPrivate::URLStr member to the scope it is used in
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 06:00:02 +03:00
Ivailo Monev
f933086926 kio: replace KPreviewPropsPlugin::createLayout() with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 05:37:27 +03:00
Ivailo Monev
3fe84d2508 kio: update KFileMetaPropsPlugin description
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 05:37:04 +03:00
Ivailo Monev
48e89aeea0 kio: consistent properties private classes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 05:10:12 +03:00
Ivailo Monev
337ebe6a21 kio: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 04:59:11 +03:00
Ivailo Monev
b334e292ff kio: move simplifiedExecLineFromService() function to the top
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 04:42:42 +03:00
Ivailo Monev
5c842d3303 kio: remove redundant writeEntry() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 04:37:22 +03:00
Ivailo Monev
ad61621e00 kio: reduces conditions in KDEPrivate::AppNodeLessThan() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 04:34:16 +03:00
Ivailo Monev
5436220b95 kio: KDesktopPropsPlugin::slotAdvanced() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 04:12:30 +03:00
Ivailo Monev
69aaffe8f4 kio: remove bogus break in KFilePermissionsPropsPlugin::updateAccessControls()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 03:42:23 +03:00
Ivailo Monev
66df922711 kio: initialize variable in KFilePermissionsPropsPlugin constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 03:05:53 +03:00
Ivailo Monev
b3a6606e0c kio: remove redundant KFilePermissionsPropsPluginPrivate destructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 02:56:42 +03:00
Ivailo Monev
af7077a0a3 kio: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 02:54:36 +03:00
Ivailo Monev
7b38e92e43 kio: remove redundant KComboBox forward-declaration
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 01:51:26 +03:00
Ivailo Monev
9e85a3efa0 kio: remove unused KPreviewPropsPlugin member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 01:48:24 +03:00
Ivailo Monev
30be334df2 kio: initialize KPropertiesDialogPluginPrivate member in its constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 01:45:10 +03:00
Ivailo Monev
ff202c6de0 kio: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 01:42:14 +03:00
Ivailo Monev
288498df73 kio: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 01:37:22 +03:00
Ivailo Monev
5fb662785b kio: remove redundant KFileMetaDataConfigurationWidget::Private destructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 01:32:18 +03:00
Ivailo Monev
c66d486a0e kio: set the placeholder text of the device widget from KDevicePropsPlugin constructor
instead of using the label as hint what to enter in case there are no
devices detected

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-15 23:18:46 +03:00
Ivailo Monev
986a303ff6 kio: KAutoMount and KAutoUnmount rewrite to use org.kde.SolidUiServer interface
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-15 22:05:16 +03:00
Ivailo Monev
1127336fa0 kio: remove unused KFileMetaDataConfigurationWidget::Private class member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-07 22:13:30 +03:00
Ivailo Monev
369cb4457c kio: remove redundant KFileMetaDataProvider::label() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-07 22:10:22 +03:00