mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-03 09:17:50 +03:00
ignore layout/view extensions properly
--remove them manually and do not use baseName() because it might take into account dots that are part of the name.
This commit is contained in:
parent
4de51de221
commit
7d180f8dd6
@ -193,7 +193,7 @@ void ExportTemplateHandler::chooseFileDialog()
|
||||
});
|
||||
|
||||
chooseFileDlg->open();
|
||||
chooseFileDlg->selectFile(currentFile.baseName());
|
||||
chooseFileDlg->selectFile(currentFile.fileName());
|
||||
}
|
||||
|
||||
void ExportTemplateHandler::onExport()
|
||||
|
@ -712,7 +712,7 @@ void TabLayouts::exportLayoutForBackup()
|
||||
});
|
||||
|
||||
exportFileDialog->open();
|
||||
exportFileDialog->selectFile(selectedLayout.name);
|
||||
exportFileDialog->selectFile(selectedLayout.name + ".layout.latte");
|
||||
}
|
||||
|
||||
void TabLayouts::showDetailsDialog()
|
||||
|
@ -214,10 +214,10 @@ QString Manager::proposedTemplateAbsolutePath(QString templateFilename)
|
||||
QString tempfilename = templateFilename;
|
||||
|
||||
if (tempfilename.endsWith(".layout.latte")) {
|
||||
QString clearedname = QFileInfo(tempfilename).baseName();
|
||||
QString clearedname = tempfilename.chopped(QString(".layout.latte").size());
|
||||
tempfilename = uniqueLayoutTemplateName(clearedname) + ".layout.latte";
|
||||
} else if (tempfilename.endsWith(".view.latte")) {
|
||||
QString clearedname = QFileInfo(tempfilename).baseName();
|
||||
QString clearedname = tempfilename.chopped(QString(".view.latte").size());
|
||||
tempfilename = uniqueViewTemplateName(clearedname) + ".view.latte";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user