From d154673f93ad95197bce8cadb995daa5bc39f5d8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 21 Jan 2014 20:04:48 +0000 Subject: minor code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@7820 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/skin/hotkey_opts.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/modules/skin/hotkey_opts.cpp') diff --git a/src/modules/skin/hotkey_opts.cpp b/src/modules/skin/hotkey_opts.cpp index ef9f4fe690..53c7ba77fe 100644 --- a/src/modules/skin/hotkey_opts.cpp +++ b/src/modules/skin/hotkey_opts.cpp @@ -175,7 +175,7 @@ static void sttOptionsSetupItem(HWND hwndList, int idx, THotkeyItem *item) LVITEM lvi = {0}; lvi.iItem = idx; - if ( !item->rootHotkey) { + if (!item->rootHotkey) { lvi.mask = LVIF_TEXT|LVIF_IMAGE; lvi.iSubItem = COL_NAME; lvi.pszText = item->getDescr(); @@ -245,16 +245,16 @@ static int CALLBACK sttOptionsSortList(LPARAM lParam1, LPARAM lParam2, LPARAM lP if (ListView_GetItem((HWND)lParamSort, &lvi)) item2 = (THotkeyItem *)lvi.lParam; - if ( !item1 && !item2) + if (!item1 && !item2) return lstrcmp(title1, title2); - if ( !item1) { + if (!item1) { if (res = lstrcmp(title1, item2->getSection())) return res; return -1; } - if ( !item2) { + if (!item2) { if (res = lstrcmp(item1->getSection(), title2)) return res; return 1; @@ -314,7 +314,7 @@ static void sttOptionsSaveItem(THotkeyItem *item) char buf[MAXMODULELABELLENGTH]; if (item->rootHotkey) return; - if ( !item->OptChanged) return; + if (!item->OptChanged) return; item->Hotkey = item->OptHotkey; item->type = item->OptType; @@ -356,7 +356,7 @@ static void sttBuildHotkeyList(HWND hwndList) if (item->OptDeleted) continue; - if ( !i || lstrcmp(item->ptszSection, hotkeys[i-1]->ptszSection)) { + if (!i || lstrcmp(item->ptszSection, hotkeys[i-1]->ptszSection)) { lvi.mask = LVIF_TEXT|LVIF_PARAM; lvi.iItem = nItems++; lvi.iSubItem = 0; @@ -537,7 +537,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, lvi.mask = LVIF_PARAM; for (lvi.iItem = 0; lvi.iItem < count; ++lvi.iItem) { ListView_GetItem(hwndHotkey, &lvi); - if ( !lvi.lParam) continue; + if (!lvi.lParam) continue; if (((THotkeyItem *)lvi.lParam)->UnregisterHotkey) { ListView_DeleteItem(hwndHotkey, lvi.iItem); @@ -609,7 +609,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, ShowWindow( GetDlgItem(hwndDlg, IDC_HOTKEY), SW_HIDE); SetFocus(hwndHotkey); - if ( !wHotkey || (wHotkey == VK_ESCAPE) || (HIWORD(wParam) != 0)) + if (!wHotkey || (wHotkey == VK_ESCAPE) || (HIWORD(wParam) != 0)) break; lvi.mask = LVIF_PARAM; @@ -637,7 +637,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, lvi.mask = LVIF_PARAM; ListView_GetItem(hwndList, &lvi); - if ( !(item = (THotkeyItem *)lvi.lParam)) return FALSE; + if (!(item = (THotkeyItem *)lvi.lParam)) return FALSE; if ((pt.x == -1) && (pt.y == -1)) { RECT rc; @@ -667,7 +667,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, (UINT_PTR)MI_LOCAL, TranslateT("Miranda scope")); } AppendMenu(hMenu, MF_SEPARATOR, 0, NULL); - if ( !item->rootHotkey) + if (!item->rootHotkey) AppendMenu(hMenu, MF_STRING, (UINT_PTR)MI_ADD, TranslateT("Add binding")); else AppendMenu(hMenu, MF_STRING, (UINT_PTR)MI_REMOVE, TranslateT("Remove")); @@ -775,7 +775,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, ListView_HitTest(lpnmia->hdr.hwndFrom, &lvhti); if (item && - ( !item->rootHotkey && (lpnmia->iSubItem == COL_NAME) && ((lvhti.flags & LVHT_ONITEM) == LVHT_ONITEMICON) || + (!item->rootHotkey && (lpnmia->iSubItem == COL_NAME) && ((lvhti.flags & LVHT_ONITEM) == LVHT_ONITEMICON) || item->rootHotkey && (lpnmia->iSubItem == COL_TYPE)) && ((item->OptType == HKT_GLOBAL) || (item->OptType == HKT_LOCAL))) { @@ -846,7 +846,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, { LPNMLISTVIEW param = (LPNMLISTVIEW)lParam; THotkeyItem *item = (THotkeyItem *)param->lParam; - if ( !initialized || (param->uNewState>>12 == param->uOldState>>12)) + if (!initialized || (param->uNewState>>12 == param->uOldState>>12)) break; if (item && !item->rootHotkey) { @@ -854,7 +854,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, sttOptionsSetChanged(item); SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); } - else if ( !item) { + else if (!item) { TCHAR buf[256]; LVITEM lvi = {0}; lvi.mask = LVIF_TEXT; @@ -871,8 +871,8 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, THotkeyItem *item; ListView_GetItem(lpnmhdr->hwndFrom, &lvi); item = (THotkeyItem *)lvi.lParam; - if ( !item) continue; - if ( !lstrcmp( item->getSection(), buf)) { + if (!item) continue; + if (!lstrcmp( item->getSection(), buf)) { ListView_DeleteItem(lpnmhdr->hwndFrom, lvi.iItem); --lvi.iItem; --count; -- cgit v1.2.3