Bug 446205 - [feature] - improve MultipleLayouts startup mode and reduce hard disk usage
Summary: [feature] - improve MultipleLayouts startup mode and reduce hard disk usage
Status: RESOLVED FIXED
Alias: None
Product: lattedock
Classification: Unmaintained
Component: application (other bugs)
Version First Reported In: git (master)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-28 17:16 UTC by Michail Vourlakos
Modified: 2022-01-25 08:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michail Vourlakos 2021-11-28 17:16:25 UTC
SUMMARY
Currently Latte for MultipleLayouts to work is cherry-picking the needed layouts and adjusts them in the hidden multiple-layouts file. The exact same thing is done on reverse when Latte is closing, so the layouts files are updated accordingly.

It might be a better idea to use the Plasma approach. Latte can always trust that the multiple-layouts file contains valid data. In that way closing Latte wont drop the data in multiple-layouts file and when latte is started afterwards in that mode  the big hard disk usage wont be necessary. Only layouts that are not needed any more because their Activities are not running will be needed to update their layout original data.

Following cases should be considered:
  - What is done when latte crashes is that mode?
Plasma is actually not doing anything and Latte could follow the same approach by considering the data in multiple-layouts as valid

  - When original layout data file will be updated?
A good idea probably is when we open the Layouts Editor which is also the default way to import-export layouts or when such an import/export is requested. This needs a little more thinking.
Comment 1 Michail Vourlakos 2022-01-25 08:11:50 UTC
Git commit c7bb46b2172602491efd0ef551f3d425bc235f87 by Michail Vourlakos.
Committed on 25/01/2022 at 07:58.
Pushed by mvourlakos into branch 'master'.

introduce new MultipleLayouts mechanism

--the new approach does not load/unload layouts
during startup/exit. When the user loads layouts
in multiple layouts mode the layouts are inserted
and when exit they still remain in the hidden
multiple layouts file. These layouts present in the
multiple layouts file from now are called preloaded
layouts.
--the new approach fixes also the wayland exit
issue and in general the message for Latte not
closed properly has been totally dropped.
Related: bug 448702

M  +13   -0    app/apptypes.h
M  +4    -0    app/lattecorona.cpp
M  +32   -0    app/layouts/importer.cpp
M  +6    -0    app/layouts/importer.h
M  +6    -2    app/layouts/manager.cpp
M  +62   -0    app/layouts/storage.cpp
M  +3    -0    app/layouts/storage.h
M  +51   -13   app/layouts/synchronizer.cpp
M  +4    -2    app/layouts/synchronizer.h

https://invent.kde.org/plasma/latte-dock/commit/c7bb46b2172602491efd0ef551f3d425bc235f87