More consistent unicode behaviour for text

develop
kaetemi 4 years ago
parent c068d757eb
commit 8d94baaf14

@ -79,8 +79,6 @@ namespace NLGUI
sint64 getInputStringAsInt64() const; sint64 getInputStringAsInt64() const;
void setInputStringAsFloat(float val); void setInputStringAsFloat(float val);
float getInputStringAsFloat() const; float getInputStringAsFloat() const;
void setInputStringAsStdString(const std::string &str);
std::string getInputStringAsStdString() const;
void setInputStringAsUtf8(const std::string &str); void setInputStringAsUtf8(const std::string &str);
std::string getInputStringAsUtf8() const; std::string getInputStringAsUtf8() const;
void setColor(NLMISC::CRGBA col); void setColor(NLMISC::CRGBA col);
@ -189,7 +187,7 @@ namespace NLGUI
REFLECT_LUA_METHOD("setSelectionAll", luaSetSelectionAll); REFLECT_LUA_METHOD("setSelectionAll", luaSetSelectionAll);
REFLECT_LUA_METHOD("setFocusOnText", luaSetFocusOnText); REFLECT_LUA_METHOD("setFocusOnText", luaSetFocusOnText);
REFLECT_LUA_METHOD("cancelFocusOnText", luaCancelFocusOnText); REFLECT_LUA_METHOD("cancelFocusOnText", luaCancelFocusOnText);
REFLECT_STRING("input_string", getInputStringAsStdString, setInputStringAsStdString); REFLECT_STRING("input_string", getInputStringAsUtf8, setInputStringAsUtf8);
REFLECT_UCSTRING("uc_input_string", getInputString, setInputString); REFLECT_UCSTRING("uc_input_string", getInputString, setInputString);
REFLECT_EXPORT_END REFLECT_EXPORT_END

