if (functionNamesList.size() == 0)
{
// no script : create a <empty> entry
- DoAppendMenu(hMenu, MF_STRING, ID_NO_EDIT_SCRIPTS, theApp.LoadString(IDS_NO_EDIT_SCRIPTS).c_str());
+ DoAppendMenu(hMenu, MF_STRING, ID_NO_EDIT_SCRIPTS, _("< Empty >").c_str());
}
else
{
}
if (!IsWindowsScriptThere())
- DoAppendMenu(hMenu, MF_STRING, ID_NO_SCT_SCRIPTS, theApp.LoadString(ID_NO_SCT_SCRIPTS).c_str());
+ DoAppendMenu(hMenu, MF_STRING, ID_NO_SCT_SCRIPTS, _("WSH not found - .sct scripts disabled").c_str());
return hMenu;
}
ASSERT(pd);
// title
- DoAppendMenu(hMenu, MF_STRING, ID_NO_PREDIFFER, theApp.LoadString(IDS_NO_PREDIFFER).c_str());
+ DoAppendMenu(hMenu, MF_STRING, ID_NO_PREDIFFER, _("No prediffer (normal)").c_str());
// get the scriptlet files
PluginArray * piScriptArray =
// build the menu : first part, suggested plugins
// title
DoAppendMenu(hMenu, MF_SEPARATOR, 0, NULL);
- DoAppendMenu(hMenu, MF_STRING, ID_SUGGESTED_PLUGINS, theApp.LoadString(IDS_SUGGESTED_PLUGINS).c_str());
+ DoAppendMenu(hMenu, MF_STRING, ID_SUGGESTED_PLUGINS, _("Suggested plugins").c_str());
int ID = ID_PREDIFFERS_FIRST; // first ID in menu
int iScript;
// build the menu : second part, others plugins
// title
DoAppendMenu(hMenu, MF_SEPARATOR, 0, NULL);
- DoAppendMenu(hMenu, MF_STRING, ID_NOT_SUGGESTED_PLUGINS, theApp.LoadString(IDS_NOT_SUGGESTED_PLUGINS).c_str());
+ DoAppendMenu(hMenu, MF_STRING, ID_NOT_SUGGESTED_PLUGINS, _("Other plugins").c_str());
ID = ID_PREDIFFERS_FIRST; // first ID in menu
for (iScript = 0 ; iScript < piScriptArray->size() ; iScript++, ID ++)
nLastLine = pDoc->m_ptBuf[m_nThisPane]->ComputeRealLine(nLineCount - 1);
// Set active file and current line selected in dialog
- dlg.m_strParam.Format(_T("%d"), nRealLine + 1);
+ dlg.m_strParam = string_to_str(nRealLine + 1);
dlg.m_nFile = (pDoc->m_nBuffers < 3) ? (m_nThisPane == 1 ? 2 : 0) : m_nThisPane;
dlg.m_nGotoWhat = 0;
// Get views
pCurrentView = GetGroupView(m_nThisPane);
+ int num = 0;
+ try { num = string_stoi(dlg.m_strParam) - 1; } catch(...) {}
+
if (dlg.m_nGotoWhat == 0)
{
- int nRealLine = _ttoi(dlg.m_strParam) - 1;
+ int nRealLine = num;
if (nRealLine < 0)
nRealLine = 0;
if (nRealLine > nLastLine)
}
else
{
- int diff = _ttoi(dlg.m_strParam) - 1;
+ int diff = num;
if (diff < 0)
diff = 0;
if (diff >= pDoc->m_diffList.GetSize())
CPoint ptEnd;
CString strText;
CString strLine;
- CString strNum;
CString strNumLine;
UINT line = 0;
int nNumWidth = 0;
// Get last selected line (having widest linenumber)
line = pDoc->m_ptBuf[m_nThisPane]->ComputeRealLine(ptEnd.y);
- strNum.Format(_T("%d"), line + 1);
- nNumWidth = strNum.GetLength();
+ nNumWidth = string_to_str(line + 1).length();
for (int i = ptStart.y; i <= ptEnd.y; i++)
{
// Insert spaces to align different width linenumbers (99, 100)
strLine = GetLineText(i);
- strNum.Format(_T("%d"), line + 1);
- CString sSpaces(' ', nNumWidth - strNum.GetLength());
+ CString sSpaces(' ', nNumWidth - string_to_str(line + 1).length());
strText += sSpaces;
strNumLine.Format(_T("%d: %s"), line + 1, strLine);