Commit graph

11 commits

Author SHA1 Message Date
Carl Schwan
725a4e6d46 kdeconnect_runcommand_config: Fix i18n call 2024-10-09 10:26:16 +00:00
Carl Schwan
e04072c83e kdeconnect-app: Remove PluginInfoPage wrapper
Base the config page on Kirigami.Page and create them directly.
2024-10-06 11:04:44 +00:00
Christoph Wolk
ba5061a215 plugins/runcommand: set Dialog preferredWidth
The Add command dialog currently does not set a preferredWidth, which
seems to cause repeated binding loops and a lot of log spam until the
dialog is actually put on screen.

This change sets the preferredWidth to 20*gridUnit, which seems to be
the typical size used in small dialogs and is about the size that the
dialog has without a width explicitly set.
2024-09-08 13:19:44 +00:00
Christoph Wolk
3e7936dc08 plugins/runcommand: improve PlaceholderMessage
While the HIG is not quite clear on this, PlaceholderMessages throughout
KDE applications and kcms tend to have sentence capitalization in their
title and include a verb (e.g. "Playlist is empty", "No game controllers
found"). The runcommand plugin breaks with this; it uses title
capitalization and does not include a verb: "No Commands".

This change modifies the title to read "No commands configured".
2024-09-08 13:19:44 +00:00
Christoph Wolk
eecdc67074 plugins/runcommand: use ColumnLayout for ListView
The ListView displaying the configured actions currently directly uses a
label that is made multi-line by including a newline. As a consequence,
eliding the text does not work properly and there is a visual clash with
the included action button. It also means that there is a rather
pointlessly translatable string that is just there for UI logic.

This change modifies the delegate to use a ColumnLayout instead, which
enables correct eliding of the labels and more cleanly separates layout
and content concerns.
2024-09-08 13:19:44 +00:00
Christoph Wolk
9f34092aa9 plugins/runcommand: make config dialog HIG-compliant
The HIG recommend that buttons with an action label that require further
user input end in an ellipsis, and that dialog buttons should clearly
indicate what they do. Button labels typically do not match the given
exceptions that license sentence case. Currently, the main "Add command"
button in the configuration button does not end in an ellipsis even
though it opens a dialog, is sentence case, and the dialog has a "Save"
rather than the customary "Add" that is used for these kinds of actions,
in particular in kcms. The dialog title is also not translatable.

This change adds the ellipsis, converts the button to title case, makes
the dialog title translatable, and adds an "Add" button as an action to
the dialog.
2024-09-08 13:19:44 +00:00
Christoph Wolk
19763dbf46 plugins/runcommand: use Kirigami.Dialog
The "Add Command" dialog in the settings for the Run Command plugin
looks rather broken at the moment, as the size is not explicitly set and
the default value ends up much smaller than the contents. It uses
QQC2.Dialog, even though the plugin makes heavy use of Kirigami. Using
Kirigami.dialog here would solve the sizing issue, and generally lead to
a more consistent interface.

This change makes the plugin use Kirigami.Dialog instead of QQC2.

BUG: 487438
2024-08-05 22:06:14 +00:00
ivan tkachenko
5db4263af6
Port implicit default content items to use contentItem: property
See also
https://invent.kde.org/frameworks/kirigami/-/merge_requests/1338
and
https://invent.kde.org/frameworks/kirigami/-/merge_requests/1340
2023-11-09 00:06:14 +03:00
Carl Schwan
b2e83f506c Improve and fix pluging modules
- Fix call to removed get() method
- Add PlaceHolderMessage in runcommand plugin
- Simplify qml code when possible
- Use latest qml import
- Fix missing i18n call

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-12-14 16:46:57 +00:00
Nicolas Fella
645bf381c4 Add missing license headers
I'm the sole author of these files
2021-02-27 20:04:47 +01:00
Nicolas Fella
400c800deb [app] Add plugin settings page
Include a page that allows (de)selecting and configuring plugins

This is one of the last missing pieces for feature parity with the KCM.
2020-09-08 20:33:20 +02:00