#include "frontends/controllers/ControlMath.h"
-using lyx::support::compare_ascii_no_case;
-using lyx::support::getVectorFromString;
-using lyx::support::libFileSearch;
-using lyx::support::subst;
+
+namespace lyx {
+
+using support::compare_ascii_no_case;
+using support::getVectorFromString;
+using support::libFileSearch;
+using support::subst;
using std::endl;
using std::make_pair;
{ "separator", TO_SEPARATOR }
};
-} // end of anon namespace
+} // namespace anon
ToolbarBackend::ToolbarBackend()
switch (lex.lex()) {
case TO_ADD:
if (lex.next(true)) {
- string const tooltip = _(lex.getString());
+ docstring const tooltip = _(lex.getString());
lex.next(true);
string const func_arg = lex.getString();
lyxerr[Debug::PARSER]
void ToolbarBackend::add(Toolbar & tb,
- FuncRequest const & func, string const & tooltip)
+ FuncRequest const & func, docstring const & tooltip)
{
tb.items.push_back(make_pair(func, tooltip));
tb.items.back().first.origin = FuncRequest::UI;
string const ToolbarBackend::getIcon(FuncRequest const & f)
{
- using lyx::frontend::find_xpm;
+ using frontend::find_xpm;
string fullname;
switch (f.action) {
case LFUN_MATH_INSERT:
- if (!f.argument.empty())
- fullname = find_xpm(f.argument.substr(1));
+ if (!f.argument().empty())
+ fullname = find_xpm(to_utf8(f.argument()).substr(1));
break;
case LFUN_MATH_DELIM:
case LFUN_MATH_BIGDELIM:
- fullname = find_xpm(f.argument);
+ fullname = find_xpm(to_utf8(f.argument()));
break;
default:
string const name = lyxaction.getActionName(f.action);
string xpm_name(name);
- if (!f.argument.empty())
- xpm_name = subst(name + ' ' + f.argument, ' ', '_');
+ if (!f.argument().empty())
+ xpm_name = subst(name + ' ' + to_utf8(f.argument()), ' ', '_');
fullname = libFileSearch("images", xpm_name, "xpm");
lyxerr[Debug::GUI] << "Cannot find icon for command \""
<< lyxaction.getActionName(f.action)
- << '(' << f.argument << ")\"" << endl;
+ << '(' << to_utf8(f.argument()) << ")\"" << endl;
return libFileSearch("images", "unknown", "xpm");
}
+
+
+} // namespace lyx