diff options
author | George Hazan <ghazan@miranda.im> | 2017-11-02 20:40:32 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-11-02 20:40:32 +0300 |
commit | 5797a7f1443a3596017c7fa9b5a4815682ba3cec (patch) | |
tree | 3da2a13d60ac173d8e08fade0831252d36f6517c | |
parent | 8e436ee2cd6d226ba8c82f8493e77c66d3fb95da (diff) |
no need to wipe out toolbar buttons anymore
-rw-r--r-- | include/m_message.h | 2 | ||||
-rw-r--r-- | include/m_srmm_int.h | 2 | ||||
-rw-r--r-- | src/mir_app/src/srmm_toolbar.cpp | 9 |
3 files changed, 6 insertions, 7 deletions
diff --git a/include/m_message.h b/include/m_message.h index 9c9e421f50..3b484a8cb0 100644 --- a/include/m_message.h +++ b/include/m_message.h @@ -228,7 +228,7 @@ struct StatusIconClickData struct BBButton
{
const char *pszModuleName; // module name without spaces and underline symbols (e.g. "tabsrmm")
- DWORD dwButtonID; // your button ID, will be combined with pszModuleName for storing settings, etc...
+ int dwButtonID; // your button ID, will be combined with pszModuleName for storing settings, etc...
const wchar_t *pwszText; // button's text, might be NULL
const wchar_t *pwszTooltip; // button's tooltip, might be NULL
diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h index 9c7770d955..4cb529a47e 100644 --- a/include/m_srmm_int.h +++ b/include/m_srmm_int.h @@ -78,7 +78,7 @@ EXTERN_C MIR_APP_DLL(CustomButtonData*) Srmm_GetNthButton(int i); EXTERN_C MIR_APP_DLL(int) Srmm_GetButtonCount(void); // emulates a click on a toolbar button -EXTERN_C MIR_APP_DLL(void) Srmm_ClickToolbarIcon(MCONTACT hContact, DWORD idFrom, HWND hwndFrom, BOOL code); +EXTERN_C MIR_APP_DLL(void) Srmm_ClickToolbarIcon(MCONTACT hContact, int idFrom, HWND hwndFrom, BOOL code); // these messages are sent to the message windows if toolbar buttons are changed #define WM_CBD_FIRST (WM_USER+0x600) diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp index 1785f4d051..9d05d9c202 100644 --- a/src/mir_app/src/srmm_toolbar.cpp +++ b/src/mir_app/src/srmm_toolbar.cpp @@ -46,8 +46,8 @@ static int SortButtons(const CustomButtonData *p1, const CustomButtonData *p2) static LIST<CustomButtonData> arButtonsList(1, SortButtons); -DWORD LastCID = MIN_CBUTTONID; -DWORD dwSepCount = 0; +int LastCID = MIN_CBUTTONID; +int dwSepCount = 0; static mir_cs csToolBar; static HANDLE hHookToolBarLoadedEvt, hHookButtonPressedEvt; @@ -69,7 +69,7 @@ static void CB_RegisterSeparators() { BBButton bbd = {}; bbd.pszModuleName = "Tabsrmm_sep"; - for (DWORD i = 0; dwSepCount > i; i++) { + for (int i = 0; dwSepCount > i; i++) { bbd.bbbFlags = BBBF_ISSEPARATOR | BBBF_ISIMBUTTON; bbd.dwButtonID = i + 1; bbd.dwDefPos = 410 + i; @@ -285,7 +285,7 @@ MIR_APP_DLL(int) Srmm_ModifyButton(BBButton *bbdi) return 0; } -MIR_APP_DLL(void) Srmm_ClickToolbarIcon(MCONTACT hContact, DWORD idFrom, HWND hwndDlg, BOOL code) +MIR_APP_DLL(void) Srmm_ClickToolbarIcon(MCONTACT hContact, int idFrom, HWND hwndDlg, BOOL code) { bool bFromArrow = false; HWND hwndFrom = nullptr; @@ -686,7 +686,6 @@ public: void btnResetClicked(void*) { db_delete_module(0, MODULENAME); - WindowList_Broadcast(g_hWindowList, WM_CBD_REMOVED, 0, 0); Srmm_ResetToolbar(); qsort(arButtonsList.getArray(), arButtonsList.getCount(), sizeof(void*), sstSortButtons); |