diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-04-05 17:56:53 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-04-05 17:56:53 +0000 |
commit | 346981c06e7e810d44a0fc05c649f538c501ae21 (patch) | |
tree | 202779c6ea8d8ca69ab9cacbd1a05568b04c7551 /protocols/IRCG/src | |
parent | eaab3f090b5928e49938e0d880d4268e9843be02 (diff) |
- fixes #640 (IRC: "server code page option" reset its value)
- ressource fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@8865 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG/src')
-rw-r--r-- | protocols/IRCG/src/clist.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/input.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/irc.h | 8 | ||||
-rw-r--r-- | protocols/IRCG/src/ircproto.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/options.cpp | 19 | ||||
-rw-r--r-- | protocols/IRCG/src/resource.h | 2 |
6 files changed, 17 insertions, 18 deletions
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index 077e325ed7..17373420c2 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -34,7 +34,7 @@ BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask, if (hc && db_get_b(hc, "CList", "NotOnList", 0) == 0 && db_get_b(hc, "CList", "Hidden", 0) == 0)
bFlag = true;
- CMString contactname = name; contactname += _T(DCCSTRING);
+ CMString contactname = name; contactname += DCCSTRING;
CONTACT user = { (TCHAR*)contactname.c_str(), NULL, NULL, false, false, true };
hContact = CList_AddContact(&user, false, false);
diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp index 3288a69a40..29d5b4c14b 100644 --- a/protocols/IRCG/src/input.cpp +++ b/protocols/IRCG/src/input.cpp @@ -677,7 +677,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, MCONTACT hConta ulAdr = ConvertIPToInteger(m_IPFromServer ? m_myHost : m_myLocalHost);
if (ulAdr) {
- CMString contact = two; contact += _T(DCCSTRING);
+ CMString contact = two; contact += DCCSTRING;
CONTACT user = { (TCHAR*)contact.c_str(), NULL, NULL, false, false, true };
MCONTACT hContact = CList_AddContact(&user, false, false);
setByte(hContact, "DCC", 1);
diff --git a/protocols/IRCG/src/irc.h b/protocols/IRCG/src/irc.h index 6ba49149e2..27ef8bc750 100644 --- a/protocols/IRCG/src/irc.h +++ b/protocols/IRCG/src/irc.h @@ -87,10 +87,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define IRC_UM_DISCONNECT "/UMenuDisconnect"
#define IRC_UM_IGNORE "/UMenuIgnore"
-#define STR_QUITMESSAGE "\002Miranda NG!\002 Smaller, Faster, Easier. http://miranda-ng.org/"
-#define STR_USERINFO "I'm a happy Miranda NG user! Get it here: http://miranda-ng.org/"
-#define STR_AWAYMESSAGE "I'm away from the computer." // Default away
-#define DCCSTRING " (DCC)"
+#define STR_QUITMESSAGE _T("\002Miranda NG!\002 Smaller, Faster, Easier. http://miranda-ng.org/")
+#define STR_USERINFO _T("I'm a happy Miranda NG user! Get it here: http://miranda-ng.org/")
+#define STR_AWAYMESSAGE _T("I'm away from the computer.") // Default away
+#define DCCSTRING _T(" (DCC)")
#define SERVERSMODULE "IRC Servers"
#define SERVERWINDOW _T("Network log")
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 5a5f910aea..73c64b08ff 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -975,7 +975,7 @@ int __cdecl CIrcProto::SetAwayMsg(int status, const TCHAR* msg) ReplaceString(newStatus, _T("\r\n"), _T(" "));
if (m_statusMessage.IsEmpty() || msg == NULL || m_statusMessage != newStatus) {
if (msg == NULL || *msg == 0)
- m_statusMessage = _T(STR_AWAYMESSAGE);
+ m_statusMessage = STR_AWAYMESSAGE;
else
m_statusMessage = newStatus;
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 38b73b0617..0e725d7607 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -273,9 +273,9 @@ struct { UINT cpId; TCHAR *cpName; } static cpTable[] = static CCtrlCombo* sttCombo;
-static BOOL CALLBACK sttLangAddCallback(CHAR *str)
+static BOOL CALLBACK sttLangAddCallback(TCHAR *str)
{
- UINT cp = atoi(str);
+ UINT cp = _ttoi(str);
CPINFOEX cpinfo;
if (GetCPInfoEx(cp, 0, &cpinfo)) {
TCHAR* b = _tcschr(cpinfo.CodePageName, '(');
@@ -1035,11 +1035,10 @@ void COtherPrefsDlg::OnInitDialog() m_codepage.AddString(TranslateT("Default ANSI codepage"), CP_ACP);
sttCombo = &m_codepage;
- EnumSystemCodePagesA(sttLangAddCallback, CP_INSTALLED);
+ EnumSystemCodePages(sttLangAddCallback, CP_INSTALLED);
- int i;
- for (i = m_codepage.GetCount(); i >= 0; i--) {
- if (m_codepage.GetItemData(i) == m_proto->getCodepage()) {
+ for (int i = m_codepage.GetCount(); i >= 0; i--) {
+ if (m_codepage.GetItemData(i) == m_proto->m_codepage) {
m_codepage.SetCurSel(i);
break;
}
@@ -1049,7 +1048,7 @@ void COtherPrefsDlg::OnInitDialog() if (m_proto->m_codepage == CP_UTF8)
m_autodetect.Disable();
- for (i = 0; i < g_servers.getCount(); i++) {
+ for (int i = 0; i < g_servers.getCount(); i++) {
SERVER_INFO& si = g_servers[i];
int idx = m_performCombo.FindStringA(si.m_group, -1, true);
if (idx == CB_ERR) {
@@ -1058,7 +1057,7 @@ void COtherPrefsDlg::OnInitDialog() }
}
- for (i = 0; i < SIZEOF(sttPerformEvents); i++) {
+ for (int i = 0; i < SIZEOF(sttPerformEvents); i++) {
int idx = m_performCombo.InsertString(_A2T(sttPerformEvents[i]), i);
addPerformComboValue(idx, sttPerformEvents[i]);
}
@@ -1704,9 +1703,9 @@ void CIrcProto::InitPrefs(void) ConnectSettings[3].defStr = _T("30");
ConnectSettings[4].defStr = _T("10");
- CtcpSettings[0].defStr = _T(STR_USERINFO);
+ CtcpSettings[0].defStr = STR_USERINFO;
- OtherSettings[0].defStr = _T(STR_QUITMESSAGE);
+ OtherSettings[0].defStr = STR_QUITMESSAGE;
ReadSettings(ConnectSettings, SIZEOF(ConnectSettings));
ReadSettings(CtcpSettings, SIZEOF(CtcpSettings));
diff --git a/protocols/IRCG/src/resource.h b/protocols/IRCG/src/resource.h index 9ac60a05f6..8727232122 100644 --- a/protocols/IRCG/src/resource.h +++ b/protocols/IRCG/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by D:\Myranda\protocols\IRCG\res\IRC.rc
+// Used by ..\res\IRC.rc
//
#define ID_INFO_QUERY 3
#define IDD_PREFS_MAIN 101
|