Commit graph

5355 commits

Author SHA1 Message Date
Ivailo Monev
a4df5d73f9 kdeui: write shortcuts configuration only to regular config files
that xml gui stuff is pure garbage

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-26 01:09:52 +03:00
Ivailo Monev
e47359782c plasma: make Plasma::Applet::setGlobalShortcut() set the shortcut once only
the shortcut is managed internally by Plasma::Applet

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-26 01:08:31 +03:00
Ivailo Monev
1faf138d4b kdeui: do not emit KAction::globalShortcutChanged() when the default changes or when the shortcut is set for the first time
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-26 01:06:36 +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
11e40bd6d2 kdeui: ungrab all shortcuts from KGlobalAccelPrivate::remove()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 10:34:58 +03:00
Ivailo Monev
3996fa22a7 kdeui: grab as many shortcuts as possible from KGlobalAccel
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 09:45:32 +03:00
Ivailo Monev
2c8f18c893 kdeui: check for self-match in global shortcuts too from KKeySequenceWidget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 09:45:07 +03:00
Ivailo Monev
334ecceb27 plasma: set the associated action of the shortcut editor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 09:44:35 +03:00
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
40d573ff43 kdeui: add XGrabKey and XUngrabKey references
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 07:24:32 +03:00
Ivailo Monev
18e2f7d037 kdeui: implement shortcut blocking for KGlobalAccel and use it in KKeySequenceWidget
obviously recording global shortcuts was borked

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 07:14:06 +03:00
Ivailo Monev
a81a250707 kdeui: fix handling of more than one shortcut in KKeySequenceWidget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 06:24:55 +03:00
Ivailo Monev
35e1c708d0 kdeui: remove redundant display check in KStandardShortcut initialization function
QKeySequence is not wired to GUI bits

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 06:13:57 +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
667e1073f0 kdeui: steal the action global shortcut by setting it to empty QKeySequence and then removing it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 23:41:04 +03:00
Ivailo Monev
45ef26718a kdeui: emit globalShortcutChanged() from KAction
no way the grab failed or something other than KGlobalAccel grabs the
shortcut by force from KGlobalAccel, right?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 23:37:43 +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
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
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
a8906fbcf5 kdeui: testing build fix
tests pass to no surprise

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 06:15:13 +03:00
Ivailo Monev
39998ee94e kdeui: accept the ambiguous event in KAction::event()
with an upcomming change in Katie it is required to stop sending events

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 06:14:29 +03:00
Ivailo Monev
671d45fe1d generic: adjust to Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-22 04:29:48 +03:00
Ivailo Monev
b8266082ff Merge branch 'master' of ssh://bitbucket.org/smil3y/kdelibs 2024-04-22 02:55:06 +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
9c78166b87 kdecore: debug areas update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-22 00:38:11 +03:00
Ivailo Monev
594e901c4a kdeui: rework KGlobalAccel
global shortcut resolution (the KGlobalAccel methods) work on
application level, X11 as far as I can tell does not have a method to
tell which application has grabbed a key (to fill KGlobalShortcutInfo).
other than that no configuration interface for global shortcuts (not by
KGlobalAccel itself, plasma and its applets have interface for that),
also the shortcuts interface did not and still does not handle global
shortcuts well so that is something to look into.

one of the problems solved with this change is the fact that multiple
plasma applets (e.g. multiple instances of the keyboard applet) could
not use the same shortcut, now it is possible. as for which applet gets
the shortcut action it is the one that has the grab first - that is how
key grabbing works in X11

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-22 00:07:35 +03:00
Ivailo Monev
936a4e3e84 kdeui: new/delete size mismatch fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 21:40:37 +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
713c9394d7 kdecore: drop message box feature of KDebug
tho it can be fixed (by not using queued up message boxes) I am not into
supporting such feature

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 19:40:13 +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
9d2994fad0 kdecore: start as many threads as possible from the queue of KThreadPool
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 17:32:44 +03:00
Ivailo Monev
f53d175e6b kio: handle non-local URLs in KRecentDocument and reject URLs with empty filename
this is mostly for KIO jobs that, for example, get remote URLs

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 16:28:28 +03:00
Ivailo Monev
3be77d2b5f kio: remove unused header inclusion
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 16:00:49 +03:00
Ivailo Monev
4b7f20f57b kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 16:00:36 +03:00
Ivailo Monev
302a470d3b kded: drop unused window registration feature
no point in passing around windows to kded4 or its modules, job UI delegate
windows are different thing tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 15:45:36 +03:00