diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-05 14:50:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-05 14:50:06 +0000 |
commit | 046a82ec1d9982a0beb8d19b6f31c279eeb02b50 (patch) | |
tree | a62c2ce231b4486390e9d4daf7b311f4d89c4daf /src/modules/metacontacts/meta_options.cpp | |
parent | a921704492eb11e19954eddc68479af74b4787ef (diff) |
- "Add to metacontact" dialog fixed;
- "Remove from metacontact" menu item sometimes got hidden;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@8412 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/metacontacts/meta_options.cpp')
-rw-r--r-- | src/modules/metacontacts/meta_options.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/modules/metacontacts/meta_options.cpp b/src/modules/metacontacts/meta_options.cpp index 8e87d8a22b..2a30c3d784 100644 --- a/src/modules/metacontacts/meta_options.cpp +++ b/src/modules/metacontacts/meta_options.cpp @@ -447,12 +447,12 @@ INT_PTR CALLBACK DlgProcOptsPriorities(HWND hwndDlg, UINT msg, WPARAM wParam, LP ProtoEnumAccounts(&num_protocols, &pppDesc);
hw = GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL);
- int index = SendMessage(hw, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)TranslateT("<default>"));
- SendMessage(hw, CB_SETITEMDATA, (WPARAM)index, -1);
+ int index = SendMessage(hw, CB_INSERTSTRING, -1, (LPARAM)TranslateT("<default>"));
+ SendMessage(hw, CB_SETITEMDATA, index, -1);
for (int i = 0; i < num_protocols; i++) {
if (strcmp(pppDesc[i]->szModuleName, META_PROTO) != 0) {
- index = SendMessage(hw, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)pppDesc[i]->tszAccountName);
- SendMessage(hw, CB_SETITEMDATA, (WPARAM)index, i);
+ index = SendMessage(hw, CB_INSERTSTRING, -1, (LPARAM)pppDesc[i]->tszAccountName);
+ SendMessage(hw, CB_SETITEMDATA, index, i);
}
}
@@ -465,10 +465,10 @@ INT_PTR CALLBACK DlgProcOptsPriorities(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WMU_FILLPRIODATA:
sel = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL), CB_GETCURSEL, 0, 0);
if (sel != -1) {
- int index = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL), CB_GETITEMDATA, (WPARAM)sel, 0);
+ int index = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL), CB_GETITEMDATA, sel, 0);
sel = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_STATUS), CB_GETCURSEL, 0, 0);
if (sel != -1) {
- int status = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_STATUS), CB_GETITEMDATA, (WPARAM)sel, 0);
+ int status = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_STATUS), CB_GETITEMDATA, sel, 0);
SetDlgItemInt(hwndDlg, IDC_ED_PRIORITY, GetPriority(index, status), FALSE);
if (index == -1) {
EnableWindow(GetDlgItem(hwndDlg, IDC_ED_PRIORITY), TRUE);
@@ -497,13 +497,13 @@ INT_PTR CALLBACK DlgProcOptsPriorities(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WMU_FILLSTATUSCMB:
sel = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL), CB_GETCURSEL, 0, 0);
if (sel != -1) {
- int index = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL), CB_GETITEMDATA, (WPARAM)sel, 0);
+ int index = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL), CB_GETITEMDATA, sel, 0);
HWND hw = GetDlgItem(hwndDlg, IDC_CMB_STATUS);
SendMessage(hw, CB_RESETCONTENT, 0, 0);
if (index == -1) {
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
- index = SendMessage(hw, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)cli.pfnGetStatusModeDescription(i, 0));
- SendMessage(hw, CB_SETITEMDATA, (WPARAM)index, i);
+ index = SendMessage(hw, CB_INSERTSTRING, -1, (LPARAM)cli.pfnGetStatusModeDescription(i, 0));
+ SendMessage(hw, CB_SETITEMDATA, index, i);
}
}
else {
@@ -515,8 +515,8 @@ INT_PTR CALLBACK DlgProcOptsPriorities(HWND hwndDlg, UINT msg, WPARAM wParam, LP for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
if (caps & Proto_Status2Flag(i)) {
- index = SendMessage(hw, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)cli.pfnGetStatusModeDescription(i, 0));
- SendMessage(hw, CB_SETITEMDATA, (WPARAM)index, i);
+ index = SendMessage(hw, CB_INSERTSTRING, -1, (LPARAM)cli.pfnGetStatusModeDescription(i, 0));
+ SendMessage(hw, CB_SETITEMDATA, index, i);
}
}
}
@@ -531,11 +531,11 @@ INT_PTR CALLBACK DlgProcOptsPriorities(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_CHK_DEFAULT:
sel = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL), CB_GETCURSEL, 0, 0);
if (sel != -1) {
- int index = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL), CB_GETITEMDATA, (WPARAM)sel, 0);
+ int index = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL), CB_GETITEMDATA, sel, 0);
sel = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_STATUS), CB_GETCURSEL, 0, 0);
if (sel != -1) {
BOOL checked = IsDlgButtonChecked(hwndDlg, IDC_CHK_DEFAULT);
- int status = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_STATUS), CB_GETITEMDATA, (WPARAM)sel, 0);
+ int status = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_STATUS), CB_GETITEMDATA, sel, 0);
if (checked) {
SetPriority(index, status, TRUE, 0);
SetDlgItemInt(hwndDlg, IDC_ED_PRIORITY, GetPriority(index, status), FALSE);
@@ -562,10 +562,10 @@ INT_PTR CALLBACK DlgProcOptsPriorities(HWND hwndDlg, UINT msg, WPARAM wParam, LP if ( HIWORD( wParam ) == EN_CHANGE && LOWORD(wParam) == IDC_ED_PRIORITY && ( HWND )lParam == GetFocus()) {
sel = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL), CB_GETCURSEL, 0, 0);
if (sel != -1) {
- int index = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL), CB_GETITEMDATA, (WPARAM)sel, 0);
+ int index = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_PROTOCOL), CB_GETITEMDATA, sel, 0);
sel = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_STATUS), CB_GETCURSEL, 0, 0);
if (sel != -1) {
- int status = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_STATUS), CB_GETITEMDATA, (WPARAM)sel, 0);
+ int status = SendMessage(GetDlgItem(hwndDlg, IDC_CMB_STATUS), CB_GETITEMDATA, sel, 0);
int prio = GetDlgItemInt(hwndDlg, IDC_ED_PRIORITY, 0, FALSE);
SetPriority(index, status, FALSE, prio);
if (prio != GetPriority(index, status))
|