https://bugs.kde.org/show_bug.cgi?id=511560

Michał <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |m

--- Comment #2 from Michał <[email protected]> ---
Now after https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3373
the file
/usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml
doesn't even exist anymore, since after the migration to plasma_add_applet, it
is now embedded in the qrc resources, instead of residing on the drive.

So that changes this bug from wishlist to a regression for 6.6, since now
distros are unable to easily modify the default list of pinned apps, without
recompiling the whole thing with their own .xml.

I was looking at the implementation of kicker-extra-favoritesrc, and made some
maybe useful link-notes around the code of both:
-
https://github.com/KDE/plasma-workspace/blob/d4561bcdb24a5ff4120de89c3f7ae73383fc618b/applets/kicker/kastatsfavoritesmodel.cpp#L613
-
https://github.com/KDE/plasma-desktop/blob/516a36d8dc1b6f811afd02d00d41431ac3472efa/applets/kicker/main.qml#L123
-
https://github.com/KDE/documentation-develop-kde-org/blob/264cb08aaafac1b4047f8ed8f15e0e11c9528641/content/docs/administration/menu/index.md?plain=1#L13
-
https://github.com/KDE/plasma-desktop/blob/516a36d8dc1b6f811afd02d00d41431ac3472efa/applets/taskmanager/main.xml#L107
-
https://github.com/KDE/plasma-desktop/blob/516a36d8dc1b6f811afd02d00d41431ac3472efa/applets/taskmanager/CMakeLists.txt#L33
-
https://github.com/KDE/plasma-desktop/blob/516a36d8dc1b6f811afd02d00d41431ac3472efa/applets/taskmanager/qml/main.qml#L225
-
https://github.com/KDE/kdelibs/blob/1c5b25966136b6099665477616fb4d38a98fd7ef/plasma/applet.cpp#L2811
-
https://github.com/KDE/plasma-workspace/blob/d4561bcdb24a5ff4120de89c3f7ae73383fc618b/libtaskmanager/tasksmodel.cpp#L1444
-
https://github.com/KDE/plasma-workspace/blob/d4561bcdb24a5ff4120de89c3f7ae73383fc618b/libtaskmanager/launchertasksmodel.cpp

In general, the way it's implemented for Kicker, it takes advantage of the code
that runs a "migration" from default list of favorites into the way it's stored
currently, taking advantage of how this code is ran on the first time the
plasmoid is created, having the opportunity to alter its content with that
kicker-extra-favoritesrc file.

Meanwhile as far as I understand, with taskmanager using `launcherList =
Plasmoid.configuration.launchers`, it isn't really easily possible to tell
apart whether the configuration was loaded from the default main.xml
configuration, or from the entry in
~/.config/plasma-org.kde.plasma.desktop-appletsrc.

So I have no immediate ideas for how this should be implemented. Unless the
taskmanager gets a boolean analogous to favoritesPortedToKAstats and sets it to
true after the configuration was read for the first time and altered using that
sidekick file. The only major problem with that would be that it'd set the
launchers list permanently in the user config, while currently if the user
didn't alter the list at all, it'd keep following whatever distro changes were
to be made in the future. Alternatively, a boolean could be set to true once
the user actually modifies the list manually? Or the initial list of launchers
could be hardcoded somewhere else (rather than in main.xml), and then it'd only
be written to the config after the user manually altered it? I think the last
option could be the least dumb in this case.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to