summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-06 23:12:21 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-06 23:12:21 +0300
commit97d55ca3bede2281dc5b615fb9755195963aa83b (patch)
tree217c39008a698b24d7487a07b46db78b2ab4cac6
parent2edf7b43622a8f29a0bfaf578c30127f933fe2c9 (diff)
forgotten code for processing toolbar button events
-rw-r--r--plugins/Scriver/src/chat/window.cpp6
-rw-r--r--plugins/Scriver/src/msgdialog.cpp6
-rw-r--r--src/core/stdmsg/src/chat_window.cpp10
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp2
-rw-r--r--src/core/stdmsg/src/stdafx.h1
5 files changed, 24 insertions, 1 deletions
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index 81e1b92c12..ce1168ceb6 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -1529,6 +1529,12 @@ LABEL_SHOWWINDOW:
if (!lParam && Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, si->hContact))
break;
+ if (HIWORD(wParam) == BN_CLICKED)
+ if (LOWORD(wParam) >= MIN_CBUTTONID && LOWORD(wParam) <= MAX_CBUTTONID) {
+ Srmm_ClickToolbarIcon(si->hContact, LOWORD(wParam), GetDlgItem(hwndDlg, LOWORD(wParam)), 0);
+ break;
+ }
+
switch (LOWORD(wParam)) {
case IDC_CHAT_LIST:
if (HIWORD(wParam) == LBN_DBLCLK) {
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 0d5ba8e5ad..f6efee312a 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -1516,6 +1516,12 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (!lParam && Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, dat->hContact))
break;
+ if (HIWORD(wParam) == BN_CLICKED)
+ if (LOWORD(wParam) >= MIN_CBUTTONID && LOWORD(wParam) <= MAX_CBUTTONID) {
+ Srmm_ClickToolbarIcon(dat->hContact, LOWORD(wParam), GetDlgItem(hwndDlg, LOWORD(wParam)), 0);
+ break;
+ }
+
switch (LOWORD(wParam)) {
case IDC_SENDALL:
int result;
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index 6bfa86272b..453b979a3a 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -1145,6 +1145,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
SendMessage(hwndButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon));
}
+ NotifyLocalWinEvent(si->hContact, hwndDlg, MSG_WINDOW_EVT_OPENING);
mir_subclassWindow(GetDlgItem(hwndDlg, IDC_SPLITTERX), SplitterSubclassProc);
mir_subclassWindow(GetDlgItem(hwndDlg, IDC_SPLITTERY), SplitterSubclassProc);
mir_subclassWindow(hNickList, NicklistSubclassProc);
@@ -1187,6 +1188,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
SendMessage(hwndDlg, GC_UPDATETITLE, 0, 0);
SendMessage(hwndDlg, GC_SETWINDOWPOS, 0, 0);
}
+ NotifyLocalWinEvent(si->hContact, hwndDlg, MSG_WINDOW_EVT_OPEN);
break;
case GC_SETWNDPROPS:
@@ -2251,6 +2253,12 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
break;
case WM_COMMAND:
+ if (HIWORD(wParam) == BN_CLICKED)
+ if (LOWORD(wParam) >= MIN_CBUTTONID && LOWORD(wParam) <= MAX_CBUTTONID) {
+ Srmm_ClickToolbarIcon(si->hContact, LOWORD(wParam), GetDlgItem(hwndDlg, LOWORD(wParam)), 0);
+ break;
+ }
+
switch (LOWORD(wParam)) {
case IDC_LIST:
if (HIWORD(wParam) == LBN_DBLCLK) {
@@ -2484,6 +2492,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
break;
case WM_DESTROY:
+ NotifyLocalWinEvent(si->hContact, hwndDlg, MSG_WINDOW_EVT_CLOSING);
SendMessage(hwndDlg, GC_SAVEWNDPOS, 0, 0);
si->hWnd = NULL;
@@ -2492,6 +2501,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
si->hwndStatus = NULL;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
+ NotifyLocalWinEvent(si->hContact, hwndDlg, MSG_WINDOW_EVT_CLOSE);
break;
}
return FALSE;
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index da30d9a647..65ab69b1b2 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -36,7 +36,7 @@ static void UpdateReadChars(HWND hwndDlg, HWND hwndStatus);
static const UINT infoLineControls[] = { IDC_PROTOCOL, IDC_NAME };
static const UINT sendControls[] = { IDC_MESSAGE };
-static void NotifyLocalWinEvent(MCONTACT hContact, HWND hwnd, unsigned int type)
+void NotifyLocalWinEvent(MCONTACT hContact, HWND hwnd, unsigned int type)
{
if (hContact != NULL && hwnd != NULL) {
MessageWindowEventData mwe = { 0 };
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h
index 8b3c9e400c..5ad3eaaf4a 100644
--- a/src/core/stdmsg/src/stdafx.h
+++ b/src/core/stdmsg/src/stdafx.h
@@ -159,6 +159,7 @@ bool LoadMessageFont(LOGFONT *lf, COLORREF *colour);
// message.c
char* Message_GetFromStream(HWND hwndDlg, SESSION_INFO *si);
+void NotifyLocalWinEvent(MCONTACT hContact, HWND hwnd, unsigned int type);
BOOL TabM_AddTab(const wchar_t *pszID, const char* pszModule);
BOOL TabM_RemoveAll(void);