mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Change editMessage to return a docstring, change functions to not use to_utf8.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14953 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
43b77ba2d7
commit
edd81011ce
@ -252,10 +252,9 @@ bool InsetBase::autoDelete() const
|
||||
}
|
||||
|
||||
|
||||
std::string const InsetBase::editMessage() const
|
||||
lyx::docstring const InsetBase::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened inset"));
|
||||
return _("Opened inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
||||
#ifndef INSETBASE_H
|
||||
#define INSETBASE_H
|
||||
|
||||
#include "support/docstring.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -210,7 +212,7 @@ public:
|
||||
HIGHLY_EDITABLE
|
||||
};
|
||||
/// what appears in the minibuffer when opening
|
||||
virtual std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
virtual EDITABLE editable() const;
|
||||
/// can we go further down on mouse click?
|
||||
|
@ -30,6 +30,8 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
using lyx::docstring;
|
||||
|
||||
using std::auto_ptr;
|
||||
using std::string;
|
||||
using std::istringstream;
|
||||
@ -116,9 +118,9 @@ auto_ptr<InsetBase> InsetBox::doClone() const
|
||||
}
|
||||
|
||||
|
||||
string const InsetBox::editMessage() const
|
||||
docstring const InsetBox::editMessage() const
|
||||
{
|
||||
return lyx::to_utf8(_("Opened Box Inset"));
|
||||
return _("Opened Box Inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
///
|
||||
~InsetBox();
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
InsetBase::Code lyxCode() const { return InsetBase::BOX_CODE; }
|
||||
///
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
using lyx::docstring;
|
||||
|
||||
using std::string;
|
||||
using std::auto_ptr;
|
||||
using std::istringstream;
|
||||
@ -67,10 +69,9 @@ auto_ptr<InsetBase> InsetBranch::doClone() const
|
||||
}
|
||||
|
||||
|
||||
string const InsetBranch::editMessage() const
|
||||
docstring const InsetBranch::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened Branch Inset"));
|
||||
return _("Opened Branch Inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
///
|
||||
~InsetBranch();
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
InsetBase::Code lyxCode() const { return InsetBase::BRANCH_CODE; }
|
||||
///
|
||||
|
@ -75,10 +75,9 @@ void InsetCaption::read(Buffer const & buf, LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
string const InsetCaption::editMessage() const
|
||||
docstring const InsetCaption::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened Caption Inset"));
|
||||
return _("Opened Caption Inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
///
|
||||
virtual InsetBase::Code lyxCode() const;
|
||||
///
|
||||
virtual std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
virtual void cursorPos
|
||||
(CursorSlice const & sl, bool boundary, int & x, int & y) const;
|
||||
|
@ -114,10 +114,9 @@ void InsetCharStyle::setDefined(CharStyles::iterator cs)
|
||||
}
|
||||
|
||||
|
||||
string const InsetCharStyle::editMessage() const
|
||||
docstring const InsetCharStyle::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened CharStyle Inset"));
|
||||
return _("Opened CharStyle Inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
/// (Re-)set the character style parameters from \p cs
|
||||
void setDefined(CharStyles::iterator cs);
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
InsetBase::Code lyxCode() const { return InsetBase::CHARSTYLE_CODE; }
|
||||
///
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "support/std_ostream.h"
|
||||
|
||||
|
||||
using lyx::docstring;
|
||||
|
||||
using std::string;
|
||||
using std::auto_ptr;
|
||||
using std::ostream;
|
||||
@ -60,10 +62,10 @@ void InsetEnvironment::read(Buffer const & buf, LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
string const InsetEnvironment::editMessage() const
|
||||
docstring const InsetEnvironment::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened Environment Inset: ")) + getInsetName();
|
||||
return _("Opened Environment Inset: ") + lyx::from_utf8(getInsetName());
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
int latex(Buffer const &, std::ostream &,
|
||||
OutputParams const &) const;
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
InsetBase::EDITABLE editable() const { return HIGHLY_EDITABLE; }
|
||||
///
|
||||
|
@ -36,6 +36,7 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
using lyx::docstring;
|
||||
using lyx::pos_type;
|
||||
using lyx::support::token;
|
||||
|
||||
@ -137,10 +138,9 @@ void InsetERT::read(Buffer const & buf, LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
string const InsetERT::editMessage() const
|
||||
docstring const InsetERT::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened ERT Inset"));
|
||||
return _("Opened ERT Inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
///
|
||||
void read(Buffer const & buf, LyXLex & lex);
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
bool insetAllowed(InsetBase::Code code) const;
|
||||
///
|
||||
|
@ -36,6 +36,7 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
using lyx::docstring;
|
||||
using lyx::support::contains;
|
||||
|
||||
using std::endl;
|
||||
@ -288,10 +289,9 @@ auto_ptr<InsetBase> InsetFloat::doClone() const
|
||||
}
|
||||
|
||||
|
||||
string const InsetFloat::editMessage() const
|
||||
docstring const InsetFloat::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened Float Inset"));
|
||||
return _("Opened Float Inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
int docbook(Buffer const &, std::ostream &,
|
||||
OutputParams const &) const;
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
bool insetAllowed(InsetBase::Code) const;
|
||||
/** returns true if, when outputing LaTeX, font changes should
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include "support/std_ostream.h"
|
||||
|
||||
using lyx::docstring;
|
||||
|
||||
using std::string;
|
||||
using std::auto_ptr;
|
||||
@ -53,10 +54,9 @@ auto_ptr<InsetBase> InsetFoot::doClone() const
|
||||
}
|
||||
|
||||
|
||||
string const InsetFoot::editMessage() const
|
||||
docstring const InsetFoot::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened Footnote Inset"));
|
||||
return _("Opened Footnote Inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
int docbook(Buffer const &, std::ostream &,
|
||||
OutputParams const & runparams) const;
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
protected:
|
||||
InsetFoot(InsetFoot const &);
|
||||
private:
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "support/std_ostream.h"
|
||||
|
||||
using lyx::docstring;
|
||||
|
||||
using std::string;
|
||||
using std::auto_ptr;
|
||||
@ -48,10 +49,9 @@ auto_ptr<InsetBase> InsetMarginal::doClone() const
|
||||
}
|
||||
|
||||
|
||||
string const InsetMarginal::editMessage() const
|
||||
docstring const InsetMarginal::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened Marginal Note Inset"));
|
||||
return _("Opened Marginal Note Inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
int docbook(Buffer const &, std::ostream &,
|
||||
OutputParams const & runparams) const;
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
protected:
|
||||
InsetMarginal(InsetMarginal const &);
|
||||
private:
|
||||
|
@ -34,6 +34,8 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
using lyx::docstring;
|
||||
|
||||
using std::string;
|
||||
using std::auto_ptr;
|
||||
using std::istringstream;
|
||||
@ -141,10 +143,9 @@ auto_ptr<InsetBase> InsetNote::doClone() const
|
||||
}
|
||||
|
||||
|
||||
string const InsetNote::editMessage() const
|
||||
docstring const InsetNote::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened Note Inset"));
|
||||
return _("Opened Note Inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
///
|
||||
~InsetNote();
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
InsetBase::Code lyxCode() const { return InsetBase::NOTE_CODE; }
|
||||
///
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
using lyx::docstring;
|
||||
|
||||
using std::string;
|
||||
using std::auto_ptr;
|
||||
using std::ostream;
|
||||
@ -53,10 +55,9 @@ auto_ptr<InsetBase> InsetOptArg::doClone() const
|
||||
}
|
||||
|
||||
|
||||
string const InsetOptArg::editMessage() const
|
||||
docstring const InsetOptArg::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened Optional Argument Inset"));
|
||||
return _("Opened Optional Argument Inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
/// code of the inset
|
||||
InsetBase::Code lyxCode() const { return InsetBase::OPTARG_CODE; }
|
||||
/// return an message upon editing
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
|
||||
/// Standard LaTeX output -- short-circuited
|
||||
int latex(Buffer const &, std::ostream &,
|
||||
|
@ -449,10 +449,9 @@ void InsetTabular::drawCellLines(Painter & pain, int x, int y,
|
||||
}
|
||||
|
||||
|
||||
string const InsetTabular::editMessage() const
|
||||
docstring const InsetTabular::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened table"));
|
||||
return _("Opened table");
|
||||
}
|
||||
|
||||
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
///
|
||||
void drawSelection(PainterInfo & pi, int x, int y) const;
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
EDITABLE editable() const { return HIGHLY_EDITABLE; }
|
||||
///
|
||||
|
@ -225,10 +225,9 @@ void InsetText::drawSelection(PainterInfo & pi, int x, int y) const
|
||||
}
|
||||
|
||||
|
||||
string const InsetText::editMessage() const
|
||||
docstring const InsetText::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened Text Inset"));
|
||||
return _("Opened Text Inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
/// draw inset selection
|
||||
void drawSelection(PainterInfo & pi, int x, int y) const;
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
EDITABLE editable() const { return HIGHLY_EDITABLE; }
|
||||
///
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
int latex(Buffer const &, std::ostream &,
|
||||
OutputParams const &) const;
|
||||
///
|
||||
string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
private:
|
||||
virtual std::auto_ptr<InsetBase> doClone() const;
|
||||
|
||||
|
@ -34,6 +34,8 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
using lyx::docstring;
|
||||
|
||||
using std::string;
|
||||
using std::endl;
|
||||
using std::auto_ptr;
|
||||
@ -186,10 +188,9 @@ auto_ptr<InsetBase> InsetWrap::doClone() const
|
||||
}
|
||||
|
||||
|
||||
string const InsetWrap::editMessage() const
|
||||
docstring const InsetWrap::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Opened Wrap Inset"));
|
||||
return _("Opened Wrap Inset");
|
||||
}
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
int docbook(Buffer const &, std::ostream &,
|
||||
OutputParams const &) const;
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
bool insetAllowed(InsetBase::Code) const;
|
||||
///
|
||||
|
@ -1310,10 +1310,9 @@ void MathHullInset::edit(LCursor & cur, bool left)
|
||||
}
|
||||
|
||||
|
||||
string const MathHullInset::editMessage() const
|
||||
docstring const MathHullInset::editMessage() const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_("Math editor mode"));
|
||||
return _("Math editor mode");
|
||||
}
|
||||
|
||||
|
||||
|
@ -186,7 +186,7 @@ private:
|
||||
//
|
||||
public:
|
||||
/// what appears in the minibuffer when opening
|
||||
virtual std::string const editMessage() const;
|
||||
virtual lyx::docstring const editMessage() const;
|
||||
///
|
||||
virtual void mutateToText();
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user