diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-16 22:17:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-16 22:17:16 +0000 |
commit | 55a8ab47a15bfbfbd52d0d28368a72c0207a12a5 (patch) | |
tree | 64f25a3488a439ca3aae9eb80d7735f9147013e9 /plugins/NewXstatusNotify/src/indsnd.cpp | |
parent | 769b537b5e1a99fc53aa7296fd2b21dc77a4071c (diff) |
fixes warning & 64-bit issues
git-svn-id: http://svn.miranda-ng.org/main/trunk@14972 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewXstatusNotify/src/indsnd.cpp')
-rw-r--r-- | plugins/NewXstatusNotify/src/indsnd.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 1f81d2ec3a..89488d3843 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -199,20 +199,20 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA PreviewSound(hList);
break;
case IDC_CHANGE:
- {
- int iSel = ListView_GetNextItem(GetDlgItem(hwndDlg, IDC_INDSNDLIST), -1, LVNI_SELECTED);
- if (iSel != -1) {
- TCHAR stzFilePath[MAX_PATH];
- if (SelectSound(hwndDlg, stzFilePath, MAX_PATH - 1) != NULL) {
- iSel = -1;
- while ((iSel = ListView_GetNextItem(hList, iSel, LVNI_SELECTED)) != -1)
- ListView_SetItemText(hList, iSel, 1, stzFilePath);
-
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ {
+ int iSel = ListView_GetNextItem(GetDlgItem(hwndDlg, IDC_INDSNDLIST), -1, LVNI_SELECTED);
+ if (iSel != -1) {
+ TCHAR stzFilePath[MAX_PATH];
+ if (SelectSound(hwndDlg, stzFilePath, MAX_PATH - 1) != NULL) {
+ iSel = -1;
+ while ((iSel = ListView_GetNextItem(hList, iSel, LVNI_SELECTED)) != -1)
+ ListView_SetItemText(hList, iSel, 1, stzFilePath);
+
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ }
}
}
- }
- break;
+ break;
case IDC_DELETE:
if (ListView_GetSelectionMark(hList) != -1)
if (RemoveSoundFromList(GetDlgItem(hwndDlg, IDC_INDSNDLIST)))
@@ -230,7 +230,6 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case WM_NOTIFY:
if (((LPNMHDR)lParam)->code == PSN_APPLY) {
TCHAR buff[MAX_PATH];
- HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
LVITEM lvi = { 0 };
lvi.mask = LVIF_PARAM;
@@ -265,7 +264,6 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TCHAR stzFilePath[MAX_PATH];
if (SelectSound(hwndDlg, stzFilePath, MAX_PATH - 1) != NULL) {
int iSel = -1;
- HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
while ((iSel = ListView_GetNextItem(hList, iSel, LVNI_SELECTED)) != -1)
ListView_SetItemText(hList, iSel, 1, stzFilePath);
|