@ -122,30 +122,26 @@ namespace NLGUI
CXMLAutoPtr prop; CXMLAutoPtr prop;
// get static toolTip // get static toolTip
prop = (char*) xmlGetProp( cur, (xmlChar*)"tooltip" ); prop = (char *)xmlGetProp(cur, (xmlChar *)"tooltip_i18n");
if (prop) if ((bool)prop && strlen((const char *)prop) > 0)
{ {
const char *propPtr = prop; // Force I18N tooltip
if (strlen(propPtr) > 2 && propPtr[0] == 'u' && propPtr[1] == ':') if (!editorMode)
_ContextHelp = ucstring::makeFromUtf8(std::string(propPtr).substr(2)); _ContextHelp = CI18N::get((const char *)prop);
else else
_ContextHelp = ucstring(propPtr); _ContextHelp.fromUtf8((const char *)prop);
if( !editorMode && ( strlen(propPtr) > 2 ) )
{
if ((propPtr[0] == 'u') && (propPtr[1] == 'i'))
_ContextHelp = CI18N::get ((const char *) prop);
}
} }
// Force I18N tooltip else
prop = (char*) xmlGetProp( cur, (xmlChar*)"tooltip_i18n" );
if ((bool)prop && strlen((const char*)prop)>0)
{ {
if( !editorMode ) // get static toolTip
_ContextHelp = CI18N::get ((const char *) prop); prop = (char *)xmlGetProp(cur, (xmlChar *)"tooltip");
else if (prop)
_ContextHelp = (const char*)prop; {
if (!editorMode && NLMISC::startsWith((const char *)prop, "ui"))
_ContextHelp = CI18N::get((const char *)prop);
else
_ContextHelp.fromUtf8((const char *)prop);
}
} }
// get dynamic toolTip ActionHandler // get dynamic toolTip ActionHandler
@ -173,7 +169,7 @@ namespace NLGUI
_ToolTipSpecialParent= CStringShared(); _ToolTipSpecialParent= CStringShared();
if(prop) if(prop)
{ {
_ToolTipSpecialParent= std::string((const char*)prop); _ToolTipSpecialParent= (const char*)prop;
} }
// Tooltip posref // Tooltip posref
@ -201,12 +197,12 @@ namespace NLGUI
{ {
if( name == "tooltip" ) if( name == "tooltip" )
{ {
return _ContextHelp.toString(); return _ContextHelp.toUtf8();
} }
else else
if( name == "tooltip_i18n" ) if( name == "tooltip_i18n" )
{ {
return _ContextHelp.toString(); return _ContextHelp.toUtf8();
} }
else else
if( name == "on_tooltip" ) if( name == "on_tooltip" )
@ -262,13 +258,19 @@ namespace NLGUI
{ {
if( name == "tooltip" ) if( name == "tooltip" )
{ {
_ContextHelp = ucstring::makeFromUtf8(value); if (!editorMode && NLMISC::startsWith(value, "ui"))
_ContextHelp = CI18N::get(value);
else
_ContextHelp.fromUtf8(value);
return; return;
} }
else else
if( name == "tooltip_i18n" ) if( name == "tooltip_i18n" )
{ {
_ContextHelp = value; if (!editorMode)
_ContextHelp = CI18N::get(value);
else
_ContextHelp.fromUtf8(value);
return; return;
} }
else else

@ -596,9 +596,11 @@ namespace NLGUI
if (prop) if (prop)
{ {
const char *propPtr = prop; const char *propPtr = prop;
ucstring text = ucstring(propPtr); ucstring text;
if ((strlen(propPtr)>2) && (propPtr[0] == 'u') && (propPtr[1] == 'i')) if (NLMISC::startsWith(propPtr, "ui"))
text = CI18N::get (propPtr); text = CI18N::get(propPtr);
else
text.fromUtf8(propPtr);
_ViewText->setText(text); _ViewText->setText(text);
} }
} }

@ -467,7 +467,7 @@ namespace NLGUI
void CDBGroupComboBox::setViewText(const ucstring & text) void CDBGroupComboBox::setViewText(const ucstring & text)
{ {
_IsExternViewText = true; _IsExternViewText = true;
_ExternViewText = ucstring(text); _ExternViewText = text;
_ViewText->setText(_ExternViewText); _ViewText->setText(_ExternViewText);
} }

@ -147,9 +147,10 @@ namespace NLGUI
if(ptr) if(ptr)
{ {
const char *propPtr = ptr; const char *propPtr = ptr;
_EmptyText = ucstring(propPtr); if (NLMISC::startsWith(propPtr, "ui"))
if ((strlen(propPtr)>2) && (propPtr[0] == 'u') && (propPtr[1] == 'i')) _EmptyText = CI18N::get(propPtr);
_EmptyText = CI18N::get (propPtr); else
_EmptyText.fromUtf8(propPtr);
} }
// init cache. // init cache.

@ -1229,7 +1229,7 @@ namespace NLGUI
{ {
makeTopWindow(); makeTopWindow();
// for french, deutsch and russian, be aware of unicode // for french, deutsch and russian, be aware of unicode
std::string command = ucstring(_InputString.substr(1)).toUtf8(); std::string command = _InputString.substr(1).toUtf8();
ICommand::expand(command); ICommand::expand(command);
// then back to ucstring // then back to ucstring
_InputString.fromUtf8(command); _InputString.fromUtf8(command);
@ -1735,26 +1735,10 @@ namespace NLGUI
CInterfaceGroup::setActive(active); CInterfaceGroup::setActive(active);
} }
// ***************************************************************************
void CGroupEditBox::setInputStringAsStdString(const std::string &str)
{
setInputString(ucstring(str));
}
// ***************************************************************************
std::string CGroupEditBox::getInputStringAsStdString() const
{
std::string result;
_InputString.toString(result);
return result;
}
// *************************************************************************** // ***************************************************************************
void CGroupEditBox::setInputStringAsUtf8(const std::string &str) void CGroupEditBox::setInputStringAsUtf8(const std::string &str)
{ {
ucstring tmp; setInputString(ucstring::makeFromUtf8(str));
tmp.fromUtf8(str);
setInputString(tmp);
} }
// *************************************************************************** // ***************************************************************************

@ -4716,7 +4716,7 @@ namespace NLGUI
const char *funcName = "addString"; const char *funcName = "addString";
CLuaIHM::checkArgCount(ls, funcName, 1); CLuaIHM::checkArgCount(ls, funcName, 1);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING); CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
addString(ucstring(ls.toString(1))); addString(ucstring::makeFromUtf8(ls.toString(1)));
return 0; return 0;
} }
@ -5470,7 +5470,7 @@ namespace NLGUI
} }
else else
{ {
ctrlButton->setDefaultContextHelp(ucstring(tooltip)); ctrlButton->setDefaultContextHelp(ucstring::makeFromUtf8(tooltip));
} }
} }

