Commit graph

142 commits

Author SHA1 Message Date
Ivailo Monev
d077f26ce5 kdeui: deal with TODO related to KKeySequenceWidget
it is simple - as soon as a second key sequence is added to action it will
be a partial match with itself (atleast)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 09:08:48 +03:00
Ivailo Monev
080d40fc9f kdeui: set flags for the KShortcutsEditor items
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 05:24:01 +03:00
Ivailo Monev
f8dbe8fb29 kdeui: copy the action tool and status tips in KShortcutsEditor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 05:08:59 +03:00
Ivailo Monev
3b7d786733 kdeui: redo the items when importing configuration in KShortcutsEditor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 03:57:50 +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
d5f125511c kdeui: use the main component as fallback in KShortcutsEditor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 03:13:12 +03:00
Ivailo Monev
ef7148ff44 kdeui: sort internal KShortcutsEditor widget items and show columns based on options and items count
there may be a case of not having any items (e.g. only global shortcuts are
do be shown but there are none), have to figure out how to handle that

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 02:44:23 +03:00
Ivailo Monev
d55aff3489 kdeui: do not add widgets for non-configurable shortcuts
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 00:14:27 +03:00
Ivailo Monev
d3fd904c29 kdeui: implement KShortcutsEditor::allDefault() and apply changes to the sequences
now to figure out if importing of action collections settings should be
magic or done by a KShortcutsEditor::importConfiguration() call (there is
only one place where it is called, see kwin/kcmkwin/kwindesktop/main.cpp)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 23:09:51 +03:00
Ivailo Monev
1e00291be2 kdeui: set the top-level items icon in KShortcutsEditor
kinda hack tho but makes it easier to distinguish between main and plugin
action collection shortcuts, if there is only one top-level item it should
not be visible (decorated) for cases like kwin KCM but this will be done
later on

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 22:34:39 +03:00
Ivailo Monev
9ca75a8355 kdeui: implement KShortcutsEditor::keyChange() signal
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 22:18:55 +03:00
Ivailo Monev
e7abdd765f kdeui: setup conflict detection in KShortcutsEditor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 22:00:07 +03:00
Ivailo Monev
f9fdbc6a7e kdeui: simplify reading and writing of shortcut settings
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 21:40:13 +03:00
Ivailo Monev
bbf7fddba4 kdeui: expand root KShortcutsEditor items and look for exisiting one first
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 20:48:23 +03:00
Ivailo Monev
f623641b73 kdeui: semi-working KShortcutsEditor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 13:41:29 +03:00
Ivailo Monev
378011afe8 kdeui: remove unused KShortcutsEditor::ActionType enums
were not even used in the old implementation

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 11:12:13 +03:00
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