summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/changeinfo/dlgproc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/IcqOscarJ/changeinfo/dlgproc.cpp')
-rw-r--r--protocols/IcqOscarJ/changeinfo/dlgproc.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/protocols/IcqOscarJ/changeinfo/dlgproc.cpp b/protocols/IcqOscarJ/changeinfo/dlgproc.cpp
index babb269c28..404777aa97 100644
--- a/protocols/IcqOscarJ/changeinfo/dlgproc.cpp
+++ b/protocols/IcqOscarJ/changeinfo/dlgproc.cpp
@@ -39,17 +39,17 @@ static int DrawTextUtf(HDC hDC, char *text, LPRECT lpRect, UINT uFormat, LPSIZE
if (lpSize)
GetTextExtentPoint32W(hDC, tmp, strlennull(tmp), lpSize);
SAFE_FREE((void**)&tmp);
-
+
return res;
}
char* ChangeInfoData::GetItemSettingText(int i, char *buf, size_t bufsize)
{
- char *text = buf;
- int alloced = 0;
+ char *text = buf;
+ int alloced = 0;
- buf[0] = '\0';
+ buf[0] = '\0';
if (settingData[i].value == 0 && !(setting[i].displayType & LIF_ZEROISVALID))
{
@@ -64,7 +64,7 @@ char* ChangeInfoData::GetItemSettingText(int i, char *buf, size_t bufsize)
case LI_STRING:
case LI_LONGSTRING:
text = BinaryToEscapes((char*)settingData[i].value);
- alloced = 1;
+ alloced = 1;
break;
case LI_NUMBER:
@@ -78,19 +78,19 @@ char* ChangeInfoData::GetItemSettingText(int i, char *buf, size_t bufsize)
{
text = ICQTranslateUtfStatic(LPGEN("Unknown value"), buf, bufsize);
- FieldNamesItem *list = (FieldNamesItem*)setting[i].pList;
- for (int j=0; TRUE; j++)
+ FieldNamesItem *list = (FieldNamesItem*)setting[i].pList;
+ for (int j=0; TRUE; j++)
if (list[j].code == settingData[i].value)
{
text = ICQTranslateUtfStatic(list[j].text, buf, bufsize);
break;
}
- else if (!list[j].text)
- {
- if (list[j].code == settingData[i].value)
- text = ICQTranslateUtfStatic("Unspecified", buf, bufsize);
- break;
- }
+ else if (!list[j].text)
+ {
+ if (list[j].code == settingData[i].value)
+ text = ICQTranslateUtfStatic("Unspecified", buf, bufsize);
+ break;
+ }
}
break;
}
@@ -102,23 +102,23 @@ char* ChangeInfoData::GetItemSettingText(int i, char *buf, size_t bufsize)
else
{
if (alloced)
- {
+ {
SAFE_FREE(&text);
- alloced = 0;
- }
- text = "********";
+ alloced = 0;
+ }
+ text = "********";
}
}
- if (text != buf)
- {
- char *tmp = text;
+ if (text != buf)
+ {
+ char *tmp = text;
- text = null_strcpy(buf, text, bufsize - 1);
- if (alloced)
- SAFE_FREE(&tmp);
- }
+ text = null_strcpy(buf, text, bufsize - 1);
+ if (alloced)
+ SAFE_FREE(&tmp);
+ }
- return text;
+ return text;
}
@@ -503,7 +503,7 @@ INT_PTR CALLBACK ChangeInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
dat->ClearChangeFlags();
UnhookEvent(dat->hAckHook);
- dat->hAckHook = NULL;
+ dat->hAckHook = NULL;
EnableDlgItem(hwndDlg, IDC_LIST, TRUE);
EnableDlgItem(hwndDlg, IDC_UPLOADING, FALSE);
SetDlgItemTextUtf(hwndDlg, IDC_UPLOADING, ICQTranslateUtfStatic(LPGEN("Upload complete"), str, MAX_PATH));
@@ -517,7 +517,7 @@ INT_PTR CALLBACK ChangeInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableDlgItem(hwndDlg, IDC_UPLOADING, FALSE);
SetDlgItemTextUtf(hwndDlg, IDC_UPLOADING, ICQTranslateUtfStatic(LPGEN("Upload FAILED"), str, MAX_PATH));
SendMessage(GetParent(hwndDlg), PSM_FORCECHANGED, 0, 0);
- EnableDlgItem(hwndDlg, IDC_SAVE, TRUE);
+ EnableDlgItem(hwndDlg, IDC_SAVE, TRUE);
}
break;
}
@@ -527,13 +527,13 @@ INT_PTR CALLBACK ChangeInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
UnhookEvent(dat->hAckHook);
dat->hAckHook = NULL;
}
- {
- HFONT hFont = (HFONT)SendMessage(dat->hwndList, WM_GETFONT, 0, 0);
- DeleteObject(hFont);
- }
+ {
+ HFONT hFont = (HFONT)SendMessage(dat->hwndList, WM_GETFONT, 0, 0);
+ DeleteObject(hFont);
+ }
dat->FreeStoredDbSettings();
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
- SAFE_DELETE((void_struct**)&dat);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
+ delete dat;
break;
}
return FALSE;