refine browseRelFile in function addExtraEmbeddedFile

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23655 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2008-03-11 02:26:20 +00:00
parent 361d4d9a16
commit 99a5b638c3

View File

@ -1416,8 +1416,14 @@ void GuiDocument::setExtraEmbeddedFileList()
void GuiDocument::addExtraEmbeddedFile()
{
QString const label1 = qt_("Documents|#o#O");
QString const dir1 = toqstr(lyxrc.document_path);
FileFilterList const filter(_("LyX Layout (*.layout);;LaTeX Classes (*.{cls,sty});;BibTeX Databases (*.{bib,bst})"));
QString file = browseRelFile(QString(), bufferFilepath(),
qt_("Extra embedded file"), FileFilterList(), true);
qt_("Extra embedded file"), filter, true, label1, dir1);
if (file.isEmpty())
return;
if (embeddedFilesModule->extraLW->findItems(file, Qt::MatchExactly).empty())
embeddedFilesModule->extraLW->addItem(file);