Commit graph

126 commits

Author SHA1 Message Date
Ivailo Monev
843463c95d kdeui: drop KSortcut
missing proper configuration interface for the shortcuts, the old one
was borked anyway

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 10:19:03 +03:00
Ivailo Monev
d725bcef69 kdeui: remove old KGlobalAccel autoloading feature leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-22 02:51:29 +03:00
Ivailo Monev
a70b781c58 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 21:37:05 +03:00
Ivailo Monev
ac1f9e2eb9 kdeui: KMessageBox optimization
only for the case when notification via KNotification is done

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 20:40:07 +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
093ad1d84d kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 19:17:23 +03:00
Ivailo Monev
4857f6cd17 kdeui: rework KAboutKdeDialog to expand the text as much as possible
also to parent widgets properly

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-15 22:55:46 +03:00
Ivailo Monev
45674c0c4e kdeui: replace KFontDialog and KFontChooser with QFontDialog
requires the following commit from the Katie repo:
97fea30784dfdc41a6599ea31219d0b366d8efaa

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-31 19:01:45 +03:00
Ivailo Monev
bb11a3e5f4 kdeui: replace KFontComboBox with QFontComboBox
one less class to maintain with substitute provided by Katie

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-31 01:40:10 +02:00
Ivailo Monev
75b9cfddd3 generic: const-ify private data pointers where copying is disabled
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-23 06:49:59 +02:00
Ivailo Monev
2cee1a15f8 kdeui: replace QLabel with KPixmapWidget in KPasswordDialog
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 16:16:00 +03:00
Ivailo Monev
23cc474596 kdeui: replace QLabel with KPixmapWidget in KNewPasswordDialog
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-29 19:20:18 +03:00
Ivailo Monev
099f49db36 generic: replace QLabel with the new KPixmapWidget class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-29 18:06:09 +03:00
Ivailo Monev
88598523d0 kdeui: new KPixmapWidget
the idea for QImage/QPixmap-optimized widget occurred to me while
writing kimageviewer (see the kde-playground repo), unlike the widget I
wrote for kimageviewer this one supports drag-n-drop tho and is drop-in
replacement for QLabel when showing only a pixmap is required. the
widget also shows a small image while dragging ala ksnapshot

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-29 08:59:51 +03:00
Ivailo Monev
048737d48c kdeui: remove bogus bits in KAction::setGlobalShortcut()
the keycode for invalid shortcuts (QKeySequence) is zero, the key could be
zero if alternative shortcut is not set and there is only primary shortcut.
also, Katie's QKeySequence supports only two key combinations now - one for
primary and one for alternative, see the following commit in the Katie
repo:
d03db175529e800f62acd858badb5622be2e00af

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-27 17:23:59 +03:00
Ivailo Monev
2bf47096e8 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-27 07:08:35 +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
9fee47106a kdeui: initialize KTimerDialogPrivate::buttonOnTimeout member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 15:51:24 +03:00
Ivailo Monev
437a488d1a kdeui: move private KTimerDialog members to private data pointer
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 15:44:06 +03:00
Ivailo Monev
e0d476372c kdeui: move KTimerDialog source and header from kde-workspace
there were 3 copies of it, only one with minor changes. by moving it
here any changes that have to be done to it will not have to be done to
the copies aswell.

