Index: ActivityView.cpp =================================================================== RCS file: /cvs/mushclient/ActivityView.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -c -r1.15 -r1.16 *** ActivityView.cpp 24 Nov 2004 02:27:24 -0000 1.15 --- ActivityView.cpp 12 Jun 2007 04:01:56 -0000 1.16 *************** *** 106,118 **** App.RestoreColumnConfiguration ("Activity List", eColumnCount, GetListCtrl (), iColOrder, iColWidth, m_last_col, m_reverse); ! GetListCtrl ().InsertColumn(eColumnSeq, "Seq", LVCFMT_RIGHT, iColWidth [eColumnSeq]); ! GetListCtrl ().InsertColumn(eColumnMush, "World", LVCFMT_LEFT, iColWidth [eColumnMush]); ! GetListCtrl ().InsertColumn(eColumnNew, "New", LVCFMT_RIGHT, iColWidth [eColumnNew]); ! GetListCtrl ().InsertColumn(eColumnLines, "Lines", LVCFMT_RIGHT, iColWidth [eColumnLines]); ! GetListCtrl ().InsertColumn(eColumnStatus, "Status", LVCFMT_LEFT, iColWidth [eColumnStatus]); ! GetListCtrl ().InsertColumn(eColumnSince, "Since", LVCFMT_LEFT, iColWidth [eColumnSince]); ! GetListCtrl ().InsertColumn(eColumnDuration, "Duration", LVCFMT_RIGHT, iColWidth [eColumnDuration]); // recover column sequence --- 106,118 ---- App.RestoreColumnConfiguration ("Activity List", eColumnCount, GetListCtrl (), iColOrder, iColWidth, m_last_col, m_reverse); ! GetListCtrl ().InsertColumn(eColumnSeq, TranslateHeading ("Seq"), LVCFMT_RIGHT, iColWidth [eColumnSeq]); ! GetListCtrl ().InsertColumn(eColumnMush, TranslateHeading ("World"), LVCFMT_LEFT, iColWidth [eColumnMush]); ! GetListCtrl ().InsertColumn(eColumnNew, TranslateHeading ("New"), LVCFMT_RIGHT, iColWidth [eColumnNew]); ! GetListCtrl ().InsertColumn(eColumnLines, TranslateHeading ("Lines"), LVCFMT_RIGHT, iColWidth [eColumnLines]); ! GetListCtrl ().InsertColumn(eColumnStatus, TranslateHeading ("Status"), LVCFMT_LEFT, iColWidth [eColumnStatus]); ! GetListCtrl ().InsertColumn(eColumnSince, TranslateHeading ("Since"), LVCFMT_LEFT, iColWidth [eColumnSince]); ! GetListCtrl ().InsertColumn(eColumnDuration, TranslateHeading ("Duration"), LVCFMT_RIGHT, iColWidth [eColumnDuration]); // recover column sequence Index: AsciiArtDlg.cpp =================================================================== RCS file: /cvs/mushclient/AsciiArtDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** AsciiArtDlg.cpp 12 Apr 2002 05:01:03 -0000 1.2 --- AsciiArtDlg.cpp 11 Jun 2007 10:42:08 -0000 1.3 *************** *** 46,52 **** if (m_strText.IsEmpty ()) { ! ::AfxMessageBox("You must specify some text to insert."); DDX_Text(pDX, IDC_TEXT, m_strText); pDX->Fail(); } --- 46,52 ---- if (m_strText.IsEmpty ()) { ! ::TMessageBox("You must specify some text to insert."); DDX_Text(pDX, IDC_TEXT, m_strText); pDX->Fail(); } *************** *** 56,62 **** if (m_strFont.IsEmpty ()) { ! ::AfxMessageBox("You must specify a font file."); DDX_Text(pDX, IDC_FONT, m_strFont); pDX->Fail(); } --- 56,62 ---- if (m_strFont.IsEmpty ()) { ! ::TMessageBox("You must specify a font file."); DDX_Text(pDX, IDC_FONT, m_strFont); pDX->Fail(); } Index: CHATSOCK.CPP =================================================================== RCS file: /cvs/mushclient/CHATSOCK.CPP,v retrieving revision 1.36 retrieving revision 1.39 diff -c -r1.36 -r1.39 *** CHATSOCK.CPP 3 Apr 2007 00:59:36 -0000 1.36 --- CHATSOCK.CPP 12 Jun 2007 04:01:56 -0000 1.39 *************** *** 385,392 **** if (m_pDoc->m_bValidateIncomingCalls) { m_pDoc->Activate (); ! if (::AfxMessageBox ( ! CFormat ("Incoming chat call to world %s from %s, IP address: %s.\n\nAccept it?", (LPCTSTR) m_pDoc->m_mush_name, (LPCTSTR) m_strRemoteUserName, (LPCTSTR) inet_ntoa (m_ServerAddr.sin_addr)), --- 385,392 ---- if (m_pDoc->m_bValidateIncomingCalls) { m_pDoc->Activate (); ! if (::TMessageBox ( ! TFormat ("Incoming chat call to world %s from %s, IP address: %s.\n\nAccept it?", (LPCTSTR) m_pDoc->m_mush_name, (LPCTSTR) m_strRemoteUserName, (LPCTSTR) inet_ntoa (m_ServerAddr.sin_addr)), *************** *** 401,407 **** } // end of needing to validate calls m_pDoc->ChatNote (eChatSession, ! CFormat ("Chat session accepted, remote user: \"%s\"", (LPCTSTR) m_strRemoteUserName)); // tell them our acceptance, and chat name --- 401,407 ---- } // end of needing to validate calls m_pDoc->ChatNote (eChatSession, ! TFormat ("Chat session accepted, remote user: \"%s\"", (LPCTSTR) m_strRemoteUserName)); // tell them our acceptance, and chat name *************** *** 557,563 **** if (count == SOCKET_ERROR && nError != WSAEWOULDBLOCK) { m_pDoc->ChatNote (eChatConnection, ! CFormat ("Unable to send to \"%s\", code = %i (%s)", (LPCTSTR) m_strServerName, nError, m_pDoc->GetSocketError (nError))); --- 557,563 ---- if (count == SOCKET_ERROR && nError != WSAEWOULDBLOCK) { m_pDoc->ChatNote (eChatConnection, ! TFormat ("Unable to send to \"%s\", code = %i (%s)", (LPCTSTR) m_strServerName, nError, m_pDoc->GetSocketError (nError))); *************** *** 588,594 **** if (nErrorCode != 0) { m_pDoc->ChatNote (eChatConnection, ! CFormat ("Unable to connect to \"%s\", code = %i (%s)", (LPCTSTR) m_strServerName, nErrorCode, m_pDoc->GetSocketError (nErrorCode))); --- 588,594 ---- if (nErrorCode != 0) { m_pDoc->ChatNote (eChatConnection, ! TFormat ("Unable to connect to \"%s\", code = %i (%s)", (LPCTSTR) m_strServerName, nErrorCode, m_pDoc->GetSocketError (nErrorCode))); *************** *** 597,603 **** } m_pDoc->ChatNote (eChatSession, ! CFormat ("Session established to %s.", (LPCTSTR) m_strServerName)); CString strHostName; --- 597,603 ---- } m_pDoc->ChatNote (eChatSession, ! TFormat ("Session established to %s.", (LPCTSTR) m_strServerName)); CString strHostName; *************** *** 629,635 **** if (WSAGETASYNCERROR (lParam)) { m_pDoc->ChatNote (eChatConnection, ! CFormat ("Chat session cannot resolve host name: %s.", (LPCTSTR) m_strServerName)); m_bDeleteMe = true; m_iChatStatus = eChatClosed; --- 629,635 ---- if (WSAGETASYNCERROR (lParam)) { m_pDoc->ChatNote (eChatConnection, ! TFormat ("Chat session cannot resolve host name: %s.", (LPCTSTR) m_strServerName)); m_bDeleteMe = true; m_iChatStatus = eChatClosed; *************** *** 668,674 **** ntohs (pSocket->m_ServerAddr.sin_port) == m_iAllegedPort) { m_pDoc->ChatNote (eChatConnection, ! CFormat ("You are already connected to %s port %d", (LPCTSTR) m_strAllegedAddress, m_iAllegedPort)); --- 668,674 ---- ntohs (pSocket->m_ServerAddr.sin_port) == m_iAllegedPort) { m_pDoc->ChatNote (eChatConnection, ! TFormat ("You are already connected to %s port %d", (LPCTSTR) m_strAllegedAddress, m_iAllegedPort)); *************** *** 678,684 **** } // end of checking them m_pDoc->ChatNote (eChatConnection, ! CFormat ("Calling chat server at %s port %d", (LPCTSTR) m_strAllegedAddress, m_iAllegedPort)); --- 678,684 ---- } // end of checking them m_pDoc->ChatNote (eChatConnection, ! TFormat ("Calling chat server at %s port %d", (LPCTSTR) m_strAllegedAddress, m_iAllegedPort)); *************** *** 728,734 **** return; #if CHAT_DEBUG ! m_pDoc->Note (CFormat ("Received chat message %i on %i, data: \"%s\"", iMessage, m_iChatID, (LPCTSTR) strMessage)); --- 728,734 ---- return; #if CHAT_DEBUG ! m_pDoc->Note (TFormat ("Received chat message %i on %i, data: \"%s\"", iMessage, m_iChatID, (LPCTSTR) strMessage)); *************** *** 793,803 **** // tell them we don't support that SendChatMessage (CHAT_MESSAGE, ! CFormat ("\n%s does not support the chat command %i.\n", m_pDoc->m_strOurChatName, iMessage)); // tell us we got it m_pDoc->ChatNote (eChatInformation, ! CFormat ("Received unsupported chat command %i from %s", iMessage, (LPCTSTR) m_strRemoteUserName)); break; --- 793,803 ---- // tell them we don't support that SendChatMessage (CHAT_MESSAGE, ! TFormat ("\n%s does not support the chat command %i.\n", m_pDoc->m_strOurChatName, iMessage)); // tell us we got it m_pDoc->ChatNote (eChatInformation, ! TFormat ("Received unsupported chat command %i from %s", iMessage, (LPCTSTR) m_strRemoteUserName)); break; *************** *** 816,822 **** return; #if CHAT_DEBUG ! m_pDoc->Note (CFormat ("Sending chat message %i on %i, data: \"%s\"", iMessage, m_iChatID, (LPCTSTR) strMessage)); --- 816,822 ---- return; #if CHAT_DEBUG ! m_pDoc->Note (TFormat ("Sending chat message %i on %i, data: \"%s\"", iMessage, m_iChatID, (LPCTSTR) strMessage)); *************** *** 914,920 **** m_strRemoteUserName = strMessage; m_pDoc->ChatNote (eChatNameChange, ! CFormat ("%s has changed his/her name to %s.", (LPCTSTR) strOldName, (LPCTSTR) m_strRemoteUserName)); --- 914,920 ---- m_strRemoteUserName = strMessage; m_pDoc->ChatNote (eChatNameChange, ! TFormat ("%s has changed his/her name to %s.", (LPCTSTR) strOldName, (LPCTSTR) m_strRemoteUserName)); *************** *** 944,950 **** } // end of doing all m_pDoc->ChatNote (eChatInformation, ! CFormat ("%s has requested your public connections", (LPCTSTR) m_strRemoteUserName)); SendChatMessage (CHAT_CONNECTION_LIST, strResult); } // end of CChatSocket::Process_Request_connections --- 944,950 ---- } // end of doing all m_pDoc->ChatNote (eChatInformation, ! TFormat ("%s has requested your public connections", (LPCTSTR) m_strRemoteUserName)); SendChatMessage (CHAT_CONNECTION_LIST, strResult); } // end of CChatSocket::Process_Request_connections *************** *** 955,961 **** StringToList (strMessage, ",", strList); int iCount = strList.GetCount () / 2; // number of connections m_pDoc->ChatNote (eChatConnectionList, ! CFormat ("Found %i connection%s to %s", PLURAL (iCount), (LPCTSTR) m_strRemoteUserName)); --- 955,961 ---- StringToList (strMessage, ",", strList); int iCount = strList.GetCount () / 2; // number of connections m_pDoc->ChatNote (eChatConnectionList, ! TFormat ("Found %i connection%s to %s", PLURAL (iCount), (LPCTSTR) m_strRemoteUserName)); *************** *** 1096,1102 **** if (!m_bCanSendFiles) { SendChatMessage (CHAT_FILE_DENY, ! CFormat ("%s is not allowing file transfers from you.", (LPCTSTR) m_pDoc->m_strOurChatName)); return; } --- 1096,1102 ---- if (!m_bCanSendFiles) { SendChatMessage (CHAT_FILE_DENY, ! TFormat ("%s is not allowing file transfers from you.", (LPCTSTR) m_pDoc->m_strOurChatName)); return; } *************** *** 1117,1123 **** m_strSenderFileName.Find (_T("\\")) != -1) { SendChatMessage (CHAT_FILE_DENY, ! CFormat ("Supplied file name of \"%s\" may not contain slashes.", (LPCTSTR) m_strSenderFileName)); return; } --- 1117,1123 ---- m_strSenderFileName.Find (_T("\\")) != -1) { SendChatMessage (CHAT_FILE_DENY, ! TFormat ("Supplied file name of \"%s\" may not contain slashes.", (LPCTSTR) m_strSenderFileName)); return; } *************** *** 1140,1147 **** if (!m_pDoc->m_bAutoAllowFiles) { m_pDoc->Activate (); ! if (::AfxMessageBox ( ! CFormat ("%s wishes to send you the file \"%s\", size %ld bytes (%1.1f Kb).\n\nAccept it?", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) m_strSenderFileName, m_iFileSize, --- 1140,1147 ---- if (!m_pDoc->m_bAutoAllowFiles) { m_pDoc->Activate (); ! if (UMessageBox ( ! TFormat ("%s wishes to send you the file \"%s\", size %ld bytes (%1.1f Kb).\n\nAccept it?", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) m_strSenderFileName, m_iFileSize, *************** *** 1162,1168 **** _T("|"), // filter &Frame); // parent window ! CString strTitle = CFormat ("Chat: Save file from %s as ...", (LPCTSTR) m_strRemoteUserName); filedlg.m_ofn.lpstrTitle = strTitle; --- 1162,1168 ---- _T("|"), // filter &Frame); // parent window ! CString strTitle = TFormat ("Chat: Save file from %s as ...", (LPCTSTR) m_strRemoteUserName); filedlg.m_ofn.lpstrTitle = strTitle; *************** *** 1190,1196 **** { // tell them our rejection SendChatMessage (CHAT_FILE_DENY, ! CFormat ("%s does not want that particular file.", (LPCTSTR) m_pDoc->m_strOurChatName)); return; } // end of this file not wanted right now --- 1190,1196 ---- { // tell them our rejection SendChatMessage (CHAT_FILE_DENY, ! TFormat ("%s does not want that particular file.", (LPCTSTR) m_pDoc->m_strOurChatName)); return; } // end of this file not wanted right now *************** *** 1203,1211 **** catch (CFileException * e) { SendChatMessage (CHAT_FILE_DENY, ! CFormat ("%s can not open that file.", (LPCTSTR) m_pDoc->m_strOurChatName)); ! m_pDoc->ChatNote (eChatFile, CFormat ("File %s cannot be opened.", (LPCTSTR) m_strOurFileName)); e->Delete (); // reset the two fields we changed so far --- 1203,1211 ---- catch (CFileException * e) { SendChatMessage (CHAT_FILE_DENY, ! TFormat ("%s can not open that file.", (LPCTSTR) m_pDoc->m_strOurChatName)); ! m_pDoc->ChatNote (eChatFile, TFormat ("File %s cannot be opened.", (LPCTSTR) m_strOurFileName)); e->Delete (); // reset the two fields we changed so far *************** *** 1221,1227 **** SendChatMessage (CHAT_FILE_BLOCK_REQUEST, ""); m_pDoc->ChatNote (eChatFile, ! CFormat ( "Receiving a file from %s -- Filename: %s, Length: %ld bytes (%1.1f Kb).", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) m_strOurFileName, --- 1221,1227 ---- SendChatMessage (CHAT_FILE_BLOCK_REQUEST, ""); m_pDoc->ChatNote (eChatFile, ! TFormat ( "Receiving a file from %s -- Filename: %s, Length: %ld bytes (%1.1f Kb).", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) m_strOurFileName, *************** *** 1287,1293 **** { SendChatMessage (CHAT_MESSAGE, "File transfer aborted due to read error by sender."); m_pDoc->ChatNote (eChatFile, ! CFormat ("Send of file \"%s\" aborted due to read error.", (LPCTSTR) m_strOurFileName )); StopFileTransfer (true); // close file return; --- 1287,1293 ---- { SendChatMessage (CHAT_MESSAGE, "File transfer aborted due to read error by sender."); m_pDoc->ChatNote (eChatFile, ! TFormat ("Send of file \"%s\" aborted due to read error.", (LPCTSTR) m_strOurFileName )); StopFileTransfer (true); // close file return; *************** *** 1302,1312 **** if (m_iBlocksTransferred >= m_iFileBlocks) { SendChatMessage (CHAT_FILE_END, ""); ! m_pDoc->ChatNote (eChatFile, CFormat ("Send of file \"%s\" complete.", (LPCTSTR) m_strOurFileName )); shsFinal (&m_shsInfo); SendChatMessage (CHAT_MESSAGE, ! CFormat ("Sumcheck from sender was: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], --- 1302,1312 ---- if (m_iBlocksTransferred >= m_iFileBlocks) { SendChatMessage (CHAT_FILE_END, ""); ! m_pDoc->ChatNote (eChatFile, TFormat ("Send of file \"%s\" complete.", (LPCTSTR) m_strOurFileName )); shsFinal (&m_shsInfo); SendChatMessage (CHAT_MESSAGE, ! TFormat ("Sumcheck from sender was: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], *************** *** 1315,1321 **** )); // tell sender sumcheck m_pDoc->ChatNote (eChatFile, ! CFormat ("Sumcheck we calculated: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], --- 1315,1321 ---- )); // tell sender sumcheck m_pDoc->ChatNote (eChatFile, ! TFormat ("Sumcheck we calculated: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], *************** *** 1365,1371 **** SendChatMessage (CHAT_MESSAGE, "File transfer aborted due to write error by receiver."); m_pDoc->ChatNote (eChatFile, ! CFormat ("Receive of file \"%s\" aborted due to write error.", (LPCTSTR) m_strOurFileName )); StopFileTransfer (true); // close file return; --- 1365,1371 ---- SendChatMessage (CHAT_MESSAGE, "File transfer aborted due to write error by receiver."); m_pDoc->ChatNote (eChatFile, ! TFormat ("Receive of file \"%s\" aborted due to write error.", (LPCTSTR) m_strOurFileName )); StopFileTransfer (true); // close file return; *************** *** 1383,1393 **** if (m_iBlocksTransferred >= m_iFileBlocks) { ! m_pDoc->ChatNote (eChatFile,CFormat ("Receive of file \"%s\" complete.", (LPCTSTR) m_strOurFileName )); shsFinal (&m_shsInfo); m_pDoc->ChatNote (eChatFile, ! CFormat ("Sumcheck as written was: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], --- 1383,1393 ---- if (m_iBlocksTransferred >= m_iFileBlocks) { ! m_pDoc->ChatNote (eChatFile,TFormat ("Receive of file \"%s\" complete.", (LPCTSTR) m_strOurFileName )); shsFinal (&m_shsInfo); m_pDoc->ChatNote (eChatFile, ! TFormat ("Sumcheck as written was: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], *************** *** 1396,1402 **** )); // notify sender SendChatMessage (CHAT_MESSAGE, ! CFormat ("Sumcheck as received was: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], --- 1396,1402 ---- )); // notify sender SendChatMessage (CHAT_MESSAGE, ! TFormat ("Sumcheck as received was: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], *************** *** 1421,1427 **** if (m_iFileBlocks != m_iBlocksTransferred) { m_pDoc->ChatNote (eChatFile, ! CFormat ("Transfer of file \"%s\" stopped prematurely.", (LPCTSTR) m_strOurFileName )); StopFileTransfer (true); // too soon - abort it --- 1421,1427 ---- if (m_iFileBlocks != m_iBlocksTransferred) { m_pDoc->ChatNote (eChatFile, ! TFormat ("Transfer of file \"%s\" stopped prematurely.", (LPCTSTR) m_strOurFileName )); StopFileTransfer (true); // too soon - abort it *************** *** 1458,1470 **** CString strPingTime; strPingTime.Format ("%9.3f seconds", m_fLastPingTime); m_pDoc->ChatNote (eChatPing, ! CFormat ("Ping time to %s: %s", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) strPingTime)); } else m_pDoc->ChatNote (eChatPing, ! CFormat ("Ping response: %s", (LPCTSTR) strMessage)); } // end of CChatSocket::Process_Ping_response void CChatSocket::Process_Peek_connections (const CString strMessage) --- 1458,1470 ---- CString strPingTime; strPingTime.Format ("%9.3f seconds", m_fLastPingTime); m_pDoc->ChatNote (eChatPing, ! TFormat ("Ping time to %s: %s", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) strPingTime)); } else m_pDoc->ChatNote (eChatPing, ! TFormat ("Ping response: %s", (LPCTSTR) strMessage)); } // end of CChatSocket::Process_Ping_response void CChatSocket::Process_Peek_connections (const CString strMessage) *************** *** 1503,1509 **** SendChatMessage (CHAT_PEEK_LIST, strResult); m_pDoc->ChatNote (eChatInformation, ! CFormat ("%s is peeking at your connections", (LPCTSTR) m_strRemoteUserName)); } // end of CChatSocket::Process_Peek_connections --- 1503,1509 ---- SendChatMessage (CHAT_PEEK_LIST, strResult); m_pDoc->ChatNote (eChatInformation, ! TFormat ("%s is peeking at your connections", (LPCTSTR) m_strRemoteUserName)); } // end of CChatSocket::Process_Peek_connections *************** *** 1519,1525 **** iCount = strList.GetCount () / 2; // number of connections m_pDoc->ChatNote (eChatPeekList, ! CFormat ("Peek found %i connection%s to %s", PLURAL (iCount), (LPCTSTR) m_strRemoteUserName)); --- 1519,1525 ---- iCount = strList.GetCount () / 2; // number of connections m_pDoc->ChatNote (eChatPeekList, ! TFormat ("Peek found %i connection%s to %s", PLURAL (iCount), (LPCTSTR) m_strRemoteUserName)); *************** *** 1553,1559 **** iCount = strList.GetCount () / 3; // number of connections m_pDoc->ChatNote (eChatPeekList, ! CFormat ("Peek found %i connection%s to %s", PLURAL (iCount), (LPCTSTR) m_strRemoteUserName)); --- 1553,1559 ---- iCount = strList.GetCount () / 3; // number of connections m_pDoc->ChatNote (eChatPeekList, ! TFormat ("Peek found %i connection%s to %s", PLURAL (iCount), (LPCTSTR) m_strRemoteUserName)); *************** *** 1596,1605 **** if (m_bHeIsSnooping) { SendChatMessage (CHAT_MESSAGE, ! CFormat ("\nYou are no longer snooping %s.\n", m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatInformation, ! CFormat ("%s has stopped snooping you.", (LPCTSTR) m_strRemoteUserName)); m_bHeIsSnooping = false; return; // all done --- 1596,1605 ---- if (m_bHeIsSnooping) { SendChatMessage (CHAT_MESSAGE, ! TFormat ("\nYou are no longer snooping %s.\n", m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatInformation, ! TFormat ("%s has stopped snooping you.", (LPCTSTR) m_strRemoteUserName)); m_bHeIsSnooping = false; return; // all done *************** *** 1608,1631 **** if (m_bCanSnoop) { if (!m_pDoc->m_bAutoAllowSnooping && // don't bother if they don't mind ! ::AfxMessageBox ( ! CFormat ("%s wishes to start snooping you.\n\nPermit it?", (LPCTSTR) m_strRemoteUserName), MB_YESNO) != IDYES) { // tell them our rejection SendChatMessage (CHAT_MESSAGE, ! CFormat ("\n%s does not want you to snoop just now.\n", (LPCTSTR) m_pDoc->m_strOurChatName)); } // end of snoop not allowed right now else { // tell them our acceptance SendChatMessage (CHAT_MESSAGE, ! CFormat ("\nYou are now snooping %s.\n", (LPCTSTR) m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatInformation, ! CFormat ("%s is now snooping you.", (LPCTSTR) m_strRemoteUserName)); m_bHeIsSnooping = true; } --- 1608,1631 ---- if (m_bCanSnoop) { if (!m_pDoc->m_bAutoAllowSnooping && // don't bother if they don't mind ! ::TMessageBox ( ! TFormat ("%s wishes to start snooping you.\n\nPermit it?", (LPCTSTR) m_strRemoteUserName), MB_YESNO) != IDYES) { // tell them our rejection SendChatMessage (CHAT_MESSAGE, ! TFormat ("\n%s does not want you to snoop just now.\n", (LPCTSTR) m_pDoc->m_strOurChatName)); } // end of snoop not allowed right now else { // tell them our acceptance SendChatMessage (CHAT_MESSAGE, ! TFormat ("\nYou are now snooping %s.\n", (LPCTSTR) m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatInformation, ! TFormat ("%s is now snooping you.", (LPCTSTR) m_strRemoteUserName)); m_bHeIsSnooping = true; } *************** *** 1634,1643 **** else { // not allowed to snoop SendChatMessage (CHAT_MESSAGE, ! CFormat ("\n%s has not given you permission to snoop.\n", (LPCTSTR) m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatInformation, ! CFormat ("%s attempted to snoop you.", (LPCTSTR) m_strRemoteUserName)); } // end of not allowed to snoop --- 1634,1643 ---- else { // not allowed to snoop SendChatMessage (CHAT_MESSAGE, ! TFormat ("\n%s has not given you permission to snoop.\n", (LPCTSTR) m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatInformation, ! TFormat ("%s attempted to snoop you.", (LPCTSTR) m_strRemoteUserName)); } // end of not allowed to snoop *************** *** 1692,1702 **** { // tell them our acceptance SendChatMessage (CHAT_MESSAGE, ! CFormat ("\nYou command %s to '%s'.\n", (LPCTSTR) m_pDoc->m_strOurChatName , (LPCTSTR) strMessage)); m_pDoc->ChatNote (eChatCommand, ! CFormat ("%s commands you to '%s'.", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) strMessage)); m_pDoc->m_iExecutionDepth = 0; --- 1692,1702 ---- { // tell them our acceptance SendChatMessage (CHAT_MESSAGE, ! TFormat ("\nYou command %s to '%s'.\n", (LPCTSTR) m_pDoc->m_strOurChatName , (LPCTSTR) strMessage)); m_pDoc->ChatNote (eChatCommand, ! TFormat ("%s commands you to '%s'.", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) strMessage)); m_pDoc->m_iExecutionDepth = 0; *************** *** 1705,1714 **** else { // not allowed to send commands SendChatMessage (CHAT_MESSAGE, ! CFormat ("\n%s has not given you permission to send commands.\n", m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatCommand, ! CFormat ("%s attempted to send you a command.", (LPCTSTR) m_strRemoteUserName)); } // end of not allowed to end commands --- 1705,1714 ---- else { // not allowed to send commands SendChatMessage (CHAT_MESSAGE, ! TFormat ("\n%s has not given you permission to send commands.\n", m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatCommand, ! TFormat ("%s attempted to send you a command.", (LPCTSTR) m_strRemoteUserName)); } // end of not allowed to end commands Index: ChatListDlg.cpp =================================================================== RCS file: /cvs/mushclient/ChatListDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** ChatListDlg.cpp 27 Nov 2004 09:11:30 -0000 1.4 --- ChatListDlg.cpp 12 Jun 2007 04:01:56 -0000 1.5 *************** *** 151,157 **** CDialog::OnInitDialog(); // update window title ! SetWindowText (CFormat ("Chat sessions for %s", m_pDoc->m_mush_name)); int iColOrder [eColumnChatCount] = {0, 1, 2, 3, 4, 5}, iColWidth [eColumnChatCount] = {90, 66, 81, 81, 55, 50}; --- 151,157 ---- CDialog::OnInitDialog(); // update window title ! SetWindowText (TFormat ("Chat sessions for %s", m_pDoc->m_mush_name)); int iColOrder [eColumnChatCount] = {0, 1, 2, 3, 4, 5}, iColWidth [eColumnChatCount] = {90, 66, 81, 81, 55, 50}; *************** *** 161,172 **** App.RestoreColumnConfiguration ("Chat List", eColumnChatCount, m_ctlChatList, iColOrder, iColWidth, m_last_col, m_reverse); ! m_ctlChatList.InsertColumn(eColumnChatName, "Name", LVCFMT_LEFT, iColWidth [eColumnChatName]); ! m_ctlChatList.InsertColumn(eColumnGroup, "Group", LVCFMT_LEFT, iColWidth [eColumnGroup]); ! m_ctlChatList.InsertColumn(eColumnFromIP, "From IP", LVCFMT_LEFT, iColWidth [eColumnFromIP]); ! m_ctlChatList.InsertColumn(eColumnCallIP, "Call IP", LVCFMT_LEFT, iColWidth [eColumnCallIP]); ! m_ctlChatList.InsertColumn(eColumnCallPort, "Call Port", LVCFMT_LEFT, iColWidth [eColumnCallPort]); ! m_ctlChatList.InsertColumn(eColumnFlags, "Flags", LVCFMT_LEFT, iColWidth [eColumnFlags]); // recover column sequence --- 161,172 ---- App.RestoreColumnConfiguration ("Chat List", eColumnChatCount, m_ctlChatList, iColOrder, iColWidth, m_last_col, m_reverse); ! m_ctlChatList.InsertColumn(eColumnChatName, TranslateHeading ("Name"), LVCFMT_LEFT, iColWidth [eColumnChatName]); ! m_ctlChatList.InsertColumn(eColumnGroup, TranslateHeading ("Group"), LVCFMT_LEFT, iColWidth [eColumnGroup]); ! m_ctlChatList.InsertColumn(eColumnFromIP, TranslateHeading ("From IP"), LVCFMT_LEFT, iColWidth [eColumnFromIP]); ! m_ctlChatList.InsertColumn(eColumnCallIP, TranslateHeading ("Call IP"), LVCFMT_LEFT, iColWidth [eColumnCallIP]); ! m_ctlChatList.InsertColumn(eColumnCallPort, TranslateHeading ("Call Port"), LVCFMT_LEFT, iColWidth [eColumnCallPort]); ! m_ctlChatList.InsertColumn(eColumnFlags, TranslateHeading ("Flags"), LVCFMT_LEFT, iColWidth [eColumnFlags]); // recover column sequence Index: ColourPickerDlg.cpp =================================================================== RCS file: /cvs/mushclient/ColourPickerDlg.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -c -r1.12 -r1.13 *** ColourPickerDlg.cpp 3 Jan 2005 02:30:40 -0000 1.12 --- ColourPickerDlg.cpp 12 Jun 2007 04:01:56 -0000 1.13 *************** *** 239,245 **** | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlColourList.InsertColumn(0, "Colour name", LVCFMT_LEFT, 130); // swatch m_ctlColourList.InsertColumn(1, "", LVCFMT_LEFT, 91); --- 239,245 ---- | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlColourList.InsertColumn(0, TranslateHeading ("Colour name"), LVCFMT_LEFT, 130); // swatch m_ctlColourList.InsertColumn(1, "", LVCFMT_LEFT, 91); *************** *** 386,393 **** m_ctlBlue.SetWindowText (CFormat ("%i", iBlue)); m_ctlHue.SetWindowText (CFormat ("Hue: %5.1f", fHue)); ! m_ctlSaturation.SetWindowText (CFormat ("Saturation: %5.3f", fSaturation)); ! m_ctlLuminance.SetWindowText (CFormat ("Luminance: %5.3f", fLuminance)); m_ctlRedSlider.SetPos (iRed); m_ctlGreenSlider.SetPos (iGreen); --- 386,393 ---- m_ctlBlue.SetWindowText (CFormat ("%i", iBlue)); m_ctlHue.SetWindowText (CFormat ("Hue: %5.1f", fHue)); ! m_ctlSaturation.SetWindowText (TFormat ("Saturation: %5.3f", fSaturation)); ! m_ctlLuminance.SetWindowText (TFormat ("Luminance: %5.3f", fLuminance)); m_ctlRedSlider.SetPos (iRed); m_ctlGreenSlider.SetPos (iGreen); Index: DDV_validation.cpp =================================================================== RCS file: /cvs/mushclient/DDV_validation.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** DDV_validation.cpp 12 Apr 2002 05:01:05 -0000 1.2 --- DDV_validation.cpp 11 Jun 2007 23:44:15 -0000 1.3 *************** *** 38,44 **** { TCHAR szT[32]; if (nMinChars == 1) ! AfxMessageBox(IDS_CANNOT_BE_BLANK, MB_ICONEXCLAMATION, AFX_IDP_PARSE_STRING_SIZE); else { wsprintf(szT, _T("%d"), nMinChars); --- 38,44 ---- { TCHAR szT[32]; if (nMinChars == 1) ! TMessageBox("This field may not be blank", MB_ICONEXCLAMATION); else { wsprintf(szT, _T("%d"), nMinChars); Index: EditDlg.cpp =================================================================== RCS file: /cvs/mushclient/EditDlg.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -c -r1.15 -r1.16 *** EditDlg.cpp 25 Apr 2007 01:35:38 -0000 1.15 --- EditDlg.cpp 11 Jun 2007 10:42:08 -0000 1.16 *************** *** 45,51 **** { if (m_strText.FindOneOf ("\n\r") != -1) { ! ::AfxMessageBox("Line breaks not permitted here."); DDX_Text(pDX, IDC_TEXT, m_strText); pDX->Fail(); } --- 45,51 ---- { if (m_strText.FindOneOf ("\n\r") != -1) { ! ::TMessageBox("Line breaks not permitted here."); DDX_Text(pDX, IDC_TEXT, m_strText); pDX->Fail(); } Index: EditVariable.cpp =================================================================== RCS file: /cvs/mushclient/EditVariable.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** EditVariable.cpp 31 Dec 2004 07:03:34 -0000 1.8 --- EditVariable.cpp 11 Jun 2007 10:42:08 -0000 1.9 *************** *** 49,55 **** if (CheckLabel (m_strName)) { ! ::AfxMessageBox("The variable name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_VARIABLE_NAME, m_strName); pDX->Fail(); --- 49,55 ---- if (CheckLabel (m_strName)) { ! ::TMessageBox("The variable name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_VARIABLE_NAME, m_strName); pDX->Fail(); *************** *** 62,68 **** if (!m_bDoingChange) // only do this on an add if (m_pVariableMap->Lookup (m_strName, variable_item)) { ! ::AfxMessageBox("This variable name is already in the list of variables."); DDX_Text(pDX, IDC_VARIABLE_NAME, m_strName); pDX->Fail(); return; --- 62,68 ---- if (!m_bDoingChange) // only do this on an add if (m_pVariableMap->Lookup (m_strName, variable_item)) { ! ::TMessageBox("This variable name is already in the list of variables."); DDX_Text(pDX, IDC_VARIABLE_NAME, m_strName); pDX->Fail(); return; Index: FindDlg.cpp =================================================================== RCS file: /cvs/mushclient/FindDlg.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** FindDlg.cpp 31 Oct 2006 19:57:58 -0000 1.6 --- FindDlg.cpp 11 Jun 2007 10:42:08 -0000 1.7 *************** *** 44,50 **** if (m_strFindText.IsEmpty ()) { ! ::AfxMessageBox("You must specify something to search for."); DDX_Text(pDX, IDC_FIND_WHAT, m_strFindText); pDX->Fail(); } --- 44,50 ---- if (m_strFindText.IsEmpty ()) { ! ::TMessageBox("You must specify something to search for."); DDX_Text(pDX, IDC_FIND_WHAT, m_strFindText); pDX->Fail(); } Index: Finding.cpp =================================================================== RCS file: /cvs/mushclient/Finding.cpp,v retrieving revision 1.12 retrieving revision 1.14 diff -c -r1.12 -r1.14 *** Finding.cpp 20 Apr 2007 02:51:38 -0000 1.12 --- Finding.cpp 11 Jun 2007 21:40:12 -0000 1.14 *************** *** 48,58 **** CString strFindType = "text"; if (FindInfo.m_bRegexp) strFindType = "regular expression"; ! strMsg.Format ("The %s \"%s\" was not found%s", (LPCTSTR) strFindType, (LPCTSTR) FindInfo.m_strFindStringList.GetHead (), FindInfo.m_bAgain ? " again." : " ."); ! ::AfxMessageBox (strMsg, MB_ICONINFORMATION); FindInfo.m_iStartColumn = -1; return false; } // end of NotFound --- 48,58 ---- CString strFindType = "text"; if (FindInfo.m_bRegexp) strFindType = "regular expression"; ! strMsg = TFormat ("The %s \"%s\" was not found%s", (LPCTSTR) strFindType, (LPCTSTR) FindInfo.m_strFindStringList.GetHead (), FindInfo.m_bAgain ? " again." : " ."); ! ::TMessageBox (strMsg, MB_ICONINFORMATION); FindInfo.m_iStartColumn = -1; return false; } // end of NotFound Index: FunctionListDlg.cpp =================================================================== RCS file: /cvs/mushclient/FunctionListDlg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** FunctionListDlg.cpp 26 Apr 2007 06:10:06 -0000 1.3 --- FunctionListDlg.cpp 11 Jun 2007 10:42:08 -0000 1.4 *************** *** 184,190 **** CDialog::OnOK(); } else ! ::AfxMessageBox ("No function selected"); } void CFunctionListDlg::OnChangeFilter() --- 184,190 ---- CDialog::OnOK(); } else ! ::TMessageBox ("No function selected"); } void CFunctionListDlg::OnChangeFilter() Index: GlobalChangeDlg.cpp =================================================================== RCS file: /cvs/mushclient/GlobalChangeDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** GlobalChangeDlg.cpp 3 Jan 2005 02:30:40 -0000 1.4 --- GlobalChangeDlg.cpp 11 Jun 2007 10:42:08 -0000 1.5 *************** *** 38,44 **** if (m_strChangeFrom.IsEmpty ()) { ! ::AfxMessageBox("This field cannot be empty."); DDX_Text(pDX, IDC_CHANGE_FROM, m_strChangeFrom); pDX->Fail(); } --- 38,44 ---- if (m_strChangeFrom.IsEmpty ()) { ! ::TMessageBox("This field cannot be empty."); DDX_Text(pDX, IDC_CHANGE_FROM, m_strChangeFrom); pDX->Fail(); } Index: GlobalPrefs.cpp =================================================================== RCS file: /cvs/mushclient/GlobalPrefs.cpp,v retrieving revision 1.34 retrieving revision 1.36 diff -c -r1.34 -r1.36 *** GlobalPrefs.cpp 26 Apr 2007 02:55:45 -0000 1.34 --- GlobalPrefs.cpp 11 Jun 2007 23:44:15 -0000 1.36 *************** *** 139,145 **** } else if (CommDlgExtendedError() == FNERR_BUFFERTOOSMALL) // To many files - buffer not large enough ! AfxMessageBox("You have selected too many worlds to add. Please try again with fewer worlds."); UpdateDialogControls(this, TRUE); } --- 139,145 ---- } else if (CommDlgExtendedError() == FNERR_BUFFERTOOSMALL) // To many files - buffer not large enough ! TMessageBox("You have selected too many worlds to add. Please try again with fewer worlds."); UpdateDialogControls(this, TRUE); } *************** *** 437,442 **** --- 437,444 ---- DDX_CBIndex(pDX, IDC_TABS, m_iWindowTabsStyle); DDX_Check(pDX, IDC_FLAT_TOOLBARS, m_bFlatToolbars); DDX_Check(pDX, IDC_NOTIFY_TO_OUTPUT, m_bErrorNotificationToOutputWindow); + DDX_MinMaxString(pDX, IDC_LOCALE, m_strLocale); + DDV_MinMaxString(pDX, m_strLocale, 2, 3); //}}AFX_DATA_MAP } *************** *** 1213,1218 **** --- 1215,1221 ---- propSheet.m_Page2.m_bTriggerRemoveCheck = pApp->m_bTriggerRemoveCheck; propSheet.m_Page2.m_bF1macro = pApp->m_bF1macro; propSheet.m_Page2.m_bAllTypingToCommandWindow = pApp->m_bAllTypingToCommandWindow; + propSheet.m_Page2.m_strLocale = pApp->m_strLocale; propSheet.m_Page3.m_bConfirmBeforeClosingWorld = pApp->m_bConfirmBeforeClosingWorld ; propSheet.m_Page3.m_bConfirmBeforeClosingMushclient = pApp->m_bConfirmBeforeClosingMushclient ; propSheet.m_Page3.m_bConfirmBeforeClosingMXPdebug = pApp->m_bConfirmBeforeClosingMXPdebug ; *************** *** 1322,1327 **** --- 1325,1331 ---- pApp->m_bTriggerRemoveCheck = propSheet.m_Page2.m_bTriggerRemoveCheck; pApp->m_bF1macro = propSheet.m_Page2.m_bF1macro; pApp->m_bAllTypingToCommandWindow = propSheet.m_Page2.m_bAllTypingToCommandWindow; + pApp->m_strLocale = propSheet.m_Page2.m_strLocale; pApp->m_bConfirmBeforeClosingWorld = propSheet.m_Page3.m_bConfirmBeforeClosingWorld ; pApp->m_bConfirmBeforeClosingMushclient = propSheet.m_Page3.m_bConfirmBeforeClosingMushclient ; pApp->m_bConfirmBeforeClosingMXPdebug = propSheet.m_Page3.m_bConfirmBeforeClosingMXPdebug ; *************** *** 1599,1605 **** } else if (CommDlgExtendedError() == FNERR_BUFFERTOOSMALL) // To many files - buffer not large enough ! AfxMessageBox("You have selected too many plugins to add. Please try again with fewer Plugins."); UpdateDialogControls(this, TRUE); --- 1603,1609 ---- } else if (CommDlgExtendedError() == FNERR_BUFFERTOOSMALL) // To many files - buffer not large enough ! TMessageBox("You have selected too many plugins to add. Please try again with fewer Plugins."); UpdateDialogControls(this, TRUE); Index: GlobalPrefs.h =================================================================== RCS file: /cvs/mushclient/GlobalPrefs.h,v retrieving revision 1.25 retrieving revision 1.26 diff -c -r1.25 -r1.26 *** GlobalPrefs.h 1 Apr 2007 04:44:31 -0000 1.25 --- GlobalPrefs.h 11 Jun 2007 23:44:15 -0000 1.26 *************** *** 98,103 **** --- 98,104 ---- int m_iWindowTabsStyle; BOOL m_bFlatToolbars; BOOL m_bErrorNotificationToOutputWindow; + CString m_strLocale; //}}AFX_DATA Index: GoToLineDlg.cpp =================================================================== RCS file: /cvs/mushclient/GoToLineDlg.cpp,v retrieving revision 1.2 retrieving revision 1.4 diff -c -r1.2 -r1.4 *** GoToLineDlg.cpp 12 Apr 2002 05:01:07 -0000 1.2 --- GoToLineDlg.cpp 11 Jun 2007 21:40:12 -0000 1.4 *************** *** 42,49 **** if (m_iLineNumber < 1 || m_iLineNumber > m_iMaxLine) { CString strMessage; ! strMessage.Format ("Line number must be in range 1 to %i", m_iMaxLine); ! ::AfxMessageBox(strMessage); DDX_Text(pDX, IDC_LINE_NUMBER, m_iLineNumber); pDX->Fail(); } --- 42,49 ---- if (m_iLineNumber < 1 || m_iLineNumber > m_iMaxLine) { CString strMessage; ! strMessage = TFormat ("Line number must be in range 1 to %i", m_iMaxLine); ! ::TMessageBox(strMessage); DDX_Text(pDX, IDC_LINE_NUMBER, m_iLineNumber); pDX->Fail(); } Index: HighlightPhraseDlg.cpp =================================================================== RCS file: /cvs/mushclient/HighlightPhraseDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** HighlightPhraseDlg.cpp 3 Apr 2007 23:10:18 -0000 1.4 --- HighlightPhraseDlg.cpp 11 Jun 2007 10:42:08 -0000 1.5 *************** *** 49,55 **** // can't highlight an empty string if (m_strText.IsEmpty ()) { ! ::AfxMessageBox("The text to highlight cannot be empty.", MB_ICONSTOP); DDX_Text(pDX, IDC_HIGHLIGHT_TEXT, m_strText); pDX->Fail(); } // end of text being blank --- 49,55 ---- // can't highlight an empty string if (m_strText.IsEmpty ()) { ! ::TMessageBox("The text to highlight cannot be empty.", MB_ICONSTOP); DDX_Text(pDX, IDC_HIGHLIGHT_TEXT, m_strText); pDX->Fail(); } // end of text being blank *************** *** 57,63 **** // no change doesn't make sense here if (m_iColour <= 0) { ! ::AfxMessageBox("Please choose a colour other than '(no change)'.", MB_ICONSTOP); DDX_Text(pDX, IDC_HIGHLIGHT_TEXT, m_strText); pDX->Fail(); } // end of no colour selected --- 57,63 ---- // no change doesn't make sense here if (m_iColour <= 0) { ! ::TMessageBox("Please choose a colour other than '(no change)'.", MB_ICONSTOP); DDX_Text(pDX, IDC_HIGHLIGHT_TEXT, m_strText); pDX->Fail(); } // end of no colour selected *************** *** 68,74 **** m_iOtherBackground_orig == m_iOtherBackground) { ! ::AfxMessageBox("Please choose a different colour than the original one.", MB_ICONSTOP); DDX_Text(pDX, IDC_HIGHLIGHT_TEXT, m_strText); pDX->Fail(); } --- 68,74 ---- m_iOtherBackground_orig == m_iOtherBackground) { ! ::TMessageBox("Please choose a different colour than the original one.", MB_ICONSTOP); DDX_Text(pDX, IDC_HIGHLIGHT_TEXT, m_strText); pDX->Fail(); } Index: ImportXMLdlg.cpp =================================================================== RCS file: /cvs/mushclient/ImportXMLdlg.cpp,v retrieving revision 1.9 retrieving revision 1.11 diff -c -r1.9 -r1.11 *** ImportXMLdlg.cpp 14 Oct 2006 05:49:03 -0000 1.9 --- ImportXMLdlg.cpp 11 Jun 2007 21:40:12 -0000 1.11 *************** *** 116,122 **** catch (CFileException * e) { ! ::AfxMessageBox (CFormat ("Unable to open or read %s", (LPCTSTR) filedlg.GetPathName ()), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception --- 116,122 ---- catch (CFileException * e) { ! ::TMessageBox (TFormat ("Unable to open or read %s", (LPCTSTR) filedlg.GetPathName ()), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception *************** *** 202,223 **** &iKeypad, &iPrinting); ! CString strCounts; ! ADDCOUNT (iTriggers, "trigger", PLURAL); ! ADDCOUNT (iAliases, "alias", PLURALES); ! ADDCOUNT (iTimers, "timer", PLURAL); ! ADDCOUNT (iMacros, "macro", PLURAL); ! ADDCOUNT (iVariables, "variable", PLURAL); ! ADDCOUNT (iColours, "colour", PLURAL); ! ADDCOUNT (iKeypad, "keypad", PLURAL); ! ADDCOUNT (iPrinting, "printing style", PLURAL); if (strCounts.IsEmpty ()) ! strCounts = "No items loaded."; ! else ! strCounts += " loaded."; ! ::AfxMessageBox (strCounts, MB_ICONINFORMATION); m_pDoc->SetModifiedFlag (TRUE); // document has now changed --- 202,229 ---- &iKeypad, &iPrinting); ! CString strCounts = TFormat ( ! "%lu trigger%s, " ! "%lu alias%s, " ! "%lu timer%s, " ! "%lu macro%s, " ! "%lu variable%s, " ! "%lu colour%s, " ! "%lu keypad%s, " ! "%lu printing style%s loaded. ", ! PLURAL (iTriggers), ! PLURALES (iAliases), ! PLURAL (iTimers), ! PLURAL (iMacros), ! PLURAL (iVariables), ! PLURAL (iColours), ! PLURAL (iKeypad), ! PLURAL (iPrinting)); if (strCounts.IsEmpty ()) ! strCounts = Translate ("No items loaded."); ! ::TMessageBox (strCounts, MB_ICONINFORMATION); m_pDoc->SetModifiedFlag (TRUE); // document has now changed *************** *** 227,238 **** } else ! ::AfxMessageBox ("Not in XML format"); } // end of try block catch (CArchiveException* ) { ! ::AfxMessageBox ("There was a problem parsing the XML. " "See the error window for more details"); } --- 233,244 ---- } else ! ::TMessageBox ("Not in XML format"); } // end of try block catch (CArchiveException* ) { ! ::TMessageBox ("There was a problem parsing the XML. " "See the error window for more details"); } Index: InsertUnicodeDlg.cpp =================================================================== RCS file: /cvs/mushclient/InsertUnicodeDlg.cpp,v retrieving revision 1.1 retrieving revision 1.3 diff -c -r1.1 -r1.3 *** InsertUnicodeDlg.cpp 20 Apr 2007 02:52:09 -0000 1.1 --- InsertUnicodeDlg.cpp 11 Jun 2007 21:40:12 -0000 1.3 *************** *** 40,53 **** if(m_strCharacter.IsEmpty ()) { ! ::AfxMessageBox("Unicode character code cannot be blank."); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } // end of code being blank if(m_strCharacter.GetLength () > 10) { ! ::AfxMessageBox("Unicode character code too long."); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } // end of code being too long to convert --- 40,53 ---- if(m_strCharacter.IsEmpty ()) { ! ::TMessageBox ("Unicode character code cannot be blank."); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } // end of code being blank if(m_strCharacter.GetLength () > 10) { ! ::TMessageBox ("Unicode character code too long."); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } // end of code being too long to convert *************** *** 62,68 **** if (!isxdigit (*p)) { ! ::AfxMessageBox (CFormat ("Bad hex character: '%c'.", *p)); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } --- 62,68 ---- if (!isxdigit (*p)) { ! ::TMessageBox (TFormat ("Bad hex character: '%c'.", *p)); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } *************** *** 80,86 **** for ( ; *p; p++) if (!isdigit (*p)) { ! ::AfxMessageBox (CFormat ("Bad decimal character: '%c'.", *p)); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } --- 80,86 ---- for ( ; *p; p++) if (!isdigit (*p)) { ! ::TMessageBox (TFormat ("Bad decimal character: '%c'.", *p)); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } *************** *** 90,96 **** if (i < 0 || i > LONG_MAX) { ! ::AfxMessageBox (CFormat ("Unicode character %I64i too large - must be in range 0 to 2147483647 " "(hex 0 to 7FFFFFFF).", i)); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); --- 90,96 ---- if (i < 0 || i > LONG_MAX) { ! ::TMessageBox (TFormat ("Unicode character %I64i too large - must be in range 0 to 2147483647 " "(hex 0 to 7FFFFFFF).", i)); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); Index: LuaChooseList.cpp =================================================================== RCS file: /cvs/mushclient/LuaChooseList.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** LuaChooseList.cpp 29 Nov 2005 23:36:35 -0000 1.1 --- LuaChooseList.cpp 12 Jun 2007 04:01:56 -0000 1.2 *************** *** 53,59 **** SetWindowText (m_strTitle); ! m_ctlListBox.InsertColumn(0, "Main column", LVCFMT_LEFT, 340); m_ctlListBox.SendMessage (LVM_SETEXTENDEDLISTVIEWSTYLE, 0, m_ctlListBox.SendMessage (LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) --- 53,59 ---- SetWindowText (m_strTitle); ! m_ctlListBox.InsertColumn(0, TranslateHeading ("Main column"), LVCFMT_LEFT, 340); m_ctlListBox.SendMessage (LVM_SETEXTENDEDLISTVIEWSTYLE, 0, m_ctlListBox.SendMessage (LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) Index: LuaChooseListMulti.cpp =================================================================== RCS file: /cvs/mushclient/LuaChooseListMulti.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** LuaChooseListMulti.cpp 3 Aug 2006 03:53:08 -0000 1.1 --- LuaChooseListMulti.cpp 12 Jun 2007 04:01:56 -0000 1.2 *************** *** 49,55 **** SetWindowText (m_strTitle); ! m_ctlListBox.InsertColumn(0, "Main column", LVCFMT_LEFT, 340); m_ctlListBox.SendMessage (LVM_SETEXTENDEDLISTVIEWSTYLE, 0, m_ctlListBox.SendMessage (LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) --- 49,55 ---- SetWindowText (m_strTitle); ! m_ctlListBox.InsertColumn(0, TranslateHeading ("Main column"), LVCFMT_LEFT, 340); m_ctlListBox.SendMessage (LVM_SETEXTENDEDLISTVIEWSTYLE, 0, m_ctlListBox.SendMessage (LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) Index: LuaGsubDlg.cpp =================================================================== RCS file: /cvs/mushclient/LuaGsubDlg.cpp,v retrieving revision 1.4 retrieving revision 1.6 diff -c -r1.4 -r1.6 *** LuaGsubDlg.cpp 17 Jun 2006 23:22:37 -0000 1.4 --- LuaGsubDlg.cpp 11 Jun 2007 21:40:12 -0000 1.6 *************** *** 58,64 **** if (m_strReplacement.IsEmpty ()) { ! ::AfxMessageBox ("When calling a function the replacement text must be the function name", MB_ICONEXCLAMATION); DDX_Text(pDX, IDC_REPLACEMENT, m_strReplacement); pDX->Fail(); --- 58,64 ---- if (m_strReplacement.IsEmpty ()) { ! ::TMessageBox ("When calling a function the replacement text must be the function name", MB_ICONEXCLAMATION); DDX_Text(pDX, IDC_REPLACEMENT, m_strReplacement); pDX->Fail(); *************** *** 79,85 **** if (! FindLuaFunction (L, m_strReplacement)) { ! ::AfxMessageBox (CFormat ("Function '%s' not found in script text", (LPCTSTR) m_strReplacement), MB_ICONEXCLAMATION); DDX_Text(pDX, IDC_REPLACEMENT, m_strReplacement); pDX->Fail(); --- 79,85 ---- if (! FindLuaFunction (L, m_strReplacement)) { ! ::TMessageBox (TFormat ("Function '%s' not found in script text", (LPCTSTR) m_strReplacement), MB_ICONEXCLAMATION); DDX_Text(pDX, IDC_REPLACEMENT, m_strReplacement); pDX->Fail(); Index: MUSHclient.cpp =================================================================== RCS file: /cvs/mushclient/MUSHclient.cpp,v retrieving revision 1.73 retrieving revision 1.77 diff -c -r1.73 -r1.77 *** MUSHclient.cpp 18 Apr 2007 01:21:31 -0000 1.73 --- MUSHclient.cpp 11 Jun 2007 23:44:15 -0000 1.77 *************** *** 1,6 **** --- 1,9 ---- // MUSHclient.cpp : Defines the class behaviors for the application. // + // xgettext -kTMessageBox -kTranslate -o mushclient_static.po *.cpp + // xgettext -kTranslateFormat -o mushclient_formatted.po *.cpp + #include "stdafx.h" #include "MUSHclient.h" #include "doc.h" *************** *** 35,47 **** COLORREF xterm_256_colours [256]; // Statically link __delayLoadHelper/__FUnloadDelayLoadedDLL ! #pragma comment( lib, "Delayimp.lib") #ifdef LUA51 // Lua 5.1 #pragma comment( lib, "lua5.1.lib" ) // however we will allowed delayed load ! #pragma comment(linker, "/DelayLoad:lua5.1.dll") #else // Lua 5.0 #pragma comment( lib, "..\\lua50\\lib\\dll\\lua50.lib" ) --- 38,51 ---- COLORREF xterm_256_colours [256]; // Statically link __delayLoadHelper/__FUnloadDelayLoadedDLL ! //#pragma comment( lib, "Delayimp.lib") #ifdef LUA51 // Lua 5.1 #pragma comment( lib, "lua5.1.lib" ) // however we will allowed delayed load ! // #pragma comment(linker, "/DelayLoad:lua5.1.dll") ! #pragma comment(linker, "lua5.1.dll") #else // Lua 5.0 #pragma comment( lib, "..\\lua50\\lib\\dll\\lua50.lib" ) *************** *** 96,101 **** --- 100,115 ---- void Generate256colours (void); + extern const struct luaL_reg *ptr_xmllib; + + extern "C" + { + LUALIB_API int luaopen_rex(lua_State *L); + LUALIB_API int luaopen_bits(lua_State *L); + LUALIB_API int luaopen_compress(lua_State *L); + LUALIB_API int luaopen_bc(lua_State *L); + } + ///////////////////////////////////////////////////////////////////////////// // CMUSHclientApp *************** *** 252,257 **** --- 266,276 ---- LoadMapDirections (); Generate256colours (); + // UMessageBox ("\xC9\xB3\xC9\xA8\xC9\x95\xC9\xAE"); + + // set the current locale + setlocale (LC_ALL, "" ); + // Set the debug-heap flag so that freed blocks are kept on the // linked list, to catch any inadvertent use of freed memory SET_CRT_DEBUG_FIELD( _CRTDBG_DELAY_FREE_MEM_DF ); *************** *** 261,266 **** --- 280,286 ---- // in ProcessPreviousLine.cpp m_SpellChecker_Lua = NULL; + m_Translator_Lua = NULL; m_bShowInitialDelay = true; m_TypeOfNewDocument = eNormalNewDocument; *************** *** 278,284 **** if (!bWine) if (!AfxOleInit()) // not needed? { ! AfxMessageBox("OLE initialization failed", MB_ICONSTOP); return FALSE; } --- 298,304 ---- if (!bWine) if (!AfxOleInit()) // not needed? { ! AfxMessageBox("OLE initialization failed", MB_ICONSTOP); // DON'T TRANSLATE return FALSE; } *************** *** 290,295 **** --- 310,316 ---- else m_iCounterFrequency = 0; // no performance counter + SetRegistryKey ("Gammon Software Solutions"); // CG: The following block was added by the Splash Screen component. *************** *** 403,415 **** LoadGlobalsFromRegistry (); // check for configuration name collisions #ifdef _DEBUG for (int i = 0; AlphaOptionsTable [i].pName; i++) for (int j = 0; OptionsTable [j].pName; j++) if (strcmp (AlphaOptionsTable [i].pName, OptionsTable [j].pName) == 0) ! ::AfxMessageBox (CFormat ("Internal MUSHclient error, config name collision: %s", (LPCTSTR) OptionsTable [j].pName), MB_ICONEXCLAMATION); #endif --- 424,444 ---- LoadGlobalsFromRegistry (); + // i18n setup ------------------------------- + + if (!I18N_Setup ()) + { + AfxMessageBox("Lua (i18n) initialization failed", MB_ICONSTOP); // DON'T TRANSLATE + return FALSE; + } + // check for configuration name collisions #ifdef _DEBUG for (int i = 0; AlphaOptionsTable [i].pName; i++) for (int j = 0; OptionsTable [j].pName; j++) if (strcmp (AlphaOptionsTable [i].pName, OptionsTable [j].pName) == 0) ! ::TMessageBox (TFormat ("Internal MUSHclient error, config name collision: %s", (LPCTSTR) OptionsTable [j].pName), MB_ICONEXCLAMATION); #endif *************** *** 443,449 **** WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE , extraWnd)) // owner is hidden window { ! AfxMessageBox("Unable to load main frame window", MB_ICONSTOP); return FALSE; } m_pMainWnd = pMainFrame; --- 472,478 ---- WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE , extraWnd)) // owner is hidden window { ! TMessageBox ("Unable to load main frame window", MB_ICONSTOP); return FALSE; } m_pMainWnd = pMainFrame; *************** *** 751,757 **** // warn them, if they have sessions open. if (gdoccount > 0 && App.m_bConfirmBeforeClosingMushclient) ! if (::AfxMessageBox ("This will end your MUSHclient session.", MB_OKCANCEL | MB_ICONINFORMATION) == IDCANCEL) return 0; --- 780,786 ---- // warn them, if they have sessions open. if (gdoccount > 0 && App.m_bConfirmBeforeClosingMushclient) ! if (::TMessageBox ("This will end your MUSHclient session.", MB_OKCANCEL | MB_ICONINFORMATION) == IDCANCEL) return 0; *************** *** 976,985 **** --- 1005,1020 ---- DELETE_MAP (m_ColoursMap, CColours); + // close spell checker Lua state if (m_SpellChecker_Lua) lua_close (m_SpellChecker_Lua); m_SpellChecker_Lua = NULL; + // close i18n Lua state + if (m_Translator_Lua) + lua_close (m_Translator_Lua); + m_Translator_Lua = NULL; + return CWinApp::ExitInstance(); } *************** *** 1111,1163 **** } - LONG WINAPI DelayLoadDllExceptionFilter(PEXCEPTION_POINTERS pep) { - // Assume we recognize this exception - LONG lDisposition = EXCEPTION_EXECUTE_HANDLER; - // If this is a Delay-load problem, ExceptionInformation[0] points - // to a DelayLoadInfo structure that has detailed error info - PDelayLoadInfo pdli = PDelayLoadInfo(pep->ExceptionRecord - ->ExceptionInformation[0]); - // Create a buffer where we construct error messages - char sz[500] = { 0 }; - switch (pep->ExceptionRecord->ExceptionCode) { - case VcppException(ERROR_SEVERITY_ERROR, ERROR_MOD_NOT_FOUND): - // The DLL module was not found at runtime - wsprintf(sz, "The DLL \"%s\" was not found\n\n" - "Please ensure it is in your path, or disable the spell checker.", pdli->szDll); - break; - case VcppException(ERROR_SEVERITY_ERROR, ERROR_PROC_NOT_FOUND): - // The DLL module was found but it doesn’t contain the function - if (pdli->dlp.fImportByName) { - wsprintf(sz, "Function %s was not found in %s", - pdli->dlp.szProcName, pdli->szDll); - } else { - wsprintf(sz, "Function ordinal %d was not found in %s", - pdli->dlp.dwOrdinal, pdli->szDll); - } - break; - default: - lDisposition = EXCEPTION_CONTINUE_SEARCH; // We don’t recognize this // exception - break; - } - if (lDisposition == EXCEPTION_EXECUTE_HANDLER) { - // We recognized this error and constructed a message, show it - MessageBox(NULL, sz, NULL, MB_OK); - } - return(lDisposition); - } // end of DelayLoadDllExceptionFilter - - - extern const struct luaL_reg *ptr_xmllib; - - extern "C" - { - LUALIB_API int luaopen_rex(lua_State *L); - LUALIB_API int luaopen_bits(lua_State *L); - LUALIB_API int luaopen_compress(lua_State *L); - LUALIB_API int luaopen_bc(lua_State *L); - } - LUALIB_API int luaopen_progress_dialog(lua_State *L); void CMUSHclientApp::OpenLuaDelayed () --- 1146,1151 ---- *************** *** 1205,1211 **** lua_getglobal (m_SpellChecker_Lua, SPELLCHECKFUNCTION); if (!lua_isfunction (m_SpellChecker_Lua, -1)) { ! ::AfxMessageBox (CFormat ("Function '%s' not in spellchecker.lua file", SPELLCHECKFUNCTION), MB_OK | MB_ICONSTOP); lua_close (m_SpellChecker_Lua); m_SpellChecker_Lua = NULL; --- 1193,1199 ---- lua_getglobal (m_SpellChecker_Lua, SPELLCHECKFUNCTION); if (!lua_isfunction (m_SpellChecker_Lua, -1)) { ! ::TMessageBox (TFormat ("Function '%s' not in spellchecker.lua file", SPELLCHECKFUNCTION), MB_OK | MB_ICONSTOP); lua_close (m_SpellChecker_Lua); m_SpellChecker_Lua = NULL; *************** *** 1213,1242 **** } // end of OpenLuaDelayed - extern LONG WINAPI DelayLoadDllExceptionFilterLua(PEXCEPTION_POINTERS pep); void CMUSHclientApp::InitSpellCheck (void) { ! // Wrap all calls to delay-load DLL functions inside SEH ! __try ! { ! ! OpenLuaDelayed (); ! if (m_SpellChecker_Lua) ! m_bSpellCheckOK = true; ! else ! m_bSpellCheckOK = false; ! ! ! } ! __except (DelayLoadDllExceptionFilter(GetExceptionInformation())) ! { ! // Nothing to do in here, thread continues to run normally ! m_bSpellCheckOK = false; ! m_SpellChecker_Lua = NULL; ! } } // end of InitSpellCheck --- 1201,1219 ---- } // end of OpenLuaDelayed void CMUSHclientApp::InitSpellCheck (void) { ! ! OpenLuaDelayed (); ! if (m_SpellChecker_Lua) ! m_bSpellCheckOK = true; ! else ! m_bSpellCheckOK = false; ! ! } // end of InitSpellCheck *************** *** 1247,1256 **** { if (m_zCompress.msg) ! ::AfxMessageBox (CFormat ("Could not initialise zlib decompression engine: %s", m_zCompress.msg), MB_ICONEXCLAMATION); else ! ::AfxMessageBox (CFormat ("Could not initialise zlib decompression engine: %i", izError), MB_ICONEXCLAMATION); } // end of zLibError --- 1224,1233 ---- { if (m_zCompress.msg) ! ::TMessageBox (TFormat ("Could not initialise zlib decompression engine: %s", m_zCompress.msg), MB_ICONEXCLAMATION); else ! ::TMessageBox (TFormat ("Could not initialise zlib decompression engine: %i", izError), MB_ICONEXCLAMATION); } // end of zLibError *************** *** 1261,1281 **** { bool bCompressInitOK = false; ! // Wrap all calls to delay-load DLL functions inside SEH ! __try ! { ! int izError; ! if ((izError = inflateInit (&m_zCompress)) == Z_OK) ! bCompressInitOK = true; ! else ! zLibError (izError, m_zCompress); ! } // endof __try ! __except (DelayLoadDllExceptionFilter(GetExceptionInformation())) ! { ! // Nothing to do in here, thread continues to run normally ! } ! return bCompressInitOK; } // end of InitZlib --- 1238,1250 ---- { bool bCompressInitOK = false; ! int izError; ! if ((izError = inflateInit (&m_zCompress)) == Z_OK) ! bCompressInitOK = true; ! else ! zLibError (izError, m_zCompress); ! return bCompressInitOK; } // end of InitZlib *************** *** 1434,1439 **** --- 1403,1453 ---- } // end of Generate256colours + + BOOL CMUSHclientApp::I18N_Setup (void) // internationalization + { + + CString m_strTranslatorFile = ExtractDirectory (App.m_strMUSHclientFileName); + m_strTranslatorFile += "locale\\"; + m_strTranslatorFile += App.m_strLocale; // eg. EN + m_strTranslatorFile += ".lua"; + + CFileStatus status; + if (CFile::GetStatus(m_strTranslatorFile, status)) + { + + m_Translator_Lua = MakeLuaState(); /* opens Lua */ + if (!m_Translator_Lua) + return FALSE; // can't open Lua + + luaL_openlibs (m_Translator_Lua); // new way of opening all libraries + + luaopen_rex (m_Translator_Lua); // regular expression library + luaopen_bits (m_Translator_Lua); // bit manipulation library + luaopen_compress (m_Translator_Lua); // compression (utils) library + luaopen_bc (m_Translator_Lua); // open bc library + + // add xml reader (and other stuff) to utils lib + luaL_register (m_Translator_Lua, "utils", ptr_xmllib); + + lua_settop(m_Translator_Lua, 0); // clear stack + + + // process translator file into Lua space + // sample file name: (application directory)\locale\EN.lua + + if (luaL_loadfile(m_Translator_Lua, m_strTranslatorFile) || + lua_pcall (m_Translator_Lua, 0, 0, 0)) + { + LuaError (m_Translator_Lua, "Localization initialization"); + lua_close (m_Translator_Lua); + m_Translator_Lua = NULL; + } + + } // end of localization file exists + + return TRUE; + } // end of void CMUSHclientApp::I18N_Setup /* Index: MUSHclient.h =================================================================== RCS file: /cvs/mushclient/MUSHclient.h,v retrieving revision 1.45 retrieving revision 1.48 diff -c -r1.45 -r1.48 *** MUSHclient.h 6 Apr 2007 05:01:26 -0000 1.45 --- MUSHclient.h 11 Jun 2007 23:44:15 -0000 1.48 *************** *** 96,102 **** __int64 m_nUniqueNumber; ! lua_State * m_SpellChecker_Lua; // Lua state // global preferences --- 96,105 ---- __int64 m_nUniqueNumber; ! lua_State * m_SpellChecker_Lua; // Lua state - spellchecker ! lua_State * m_Translator_Lua; // Lua state - translation (i18n) ! ! CString m_strTranslatorFile; // eg. (application directory)\po\English_Australia.1252.po // global preferences *************** *** 173,178 **** --- 176,182 ---- CString m_strWordDelimitersDblClick; CString m_strWorldList; CString m_strLuaScript; + CString m_strLocale; // other things *************** *** 238,243 **** --- 242,249 ---- void ShowGlobalOptions (CMUSHclientDoc * pDoc); void OpenLuaDelayed (); // for spell checker + + BOOL I18N_Setup (void); // internationalization /* virtual void OnFinalRelease() Index: MUSHclient.rc =================================================================== RCS file: /cvs/mushclient/MUSHclient.rc,v retrieving revision 1.197 retrieving revision 1.200 diff -c -r1.197 -r1.200 *** MUSHclient.rc 8 Jun 2007 01:30:36 -0000 1.197 --- MUSHclient.rc 12 Jun 2007 04:01:56 -0000 1.200 *************** *** 1467,1472 **** --- 1467,1474 ---- GROUPBOX "Spell checker",IDC_STATIC,6,171,72,27 CONTROL "&Enable",IDC_ENABLE_SPELL_CHECK,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,16,182,38,10 + LTEXT "&Locale code:",IDC_STATIC,162,184,42,8 + EDITTEXT IDC_LOCALE,209,181,34,14,ES_UPPERCASE | ES_AUTOHSCROLL LTEXT "Window tabs:",IDC_STATIC,197,123,44,8 COMBOBOX IDC_TABS,195,137,48,49,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP *************** *** 2839,2851 **** IDD_REGEXP_PROBLEM DIALOGEX 0, 0, 400, 93 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Problem parsing regular expression" ! FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN LTEXT "Nature of problem.",IDC_ERROR_MESSAGE,11,5,378,11 EDITTEXT IDC_REGEXP_TEXT,11,21,378,36,ES_MULTILINE | ES_READONLY | WS_HSCROLL,WS_EX_DLGMODALFRAME LTEXT "The error occurred at column: xxxxxxxx",IDC_COLUMN,11, ! 62,123,8 DEFPUSHBUTTON "OK",IDOK,11,75,50,14 END --- 2841,2853 ---- IDD_REGEXP_PROBLEM DIALOGEX 0, 0, 400, 93 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Problem parsing regular expression" ! FONT 8, "MS Sans Serif" BEGIN LTEXT "Nature of problem.",IDC_ERROR_MESSAGE,11,5,378,11 EDITTEXT IDC_REGEXP_TEXT,11,21,378,36,ES_MULTILINE | ES_READONLY | WS_HSCROLL,WS_EX_DLGMODALFRAME LTEXT "The error occurred at column: xxxxxxxx",IDC_COLUMN,11, ! 62,375,8 DEFPUSHBUTTON "OK",IDOK,11,75,50,14 END *************** *** 5561,5568 **** // VS_VERSION_INFO VERSIONINFO ! FILEVERSION 4,0,8,0 ! PRODUCTVERSION 4,0,8,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L --- 5563,5570 ---- // VS_VERSION_INFO VERSIONINFO ! FILEVERSION 4,0,9,0 ! PRODUCTVERSION 4,0,9,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L *************** *** 5580,5593 **** VALUE "Comments", "MUSHclient - a client program for playing MUD games\0" VALUE "CompanyName", "Gammon Software Solutions\0" VALUE "FileDescription", "MUSHclient\0" ! VALUE "FileVersion", "4.08\0" VALUE "InternalName", "MUSHCLIENT\0" VALUE "LegalCopyright", "Copyright © 2007 Gammon Software Solutions\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MUSHCLIENT.EXE\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MUSHclient\0" ! VALUE "ProductVersion", "4.08\0" VALUE "SpecialBuild", "\0" END END --- 5582,5595 ---- VALUE "Comments", "MUSHclient - a client program for playing MUD games\0" VALUE "CompanyName", "Gammon Software Solutions\0" VALUE "FileDescription", "MUSHclient\0" ! VALUE "FileVersion", "4.09\0" VALUE "InternalName", "MUSHCLIENT\0" VALUE "LegalCopyright", "Copyright © 2007 Gammon Software Solutions\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MUSHCLIENT.EXE\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MUSHclient\0" ! VALUE "ProductVersion", "4.09\0" VALUE "SpecialBuild", "\0" END END Index: MapCommentDlg.cpp =================================================================== RCS file: /cvs/mushclient/MapCommentDlg.cpp,v retrieving revision 1.2 retrieving revision 1.4 diff -c -r1.2 -r1.4 *** MapCommentDlg.cpp 27 Nov 2004 09:11:30 -0000 1.2 --- MapCommentDlg.cpp 11 Jun 2007 21:40:12 -0000 1.4 *************** *** 40,46 **** int i; if ((i = m_strComment.FindOneOf ("{}")) != -1) { ! ::AfxMessageBox(CFormat ("The comment may not contain the character \"%c\"", m_strComment [i])); DDX_Text(pDX, IDC_COMMENT, m_strComment); pDX->Fail(); --- 40,46 ---- int i; if ((i = m_strComment.FindOneOf ("{}")) != -1) { ! ::TMessageBox(TFormat ("The comment may not contain the character \"%c\"", m_strComment [i])); DDX_Text(pDX, IDC_COMMENT, m_strComment); pDX->Fail(); Index: MapDlg.cpp =================================================================== RCS file: /cvs/mushclient/MapDlg.cpp,v retrieving revision 1.15 retrieving revision 1.17 diff -c -r1.15 -r1.17 *** MapDlg.cpp 20 Apr 2007 02:51:38 -0000 1.15 --- MapDlg.cpp 11 Jun 2007 21:40:12 -0000 1.17 *************** *** 98,104 **** { if (m_pDoc->m_strMapList.GetCount () > 1) ! if (::AfxMessageBox (CFormat ("Remove existing %i directions from the map?", m_pDoc->m_strMapList.GetCount ()), MB_YESNO | MB_ICONQUESTION) != IDYES) return; --- 98,104 ---- { if (m_pDoc->m_strMapList.GetCount () > 1) ! if (UMessageBox (TFormat ("Remove existing %i directions from the map?", m_pDoc->m_strMapList.GetCount ()), MB_YESNO | MB_ICONQUESTION) != IDYES) return; Index: MapMoveDlg.cpp =================================================================== RCS file: /cvs/mushclient/MapMoveDlg.cpp,v retrieving revision 1.3 retrieving revision 1.5 diff -c -r1.3 -r1.5 *** MapMoveDlg.cpp 16 Aug 2002 20:21:38 -0000 1.3 --- MapMoveDlg.cpp 11 Jun 2007 21:40:12 -0000 1.5 *************** *** 48,61 **** int i; if ((i = m_strAction.FindOneOf ("{}()/\\")) != -1) { ! ::AfxMessageBox(CFormat ("The action may not contain the character \"%c\"", m_strAction [i])); DDX_Text(pDX, IDC_ACTION, m_strAction); pDX->Fail(); } // end of bad character if ((i = m_strReverse.FindOneOf ("{}()/\\")) != -1) { ! ::AfxMessageBox(CFormat ("The reverse action may not contain the character \"%c\"", m_strReverse [i])); DDX_Text(pDX, IDC_REVERSE, m_strReverse); pDX->Fail(); --- 48,61 ---- int i; if ((i = m_strAction.FindOneOf ("{}()/\\")) != -1) { ! ::TMessageBox(TFormat ("The action may not contain the character \"%c\"", m_strAction [i])); DDX_Text(pDX, IDC_ACTION, m_strAction); pDX->Fail(); } // end of bad character if ((i = m_strReverse.FindOneOf ("{}()/\\")) != -1) { ! ::TMessageBox(TFormat ("The reverse action may not contain the character \"%c\"", m_strReverse [i])); DDX_Text(pDX, IDC_REVERSE, m_strReverse); pDX->Fail(); Index: Mapping.cpp =================================================================== RCS file: /cvs/mushclient/Mapping.cpp,v retrieving revision 1.10 retrieving revision 1.12 diff -c -r1.10 -r1.12 *** Mapping.cpp 20 Apr 2007 02:51:38 -0000 1.10 --- Mapping.cpp 11 Jun 2007 21:40:12 -0000 1.12 *************** *** 76,82 **** // then press Cancel. This would in fact not enable it, so we should warn them. if (!m_bMapping && m_strMapList.IsEmpty ()) ! if (::AfxMessageBox ("Warning - mapping has not been turned on because you pressed 'Cancel'.\n\n" "Do you want mapping enabled now?", MB_ICONQUESTION | MB_YESNO) == IDYES) m_bMapping = true; --- 76,82 ---- // then press Cancel. This would in fact not enable it, so we should warn them. if (!m_bMapping && m_strMapList.IsEmpty ()) ! if (::TMessageBox ("Warning - mapping has not been turned on because you pressed 'Cancel'.\n\n" "Do you want mapping enabled now?", MB_ICONQUESTION | MB_YESNO) == IDYES) m_bMapping = true; *************** *** 104,110 **** { char sMessage [1000]; e->GetErrorMessage (sMessage, sizeof sMessage); ! ::AfxMessageBox (CFormat ("Error \"%s\" processing mapping failure regular expression \"%s\"", sMessage, (LPCTSTR) m_strMappingFailure)); e->Delete (); --- 104,110 ---- { char sMessage [1000]; e->GetErrorMessage (sMessage, sizeof sMessage); ! ::TMessageBox (TFormat ("Error \"%s\" processing mapping failure regular expression \"%s\"", sMessage, (LPCTSTR) m_strMappingFailure)); e->Delete (); Index: MultiLineTriggerDlg.cpp =================================================================== RCS file: /cvs/mushclient/MultiLineTriggerDlg.cpp,v retrieving revision 1.1 retrieving revision 1.3 diff -c -r1.1 -r1.3 *** MultiLineTriggerDlg.cpp 3 Jan 2005 02:31:21 -0000 1.1 --- MultiLineTriggerDlg.cpp 11 Jun 2007 21:40:12 -0000 1.3 *************** *** 46,52 **** // can't make an empty trigger if (m_strTriggerText.IsEmpty ()) { ! ::AfxMessageBox("The trigger match text cannot be empty.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_TEXT, m_strTriggerText); pDX->Fail(); } // end of text being blank --- 46,52 ---- // can't make an empty trigger if (m_strTriggerText.IsEmpty ()) { ! ::TMessageBox("The trigger match text cannot be empty.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_TEXT, m_strTriggerText); pDX->Fail(); } // end of text being blank *************** *** 61,75 **** if (iCount < 1) { ! ::AfxMessageBox("Multi-line triggers must match at least 2 lines.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_TEXT, m_strTriggerText); pDX->Fail(); } // end of text being blank if (iCount > MAX_RECENT_LINES) { ! ::AfxMessageBox( ! CFormat ("Multi-line triggers can match a maximum of %i lines.", MAX_RECENT_LINES), MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_TEXT, m_strTriggerText); pDX->Fail(); --- 61,75 ---- if (iCount < 1) { ! ::TMessageBox("Multi-line triggers must match at least 2 lines.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_TEXT, m_strTriggerText); pDX->Fail(); } // end of text being blank if (iCount > MAX_RECENT_LINES) { ! ::TMessageBox( ! TFormat ("Multi-line triggers can match a maximum of %i lines.", MAX_RECENT_LINES), MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_TEXT, m_strTriggerText); pDX->Fail(); Index: PluginWizard.cpp =================================================================== RCS file: /cvs/mushclient/PluginWizard.cpp,v retrieving revision 1.21 retrieving revision 1.23 diff -c -r1.21 -r1.23 *** PluginWizard.cpp 26 Apr 2007 02:55:45 -0000 1.21 --- PluginWizard.cpp 12 Jun 2007 04:01:56 -0000 1.23 *************** *** 68,74 **** CString strTemp = m_strName; // no name doesn't become lower case if (m_doc->CheckObjectName (strTemp)) { ! ::AfxMessageBox("The plugin name must start with a letter and consist of letters" ", numbers or the underscore character.", MB_ICONSTOP); DDX_Text(pDX, IDC_NAME, m_strName); pDX->Fail(); --- 68,74 ---- CString strTemp = m_strName; // no name doesn't become lower case if (m_doc->CheckObjectName (strTemp)) { ! ::TMessageBox ("The plugin name must start with a letter and consist of letters" ", numbers or the underscore character.", MB_ICONSTOP); DDX_Text(pDX, IDC_NAME, m_strName); pDX->Fail(); *************** *** 123,129 **** // description cannot have ]]> in it if (m_strDescription.Find ("]]>") != -1) { ! ::AfxMessageBox("Description may not contain the sequence \"]]>\"", MB_ICONSTOP); DDX_Text(pDX, IDC_DESCRIPTION, m_strDescription); pDX->Fail(); } --- 123,129 ---- // description cannot have ]]> in it if (m_strDescription.Find ("]]>") != -1) { ! ::TMessageBox ("Description may not contain the sequence \"]]>\"", MB_ICONSTOP); DDX_Text(pDX, IDC_DESCRIPTION, m_strDescription); pDX->Fail(); } *************** *** 210,219 **** | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, "Name", LVCFMT_LEFT, 100); ! m_ctlList.InsertColumn(1, "Match", LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(2, "Send", LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(3, "Group", LVCFMT_LEFT, 50); int iTrigger, iItem; --- 210,219 ---- | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, TranslateHeading ("Name"), LVCFMT_LEFT, 100); ! m_ctlList.InsertColumn(1, TranslateHeading ("Match"), LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(2, TranslateHeading ("Send"), LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(3, TranslateHeading ("Group"), LVCFMT_LEFT, 50); int iTrigger, iItem; *************** *** 317,326 **** | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, "Name", LVCFMT_LEFT, 100); ! m_ctlList.InsertColumn(1, "Match", LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(2, "Send", LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(3, "Group", LVCFMT_LEFT, 50); int iAlias, iItem = 0; --- 317,326 ---- | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, TranslateHeading ("Name"), LVCFMT_LEFT, 100); ! m_ctlList.InsertColumn(1, TranslateHeading ("Match"), LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(2, TranslateHeading ("Send"), LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(3, TranslateHeading ("Group"), LVCFMT_LEFT, 50); int iAlias, iItem = 0; *************** *** 427,436 **** | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, "Name", LVCFMT_LEFT, 100); ! m_ctlList.InsertColumn(1, "Time", LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(2, "Send", LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(3, "Group", LVCFMT_LEFT, 50); int iItem = 0; POSITION pos; --- 427,436 ---- | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, TranslateHeading ("Name"), LVCFMT_LEFT, 100); ! m_ctlList.InsertColumn(1, TranslateHeading ("Time"), LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(2, TranslateHeading ("Send"), LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(3, TranslateHeading ("Group"), LVCFMT_LEFT, 50); int iItem = 0; POSITION pos; *************** *** 449,460 **** CString strTimer; if (t->iType == CTimer::eInterval) ! strTimer = CFormat ("Every %02i:%02i:%04.2f", t->iEveryHour, t->iEveryMinute, t->fEverySecond); else ! strTimer = CFormat ("At %02i:%02i:%04.2f", t->iAtHour, t->iAtMinute, t->fAtSecond); --- 449,460 ---- CString strTimer; if (t->iType == CTimer::eInterval) ! strTimer = TFormat ("Every %02i:%02i:%04.2f", t->iEveryHour, t->iEveryMinute, t->fEverySecond); else ! strTimer = TFormat ("At %02i:%02i:%04.2f", t->iAtHour, t->iAtMinute, t->fAtSecond); *************** *** 561,568 **** | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, "Name", LVCFMT_LEFT, 150); ! m_ctlList.InsertColumn(1, "Contents", LVCFMT_LEFT, 200); int iItem = 0; POSITION pos; --- 561,568 ---- | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, TranslateHeading ("Name"), LVCFMT_LEFT, 150); ! m_ctlList.InsertColumn(1, TranslateHeading ("Contents"), LVCFMT_LEFT, 200); int iItem = 0; POSITION pos; *************** *** 665,671 **** // description cannot have ]]> in it if (m_strScript.Find ("]]>") != -1) { ! ::AfxMessageBox("Script may not contain the sequence \"]]>\"", MB_ICONSTOP); DDX_Text(pDX, IDC_SCRIPT, m_strScript); pDX->Fail(); } --- 665,671 ---- // description cannot have ]]> in it if (m_strScript.Find ("]]>") != -1) { ! ::TMessageBox ("Script may not contain the sequence \"]]>\"", MB_ICONSTOP); DDX_Text(pDX, IDC_SCRIPT, m_strScript); pDX->Fail(); } *************** *** 808,814 **** // description cannot have ]]> in it if (m_strComments.Find ("--") != -1) { ! ::AfxMessageBox("Comments may not contain the sequence \"--\"", MB_ICONSTOP); DDX_Text(pDX, IDC_COMMENTS, m_strComments); pDX->Fail(); } --- 808,814 ---- // description cannot have ]]> in it if (m_strComments.Find ("--") != -1) { ! ::TMessageBox ("Comments may not contain the sequence \"--\"", MB_ICONSTOP); DDX_Text(pDX, IDC_COMMENTS, m_strComments); pDX->Fail(); } Index: PluginsDlg.cpp =================================================================== RCS file: /cvs/mushclient/PluginsDlg.cpp,v retrieving revision 1.17 retrieving revision 1.20 diff -c -r1.17 -r1.20 *** PluginsDlg.cpp 8 Jun 2007 01:30:36 -0000 1.17 --- PluginsDlg.cpp 12 Jun 2007 04:01:56 -0000 1.20 *************** *** 100,111 **** if (iColWidth [eColumnEnabled] < 20) iColWidth [eColumnEnabled] = 20; ! m_ctlPluginList.InsertColumn(eColumnName, "Name", LVCFMT_LEFT, iColWidth [eColumnName]); ! m_ctlPluginList.InsertColumn(eColumnPurpose, "Purpose", LVCFMT_LEFT, iColWidth [eColumnPurpose]); ! m_ctlPluginList.InsertColumn(eColumnAuthor, "Author", LVCFMT_LEFT, iColWidth [eColumnAuthor]); ! m_ctlPluginList.InsertColumn(eColumnLanguage, "Language", LVCFMT_LEFT, iColWidth [eColumnLanguage]); ! m_ctlPluginList.InsertColumn(eColumnFile, "File", LVCFMT_LEFT, iColWidth [eColumnFile]); ! m_ctlPluginList.InsertColumn(eColumnEnabled, "Enabled", LVCFMT_LEFT, iColWidth [eColumnEnabled]); // recover column sequence --- 100,111 ---- if (iColWidth [eColumnEnabled] < 20) iColWidth [eColumnEnabled] = 20; ! m_ctlPluginList.InsertColumn(eColumnName, TranslateHeading ("Name"), LVCFMT_LEFT, iColWidth [eColumnName]); ! m_ctlPluginList.InsertColumn(eColumnPurpose, TranslateHeading ("Purpose"), LVCFMT_LEFT, iColWidth [eColumnPurpose]); ! m_ctlPluginList.InsertColumn(eColumnAuthor, TranslateHeading ("Author"), LVCFMT_LEFT, iColWidth [eColumnAuthor]); ! m_ctlPluginList.InsertColumn(eColumnLanguage, TranslateHeading ("Language"), LVCFMT_LEFT, iColWidth [eColumnLanguage]); ! m_ctlPluginList.InsertColumn(eColumnFile, TranslateHeading ("File"), LVCFMT_LEFT, iColWidth [eColumnFile]); ! m_ctlPluginList.InsertColumn(eColumnEnabled, TranslateHeading ("Enabled"), LVCFMT_LEFT, iColWidth [eColumnEnabled]); // recover column sequence *************** *** 232,238 **** if (p->m_strDescription.IsEmpty ()) continue; // ignore ones without a description ! CString strTitle = CFormat ("%s description", (LPCTSTR) p->m_strName); m_pDoc->AppendToTheNotepad (strTitle, p->m_strDescription, --- 232,238 ---- if (p->m_strDescription.IsEmpty ()) continue; // ignore ones without a description ! CString strTitle = TFormat ("%s description", (LPCTSTR) p->m_strName); m_pDoc->AppendToTheNotepad (strTitle, p->m_strDescription, *************** *** 328,341 **** catch (CFileException * e) { ! ::AfxMessageBox (CFormat ("Unable to open or read %s", (LPCTSTR) strPath), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CArchiveException* e) { ! ::AfxMessageBox (CFormat ("There was a problem loading the plugin %s. " "See the error window for more details", (LPCTSTR) strPath), MB_ICONEXCLAMATION); e->Delete (); --- 328,341 ---- catch (CFileException * e) { ! ::TMessageBox (TFormat ("Unable to open or read %s", (LPCTSTR) strPath), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CArchiveException* e) { ! ::TMessageBox (TFormat ("There was a problem loading the plugin %s. " "See the error window for more details", (LPCTSTR) strPath), MB_ICONEXCLAMATION); e->Delete (); *************** *** 375,381 **** delete p; // delete the plugin } else ! ::AfxMessageBox ("Plugin cannot be found, unexpectedly.", MB_ICONEXCLAMATION); } // end of loop LoadList (); --- 375,381 ---- delete p; // delete the plugin } else ! ::TMessageBox ("Plugin cannot be found, unexpectedly.", MB_ICONEXCLAMATION); } // end of loop LoadList (); *************** *** 449,462 **** catch (CFileException * e) { ! ::AfxMessageBox (CFormat ("Unable to open or read %s", (LPCTSTR) strName), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CArchiveException* e) { ! ::AfxMessageBox (CFormat ("There was a problem loading the plugin %s. " "See the error window for more details", (LPCTSTR) strName), MB_ICONEXCLAMATION); e->Delete (); --- 449,462 ---- catch (CFileException * e) { ! ::TMessageBox (TFormat ("Unable to open or read %s", (LPCTSTR) strName), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CArchiveException* e) { ! ::TMessageBox (TFormat ("There was a problem loading the plugin %s. " "See the error window for more details", (LPCTSTR) strName), MB_ICONEXCLAMATION); e->Delete (); *************** *** 464,470 **** } else ! ::AfxMessageBox ("Plugin cannot be found, unexpectedly.", MB_ICONEXCLAMATION); } // end of loop --- 464,470 ---- } else ! ::TMessageBox ("Plugin cannot be found, unexpectedly.", MB_ICONEXCLAMATION); } // end of loop *************** *** 498,504 **** pNewDoc->m_iUniqueDocumentNumber = m_pDoc->m_iUniqueDocumentNumber; } else ! ::AfxMessageBox(CFormat ("Unable to edit the plugin file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); return; --- 498,504 ---- pNewDoc->m_iUniqueDocumentNumber = m_pDoc->m_iUniqueDocumentNumber; } else ! ::TMessageBox(TFormat ("Unable to edit the plugin file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); return; *************** *** 507,513 **** if ((long) ShellExecute (Frame, _T("open"), m_pDoc->m_strScriptEditor, CFormat ("\"%s\"", (LPCTSTR) strName), NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox(CFormat ("Unable to edit the plugin file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); --- 507,513 ---- if ((long) ShellExecute (Frame, _T("open"), m_pDoc->m_strScriptEditor, CFormat ("\"%s\"", (LPCTSTR) strName), NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox(TFormat ("Unable to edit the plugin file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); *************** *** 667,673 **** pNewDoc->m_iUniqueDocumentNumber = m_pDoc->m_iUniqueDocumentNumber; } else ! ::AfxMessageBox(CFormat ("Unable to edit the plugin state file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); continue; --- 667,673 ---- pNewDoc->m_iUniqueDocumentNumber = m_pDoc->m_iUniqueDocumentNumber; } else ! ::TMessageBox(TFormat ("Unable to edit the plugin state file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); continue; *************** *** 676,682 **** if ((long) ShellExecute (Frame, _T("open"), m_pDoc->m_strScriptEditor, CFormat ("\"%s\"", (LPCTSTR) strName), NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox(CFormat ("Unable to edit the plugin state file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); } // end of loop --- 676,682 ---- if ((long) ShellExecute (Frame, _T("open"), m_pDoc->m_strScriptEditor, CFormat ("\"%s\"", (LPCTSTR) strName), NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox(TFormat ("Unable to edit the plugin state file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); } // end of loop Index: ProcessPreviousLine.cpp =================================================================== RCS file: /cvs/mushclient/ProcessPreviousLine.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -c -r1.54 -r1.55 *** ProcessPreviousLine.cpp 25 Apr 2007 22:48:54 -0000 1.54 --- ProcessPreviousLine.cpp 12 Jun 2007 04:01:56 -0000 1.55 *************** *** 587,593 **** if ((m_iUTF8ErrorCount & 0x7F) == 1) ColourNote ("white", "red", ! CFormat ("Previous line had a bad UTF-8 sequence at column %i, and was not evaluated for trigger matches", iBad + 1)); } --- 587,593 ---- if ((m_iUTF8ErrorCount & 0x7F) == 1) ColourNote ("white", "red", ! TFormat ("Previous line had a bad UTF-8 sequence at column %i, and was not evaluated for trigger matches", iBad + 1)); } *************** *** 1044,1050 **** trigger_item->nMatched++; // count trigger matches ! CString strScriptSource = CFormat ("Trigger: %s", (LPCTSTR) trigger_item->strLabel); if (trigger_item->iSendTo == eSendToScriptAfterOmit) { --- 1044,1050 ---- trigger_item->nMatched++; // count trigger matches ! CString strScriptSource = TFormat ("Trigger: %s", (LPCTSTR) trigger_item->strLabel); if (trigger_item->iSendTo == eSendToScriptAfterOmit) { Index: RecallDlg.cpp =================================================================== RCS file: /cvs/mushclient/RecallDlg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** RecallDlg.cpp 28 Nov 2004 03:53:56 -0000 1.3 --- RecallDlg.cpp 11 Jun 2007 10:42:08 -0000 1.4 *************** *** 131,137 **** { if (m_ctlText.GetModify ()) { ! int iReply = ::AfxMessageBox ("Window contents have changed. Save changes?", MB_ICONQUESTION | MB_YESNOCANCEL); if (iReply == IDCANCEL) --- 131,137 ---- { if (m_ctlText.GetModify ()) { ! int iReply = ::TMessageBox ("Window contents have changed. Save changes?", MB_ICONQUESTION | MB_YESNOCANCEL); if (iReply == IDCANCEL) Index: RecallSearchDlg.cpp =================================================================== RCS file: /cvs/mushclient/RecallSearchDlg.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** RecallSearchDlg.cpp 31 Oct 2006 19:57:58 -0000 1.6 --- RecallSearchDlg.cpp 11 Jun 2007 10:42:08 -0000 1.7 *************** *** 54,60 **** if (m_strFindText.IsEmpty () || !(m_bOutput || m_bCommands || m_bNotes)) { ! ::AfxMessageBox("You must specify something to search for."); DDX_Text(pDX, IDC_FIND_WHAT, m_strFindText); pDX->Fail(); } --- 54,60 ---- if (m_strFindText.IsEmpty () || !(m_bOutput || m_bCommands || m_bNotes)) { ! ::TMessageBox("You must specify something to search for."); DDX_Text(pDX, IDC_FIND_WHAT, m_strFindText); pDX->Fail(); } Index: ScriptErrorDlg.cpp =================================================================== RCS file: /cvs/mushclient/ScriptErrorDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** ScriptErrorDlg.cpp 17 Oct 2006 21:24:16 -0000 1.4 --- ScriptErrorDlg.cpp 12 Jun 2007 04:01:56 -0000 1.5 *************** *** 71,84 **** void CScriptErrorDlg::OnCopy() { ! putontoclipboard (CFormat ("Error number: %i\r\n" ! "Event: %s\r\n" ! "Description: %s\r\n" ! "Called by: %s\r\n" , m_iError, (LPCTSTR) m_strEvent, (LPCTSTR) m_strDescription, ! (LPCTSTR) m_strCalledBy)); } --- 71,84 ---- void CScriptErrorDlg::OnCopy() { ! putontoclipboard (Replace (TFormat ("Error number: %i\n" ! "Event: %s\n" ! "Description: %s\n" ! "Called by: %s\n" , m_iError, (LPCTSTR) m_strEvent, (LPCTSTR) m_strDescription, ! (LPCTSTR) m_strCalledBy), "\n", "\r\n")); } Index: StatLink.cpp =================================================================== RCS file: /cvs/mushclient/StatLink.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** StatLink.cpp 7 Apr 2007 05:42:07 -0000 1.4 --- StatLink.cpp 11 Jun 2007 10:42:08 -0000 1.5 *************** *** 104,113 **** m_color = g_colorVisited; // change color Invalidate(); // repaint } else { ! CString msg; ! msg = "Unable to execute: "; ! msg += m_link; ! ::AfxMessageBox (msg, MB_ICONEXCLAMATION); TRACE(_T("*** WARNING: CStaticLink: unable to navigate link %s\n"), (LPCTSTR)m_link); } --- 104,111 ---- m_color = g_colorVisited; // change color Invalidate(); // repaint } else { ! CString msg = TFormat ("Unable to execute: %s", (LPCTSTR) m_link); ! ::TMessageBox (msg, MB_ICONEXCLAMATION); TRACE(_T("*** WARNING: CStaticLink: unable to navigate link %s\n"), (LPCTSTR)m_link); } Index: TextAttributesDlg.cpp =================================================================== RCS file: /cvs/mushclient/TextAttributesDlg.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** TextAttributesDlg.cpp 18 Dec 2004 07:43:43 -0000 1.5 --- TextAttributesDlg.cpp 12 Jun 2007 04:01:56 -0000 1.6 *************** *** 100,111 **** CString strDate; strDate = m_pLine->m_theTime.Format ("%A, %B %d, %#I:%M:%S %p"); ! INFO (CFormat ("Line %i (%i), %s", m_iLine, m_pLine->m_nLineNumber, (LPCTSTR) strDate)); ! INFO (CFormat (" Flags = End para: %s, Note: %s, User input: %s, Log: %s, Bookmark: %s", YES_OR_NO (m_pLine->hard_return), YES_OR_NO (m_pLine->flags & COMMENT), YES_OR_NO (m_pLine->flags & USER_INPUT), --- 100,111 ---- CString strDate; strDate = m_pLine->m_theTime.Format ("%A, %B %d, %#I:%M:%S %p"); ! INFO (TFormat ("Line %i (%i), %s", m_iLine, m_pLine->m_nLineNumber, (LPCTSTR) strDate)); ! INFO (TFormat (" Flags = End para: %s, Note: %s, User input: %s, Log: %s, Bookmark: %s", YES_OR_NO (m_pLine->hard_return), YES_OR_NO (m_pLine->flags & COMMENT), YES_OR_NO (m_pLine->flags & USER_INPUT), *************** *** 113,128 **** YES_OR_NO (m_pLine->flags & BOOKMARK) )); ! INFO (CFormat (" Length = %i, last space = %i", m_pLine->len, m_pLine->last_space)); CString strText = CString (m_pLine->text, m_pLine->len); ! INFO (CFormat (" Text = \"%s\"", (LPCTSTR) strText)); INFO (""); ! INFO (CFormat ("%i style run%s", PLURAL (m_pLine->styleList.GetCount ()))); INFO (""); CStyle * pStyle; --- 113,128 ---- YES_OR_NO (m_pLine->flags & BOOKMARK) )); ! INFO (TFormat (" Length = %i, last space = %i", m_pLine->len, m_pLine->last_space)); CString strText = CString (m_pLine->text, m_pLine->len); ! INFO (TFormat (" Text = \"%s\"", (LPCTSTR) strText)); INFO (""); ! INFO (TFormat ("%i style run%s", PLURAL (m_pLine->styleList.GetCount ()))); INFO (""); CStyle * pStyle; *************** *** 135,141 **** pStyle = m_pLine->styleList.GetNext (pos); // offset, length and text affected ! INFO (CFormat ("%i: Offset = %i, Length = %i, Text = \"%s\"", iCount, iCol, pStyle->iLength, --- 135,141 ---- pStyle = m_pLine->styleList.GetNext (pos); // offset, length and text affected ! INFO (TFormat ("%i: Offset = %i, Length = %i, Text = \"%s\"", iCount, iCol, pStyle->iLength, *************** *** 156,182 **** switch (pStyle->iFlags & ACTIONTYPE) { case ACTION_NONE: ! INFO (" No action."); break; case ACTION_SEND: ! INFO (CFormat (" Action - send to MUD: \"%s\"", (LPCTSTR) strAction)); if (!strHint.IsEmpty ()) ! INFO (CFormat (" Hint: \"%s\"", (LPCTSTR) strHint)); break; case ACTION_HYPERLINK: ! INFO (CFormat (" Action - hyperlink: \"%s\"", (LPCTSTR) strAction)); if (!strHint.IsEmpty ()) ! INFO (CFormat (" Hint: \"%s\"", (LPCTSTR) strHint)); break; case ACTION_PROMPT: ! INFO (CFormat (" Action - send to command window: \"%s\"", (LPCTSTR) strAction)); if (!strHint.IsEmpty ()) ! INFO (CFormat (" Hint: \"%s\"", (LPCTSTR) strHint)); break; --- 156,182 ---- switch (pStyle->iFlags & ACTIONTYPE) { case ACTION_NONE: ! INFO (Translate (" No action.")); break; case ACTION_SEND: ! INFO (TFormat (" Action - send to MUD: \"%s\"", (LPCTSTR) strAction)); if (!strHint.IsEmpty ()) ! INFO (TFormat (" Hint: \"%s\"", (LPCTSTR) strHint)); break; case ACTION_HYPERLINK: ! INFO (TFormat (" Action - hyperlink: \"%s\"", (LPCTSTR) strAction)); if (!strHint.IsEmpty ()) ! INFO (TFormat (" Hint: \"%s\"", (LPCTSTR) strHint)); break; case ACTION_PROMPT: ! INFO (TFormat (" Action - send to command window: \"%s\"", (LPCTSTR) strAction)); if (!strHint.IsEmpty ()) ! INFO (TFormat (" Hint: \"%s\"", (LPCTSTR) strHint)); break; *************** *** 184,192 **** // variable to set? if (!strVariable.IsEmpty ()) ! INFO (CFormat (" Set variable: %s", (LPCTSTR) strVariable)); ! INFO (CFormat (" Flags = Hilite: %s, Underline: %s, " "Blink: %s, Inverse: %s, Changed: %s", YES_OR_NO (pStyle->iFlags & HILITE), YES_OR_NO (pStyle->iFlags & UNDERLINE), --- 184,192 ---- // variable to set? if (!strVariable.IsEmpty ()) ! INFO (TFormat (" Set variable: %s", (LPCTSTR) strVariable)); ! INFO (TFormat (" Flags = Hilite: %s, Underline: %s, " "Blink: %s, Inverse: %s, Changed: %s", YES_OR_NO (pStyle->iFlags & HILITE), YES_OR_NO (pStyle->iFlags & UNDERLINE), *************** *** 196,202 **** )); if (pStyle->iFlags & START_TAG) ! INFO (CFormat (" Start MXP tag: %s", (LPCTSTR) pStyle->pAction->m_strAction)); char * sColours [8] = --- 196,202 ---- )); if (pStyle->iFlags & START_TAG) ! INFO (TFormat (" Start MXP tag: %s", (LPCTSTR) pStyle->pAction->m_strAction)); char * sColours [8] = *************** *** 215,248 **** switch (pStyle->iFlags & COLOURTYPE) { case COLOUR_ANSI: ! INFO (CFormat (" Foreground colour ANSI : %i (%s)", pStyle->iForeColour, sColours [pStyle->iForeColour & 7])); ! INFO (CFormat (" Background colour ANSI : %i (%s)", pStyle->iBackColour, sColours [pStyle->iBackColour & 7])); break; case COLOUR_CUSTOM: ! INFO (CFormat (" Custom colour: %i (%s)", pStyle->iForeColour, (LPCTSTR) m_pDoc->m_strCustomColourName [pStyle->iForeColour & 0xFF])); break; case COLOUR_RGB: ! INFO (CFormat (" Foreground colour RGB : R=%i, G=%i, B=%i", GetRValue (pStyle->iForeColour), GetGValue (pStyle->iForeColour), GetBValue (pStyle->iForeColour) )); ! INFO (CFormat (" Background colour RGB : R=%i, G=%i, B=%i", GetRValue (pStyle->iBackColour), GetGValue (pStyle->iBackColour), GetBValue (pStyle->iBackColour) )); break; case COLOUR_RESERVED: ! INFO (CFormat (" Foreground colour rsvd : %i", pStyle->iForeColour & 0xFFFFFF)); ! INFO (CFormat (" Background colour rsvd : %i", pStyle->iBackColour & 0xFFFFFF)); break; --- 215,248 ---- switch (pStyle->iFlags & COLOURTYPE) { case COLOUR_ANSI: ! INFO (TFormat (" Foreground colour ANSI : %i (%s)", pStyle->iForeColour, sColours [pStyle->iForeColour & 7])); ! INFO (TFormat (" Background colour ANSI : %i (%s)", pStyle->iBackColour, sColours [pStyle->iBackColour & 7])); break; case COLOUR_CUSTOM: ! INFO (TFormat (" Custom colour: %i (%s)", pStyle->iForeColour, (LPCTSTR) m_pDoc->m_strCustomColourName [pStyle->iForeColour & 0xFF])); break; case COLOUR_RGB: ! INFO (TFormat (" Foreground colour RGB : R=%i, G=%i, B=%i", GetRValue (pStyle->iForeColour), GetGValue (pStyle->iForeColour), GetBValue (pStyle->iForeColour) )); ! INFO (TFormat (" Background colour RGB : R=%i, G=%i, B=%i", GetRValue (pStyle->iBackColour), GetGValue (pStyle->iBackColour), GetBValue (pStyle->iBackColour) )); break; case COLOUR_RESERVED: ! INFO (TFormat (" Foreground colour rsvd : %i", pStyle->iForeColour & 0xFFFFFF)); ! INFO (TFormat (" Background colour rsvd : %i", pStyle->iBackColour & 0xFFFFFF)); break; *************** *** 255,266 **** } // end of counting number to move ! INFO (CFormat ("%i column%s in %i style run%s", PLURAL (iCol), PLURAL (m_pLine->styleList.GetCount ()))); if (iCol != m_pLine->len) ! INFO ("** WARNING - length discrepancy **"); INFO (""); ! INFO ("------ (end line information) ------"); INFO (""); OnOK(); // close dialog box --- 255,266 ---- } // end of counting number to move ! INFO (TFormat ("%i column%s in %i style run%s", PLURAL (iCol), PLURAL (m_pLine->styleList.GetCount ()))); if (iCol != m_pLine->len) ! INFO (Translate ("** WARNING - length discrepancy **")); INFO (""); ! INFO (Translate ("------ (end line information) ------")); INFO (""); OnOK(); // close dialog box Index: TextDocument.cpp =================================================================== RCS file: /cvs/mushclient/TextDocument.cpp,v retrieving revision 1.16 retrieving revision 1.18 diff -c -r1.16 -r1.18 *** TextDocument.cpp 17 Dec 2006 00:08:08 -0000 1.16 --- TextDocument.cpp 12 Jun 2007 04:01:56 -0000 1.18 *************** *** 261,269 **** m_timeFileMod = status.m_mtime; CString strText; ! strText.Format ("The file \"%s\" has been modified. Do you wish to reload it?", (LPCTSTR) GetPathName ()); ! if (::AfxMessageBox (strText, MB_YESNO | MB_ICONQUESTION) == IDYES) { CWaitCursor wait; --- 261,269 ---- m_timeFileMod = status.m_mtime; CString strText; ! strText = TFormat ("The file \"%s\" has been modified. Do you wish to reload it?", (LPCTSTR) GetPathName ()); ! if (::TMessageBox (strText, MB_YESNO | MB_ICONQUESTION) == IDYES) { CWaitCursor wait; *************** *** 279,285 **** } catch(CException* e) { ! ::AfxMessageBox ("Unable to read file", MB_ICONEXCLAMATION); e->Delete(); } } // end of approving modification or wanting it anyway --- 279,285 ---- } catch(CException* e) { ! ::TMessageBox ("Unable to read file", MB_ICONEXCLAMATION); e->Delete(); } } // end of approving modification or wanting it anyway *************** *** 426,434 **** if (!m_strSearchString.IsEmpty ()) { if (pDoc) ! strTitle = CFormat ("Notepad: %s", (LPCTSTR) pDoc->m_mush_name); else ! strTitle = "Untitled"; } CreateTextWindow ("", // contents --- 426,434 ---- if (!m_strSearchString.IsEmpty ()) { if (pDoc) ! strTitle = TFormat ("Notepad: %s", (LPCTSTR) pDoc->m_mush_name); else ! strTitle = Translate ("Untitled"); } CreateTextWindow ("", // contents Index: TextView.cpp =================================================================== RCS file: /cvs/mushclient/TextView.cpp,v retrieving revision 1.35 retrieving revision 1.40 diff -c -r1.35 -r1.40 *** TextView.cpp 4 May 2007 04:00:22 -0000 1.35 --- TextView.cpp 12 Jun 2007 04:01:56 -0000 1.40 *************** *** 539,545 **** { CTime theTime = CTime::GetCurrentTime(); ! CString strTime = theTime.Format ("%A, %#d %B %Y, %#I:%M %p"); // insert the time GetEditCtrl ().ReplaceSel (strTime, true); --- 539,545 ---- { CTime theTime = CTime::GetCurrentTime(); ! CString strTime = theTime.Format (TranslateTime ("%A, %#d %B %Y, %#I:%M %p")); // insert the time GetEditCtrl ().ReplaceSel (strTime, true); *************** *** 586,598 **** CString strDisplay; ! strDisplay.Format ("The %s contains %i line%s, %i word%s, %i character%s", (LPCTSTR) strSelection, PLURAL (iNewLines), PLURAL (iWords), PLURAL (strText.GetLength ())); ! ::AfxMessageBox (strDisplay, MB_ICONINFORMATION); } --- 586,598 ---- CString strDisplay; ! strDisplay = TFormat ("The %s contains %i line%s, %i word%s, %i character%s", (LPCTSTR) strSelection, PLURAL (iNewLines), PLURAL (iWords), PLURAL (strText.GetLength ())); ! UMessageBox (strDisplay, MB_ICONINFORMATION); } *************** *** 910,922 **** GetSelection (strText); pCmdUI->Enable(!strText.IsEmpty ()); ! pCmdUI->SetText(CFormat ("&Send To %s\tShift+Ctrl+S", (LPCTSTR) pWorld->m_mush_name)); } else { pCmdUI->Enable(FALSE); ! pCmdUI->SetText("&Send To World\tShift+Ctrl+S"); } } --- 910,922 ---- GetSelection (strText); pCmdUI->Enable(!strText.IsEmpty ()); ! pCmdUI->SetText(TFormat ("&Send To %s\tShift+Ctrl+S", (LPCTSTR) pWorld->m_mush_name)); } else { pCmdUI->Enable(FALSE); ! pCmdUI->SetText(Translate ("&Send To World\tShift+Ctrl+S")); } } *************** *** 969,975 **** return; if (pDoc->IsModified ()) ! if (::AfxMessageBox (CFormat ("Replace entire window contents with \'recall\' from %s?", (LPCTSTR) pWorld->m_mush_name), MB_YESNO | MB_ICONQUESTION ) != IDYES) return; --- 969,975 ---- return; if (pDoc->IsModified ()) ! if (::TMessageBox (TFormat ("Replace entire window contents with \'recall\' from %s?", (LPCTSTR) pWorld->m_mush_name), MB_YESNO | MB_ICONQUESTION ) != IDYES) return; *************** *** 1130,1142 **** if (pWorld) { pCmdUI->Enable(TRUE); ! pCmdUI->SetText(CFormat ("&Flip To %s\tCtrl+Alt+Space", (LPCTSTR) pWorld->m_mush_name)); } else { pCmdUI->Enable(FALSE); ! pCmdUI->SetText("&Flip To World\tCtrl+Alt+Space"); } } --- 1130,1142 ---- if (pWorld) { pCmdUI->Enable(TRUE); ! pCmdUI->SetText(TFormat ("&Flip To %s\tCtrl+Alt+Space", (LPCTSTR) pWorld->m_mush_name)); } else { pCmdUI->Enable(FALSE); ! pCmdUI->SetText(Translate ("&Flip To World\tCtrl+Alt+Space")); } } *************** *** 1339,1345 **** if (*pOld != '>') { ! ::AfxMessageBox ("Unterminated element (\"<\" not followed by \">\")", MB_ICONSTOP); return; } --- 1339,1345 ---- if (*pOld != '>') { ! ::TMessageBox ("Unterminated element (\"<\" not followed by \">\")", MB_ICONSTOP); return; } *************** *** 1355,1361 **** if (*pOld != ';') { ! ::AfxMessageBox ("Unterminated entity (\"&\" not followed by \";\")", MB_ICONSTOP); return; } --- 1355,1361 ---- if (*pOld != ';') { ! ::TMessageBox ("Unterminated entity (\"&\" not followed by \";\")", MB_ICONSTOP); return; } *************** *** 1373,1379 **** { if (!isxdigit (strEntity [i])) { ! ::AfxMessageBox (CFormat ("Invalid hex number in entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } --- 1373,1379 ---- { if (!isxdigit (strEntity [i])) { ! ::TMessageBox (TFormat ("Invalid hex number in entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } *************** *** 1382,1388 **** if (iNewDigit >= 'A') iNewDigit -= 7; if (iResult & 0xF0) ! ::AfxMessageBox (CFormat ("Invalid hex number in entity: &%s; " "- maximum of 2 hex digits", (LPCTSTR) strEntity), MB_ICONSTOP); iResult = (iResult << 4) + iNewDigit - '0'; --- 1382,1388 ---- if (iNewDigit >= 'A') iNewDigit -= 7; if (iResult & 0xF0) ! ::TMessageBox (TFormat ("Invalid hex number in entity: &%s; " "- maximum of 2 hex digits", (LPCTSTR) strEntity), MB_ICONSTOP); iResult = (iResult << 4) + iNewDigit - '0'; *************** *** 1394,1400 **** { if (!isdigit (strEntity [i])) { ! ::AfxMessageBox (CFormat ("Invalid number in entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } --- 1394,1400 ---- { if (!isdigit (strEntity [i])) { ! ::TMessageBox (TFormat ("Invalid number in entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } *************** *** 1407,1413 **** if (iResult < 32 || // don't allow nonprintable characters iResult > 255) // don't allow characters more than 1 byte { ! ::AfxMessageBox (CFormat ("Disallowed number in entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } --- 1407,1413 ---- if (iResult < 32 || // don't allow nonprintable characters iResult > 255) // don't allow characters more than 1 byte { ! ::TMessageBox (TFormat ("Disallowed number in entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } *************** *** 1420,1426 **** *pNew++ = strEntityContents [0]; else { ! ::AfxMessageBox (CFormat ("Unknown entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } --- 1420,1426 ---- *pNew++ = strEntityContents [0]; else { ! ::TMessageBox (TFormat ("Unknown entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } *************** *** 1533,1556 **** } // end of OpenLuaDelayed - extern LONG WINAPI DelayLoadDllExceptionFilterLua(PEXCEPTION_POINTERS pep); void CTextView::OpenLua () { - // Wrap all calls to delay-load DLL functions inside SEH - __try - { OpenLuaDelayed (); - } - - __except (DelayLoadDllExceptionFilterLua(GetExceptionInformation())) - { - // Nothing to do in here, thread continues to run normally - L = NULL; - } - } // end of CScriptEngine::OpenLua --- 1533,1544 ---- *************** *** 1621,1629 **** // show selection size if (nEndChar > nStartChar) ! dlg.m_strSelectionSize = CFormat ("%i character%s selected.", PLURAL (strText.GetLength ())); else ! dlg.m_strSelectionSize = CFormat ("All text selected: %i character%s", PLURAL (strText.GetLength ())); int iLines = 0; --- 1609,1617 ---- // show selection size if (nEndChar > nStartChar) ! dlg.m_strSelectionSize = TFormat ("%i character%s selected.", PLURAL (strText.GetLength ())); else ! dlg.m_strSelectionSize = TFormat ("All text selected: %i character%s", PLURAL (strText.GetLength ())); int iLines = 0; *************** *** 1634,1640 **** if (*p++ == '\n') iLines++; ! dlg.m_strSelectionSize += CFormat (" (%i line break%s)", PLURAL (iLines)); // restore from last time dlg.m_strFindPattern = App.m_strFind; --- 1622,1628 ---- if (*p++ == '\n') iLines++; ! dlg.m_strSelectionSize += TFormat (" (%i line break%s)", PLURAL (iLines)); // restore from last time dlg.m_strFindPattern = App.m_strFind; *************** *** 1725,1731 **** lua_close (L); // done with Lua script space // show count of replacements in status bar ! Frame.SetStatusMessageNow (CFormat ("%i replaced.", count)); } --- 1713,1719 ---- lua_close (L); // done with Lua script space // show count of replacements in status bar ! Frame.SetStatusMessageNow (TFormat ("%i replaced.", count)); } Index: TimerDlg.cpp =================================================================== RCS file: /cvs/mushclient/TimerDlg.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -c -r1.21 -r1.22 *** TimerDlg.cpp 26 Apr 2007 02:55:45 -0000 1.21 --- TimerDlg.cpp 11 Jun 2007 10:42:08 -0000 1.22 *************** *** 127,133 **** if (ts1 <= CmcDateTimeSpan (0, 0, 0, 0)) { ! ::AfxMessageBox("The timer interval must be greater than zero."); DDX_Text(pDX, IDC_INTERVAL_HOUR, m_iEveryHour); pDX->Fail(); return; --- 127,133 ---- if (ts1 <= CmcDateTimeSpan (0, 0, 0, 0)) { ! ::TMessageBox("The timer interval must be greater than zero."); DDX_Text(pDX, IDC_INTERVAL_HOUR, m_iEveryHour); pDX->Fail(); return; *************** *** 135,141 **** if(ts2 >= ts1) { ! ::AfxMessageBox("The timer offset must be less than the timer period."); DDX_Text(pDX, IDC_OFFSET_HOUR, m_iOffsetHour); pDX->Fail(); return; --- 135,141 ---- if(ts2 >= ts1) { ! ::TMessageBox("The timer offset must be less than the timer period."); DDX_Text(pDX, IDC_OFFSET_HOUR, m_iOffsetHour); pDX->Fail(); return; *************** *** 162,170 **** if (m_strLabel.CompareNoCase (timer_item->strLabel) == 0) { CString strMsg; ! strMsg.Format ("The timer label \"%s\" is already in the list of timers.", (LPCTSTR) m_strLabel); ! ::AfxMessageBox(strMsg); DDX_Text(pDX, IDC_TIMER_LABEL, m_strLabel); pDX->Fail(); return; --- 162,170 ---- if (m_strLabel.CompareNoCase (timer_item->strLabel) == 0) { CString strMsg; ! strMsg = TFormat ("The timer label \"%s\" is already in the list of timers.", (LPCTSTR) m_strLabel); ! ::TMessageBox(strMsg); DDX_Text(pDX, IDC_TIMER_LABEL, m_strLabel); pDX->Fail(); return; *************** *** 179,185 **** if (CheckLabel (m_strLabel)) { ! ::AfxMessageBox("The label must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_TIMER_LABEL, m_strLabel); pDX->Fail(); --- 179,185 ---- if (CheckLabel (m_strLabel)) { ! ::TMessageBox ("The label must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_TIMER_LABEL, m_strLabel); pDX->Fail(); *************** *** 193,199 **** { if (m_iSendTo == eSendToVariable) { ! ::AfxMessageBox("When sending to a variable you must specify a variable name. ", MB_ICONSTOP); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); --- 193,199 ---- { if (m_iSendTo == eSendToVariable) { ! ::TMessageBox("When sending to a variable you must specify a variable name. ", MB_ICONSTOP); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); *************** *** 206,212 **** if (CheckLabel (m_strVariable)) { ! ::AfxMessageBox("The variable name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); --- 206,212 ---- if (CheckLabel (m_strVariable)) { ! ::TMessageBox("The variable name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); *************** *** 226,232 **** { if (strResult [0] == '*') // error in speedwalk string? { ! ::AfxMessageBox (strResult.Mid (1)); DDX_Text(pDX, IDC_TIMER_CONTENTS, m_strContents); pDX->Fail(); } // end of error message --- 226,232 ---- { if (strResult [0] == '*') // error in speedwalk string? { ! ::TMessageBox (strResult.Mid (1)); // already translated, I think