summaryrefslogtreecommitdiff
path: root/protocols/IRCG/src/options.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-04-05 17:56:53 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-04-05 17:56:53 +0000
commit346981c06e7e810d44a0fc05c649f538c501ae21 (patch)
tree202779c6ea8d8ca69ab9cacbd1a05568b04c7551 /protocols/IRCG/src/options.cpp
parenteaab3f090b5928e49938e0d880d4268e9843be02 (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/options.cpp')
-rw-r--r--protocols/IRCG/src/options.cpp19
1 files changed, 9 insertions, 10 deletions
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));