QString GuiBibtex::browseBib(QString const & in_name) const
{
- QString const label1 = qt_("Documents|#o#O");
+ QString const label1 = qt_("D&ocuments");
QString const dir1 = toqstr(lyxrc.document_path);
QStringList const filter(qt_("BibTeX Databases (*.bib)"));
return browseRelToParent(in_name, bufferFilePath(),
QString GuiBibtex::browseBst(QString const & in_name) const
{
- QString const label1 = qt_("Documents|#o#O");
+ QString const label1 = qt_("D&ocuments");
QString const dir1 = toqstr(lyxrc.document_path);
QStringList const filter(qt_("BibTeX Styles (*.bst)"));
return browseRelToParent(in_name, bufferFilePath(),
if (lyxview().documentBufferView()) {
QString path = bufferFilePath();
filename = browseRelToParent(in_name, path, title, filters, false,
- qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
+ qt_("D&ocuments"), toqstr(lyxrc.document_path));
} else {
QString path = toqstr(lyxrc.document_path);
QString rel_filename = browseRelToParent(in_name, path, title, filters, false,
- qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
+ qt_("D&ocuments"), toqstr(lyxrc.document_path));
filename = makeAbsPath(rel_filename, path);
}
return filename;
void GuiDocument::browseLayout()
{
- QString const label1 = qt_("Layouts|#o#O");
+ QString const label1 = qt_("Lay&outs");
QString const dir1 = toqstr(lyxrc.document_path);
QStringList const filter(qt_("LyX Layout (*.layout)"));
QString file = browseRelToParent(QString(), bufferFilePath(),
QString const docpath = toqstr(support::onlyPath(buffer().absFileName()));
QStringList const filter(qt_("LyX Files (*.lyx)"));
QString file = browseRelToSub(old, docpath, title, filter, false,
- qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
+ qt_("D&ocuments"), toqstr(lyxrc.document_path));
if (!file.isEmpty())
latexModule->childDocLE->setText(file);
QString const bufpath = bufferFilePath();
QStringList const filter = templateFilters(template_name);
- QString const label1 = qt_("Documents|#o#O");
+ QString const label1 = qt_("D&ocuments");
QString const dir1 = toqstr(lyxrc.document_path);
return browseRelToParent(input, bufpath, title, filter, false, label1, dir1);
return browseRelToParent(in_name, bufferFilePath(),
title, fileFilters(QString()), false,
- qt_("Clipart|#C#c"), toqstr(clipdir),
- qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
+ qt_("&Clipart"), toqstr(clipdir),
+ qt_("D&ocuments"), toqstr(lyxrc.document_path));
}
QString const docpath = toqstr(support::onlyPath(buffer().absFileName()));
return browseRelToParent(in_name, docpath, title, filters, false,
- qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
+ qt_("D&ocuments"), toqstr(lyxrc.document_path));
}
QStringList const & filters)
{
// FIXME UNICODE
- QString const label1 = qt_("System files|#S#s");
+ QString const label1 = qt_("&System files");
QString const dir1 =
toqstr(addName(package().system_support().absFileName(), fromqstr(dir)));
- QString const label2 = qt_("User files|#U#u");
+ QString const label2 = qt_("&User files");
QString const dir2 =
toqstr(addName(package().user_support().absFileName(), fromqstr(dir)));
static FileName selectTemplateFile()
{
FileDialog dlg(qt_("Select template file"));
- dlg.setButton1(qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
- dlg.setButton2(qt_("Templates|#T#t"), toqstr(lyxrc.template_path));
+ dlg.setButton1(qt_("D&ocuments"), toqstr(lyxrc.document_path));
+ dlg.setButton2(qt_("&Templates"), toqstr(lyxrc.template_path));
FileDialog::Result result = dlg.open(toqstr(lyxrc.template_path),
QStringList(qt_("LyX Documents (*.lyx)")));
if (fname.empty()) {
FileDialog dlg(qt_("Select document to open"));
- dlg.setButton1(qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
- dlg.setButton2(qt_("Examples|#E#e"), toqstr(lyxrc.example_path));
+ dlg.setButton1(qt_("D&ocuments"), toqstr(lyxrc.document_path));
+ dlg.setButton2(qt_("&Examples"), toqstr(lyxrc.example_path));
QStringList const filter(qt_("LyX Documents (*.lyx)"));
FileDialog::Result result =
theFormats().prettyName(format));
FileDialog dlg(toqstr(text));
- dlg.setButton1(qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
- dlg.setButton2(qt_("Examples|#E#e"), toqstr(lyxrc.example_path));
+ dlg.setButton1(qt_("D&ocuments"), toqstr(lyxrc.document_path));
+ dlg.setButton2(qt_("&Examples"), toqstr(lyxrc.example_path));
docstring filter = theFormats().prettyName(format);
filter += " (*.{";
// FIXME UNICODE
FileDialog dlg(qt_("Select LyX document to insert"));
- dlg.setButton1(qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
- dlg.setButton2(qt_("Examples|#E#e"), toqstr(lyxrc.example_path));
+ dlg.setButton1(qt_("D&ocuments"), toqstr(lyxrc.document_path));
+ dlg.setButton2(qt_("&Examples"), toqstr(lyxrc.example_path));
FileDialog::Result result = dlg.open(toqstr(initpath),
QStringList(qt_("LyX Documents (*.lyx)")));
// No argument? Ask user through dialog.
// FIXME UNICODE
FileDialog dlg(qt_("Choose a filename to save document as"));
- dlg.setButton1(qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
- dlg.setButton2(qt_("Templates|#T#t"), toqstr(lyxrc.template_path));
+ dlg.setButton1(qt_("D&ocuments"), toqstr(lyxrc.document_path));
+ dlg.setButton2(qt_("&Templates"), toqstr(lyxrc.template_path));
if (!isLyXFileName(fname.absFileName()))
fname.changeExtension(".lyx");
FileName fname = b.fileName();
FileDialog dlg(qt_("Choose a filename to export the document as"));
- dlg.setButton1(qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
+ dlg.setButton1(qt_("D&ocuments"), toqstr(lyxrc.document_path));
QStringList types;
QString const anyformat = qt_("Guess from extension (*.*)");
namespace lyx {
-/// return the Qt form of the label
-static QString getLabel(QString const & qstr)
-{
- // FIXME UNICODE (or "qt-ify")
- string str = fromqstr(qstr);
- string label;
- string sc = split(str, label, '|');
- if (sc.length() < 2)
- return toqstr(label);
- size_t pos = label.find(sc[1]);
- if (pos != string::npos)
- label.insert(pos, 1, '&');
- return toqstr(label);
-}
-
LyXFileDialog::LyXFileDialog(QString const & title,
QString const & path,
b1_dir_ = b1.second;
QToolButton * tb = new QToolButton(this);
connect(tb, SIGNAL(clicked()), this, SLOT(button1Clicked()));
- tb->setText(getLabel(b1.first));
+ tb->setText(b1.first);
layout.at(0)->addWidget(tb);
}
b2_dir_ = b2.second;
QToolButton * tb = new QToolButton(this);
connect(tb, SIGNAL(clicked()), this, SLOT(button2Clicked()));
- tb->setText(getLabel(b2.first));
+ tb->setText(b2.first);
layout.at(0)->addWidget(tb);
}
}