diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-21 20:04:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-21 20:04:48 +0000 |
commit | d154673f93ad95197bce8cadb995daa5bc39f5d8 (patch) | |
tree | 191522aa88f9f845a9c27b1ddb86116b87033c4b /src/modules/icolib/skin2opts.cpp | |
parent | be50a70bfd8b3f3daf0c3351fdce6e2fea515bd7 (diff) |
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@7820 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/icolib/skin2opts.cpp')
-rw-r--r-- | src/modules/icolib/skin2opts.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/modules/icolib/skin2opts.cpp b/src/modules/icolib/skin2opts.cpp index a761d7854c..e61a8783d8 100644 --- a/src/modules/icolib/skin2opts.cpp +++ b/src/modules/icolib/skin2opts.cpp @@ -46,12 +46,12 @@ static HICON ExtractIconFromPath(const TCHAR *path, int cxIcon, int cyIcon) int n;
HICON hIcon;
- if ( !path)
+ if (!path)
return (HICON)NULL;
lstrcpyn(file, path, SIZEOF(file));
comma = _tcsrchr(file, ',');
- if ( !comma)
+ if (!comma)
n = 0;
else {
n = _ttoi(comma+1);
@@ -78,7 +78,7 @@ int IcoLib_ReleaseIcon(HICON hIcon, char* szIconName, bool big) if (szIconName)
item = IcoLib_FindIcon(szIconName);
- if ( !item && hIcon) // find by HICON
+ if (!item && hIcon) // find by HICON
item = IcoLib_FindHIcon(hIcon, big);
int res = 1;
@@ -103,7 +103,7 @@ HICON IconItem_GetIcon_Preview(IcolibItem* item) {
HICON hIcon = NULL;
- if ( !item->temp_reset) {
+ if (!item->temp_reset) {
HICON hRefIcon = IconItem_GetIcon(item, false);
hIcon = CopyIcon(hRefIcon);
if (item->source_small && item->source_small->icon == hRefIcon)
@@ -119,7 +119,7 @@ HICON IconItem_GetIcon_Preview(IcolibItem* item) }
}
- if ( !hIcon && item->default_file) {
+ if (!hIcon && item->default_file) {
IconSourceItem_Release(&item->default_icon);
item->default_icon = GetIconSourceItem(item->default_file, item->default_indx, item->cx, item->cy);
if (item->default_icon) {
@@ -132,7 +132,7 @@ HICON IconItem_GetIcon_Preview(IcolibItem* item) }
}
- if ( !hIcon)
+ if (!hIcon)
return CopyIcon(hIconBlank);
}
return hIcon;
@@ -197,7 +197,7 @@ static void UndoChanges(int iconIndx, int cmd) {
IcolibItem *item = iconList[ iconIndx ];
- if ( !item->temp_file && !item->temp_icon && item->temp_reset && cmd == ID_CANCELCHANGE)
+ if (!item->temp_file && !item->temp_icon && item->temp_reset && cmd == ID_CANCELCHANGE)
item->temp_reset = FALSE;
else {
SAFE_FREE((void**)&item->temp_file);
@@ -286,7 +286,7 @@ static TCHAR* OpenFileDlg(HWND hParent, const TCHAR* szFile, BOOL bAll) ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_DONTADDTORECENT;
ofn.nMaxFile = MAX_PATH*2;
- if ( !GetOpenFileName(&ofn))
+ if (!GetOpenFileName(&ofn))
return NULL;
return mir_tstrdup(file);
@@ -343,7 +343,7 @@ static HTREEITEM FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const TCHAR else
tvi.hItem = TreeView_GetRoot(hwndTree);
- if ( !name)
+ if (!name)
return tvi.hItem;
tvi.mask = TVIF_TEXT;
@@ -354,7 +354,7 @@ static HTREEITEM FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const TCHAR {
TreeView_GetItem(hwndTree, &tvi);
- if ( !lstrcmp(tvi.pszText, name))
+ if (!lstrcmp(tvi.pszText, name))
return tvi.hItem;
tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem);
@@ -470,7 +470,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
TCHAR str[MAX_PATH], *file;
GetDlgItemText(hwndDlg, IDC_ICONSET, str, SIZEOF(str));
- if ( !(file = OpenFileDlg(GetParent(hwndDlg), str, TRUE)))
+ if (!(file = OpenFileDlg(GetParent(hwndDlg), str, TRUE)))
break;
SetDlgItemText(hwndDlg, IDC_ICONSET, file);
SAFE_FREE((void**)&file);
@@ -526,7 +526,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
}
- if ( !onItem && dropHiLite != -1) {
+ if (!onItem && dropHiLite != -1) {
ImageList_DragLeave(hwndDragOver);
ListView_SetItemState(hPPreview, dropHiLite, 0, LVIS_DROPHILITED);
UpdateWindow(hPPreview);
@@ -584,7 +584,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM break;
case WM_SIZE: // make the dlg resizeable
- if ( !IsIconic(hwndDlg)) {
+ if (!IsIconic(hwndDlg)) {
UTILRESIZEDIALOG urd = {0};
urd.cbSize = sizeof(urd);
urd.hInstance = hInst;
@@ -697,7 +697,7 @@ INT_PTR CALLBACK DlgProcIcoLibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM TCHAR itemName[1024];
HTREEITEM hSection;
- if ( !hwndTree) break;
+ if (!hwndTree) break;
TreeView_SelectItem(hwndTree, NULL);
TreeView_DeleteAllItems(hwndTree);
@@ -722,8 +722,8 @@ INT_PTR CALLBACK DlgProcIcoLibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM pItemName = TranslateTS(pItemName);
hItem = FindNamedTreeItemAt(hwndTree, hSection, pItemName);
- if ( !sectionName || !hItem) {
- if ( !hItem) {
+ if (!sectionName || !hItem) {
+ if (!hItem) {
TVINSERTSTRUCT tvis = {0};
TreeItem *treeItem = (TreeItem *)mir_alloc(sizeof(TreeItem));
treeItem->value = SECTIONPARAM_MAKE(indx, sectionLevel, sectionName ? 0 : SECTIONPARAM_HAVEPAGE);
@@ -822,7 +822,7 @@ INT_PTR CALLBACK DlgProcIcoLibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
mir_cslock lck(csIconList);
hIcon = iconList[lvi.lParam]->temp_icon;
- if ( !hIcon)
+ if (!hIcon)
hIcon = IconItem_GetIcon_Preview(iconList[lvi.lParam]);
}
|