From 429859059db4093bf95dbe2695e205025dd7b3a7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 22 Mar 2017 18:15:07 +0300 Subject: Channel Manager button went to core --- src/core/stdmsg/src/msgs.cpp | 4 ++-- src/mir_app/src/mir_app.def | 1 + src/mir_app/src/mir_app64.def | 1 + src/mir_app/src/srmm_base.cpp | 7 +++++++ 4 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 906b0270a4..96e5600d9e 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -352,14 +352,14 @@ int RegisterToolbarIcons(WPARAM, LPARAM) Srmm_AddButton(&bbd); bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID; - bbd.dwButtonID = IDC_CHANMGR; + bbd.dwButtonID = IDC_SRMM_CHANMGR; bbd.dwDefPos = 30; bbd.hIcon = GetIconHandle("settings"); bbd.pwszText = LPGENW("&Room settings"); bbd.pwszTooltip = LPGENW("Control this room (CTRL+O)"); Srmm_AddButton(&bbd); - bbd.dwButtonID = IDC_SHOWNICKLIST; + bbd.dwButtonID = IDC_SRMM_NICKLIST; bbd.dwDefPos = 20; bbd.hIcon = GetIconHandle("nicklist"); bbd.pwszText = LPGENW("&Show/hide nick list"); diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 08d7355403..d4f666b55d 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -431,3 +431,4 @@ Chat_UpdateOptions @418 NONAME ?RefreshButtonStatus@CSrmmBaseDialog@@IAEXXZ @433 NONAME ?ProcessHotkeys@CSrmmBaseDialog@@IAE_NH_N00@Z @434 NONAME ?onClick_History@CSrmmBaseDialog@@IAEXPAVCCtrlButton@@@Z @435 NONAME +?onClick_ChanMgr@CSrmmBaseDialog@@IAEXPAVCCtrlButton@@@Z @436 NONAME diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 380bc88347..bfced357d5 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -431,3 +431,4 @@ Chat_UpdateOptions @418 NONAME ?RefreshButtonStatus@CSrmmBaseDialog@@IEAAXXZ @433 NONAME ?ProcessHotkeys@CSrmmBaseDialog@@IEAA_NH_N00@Z @434 NONAME ?onClick_History@CSrmmBaseDialog@@IEAAXPEAVCCtrlButton@@@Z @435 NONAME +?onClick_ChanMgr@CSrmmBaseDialog@@IEAAXPEAVCCtrlButton@@@Z @436 NONAME diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index faf40ef1b3..a527c3cbc4 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -57,6 +57,7 @@ CSrmmBaseDialog::CSrmmBaseDialog(HINSTANCE hInst, int idDialog, SESSION_INFO *si m_btnBold.OnClick = m_btnItalic.OnClick = m_btnUnderline.OnClick = Callback(this, &CSrmmBaseDialog::onClick_BIU); m_btnHistory.OnClick = Callback(this, &CSrmmBaseDialog::onClick_History); + m_btnChannelMgr.OnClick = Callback(this, &CSrmmBaseDialog::onClick_ChanMgr); if (si) { m_hContact = si->hContact; @@ -331,6 +332,12 @@ void CSrmmBaseDialog::onClick_History(CCtrlButton *pButton) else CallService(MS_HISTORY_SHOWCONTACTHISTORY, m_hContact, 0); } +void CSrmmBaseDialog::onClick_ChanMgr(CCtrlButton *pButton) +{ + if (pButton->Enabled()) + DoEventHook(GC_USER_CHANMGR, nullptr, nullptr, 0); +} + ///////////////////////////////////////////////////////////////////////////////////////// bool CSrmmBaseDialog::ProcessHotkeys(int key, bool isShift, bool isCtrl, bool isAlt) -- cgit v1.2.3