mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-05 01:18:02 +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->open();
|
||||||
chooseFileDlg->selectFile(currentFile.baseName());
|
chooseFileDlg->selectFile(currentFile.fileName());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportTemplateHandler::onExport()
|
void ExportTemplateHandler::onExport()
|
||||||
|
@ -712,7 +712,7 @@ void TabLayouts::exportLayoutForBackup()
|
|||||||
});
|
});
|
||||||
|
|
||||||
exportFileDialog->open();
|
exportFileDialog->open();
|
||||||
exportFileDialog->selectFile(selectedLayout.name);
|
exportFileDialog->selectFile(selectedLayout.name + ".layout.latte");
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabLayouts::showDetailsDialog()
|
void TabLayouts::showDetailsDialog()
|
||||||
|
@ -214,10 +214,10 @@ QString Manager::proposedTemplateAbsolutePath(QString templateFilename)
|
|||||||
QString tempfilename = templateFilename;
|
QString tempfilename = templateFilename;
|
||||||
|
|
||||||
if (tempfilename.endsWith(".layout.latte")) {
|
if (tempfilename.endsWith(".layout.latte")) {
|
||||||
QString clearedname = QFileInfo(tempfilename).baseName();
|
QString clearedname = tempfilename.chopped(QString(".layout.latte").size());
|
||||||
tempfilename = uniqueLayoutTemplateName(clearedname) + ".layout.latte";
|
tempfilename = uniqueLayoutTemplateName(clearedname) + ".layout.latte";
|
||||||
} else if (tempfilename.endsWith(".view.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";
|
tempfilename = uniqueViewTemplateName(clearedname) + ".view.latte";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user