diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-06 13:58:20 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-06 13:58:20 +0000 |
commit | 46a53191c1ad11a41c948594e972568e62d155b4 (patch) | |
tree | 7e57e6f7093fb0de766fe13a933d2f9231433e4d /src/modules/skin | |
parent | 1fe5acae909ea64a1de9ac9f58cae5a3c2d3ad1f (diff) |
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@332 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/skin')
-rw-r--r-- | src/modules/skin/sounds.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp index 8c6865f012..6e0906782e 100644 --- a/src/modules/skin/sounds.cpp +++ b/src/modules/skin/sounds.cpp @@ -175,7 +175,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM tvis.hInsertAfter = TVI_SORT;
tvis.item.mask = TVIF_TEXT | TVIF_STATE | TVIF_PARAM;
tvis.item.state = tvis.item.stateMask = TVIS_EXPANDED;
- for( i=0; i < soundCount; i++ ) {
+ for ( i=0; i < soundCount; i++ ) {
tvis.item.stateMask = TVIS_EXPANDED;
tvis.item.state = TVIS_EXPANDED;
tvis.hParent = FindNamedTreeItemAtRoot( hwndTree, soundList[i].section );
@@ -257,7 +257,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM NotifyEventHooks(hPlayEvent, 1, (LPARAM)soundList[tvi.lParam].tempFile);
else {
DBVARIANT dbv;
- if(!DBGetContactSettingString(NULL,"SkinSounds",soundList[tvi.lParam].name,&dbv)) {
+ if (!DBGetContactSettingString(NULL,"SkinSounds",soundList[tvi.lParam].name,&dbv)) {
char szPathFull[MAX_PATH];
pathToAbsolute(dbv.pszVal, szPathFull, NULL);
@@ -310,16 +310,16 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM ofn.nMaxFile = SIZEOF(str);
ofn.nMaxFileTitle = MAX_PATH;
ofn.lpstrDefExt = "wav";
- if(!GetOpenFileNameA(&ofn)) break;
+ if (!GetOpenFileNameA(&ofn)) break;
CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)str, (LPARAM)strFull);
soundList[tvi.lParam].tempFile = mir_strdup(strFull);
SetDlgItemTextA(hwndDlg, IDC_LOCATION, strFull);
}
- if(LOWORD(wParam)==IDC_GETMORE) {
+ if (LOWORD(wParam)==IDC_GETMORE) {
CallService(MS_UTILS_OPENURL,1,(LPARAM)"http://addons.miranda-im.org/index.php?action=display&id=5");
break;
}
- if(LOWORD(wParam)==IDC_LOCATION) {
+ if (LOWORD(wParam)==IDC_LOCATION) {
break;
}
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -379,7 +379,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SetDlgItemText(hwndDlg, IDC_NAMEVAL, buf);
if (soundList[tvi.lParam].tempFile)
SetDlgItemTextA(hwndDlg, IDC_LOCATION, soundList[tvi.lParam].tempFile);
- else if(!DBGetContactSettingString(NULL,"SkinSounds",soundList[tvi.lParam].name,&dbv)) {
+ else if (!DBGetContactSettingString(NULL,"SkinSounds",soundList[tvi.lParam].name,&dbv)) {
SetDlgItemTextA(hwndDlg, IDC_LOCATION, dbv.pszVal);
DBFreeVariant(&dbv);
}
@@ -402,9 +402,9 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM hti.pt.x=(short)LOWORD(GetMessagePos());
hti.pt.y=(short)HIWORD(GetMessagePos());
ScreenToClient(((LPNMHDR)lParam)->hwndFrom,&hti.pt);
- if(TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom,&hti))
+ if (TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom,&hti))
if (hti.flags&TVHT_ONITEM)
- if(hti.flags&TVHT_ONITEMSTATEICON)
+ if (hti.flags&TVHT_ONITEMSTATEICON)
if (TreeView_GetParent(hwndTree, hti.hItem)!=NULL)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -459,11 +459,11 @@ void UnloadSkinSounds(void) if ( !bModuleInitialized ) return;
- for(i=0;i<soundCount;i++) {
+ for (i=0;i<soundCount;i++) {
mir_free(soundList[i].name);
mir_free(soundList[i].section);
mir_free(soundList[i].description);
if (soundList[i].tempFile) mir_free(soundList[i].tempFile);
}
- if(soundCount) mir_free(soundList);
+ if (soundCount) mir_free(soundList);
}
|