diff options
Diffstat (limited to 'plugins/Scriver')
-rw-r--r-- | plugins/Scriver/src/chat_window.cpp | 42 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.cpp | 6 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.h | 5 | ||||
-rw-r--r-- | plugins/Scriver/src/resource.h | 3 |
5 files changed, 19 insertions, 39 deletions
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp index d0bd3109b5..8bfbe4b327 100644 --- a/plugins/Scriver/src/chat_window.cpp +++ b/plugins/Scriver/src/chat_window.cpp @@ -198,19 +198,19 @@ LRESULT CALLBACK CChatRoomDlg::MessageSubclassProc(HWND hwnd, UINT msg, WPARAM w return TRUE;
if (wParam == 0x4e && isCtrl && !isAlt) { // ctrl-n (nicklist)
- if (IsWindowEnabled(GetDlgItem(GetParent(hwnd), IDC_SHOWNICKLIST)))
- SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(IDC_SHOWNICKLIST, 0), 0);
+ if (pDlg->m_btnNickList.Enabled())
+ pDlg->m_btnNickList.OnClick(&pDlg->m_btnNickList);
return TRUE;
}
if (wParam == 0x48 && isCtrl && !isAlt) { // ctrl-h (history)
- SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(IDC_HISTORY, 0), 0);
+ pDlg->m_btnHistory.OnClick(&pDlg->m_btnHistory);
return TRUE;
}
if (wParam == 0x4f && isCtrl && !isAlt) { // ctrl-o (options)
- if (IsWindowEnabled(GetDlgItem(GetParent(hwnd), IDC_CHANMGR)))
- SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(IDC_CHANMGR, 0), 0);
+ if (pDlg->m_btnChannelMgr.Enabled())
+ pDlg->m_btnChannelMgr.OnClick(&pDlg->m_btnChannelMgr);
return TRUE;
}
@@ -700,15 +700,15 @@ void CChatRoomDlg::MessageDialogResize(int w, int h) ShowWindow(m_nickList.GetHwnd(), SW_HIDE);
if (m_si->iType == GCW_SERVER) {
- m_btnShowList.Enable(false);
+ m_btnNickList.Enable(false);
m_btnFilter.Enable(false);
- m_btnChanMgr.Enable(false);
+ m_btnChannelMgr.Enable(false);
}
else {
- m_btnShowList.Enable(true);
+ m_btnNickList.Enable(true);
m_btnFilter.Enable(true);
if (m_si->iType == GCW_CHATROOM)
- m_btnChanMgr.Enable(pci->MM_FindModule(m_si->pszModule)->bChanMgr);
+ m_btnChannelMgr.Enable(pci->MM_FindModule(m_si->pszModule)->bChanMgr);
}
int toolbarTopY = bToolbar ? h - m_pParent->iSplitterY - toolbarHeight : h - m_pParent->iSplitterY;
@@ -752,19 +752,15 @@ CChatRoomDlg::CChatRoomDlg(SESSION_INFO *si) m_splitterX(this, IDC_SPLITTERX),
m_splitterY(this, IDC_SPLITTERY),
- m_btnOk(this, IDOK),
- m_btnHistory(this, IDC_HISTORY),
- m_btnChanMgr(this, IDC_CHANMGR),
- m_btnShowList(this, IDC_SHOWNICKLIST)
+ m_btnOk(this, IDOK)
{
m_pLog = &m_log;
m_pEntry = &m_message;
m_btnOk.OnClick = Callback(this, &CChatRoomDlg::onClick_Ok);
m_btnFilter.OnClick = Callback(this, &CChatRoomDlg::onClick_Filter);
- m_btnHistory.OnClick = Callback(this, &CChatRoomDlg::onClick_History);
- m_btnChanMgr.OnClick = Callback(this, &CChatRoomDlg::onClick_ChanMgr);
- m_btnShowList.OnClick = Callback(this, &CChatRoomDlg::onClick_ShowList);
+ m_btnChannelMgr.OnClick = Callback(this, &CChatRoomDlg::onClick_ChanMgr);
+ m_btnNickList.OnClick = Callback(this, &CChatRoomDlg::onClick_ShowList);
m_nickList.OnDblClick = Callback(this, &CChatRoomDlg::onDblClick_List);
@@ -948,16 +944,6 @@ void CChatRoomDlg::onClick_Ok(CCtrlButton *pButton) SetFocus(m_message.GetHwnd());
}
-void CChatRoomDlg::onClick_History(CCtrlButton *pButton)
-{
- if (!pButton->Enabled())
- return;
-
- MODULEINFO *pInfo = pci->MM_FindModule(m_si->pszModule);
- if (pInfo)
- ShellExecute(m_hwnd, nullptr, pci->GetChatLogsFilename(m_si, 0), nullptr, nullptr, SW_SHOW);
-}
-
void CChatRoomDlg::onClick_ChanMgr(CCtrlButton *pButton)
{
if (pButton->Enabled())
@@ -1073,7 +1059,7 @@ void CChatRoomDlg::UpdateNickList() void CChatRoomDlg::UpdateOptions()
{
- m_btnShowList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon(m_bNicklistEnabled ? "chat_nicklist" : "chat_nicklist2"));
+ m_btnNickList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon(m_bNicklistEnabled ? "chat_nicklist" : "chat_nicklist2"));
m_btnFilter.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon(m_bFilterEnabled ? "chat_filter" : "chat_filter2"));
{
MODULEINFO *pInfo = pci->MM_FindModule(m_si->pszModule);
@@ -1084,7 +1070,7 @@ void CChatRoomDlg::UpdateOptions() m_btnColor.Enable(pInfo->bColor);
m_btnBkColor.Enable(pInfo->bBkgColor);
if (m_si->iType == GCW_CHATROOM)
- m_btnChanMgr.Enable(pInfo->bChanMgr);
+ m_btnChannelMgr.Enable(pInfo->bChanMgr);
}
}
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 2e0f3c5742..3684c2c52a 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -629,7 +629,6 @@ CSrmmWindow::CSrmmWindow(MCONTACT hContact, bool bIncoming, const char *szInitia m_btnAdd(this, IDC_ADD),
m_btnQuote(this, IDC_QUOTE),
m_btnDetails(this, IDC_DETAILS),
- m_btnHistory(this, IDC_HISTORY),
m_btnUserMenu(this, IDC_USERMENU)
{
m_pLog = &m_log;
@@ -643,7 +642,6 @@ CSrmmWindow::CSrmmWindow(MCONTACT hContact, bool bIncoming, const char *szInitia m_btnAdd.OnClick = Callback(this, &CSrmmWindow::onClick_Add);
m_btnQuote.OnClick = Callback(this, &CSrmmWindow::onClick_Quote);
m_btnDetails.OnClick = Callback(this, &CSrmmWindow::onClick_Details);
- m_btnHistory.OnClick = Callback(this, &CSrmmWindow::onClick_History);
m_btnUserMenu.OnClick = Callback(this, &CSrmmWindow::onClick_UserMenu);
m_message.OnChange = Callback(this, &CSrmmWindow::onChange_Message);
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index a4cc4edb4c..3be8670a67 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -475,7 +475,7 @@ int RegisterToolbarIcons(WPARAM, LPARAM) Srmm_AddButton(&bbd);
bbd.bbbFlags |= BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON;
- bbd.dwButtonID = IDC_HISTORY;
+ bbd.dwButtonID = IDC_SRMM_HISTORY;
bbd.dwDefPos = 50;
bbd.hIcon = IcoLib_GetIconHandle("scriver_HISTORY");
bbd.pwszText = LPGENW("&History");
@@ -520,14 +520,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 = IcoLib_GetIconHandle("chat_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 = IcoLib_GetIconHandle("chat_nicklist");
bbd.pwszText = LPGENW("&Show/hide nick list");
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index 9656a9b54d..5fba8353a2 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -103,7 +103,7 @@ public: class CSrmmWindow : public CScriverWindow
{
CCtrlEdit m_log, m_message;
- CCtrlButton m_btnOk, m_btnAdd, m_btnUserMenu, m_btnQuote, m_btnHistory, m_btnDetails;
+ CCtrlButton m_btnOk, m_btnAdd, m_btnUserMenu, m_btnQuote, m_btnDetails;
CSplitter m_splitter;
wchar_t *m_wszInitialText;
@@ -178,7 +178,7 @@ public: class CChatRoomDlg : public CScriverWindow
{
CCtrlEdit m_message, m_log;
- CCtrlButton m_btnOk, m_btnHistory, m_btnShowList, m_btnChanMgr;
+ CCtrlButton m_btnOk;
CCtrlListBox m_nickList;
CSplitter m_splitterX, m_splitterY;
@@ -213,7 +213,6 @@ public: void onClick_Ok(CCtrlButton*);
void onClick_Filter(CCtrlButton*);
- void onClick_History(CCtrlButton*);
void onClick_ChanMgr(CCtrlButton*);
void onClick_ShowList(CCtrlButton*);
diff --git a/plugins/Scriver/src/resource.h b/plugins/Scriver/src/resource.h index 0e6cdd399c..cd2b9afb0a 100644 --- a/plugins/Scriver/src/resource.h +++ b/plugins/Scriver/src/resource.h @@ -96,7 +96,6 @@ #define IDC_USERELATIVEDATE 1025
#define IDC_USEIEVIEW 1026
#define IDC_FONTSCOLORS 1027
-#define IDC_CHANMGR 1030
#define IDC_SHOWLOGICONS 1032
#define IDC_SHOWTIMES 1033
#define IDC_SHOWDATES 1034
@@ -122,7 +121,6 @@ #define IDC_ADD 1070
#define IDC_USERMENU 1071
#define IDC_QUOTE 1072
-#define IDC_HISTORY 1080
#define IDC_REMEMBER 1082
#define IDC_INFOBAR_NAME 1090
#define IDC_INFOBAR_STATUS 1091
@@ -173,7 +171,6 @@ #define IDC_INPUTLINESSPIN 1648
#define IDC_SPLITTERX 5006
#define IDC_SPLITTERY 5008
-#define IDC_SHOWNICKLIST 5016
#define IDC_CHAT_CHECKBOXES 5021
#define IDC_CHAT_NICKROW 5024
#define IDC_CHAT_LOGLIMIT 5024
|