@ -518,11 +518,10 @@ namespace NLGUI
{ {
_HardText = std::string( (const char*)ptr ); _HardText = std::string( (const char*)ptr );
const char *propPtr = ptr; const char *propPtr = ptr;
ucstring Text = ucstring(propPtr); if (NLMISC::startsWith(propPtr, "ui"))
if ((strlen(propPtr)>2) && (propPtr[0] == 'u') && (propPtr[1] == 'i')) addTextChild(CI18N::get(propPtr));
Text = CI18N::get (propPtr); else
addTextChild(ucstring::makeFromUtf8(propPtr));
addTextChild(Text);
} }
else else
{ {

@ -283,9 +283,10 @@ namespace NLGUI
if (name) if (name)
{ {
const char *ptrName = (const char*)name; const char *ptrName = (const char*)name;
ucstrName = ucstring(ptrName); if (NLMISC::startsWith(ptrName, "ui"))
if ((strlen(ptrName)>2) && (ptrName[0] == 'u') && (ptrName[1] == 'i')) ucstrName = CI18N::get(ptrName);
ucstrName = CI18N::get (ptrName); else
ucstrName.fromUtf8(ptrName);
} }
CXMLAutoPtr ah((const char*) xmlGetProp (cur, (xmlChar*)"handler")); CXMLAutoPtr ah((const char*) xmlGetProp (cur, (xmlChar*)"handler"));

@ -476,11 +476,10 @@ namespace NLGUI
{ {
_HardText = std::string( (const char*)ptr ); _HardText = std::string( (const char*)ptr );
const char *propPtr = ptr; const char *propPtr = ptr;
ucstring Text = ucstring(propPtr); if (NLMISC::startsWith(propPtr, "ui"))
if ((strlen(propPtr)>2) && (propPtr[0] == 'u') && (propPtr[1] == 'i')) addTextChild(CI18N::get(propPtr));
Text = CI18N::get (propPtr); else
addTextChild(ucstring::makeFromUtf8(propPtr));
addTextChild(Text);
} }
else else
{ {

@ -306,9 +306,10 @@ namespace NLGUI
if (name) if (name)
{ {
const char *ptrName = (const char*)name; const char *ptrName = (const char*)name;
Text = ucstring(ptrName); if (NLMISC::startsWith(ptrName, "ui"))
if ((strlen(ptrName)>2) && (ptrName[0] == 'u') && (ptrName[1] == 'i')) Text = CI18N::get(ptrName);
Text = CI18N::get (ptrName); else
ucstring::makeFromUtf8(ptrName);
} }
CXMLAutoPtr color((const char*) xmlGetProp (cur, (xmlChar*)"color")); CXMLAutoPtr color((const char*) xmlGetProp (cur, (xmlChar*)"color"));

@ -1880,21 +1880,21 @@ namespace NLGUI
ucstring CLuaIHM::findReplaceAll(const ucstring &str, const std::string &search, const std::string &replace) ucstring CLuaIHM::findReplaceAll(const ucstring &str, const std::string &search, const std::string &replace)
{ {
//H_AUTO(Lua_CLuaIHM_findReplaceAll) //H_AUTO(Lua_CLuaIHM_findReplaceAll)
return findReplaceAll(str, ucstring(search), ucstring(replace)); return findReplaceAll(str, ucstring::makeFromUtf8(search), ucstring::makeFromUtf8(replace));
} }
// *************************************************************************** // ***************************************************************************
ucstring CLuaIHM::findReplaceAll(const ucstring &str, const std::string &search, const ucstring &replace) ucstring CLuaIHM::findReplaceAll(const ucstring &str, const std::string &search, const ucstring &replace)
{ {
//H_AUTO(Lua_CLuaIHM_findReplaceAll) //H_AUTO(Lua_CLuaIHM_findReplaceAll)
return findReplaceAll(str, ucstring(search), ucstring(replace)); return findReplaceAll(str, ucstring::makeFromUtf8(search), replace);
} }
// *************************************************************************** // ***************************************************************************
ucstring CLuaIHM::findReplaceAll(const ucstring &str, const ucstring &search, const std::string &replace) ucstring CLuaIHM::findReplaceAll(const ucstring &str, const ucstring &search, const std::string &replace)
{ {
//H_AUTO(Lua_CLuaIHM_findReplaceAll) //H_AUTO(Lua_CLuaIHM_findReplaceAll)
return findReplaceAll(str, ucstring(search), ucstring(replace)); return findReplaceAll(str, search, ucstring::makeFromUtf8(replace));
} }

@ -982,11 +982,11 @@ namespace NLGUI
if (prop) if (prop)
{ {
const char *propPtr = prop; const char *propPtr = prop;
_Text = ucstring(propPtr); if (NLMISC::startsWith(propPtr, "ui"))
_Text = CI18N::get(propPtr);
if ((strlen(propPtr)>2) && (propPtr[0] == 'u') && (propPtr[1] == 'i')) else
_Text = CI18N::get (propPtr); _Text.fromUtf8(propPtr);
setCase (_Text, _CaseMode); setCase(_Text, _CaseMode);
} }
prop = (char*) xmlGetProp( cur, (xmlChar*)"hardtext_format" ); prop = (char*) xmlGetProp( cur, (xmlChar*)"hardtext_format" );
@ -2155,7 +2155,7 @@ namespace NLGUI
float dotWidth = 0.f; float dotWidth = 0.f;
if (_OverflowText.size() > 0) if (_OverflowText.size() > 0)
{ {
si = TextContext->getStringInfo (ucstring(_OverflowText)); si = TextContext->getStringInfo(_OverflowText);
dotWidth = si.StringWidth; dotWidth = si.StringWidth;
} }

@ -34,26 +34,26 @@ namespace NLGUI
CViewTextFormated::IViewTextFormatter *CViewTextFormated::textFormatter = NULL; CViewTextFormated::IViewTextFormatter *CViewTextFormated::textFormatter = NULL;
std::string CViewTextFormated::getProperty( const std::string &name ) const std::string CViewTextFormated::getProperty(const std::string &name) const
{ {
if( name == "format" ) if (name == "format")
{
return getFormatString().toString();
}
else
return CViewText::getProperty( name );
}
void CViewTextFormated::setProperty( const std::string &name, const std::string &value )
{
if( name == "format" )
{ {
setFormatString( value ); return getFormatString().toUtf8();
return;
} }
else else
CViewText::setProperty( name, value ); return CViewText::getProperty(name);
} }
void CViewTextFormated::setProperty(const std::string &name, const std::string &value)
{
if (name == "format")
{
setFormatString(ucstring::makeFromUtf8(value));
return;
}
else
CViewText::setProperty(name, value);
}
xmlNodePtr CViewTextFormated::serialize( xmlNodePtr parentNode, const char *type ) const xmlNodePtr CViewTextFormated::serialize( xmlNodePtr parentNode, const char *type ) const
{ {
@ -62,7 +62,7 @@ namespace NLGUI
return NULL; return NULL;
xmlSetProp( node, BAD_CAST "type", BAD_CAST "text_formated" ); xmlSetProp( node, BAD_CAST "type", BAD_CAST "text_formated" );
xmlSetProp( node, BAD_CAST "format", BAD_CAST getFormatString().c_str() ); xmlSetProp( node, BAD_CAST "format", BAD_CAST getFormatString().toUtf8().c_str() );
return NULL; return NULL;
} }
@ -73,7 +73,7 @@ namespace NLGUI
if (!CViewText::parse(cur, parentGroup)) return false; if (!CViewText::parse(cur, parentGroup)) return false;
CXMLAutoPtr prop((const char*) xmlGetProp( cur, (xmlChar*)"format" )); CXMLAutoPtr prop((const char*) xmlGetProp( cur, (xmlChar*)"format" ));
if (prop) if (prop)
setFormatString(ucstring((const char *) prop)); setFormatString(ucstring::makeFromUtf8((const char *)prop));
else else
setFormatString(ucstring("$t")); setFormatString(ucstring("$t"));
return true; return true;

@ -33,36 +33,35 @@ NLMISC_REGISTER_OBJECT(CViewBase, CViewTextIDFormated, std::string, "text_id_for
namespace NLGUI namespace NLGUI
{ {
std::string CViewTextIDFormated::getProperty( const std::string &name ) const std::string CViewTextIDFormated::getProperty(const std::string &name) const
{ {
if( name == "format" ) if (name == "format")
{ {
return getFormatString().toString(); return getFormatString().toUtf8();
} }
else else
return CViewTextID::getProperty( name ); return CViewTextID::getProperty(name);
} }
void CViewTextIDFormated::setProperty(const std::string &name, const std::string &value)
void CViewTextIDFormated::setProperty( const std::string &name, const std::string &value )
{ {
if( name == "format" ) if (name == "format")
{ {
setFormatString( value ); setFormatString(ucstring::makeFromUtf8(value));
return; return;
} }
else else
CViewTextID::setProperty( name, value ); CViewTextID::setProperty(name, value);
} }
xmlNodePtr CViewTextIDFormated::serialize( xmlNodePtr parentNode, const char *type ) const xmlNodePtr CViewTextIDFormated::serialize(xmlNodePtr parentNode, const char *type) const
{ {
xmlNodePtr node = CViewTextID::serialize( parentNode, type ); xmlNodePtr node = CViewTextID::serialize(parentNode, type);
if( node == NULL ) if (node == NULL)
return NULL; return NULL;
xmlSetProp( node, BAD_CAST "type", BAD_CAST "text_id_formated" ); xmlSetProp( node, BAD_CAST "type", BAD_CAST "text_id_formated" );
xmlSetProp( node, BAD_CAST "format", BAD_CAST getFormatString().c_str() ); xmlSetProp( node, BAD_CAST "format", BAD_CAST getFormatString().toUtf8().c_str() );
return node; return node;
} }
@ -73,7 +72,7 @@ namespace NLGUI
if (!CViewTextID::parse(cur, parentGroup)) return false; if (!CViewTextID::parse(cur, parentGroup)) return false;
CXMLAutoPtr prop((const char*) xmlGetProp( cur, (xmlChar*)"format" )); CXMLAutoPtr prop((const char*) xmlGetProp( cur, (xmlChar*)"format" ));
if (prop) if (prop)
setFormatString(ucstring((const char *) prop)); setFormatString(ucstring::makeFromUtf8((const char *)prop));
else else
setFormatString(ucstring("$t")); setFormatString(ucstring("$t"));
return true; return true;

@ -167,7 +167,10 @@ bool CSystemUtils::copyTextToClipboard(const ucstring &text)
bool isUnicode = (IsClipboardFormatAvailable(CF_UNICODETEXT) == TRUE); bool isUnicode = (IsClipboardFormatAvailable(CF_UNICODETEXT) == TRUE);
// allocates a buffer to copy text in global memory // allocates a buffer to copy text in global memory
HGLOBAL mem = GlobalAlloc(GHND|GMEM_DDESHARE, (text.size()+1) * (isUnicode ? 2:1)); std::string textLocal;
if (!isUnicode) textLocal = NLMISC::wideToMbcs(text);
if (text.size() && !textLocal.size()) textLocal = text.toString();
HGLOBAL mem = GlobalAlloc(GHND | GMEM_DDESHARE, isUnicode ? ((text.size() + 1) * sizeof(wchar_t)) : textLocal.size());
if (mem) if (mem)
{ {
@ -179,7 +182,7 @@ bool CSystemUtils::copyTextToClipboard(const ucstring &text)
if (isUnicode) if (isUnicode)
wcscpy((wchar_t *)hLock, (const wchar_t *)text.c_str()); wcscpy((wchar_t *)hLock, (const wchar_t *)text.c_str());
else else
strcpy((char *)hLock, text.toString().c_str()); strcpy((char *)hLock, textLocal.c_str());
// unlock buffer // unlock buffer
GlobalUnlock(mem); GlobalUnlock(mem);
@ -213,7 +216,7 @@ bool CSystemUtils::pasteTextFromClipboard(ucstring &text)
// get data from clipboard (if not of this type, they are converted) // get data from clipboard (if not of this type, they are converted)
// warning, this code can't be debuggued in VC++ IDE, hObj will be always NULL // warning, this code can't be debuggued in VC++ IDE, hObj will be always NULL
HANDLE hObj = GetClipboardData(isUnicode ? CF_UNICODETEXT:CF_TEXT); HANDLE hObj = GetClipboardData(isUnicode ? CF_UNICODETEXT : CF_TEXT);
if (hObj) if (hObj)
{ {
@ -224,9 +227,15 @@ bool CSystemUtils::pasteTextFromClipboard(ucstring &text)
{ {
// retrieve clipboard data // retrieve clipboard data
if (isUnicode) if (isUnicode)
text = (const ucchar*)hLock; {
else text = (const ucchar *)hLock;
text = (const char*)hLock; }
else
{
static_cast<std::wstring &>(text) = NLMISC::mbcsToWide((const char *)hLock);
if (!text.size() && ((const char *)hLock)[0])
text = (const char *)hLock;
}
// unlock data // unlock data
GlobalUnlock(hObj); GlobalUnlock(hObj);

@ -636,7 +636,7 @@ public:
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(Params)); CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(Params));
if (pCS == NULL) return; if (pCS == NULL) return;
pCS->setMacroText(pEB->getInputStringAsStdString()); pCS->setMacroText(pEB->getInputStringAsUtf8());
} }
}; };
REGISTER_ACTION_HANDLER( CHandlerEBUpdateMacroText, "eb_update_macro_text"); REGISTER_ACTION_HANDLER( CHandlerEBUpdateMacroText, "eb_update_macro_text");
@ -703,10 +703,10 @@ public:
CGroupEditBox *pEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_MACROICONCREATION_EDITTEXT)); CGroupEditBox *pEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_MACROICONCREATION_EDITTEXT));
if (pEB != NULL) if (pEB != NULL)
{ {
pEB->setInputStringAsStdString(pMCM->CurrentEditMacro.DispText); pEB->setInputStringAsUtf8(pMCM->CurrentEditMacro.DispText);
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_MACROICONCREATION_ICON)); CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_MACROICONCREATION_ICON));
if (pCS != NULL) if (pCS != NULL)
pCS->setMacroText(pEB->getInputStringAsStdString()); pCS->setMacroText(pEB->getInputStringAsUtf8());
} }
CAHManager::getInstance()->runActionHandler("set_macro_back", NULL, string("target=")+CTRL_MACROICONCREATION_ICON+"|value="+toString(back)); CAHManager::getInstance()->runActionHandler("set_macro_back", NULL, string("target=")+CTRL_MACROICONCREATION_ICON+"|value="+toString(back));
@ -862,11 +862,11 @@ public:
if (pEB == NULL) return; if (pEB == NULL) return;
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance(); CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
pMCM->CurrentEditMacro.Name = pEB->getInputStringAsStdString(); pMCM->CurrentEditMacro.Name = pEB->getInputStringAsUtf8();
if ((pMCM->CurrentEditMacro.Name.size() >= 2) && if ((pMCM->CurrentEditMacro.Name.size() >= 2) &&
(pMCM->CurrentEditMacro.Name[0] == 'u') && (pMCM->CurrentEditMacro.Name[1] == 'i')) (pMCM->CurrentEditMacro.Name[0] == 'u') && (pMCM->CurrentEditMacro.Name[1] == 'i'))
pMCM->CurrentEditMacro.Name[0] = 'U'; pMCM->CurrentEditMacro.Name[0] = 'U';
pEB->setInputString(pMCM->CurrentEditMacro.Name); pEB->setInputStringAsUtf8(pMCM->CurrentEditMacro.Name);
} }
}; };
REGISTER_ACTION_HANDLER( CHandlerNewMacroEnterName, "new_macro_enter_name"); REGISTER_ACTION_HANDLER( CHandlerNewMacroEnterName, "new_macro_enter_name");

@ -1379,8 +1379,8 @@ class CAHOnLogin : public IActionHandler
return; return;
} }
LoginLogin = pGEBLog->getInputStringAsStdString(); LoginLogin = pGEBLog->getInputString().toString(); // FIXME: Unicode login
LoginPassword = pGEBPwd->getInputStringAsStdString(); LoginPassword = pGEBPwd->getInputString().toString();
onlogin(); onlogin();
} }

Loading…
Cancel
Save