From 99a5b638c3494c8268dec39d64b3fc06fe636bd1 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Tue, 11 Mar 2008 02:26:20 +0000 Subject: [PATCH] refine browseRelFile in function addExtraEmbeddedFile git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23655 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiDocument.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index d8d96144fa..944c65bfde 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -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);