summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index 4858eba251..5c96538e40 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -589,11 +589,11 @@ public:
SaveTree();
CB_ReInitCustomButtons();
- BYTE newGap = (BYTE)SendDlgItemMessage(m_hwnd, IDC_SPIN1, UDM_GETPOS, 0, 0);
- if (newGap != db_get_b(NULL, MODULENAME, "ButtonsBarGap", 1))
+ WORD newGap = m_gap.GetPosition();
+ if (newGap != db_get_b(NULL, MODULENAME, "ButtonsBarGap", 1)) {
WindowList_BroadcastAsync(chatApi.hWindowList, WM_SIZE, 0, 0);
-
- db_set_b(0, MODULENAME, "ButtonsBarGap", newGap);
+ db_set_b(0, MODULENAME, "ButtonsBarGap", newGap);
+ }
BuildMenuObjectsTree();
@@ -613,6 +613,7 @@ public:
db_delete_module(NULL, MODULENAME);
CB_HardReInit();
BuildMenuObjectsTree();
+ NotifyChange();
}
void btnSeparatorClicked(void*)
@@ -640,6 +641,7 @@ public:
hItem = m_toolBar.InsertItem(&tvis);
m_toolBar.SetCheckState(hItem, (cbd->m_bIMButton || cbd->m_bChatButton));
+ NotifyChange();
}
void OnTreeSelChanging(void*)
@@ -736,6 +738,13 @@ void KillModuleToolbarIcons(int _hLang)
static int SrmmModulesLoaded(WPARAM, LPARAM)
{
HookEvent(ME_OPT_INITIALISE, SrmmOptionsInit);
+ return 0;
+}
+
+static INT_PTR SrmmLoadToolbar(WPARAM wParam, LPARAM)
+{
+ CallService(MS_SYSTEM_REMOVEWAIT, wParam, 0);
+ CloseHandle((HANDLE)wParam);
NotifyEventHooks(hHookToolBarLoadedEvt, 0, 0);
return 0;
@@ -755,6 +764,10 @@ void LoadSrmmToolbarModule()
{
HookEvent(ME_SYSTEM_MODULESLOADED, SrmmModulesLoaded);
+ HANDLE hEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
+ CreateServiceFunction("Srmm/LoadToolbar", SrmmLoadToolbar);
+ CallService(MS_SYSTEM_WAITONHANDLE, (WPARAM)hEvent, (LPARAM)"Srmm/LoadToolbar");
+
hHookButtonPressedEvt = CreateHookableEvent(ME_MSG_BUTTONPRESSED);
hHookToolBarLoadedEvt = CreateHookableEvent(ME_MSG_TOOLBARLOADED);