TODO: move its private members to KTimerDialogPrivate

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 15:18:39 +03:00
Ivailo Monev
12b8b0b3ae kdeui: remove unused KAssistantDialog class
use QWizard instead

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 13:53:21 +03:00
Ivailo Monev
b3b190e6ae kdeui: raise and activate KMessageBox and queued KDialog windows
this is mostly for status notifier dialogs, if the dialogs are not raised
and activated they will block (because QDialog::exec() is called) and
manual activation has to be done (via alt+tab)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 02:02:58 +03:00
Ivailo Monev
cc38aa13b0 kdeui: remove non-operational bits
Katie has the option to set printer properties and options anyway, as
for why the bits are non-operational - it is because of the version
check which is lower than the current Katie version

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 21:10:02 +03:00
Ivailo Monev
9945c07d7f kdeui: remove reference to non-existing KPasswordEdit class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 20:37:36 +03:00
Ivailo Monev
fa51ecdfaf kdecore: remove unused KAboutData methods and redundant constructor arguments
the homepage and the bugs email address shall always be defined in
kglobalsettings header for official Katana applications, libraries, etc.
the option to override them is still a thing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 17:41:54 +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
Ivailo Monev
0c2a65b0e9 kdeui: focus the first KNewPasswordDialog password widget on initialization
much like KPasswordDialog which does a lot of focus tricks depending on
its flags and which widgets are to be shown

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 16:11:09 +03:00
Ivailo Monev
4de3537a82 kdeui: new KTimeEdit widget
inspired by QTimeEdit but ment for timers

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 13:14:24 +03:00
Ivailo Monev
b323e4a95d kdeui: remove forward-declaration of now non-existing KCalendarWidgetPrivate class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 12:19:10 +03:00
Ivailo Monev
899f789b07 kdecore: move KToolInvocation to kdeui
to get rid of the KApplication signal which is a hack really

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 08:09:02 +00:00
Ivailo Monev
601193748c kdeui: show only a label from KSwitchLanguageDialog when translations are not installed
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 06:47:58 +03:00
Ivailo Monev
8da6fa7558 kdeui: preserve the translations order in KSwitchLanguageDialog
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 11:53:06 +03:00
Ivailo Monev
b8c4f73865 kdeui: implement KSwitchLanguageDialog
note that it does not change the locale language (yet), nor does is affect
it. it changes the translation language(s) - two different things!

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 11:16:27 +03:00
Ivailo Monev
b7e54f8e21 kdeui: stub KSwitchLanguageDialog
to be rewritten. date, time, days, etc. translation and conversion work
like a charm tho (when translated and supported by the locale classes
ofcourse):
https://ibb.co/hcW0dL3

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 00:40:39 +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
061a11fd43 kdeui: replace KDatePicker/KDateTable with new KCalendarWidget class
interestingly QLocale is not used for many things but that is about to
change, Katie uses it a lot internally (e.g. for QDateTime formatting
and such) so instead of bolting a calendar system on top of KLocale
perhaps a QLocale wrapped around in KLocale will fit the general idea
of using QLocale in widgets when necessary (as does QCalendarWidget).

that however means no way to specify a calendar system (in general,
other than changing the widgets locale itself) but the QDateTime and
related classes are tied to gregorian calendar already - the system
time itself carries no information about the calendar and any
conversions from one calendar to another are basically made up stuff
(there is the time zone thing ofcourse but that is not a calendar)

another interesting thing to note is that KLocale was written such that
it is read-write - changing the date formats for example is possible
because there are public KLocale methods for that.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 06:16:56 +03:00
Ivailo Monev
000c8af989 kdeui: remove unused date and time related widget classes
some of the classes date back to 2001 and 2002, still unused

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 02:48:22 +03:00
Ivailo Monev
f452e2e50b kdecore: reimplement KDateTime via QDateTime
KDateTime shall be used only for storing date and time while KLocale
shall be used to display such, not even going to test what KDateTime
does because it is basically a few methods on top of QDateTime now.

and because QDateTime knows not much about calendar systems while
KLocale supports several it makes sense for KDateTime to not be used for
displaying date and time thus the TODOs for KLocale are simply removed

note that KLocale still uses its own parser and formatter which means
that the change affects only KDateTime and its uses, not KLocale

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-21 07:51:13 +03:00
Ivailo Monev
4ed10bdd76 kdeui: do not change the KDialog size on details widget visibility change
because the details widget may be shown, the dialog manually resized and
when the details widget is hidden the manually set size gets overriden -
the dialog size should remain the same after manual resize!

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-12 20:47:47 +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
a6ffb2dbc0 kdeui: remove unused KPixmapRegionSelectorWidget and KPixmapRegionSelectorDialog classes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 07:23:23 +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
b600997970 kdeui: initialize KTipDatabase::Private member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-29 08:38:58 +03:00
Ivailo Monev
1955668732 kdeui: do not look for tip icons in <prefix>/share/kdewizard/pics
nothing installs icons there

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-29 05:57:44 +03:00
Ivailo Monev
01d26adc48 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-29 05:53:43 +03:00
Ivailo Monev
1f67d424e7 kdeui: initialize variable in KDialogQueue::Private::slotShowQueuedDialog()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-29 04:03:57 +03:00
Ivailo Monev
e555f8ce9b kdeui: initialize KDialogQueue::Private member in its constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-29 04:01:20 +03:00
Ivailo Monev
77046eb641 kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-29 03:47:30 +03:00
Ivailo Monev
4e98703f75 kdeui: KDialog::setCaption() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-29 03:28:24 +03:00
Ivailo Monev
82bbcf9b77 kdeui: remove deprecated KDialog methods
KDialog::updateGeometry() hides the QWidget::updateGeometry() method that
actually does something

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-29 03:02:31 +03:00