#include "Dialog.h"
#include "FileDialog.h"
#include "GuiApplication.h"
+#include "GuiCompleter.h"
#include "GuiWorkArea.h"
#include "GuiKeySymbol.h"
#include "GuiToolbar.h"
#include "support/assert.h"
#include "support/debug.h"
-#include "support/FileFilterList.h"
#include "support/FileName.h"
#include "support/filetools.h"
#include "support/gettext.h"
if (wa == d.current_work_area_) {
disconnectBuffer();
disconnectBufferView();
- hideBufferDependent();
d.current_work_area_ = 0;
}
dlg.setButton1(qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
dlg.setButton1(qt_("Templates|#T#t"), toqstr(lyxrc.template_path));
- FileDialog::Result result =
- dlg.open(toqstr(lyxrc.template_path),
- FileFilterList(_("LyX Documents (*.lyx)")));
+ FileDialog::Result result = dlg.open(toqstr(lyxrc.template_path),
+ QStringList(qt_("LyX Documents (*.lyx)")));
if (result.first == FileDialog::Later)
return FileName();
toqstr(addPath(package().system_support().absFilename(), "examples")));
FileDialog::Result result =
- dlg.open(toqstr(initpath), FileFilterList(_("LyX Documents (*.lyx)")));
+ dlg.open(toqstr(initpath), QStringList(qt_("LyX Documents (*.lyx)")));
if (result.first == FileDialog::Later)
return;
filter += ')';
FileDialog::Result result =
- dlg.open(toqstr(initpath), FileFilterList(filter));
+ dlg.open(toqstr(initpath), fileFilters(toqstr(filter)));
if (result.first == FileDialog::Later)
return;
return;
// get absolute path of file
- FileName const fullname(makeAbsPath(filename));
+ FileName const fullname(support::makeAbsPath(filename));
FileName const lyxfile(support::changeExtension(fullname.absFilename(), ".lyx"));
toqstr(addPath(package().system_support().absFilename(),
"examples")));
- FileDialog::Result result =
- dlg.open(toqstr(initpath),
- FileFilterList(_("LyX Documents (*.lyx)")));
+ FileDialog::Result result = dlg.open(toqstr(initpath),
+ QStringList(qt_("LyX Documents (*.lyx)")));
if (result.first == FileDialog::Later)
return;
LFUN_FILE_INSERT_PLAINTEXT_PARA : LFUN_FILE_INSERT_PLAINTEXT));
FileDialog::Result result = dlg.open(toqstr(bv->buffer().filePath()),
- FileFilterList());
+ QStringList());
if (result.first == FileDialog::Later)
return;
if (!newname.empty()) {
// FIXME UNICODE
- fname = makeAbsPath(to_utf8(newname), oldname.onlyPath().absFilename());
+ fname = support::makeAbsPath(to_utf8(newname), oldname.onlyPath().absFilename());
} else {
// Switch to this Buffer.
setBuffer(&b);
if (!isLyXFilename(fname.absFilename()))
fname.changeExtension(".lyx");
- FileFilterList const filter(_("LyX Documents (*.lyx)"));
-
FileDialog::Result result =
dlg.save(toqstr(fname.onlyPath().absFilename()),
- filter,
+ QStringList(qt_("LyX Documents (*.lyx)")),
toqstr(fname.onlyFileName()));
if (result.first == FileDialog::Later)
}
-void GuiView::hideBufferDependent() const
-{
- map<string, DialogPtr>::const_iterator it = d.dialogs_.begin();
- map<string, DialogPtr>::const_iterator end = d.dialogs_.end();
-
- for(; it != end; ++it) {
- Dialog * dialog = it->second.get();
- if (dialog->isBufferDependent())
- dialog->hideView();
- }
-}
-
-
void GuiView::updateBufferDependent(bool switched) const
{
map<string, DialogPtr>::const_iterator it = d.dialogs_.begin();