summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Clist_nicer/src/CLCButton.cpp35
-rw-r--r--plugins/Clist_nicer/src/Include/Version.h2
-rw-r--r--plugins/Clist_nicer/src/config.cpp22
3 files changed, 16 insertions, 43 deletions
diff --git a/plugins/Clist_nicer/src/CLCButton.cpp b/plugins/Clist_nicer/src/CLCButton.cpp
index c337a226e9..5cbf3fd6d6 100644
--- a/plugins/Clist_nicer/src/CLCButton.cpp
+++ b/plugins/Clist_nicer/src/CLCButton.cpp
@@ -43,29 +43,6 @@ struct CluiTopButton BTNS[] =
static int g_index = -1;
-static int getButtonIndex(HANDLE hButton)
-{
- // nasty clutch. during the initial customization
- // hButton isn't assigned into BNTS yet
- if (g_index != -1)
- return g_index;
-
- for (int i = 0; i < SIZEOF(BTNS); i++)
- if (BTNS[i].hButton == hButton)
- return i;
-
- return -1;
-}
-
-static int getLastIndex()
-{
- for (int i = 0; ; i++)
- if (BTNS[i].pszButtonID == NULL)
- return i;
-
- return -1;
-}
-
static void InitDefaultButtons()
{
for (int i = 0; i < SIZEOF(BTNS); i++ ) {
@@ -597,18 +574,14 @@ static void CustomizeToolbar(HANDLE hButton, HWND hWnd, LPARAM)
mir_subclassWindow(hWnd, TSButtonWndProc);
MButtonExtension *bct = (MButtonExtension*)GetWindowLongPtr(hWnd, 0);
- int idx = getButtonIndex(hButton);
- if (idx != -1) { // adding built-in button
- BTNS[idx].hwndButton = hWnd;
- if (BTNS[idx].isAction)
+ if (g_index != -1) { // adding built-in button
+ BTNS[g_index].hwndButton = hWnd;
+ if (BTNS[g_index].isAction)
bct->bSendOnDown = true;
- if (!BTNS[idx].isPush)
+ if (!BTNS[g_index].isPush)
bct->bIsPushBtn = true;
}
else {
- idx = getLastIndex();
- BTNS[idx].hwndButton = hWnd;
- BTNS[idx].pszButtonID = "plugin";
bool bSkinned = cfg::dat.bSkinnedButtonMode != 0;
CustomizeButton(hWnd, bSkinned, !bSkinned, bSkinned, true);
}
diff --git a/plugins/Clist_nicer/src/Include/Version.h b/plugins/Clist_nicer/src/Include/Version.h
index 6e24a0cd7e..74cce7462a 100644
--- a/plugins/Clist_nicer/src/Include/Version.h
+++ b/plugins/Clist_nicer/src/Include/Version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 9
#define __RELEASE_NUM 2
-#define __BUILD_NUM 2
+#define __BUILD_NUM 3
#include <stdver.h>
diff --git a/plugins/Clist_nicer/src/config.cpp b/plugins/Clist_nicer/src/config.cpp
index 96663f2074..2034a7d7e5 100644
--- a/plugins/Clist_nicer/src/config.cpp
+++ b/plugins/Clist_nicer/src/config.cpp
@@ -32,20 +32,20 @@ LIST<TExtraCache> cfg::arCache(100, LIST<TExtraCache>::FTSortFunc(NumericKeySort
bool cfg::shutDown = false;
-TSysConfig API::sysConfig = {0};
-TSysState API::sysState = {0};
+TSysConfig API::sysConfig = {0};
+TSysState API::sysState = {0};
-pfnDwmExtendFrameIntoClientArea_t API::pfnDwmExtendFrameIntoClientArea = 0;
-pfnDwmIsCompositionEnabled_t API::pfnDwmIsCompositionEnabled = 0;
+pfnDwmExtendFrameIntoClientArea_t API::pfnDwmExtendFrameIntoClientArea = 0;
+pfnDwmIsCompositionEnabled_t API::pfnDwmIsCompositionEnabled = 0;
EXCEPTION_RECORD API::exRecord = {0};
-CONTEXT API::exCtx = {0};
-LRESULT API::exLastResult = 0;
-char API::exSzFile[MAX_PATH] = "";
-TCHAR API::exReason[256] = _T("");
-int API::exLine = 0;
-bool API::exAllowContinue = false;
-HMODULE API::hDwm = 0;
+CONTEXT API::exCtx = {0};
+LRESULT API::exLastResult = 0;
+char API::exSzFile[MAX_PATH] = "";
+TCHAR API::exReason[256] = _T("");
+int API::exLine = 0;
+bool API::exAllowContinue = false;
+HMODULE API::hDwm = 0;
void cfg::init()
{