1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-24 17:33:50 +03:00

improve exported view template name

--use also the layout name as first part of the
proposed name
This commit is contained in:
Michail Vourlakos 2021-03-01 19:14:13 +02:00
parent 38474372b4
commit ddcfe56eda

View File

@ -72,9 +72,9 @@ ExportTemplateHandler::ExportTemplateHandler(Dialog::ExportTemplateDialog *paren
ExportTemplateHandler::ExportTemplateHandler(Dialog::ExportTemplateDialog *parentDialog, Latte::View *view) ExportTemplateHandler::ExportTemplateHandler(Dialog::ExportTemplateDialog *parentDialog, Latte::View *view)
: ExportTemplateHandler(parentDialog) : ExportTemplateHandler(parentDialog)
{ {
QString name = (view->type() == Latte::Types::PanelView ? i18n("Panel") : i18n("Dock")); QString type = (view->type() == Latte::Types::PanelView ? i18n("Panel") : i18n("Dock"));
loadViewApplets(view); loadViewApplets(view);
o_filepath = parentDialog->corona()->templatesManager()->proposedTemplateAbsolutePath(name + ".view.latte"); o_filepath = parentDialog->corona()->templatesManager()->proposedTemplateAbsolutePath(view->layout()->name() + " " + type + ".view.latte");
setFilepath(o_filepath); setFilepath(o_filepath);
} }