diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-19 19:25:00 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-19 19:25:00 +0000 |
commit | 5a5ffa5cc195669c48827e4cf9d948dfb3272e47 (patch) | |
tree | cdbad9af22211a53a3f6173514cba1345768c9a7 /plugins/Popup/src/opttree.cpp | |
parent | 5a54097bdfc5a94ea7b1f282d12c0fc1155ec7d5 (diff) |
misplaced figure brackets in Popup+ options
git-svn-id: http://svn.miranda-ng.org/main/trunk@4479 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src/opttree.cpp')
-rw-r--r-- | plugins/Popup/src/opttree.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp index 3965987833..bdaf23e446 100644 --- a/plugins/Popup/src/opttree.cpp +++ b/plugins/Popup/src/opttree.cpp @@ -23,6 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "headers.h"
+enum { IMG_GROUP, IMG_CHECK, IMG_NOCHECK, IMG_RCHECK, IMG_NORCHECK, IMG_GRPOPEN, IMG_GRPCLOSED };
+
static void OptTree_TranslateItem(HWND hwndTree, HTREEITEM hItem)
{
union
@@ -160,10 +162,8 @@ HTREEITEM OptTree_AddItem(HWND hwndTree, LPTSTR name, LPARAM lParam, int iconInd return result;
}
-BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, int *result, int idcTree, OPTTREE_OPTION *options, int optionCount)
+BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, int *result, int idcTree, OPTTREE_OPTION *options, int optionCount)
{
- enum { IMG_GROUP, IMG_CHECK, IMG_NOCHECK, IMG_RCHECK, IMG_NORCHECK, IMG_GRPOPEN, IMG_GRPCLOSED };
-
HWND hwndTree = GetDlgItem(hwnd, idcTree);
switch (msg)
{
@@ -348,8 +348,6 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, LPTSTR pszSettingName)
{
- enum { IMG_GROUP, IMG_CHECK, IMG_NOCHECK, IMG_RCHECK, IMG_NORCHECK, IMG_GRPOPEN, IMG_GRPCLOSED };
-
HWND hwndTree = GetDlgItem(hwnd, idcTree);
DWORD result = 0;
int i;
@@ -358,7 +356,7 @@ DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int op if ((!options[i].pszSettingName && !pszSettingName) ||
(options[i].pszSettingName && pszSettingName && !lstrcmp(options[i].pszSettingName, pszSettingName)))
{
- TVITEM tvi;
+ TVITEM tvi = { 0 };
tvi.mask = TVIF_HANDLE|TVIF_IMAGE;
tvi.hItem = options[i].hItem;
TreeView_GetItem(hwndTree, &tvi);
@@ -371,11 +369,8 @@ DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int op void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, DWORD dwOptions, LPTSTR pszSettingName)
{
- enum { IMG_GROUP, IMG_CHECK, IMG_NOCHECK, IMG_RCHECK, IMG_NORCHECK, IMG_GRPOPEN, IMG_GRPCLOSED };
-
HWND hwndTree = GetDlgItem(hwnd, idcTree);
- int i;
- for (i = 0; i < optionCount; ++i)
+ for (int i = 0; i < optionCount; ++i)
{
if ((!options[i].pszSettingName && !pszSettingName) ||
(options[i].pszSettingName && pszSettingName && !lstrcmp(options[i].pszSettingName, pszSettingName)))
@@ -384,12 +379,10 @@ void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int opt tvi.mask = TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
tvi.hItem = options[i].hItem;
if (options[i].groupId == OPTTREE_CHECK)
- {
tvi.iImage = tvi.iSelectedImage = (dwOptions & options[i].dwFlag) ? IMG_CHECK : IMG_NOCHECK;
- } else
- {
+ else
tvi.iImage = tvi.iSelectedImage = (dwOptions & options[i].dwFlag) ? IMG_RCHECK : IMG_NORCHECK;
- }
+
TreeView_SetItem(hwndTree, &tvi);
}
}
|