#include <sstream>
#include <fstream>
+using lyx::docstring;
+
using std::istringstream;
using std::ostream;
using std::string;
}
-string const ControlLog::title() const
+docstring const ControlLog::title() const
{
- string t;
+ docstring t;
switch (type_) {
case LatexLog:
- t = lyx::to_utf8(_("LaTeX Log"));
+ t = _("LaTeX Log");
break;
case LiterateLog:
- t = lyx::to_utf8(_("Literate Programming Build Log"));
+ t = _("Literate Programming Build Log");
break;
case Lyx2lyxLog:
- t = lyx::to_utf8(_("lyx2lyx Error Log"));
+ t = _("lyx2lyx Error Log");
break;
case VCLog:
- t = lyx::to_utf8(_("Version Control Log"));
+ t = _("Version Control Log");
break;
}
return t;
virtual bool isBufferDependent() const { return true; }
/// The title displayed by the dialog reflects the \c LOGTYPE
- std::string const title() const;
+ lyx::docstring const title() const;
/// put the log file into the ostream
void getContents(std::ostream & ss) const;
}
-string const ControlViewSource::title() const
+docstring const ControlViewSource::title() const
{
string source_type;
default:
BOOST_ASSERT(false);
}
- return lyx::to_utf8(_(source_type + " Source"));
+ return _(source_type + " Source");
}
} // namespace frontend
virtual bool isBufferDependent() const { return true; }
/// The title displayed by the dialog reflects source type.
- std::string const title() const;
+ lyx::docstring const title() const;
/** get the source code of selected paragraphs, or the whole document
\param fullSource get full source code
#include "FuncStatus.h"
#include "lyxfunc.h"
+using lyx::docstring;
using std::string;
}
-Dialog::View::View(Dialog & parent, string title) :
+Dialog::View::View(Dialog & parent, docstring title) :
p_(parent), title_(title)
{}
}
-void Dialog::View::setTitle(string const & newtitle)
+void Dialog::View::setTitle(docstring const & newtitle)
{
title_ = newtitle;
}
-string const & Dialog::View::getTitle() const
+docstring const & Dialog::View::getTitle() const
{
return title_;
}
#include "Kernel.h"
#include "lfuns.h"
+#include "support/docstring.h"
+
#include <boost/utility.hpp>
#include <boost/scoped_ptr.hpp>
/** \param parent Dialog owning this Controller.
* \param title is the dialog title displayed by the WM.
*/
- View(Dialog & parent, std::string title);
+ View(Dialog & parent, lyx::docstring title);
virtual ~View() {}
/** \name Generic View
virtual void partialUpdate(int id);
/// sets the title of the dialog (window caption)
- void setTitle(std::string const &);
+ void setTitle(lyx::docstring const &);
/// gets the title of the dialog (window caption)
- std::string const & getTitle() const;
+ lyx::docstring const & getTitle() const;
/** \name View Access
* Enable the derived classes to access the other parts of the whole.
private:
Dialog & p_;
- std::string title_;
+ lyx::docstring title_;
};
} // namespace frontend
} else if (name == "index") {
dialog->setController(new ControlCommand(*dialog, name));
dialog->setView(new QIndex(*dialog,
- lyx::to_utf8(_("Index Entry")),
+ _("Index Entry"),
qt_("&Keyword:")));
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
} else if (name == "label") {
dialog->setController(new ControlCommand(*dialog, name));
dialog->setView(new QIndex(*dialog,
- lyx::to_utf8(_("Label")),
+ _("Label"),
qt_("&Label:")));
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
} else if (name == "log") {
typedef QController<ControlAboutlyx, QView<QAboutDialog> > base_class;
QAbout::QAbout(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("About LyX")))
+ : base_class(parent, _("About LyX"))
{
}
QBibitem::QBibitem(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Bibliography Entry Settings")))
+ : base_class(parent, _("Bibliography Entry Settings"))
{
}
typedef QController<ControlBibtex, QView<QBibtexDialog> > base_class;
QBibtex::QBibtex(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("BibTeX Bibliography")))
+ : base_class(parent, _("BibTeX Bibliography"))
{
}
typedef QController<ControlBox, QView<QBoxDialog> > base_class;
QBox::QBox(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Box Settings")))
+ : base_class(parent, _("Box Settings"))
{}
QBranch::QBranch(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Branch Settings")))
+ : base_class(parent, _("Branch Settings"))
{}
QChanges::QChanges(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Merge Changes")))
+ : base_class(parent, _("Merge Changes"))
{
}
QCharacter::QCharacter(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Text Style")))
+ : base_class(parent, _("Text Style"))
{
}
#include "qt_helpers.h"
#include "bufferparams.h"
+#include "gettext.h"
#include "controllers/ControlCitation.h"
QCitationDialog::QCitationDialog(Dialog & dialog, QCitation * form)
- : Dialog::View(dialog, "Citation"), form_(form)
+ : Dialog::View(dialog, _("Citation")), form_(form)
{
setupUi(this);
#include "controllers/ButtonController.h"
+using lyx::docstring;
+
namespace lyx {
namespace frontend {
-QDialogView::QDialogView(Dialog & parent, std::string const & t)
+QDialogView::QDialogView(Dialog & parent, docstring const & t)
: Dialog::View(parent,t), updating_(false)
{}
Q_OBJECT
public:
///
- QDialogView(Dialog &, std::string const &);
+ QDialogView(Dialog &, lyx::docstring const &);
///
virtual ~QDialogView() {}
///
template <class GUIDialog>
class QView: public QDialogView {
protected:
- QView(Dialog &, std::string const &);
+ QView(Dialog &, lyx::docstring const &);
/// update the dialog
virtual void update();
template <class GUIDialog>
-QView<GUIDialog>::QView(Dialog & p, std::string const & t)
+QView<GUIDialog>::QView(Dialog & p, lyx::docstring const & t)
: QDialogView(p, t)
{}
{
protected:
///
- QController(Dialog &, std::string const &);
+ QController(Dialog &, docstring const &);
public:
/// The parent controller
Controller & controller();
template <class Controller, class Base>
-QController<Controller, Base>::QController(Dialog & p, std::string const & t)
+QController<Controller, Base>::QController(Dialog & p, docstring const & t)
: Base(p, t)
{}
QDocument::QDocument(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Document Settings")))
+ : base_class(parent, _("Document Settings"))
{}
QERT::QERT(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("TeX Code Settings")))
+ : base_class(parent, _("TeX Code Settings"))
{
}
typedef QController<ControlErrorList, QView<QErrorListDialog> > base_class;
QErrorList::QErrorList(Dialog & parent)
- : base_class(parent, "")
+ : base_class(parent, lyx::docstring())
{}
void QErrorList::update_contents()
{
- setTitle(controller().name());
+ setTitle(lyx::from_ascii(controller().name()));
dialog_->errorsLW->clear();
dialog_->descriptionTB->setPlainText(QString());
typedef QController<ControlExternal, QView<QExternalDialog> > base_class;
QExternal::QExternal(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("External Material")))
+ : base_class(parent, _("External Material"))
{}
QFloat::QFloat(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Float Settings")))
+ : base_class(parent, _("Float Settings"))
{
}
typedef QController<ControlGraphics, QView<QGraphicsDialog> > base_class;
QGraphics::QGraphics(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Graphics")))
+ : base_class(parent, _("Graphics"))
{
}
QInclude::QInclude(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Child Document")))
+ : base_class(parent, _("Child Document"))
{}
typedef QController<ControlCommand, QView<QIndexDialog> > base_class;
-QIndex::QIndex(Dialog & parent, string const & title, QString const & label)
+QIndex::QIndex(Dialog & parent, docstring const & title, QString const & label)
: base_class(parent, title), label_(label)
{
}
public:
friend class QIndexDialog;
- QIndex(Dialog &, std::string const & title, QString const & label);
+ QIndex(Dialog &, lyx::docstring const & title, QString const & label);
protected:
virtual bool isValid();
private:
typedef QController<ControlLog, QView<QLogDialog> > base_class;
QLog::QLog(Dialog & parent)
- : base_class(parent, "")
+ : base_class(parent, lyx::docstring())
{}
QMath::QMath(Dialog & parent)
- : math_base(parent, lyx::to_utf8(_("Math Panel")))
+ : math_base(parent, _("Math Panel"))
{}
QMathMatrix::QMathMatrix(Dialog & parent)
- : matrix_base(parent, lyx::to_utf8(_("Math Matrix")))
+ : matrix_base(parent, _("Math Matrix"))
{}
QMathDelimiter::QMathDelimiter(Dialog & parent)
- : delimiter_base(parent, lyx::to_utf8(_("Math Delimiter")))
+ : delimiter_base(parent, _("Math Delimiter"))
{}
QNote::QNote(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Note Settings")))
+ : base_class(parent, _("Note Settings"))
{}
QParagraph::QParagraph(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Paragraph Settings")))
+ : base_class(parent, _("Paragraph Settings"))
{}
typedef QController<ControlPrefs, QView<QPrefsDialog> > base_class;
QPrefs::QPrefs(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Preferences")))
+ : base_class(parent, _("Preferences"))
{
}
QPrint::QPrint(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Print Document")))
+ : base_class(parent, _("Print Document"))
{
}
QRef::QRef(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Cross-reference"))),
+ : base_class(parent, _("Cross-reference")),
sort_(false), at_ref_(false)
{
}
QSearch::QSearch(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Find and Replace")))
+ : base_class(parent, _("Find and Replace"))
{
}
QSendto::QSendto(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Send Document to Command")))
+ : base_class(parent, _("Send Document to Command"))
{
}
QShowFile::QShowFile(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Show File")))
+ : base_class(parent, _("Show File"))
{
}
typedef QController<ControlSpellchecker, QView<QSpellcheckerDialog> > base_class;
QSpellchecker::QSpellchecker(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Spellchecker")))
+ : base_class(parent, _("Spellchecker"))
{}
typedef QController<ControlTabular, QView<QTabularDialog> > base_class;
QTabular::QTabular(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Table Settings")))
+ : base_class(parent, _("Table Settings"))
{
}
QTabularCreate::QTabularCreate(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Insert Table")))
+ : base_class(parent, _("Insert Table"))
{
}
typedef QController<ControlTexinfo, QView<QTexinfoDialog> > base_class;
QTexinfo::QTexinfo(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("TeX Information"))),
+ : base_class(parent, _("TeX Information")),
warningPosted(false), activeStyle(ControlTexinfo::cls)
{
}
typedef QController<ControlThesaurus, QView<QThesaurusDialog> > base_class;
QThesaurus::QThesaurus(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Thesaurus")))
+ : base_class(parent, _("Thesaurus"))
{
}
namespace frontend {
QTocDialog::QTocDialog(Dialog & dialog, QToc * form)
- : Dialog::View(dialog, "Toc"), form_(form), depth_(2)
+ : Dialog::View(dialog, _("Toc")), form_(form), depth_(2)
{
setupUi(this);
typedef QController<ControlVSpace, QView<QVSpaceDialog> > base_class;
QVSpace::QVSpace(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Vertical Space Settings")))
+ : base_class(parent, _("Vertical Space Settings"))
{}
QViewSource::QViewSource(Dialog & parent)
- : base_class(parent, "")
+ : base_class(parent, lyx::docstring())
{}
typedef QController<ControlWrap, QView<QWrapDialog> > base_class;
QWrap::QWrap(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("Text Wrap Settings")))
+ : base_class(parent, _("Text Wrap Settings"))
{
}
typedef QController< ControlCommand, QView<QURLDialog> > base_class;
UrlView::UrlView(Dialog & parent)
- : base_class(parent, lyx::to_utf8(_("URL")))
+ : base_class(parent, _("URL"))
{
}