summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-15 17:06:10 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-15 17:06:10 +0000
commit541c2c38bd6e6d9a6fdbf7e19aed4aa5c005dbd7 (patch)
treeb55dd1cc4879f04c014d51380d940559a9fe40b5 /plugins/Clist_nicer/src
parente5962602ef75f2339dbb103667555ceb7c24e539 (diff)
fix for the very old bug with the ViewModes buttons' initialization
git-svn-id: http://svn.miranda-ng.org/main/trunk@5369 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src')
-rw-r--r--plugins/Clist_nicer/src/viewmodes.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp
index a51de4fab6..47ac3f043a 100644
--- a/plugins/Clist_nicer/src/viewmodes.cpp
+++ b/plugins/Clist_nicer/src/viewmodes.cpp
@@ -840,7 +840,17 @@ void BuildViewModeMenu()
AppendMenu(hViewModeMenu, MF_STRING, 10002, TranslateT("Clear current View Mode"));
}
-static UINT _buttons[] = {IDC_RESETMODES, IDC_SELECTMODE, IDC_CONFIGUREMODES, 0};
+struct
+{
+ UINT btn_id;
+ LPCSTR icon;
+}
+static _buttons[] =
+{
+ { IDC_RESETMODES, "CLN_CLVM_reset" },
+ { IDC_SELECTMODE, "CLN_CLVM_select" },
+ { IDC_CONFIGUREMODES, "CLN_CLVM_options" }
+};
LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -891,13 +901,13 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
break;
}
case WM_USER + 100:
- SendMessage(GetDlgItem(hwnd, IDC_RESETMODES), BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon("CLN_CLVM_reset"));
- SendMessage(GetDlgItem(hwnd, IDC_CONFIGUREMODES), BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon("CLN_CLVM_options"));
- SendMessage(GetDlgItem(hwnd, IDC_SELECTMODE), BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon("CLN_CLVM_select"));
{
bool bSkinned = cfg::getByte("CLCExt", "bskinned", 0) != 0;
- for (int i = 0; _buttons[i] != 0; i++ )
- CustomizeButton(hwnd, bSkinned, !bSkinned, bSkinned);
+ for (int i = 0; i < SIZEOF(_buttons); i++ ) {
+ HWND hwndButton = GetDlgItem(hwnd, _buttons[i].btn_id);
+ SendMessage(hwndButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon(_buttons[i].icon));
+ CustomizeButton(hwndButton, bSkinned, !bSkinned, bSkinned);
+ }
}
if (cfg::dat.bFilterEffective)