summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-28 15:12:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-28 15:12:27 +0300
commit3ffc894a7a132a013e74fe063b72d79e17c998dc (patch)
tree83f08037d2f840f72d79d393fdd20916e6cf6858
parent1e49d6b2cb3812d8e80051cbb3d44891e6532825 (diff)
we don't need the uFlags field either
-rw-r--r--include/delphi/m_message.inc11
-rw-r--r--include/m_message.h1
-rw-r--r--plugins/Dropbox/src/dropbox_utils.cpp2
-rw-r--r--plugins/KeyboardNotify/src/main.cpp2
-rw-r--r--plugins/MirLua/src/m_message.cpp2
-rw-r--r--plugins/Scriver/src/msgs.cpp3
-rw-r--r--plugins/Sessions/Src/Main.cpp1
-rw-r--r--plugins/TabSRMM/src/msgs.cpp11
-rw-r--r--src/core/stdmsg/src/msgs.cpp1
9 files changed, 4 insertions, 30 deletions
diff --git a/include/delphi/m_message.inc b/include/delphi/m_message.inc
index 5ce79317af..249f5e1462 100644
--- a/include/delphi/m_message.inc
+++ b/include/delphi/m_message.inc
@@ -47,11 +47,6 @@ const
MSG_WINDOW_EVT_OPEN = 2; // window has been opened
MSG_WINDOW_EVT_CLOSING = 3; // window is about to be closed
MSG_WINDOW_EVT_CLOSE = 4; // window has been closed
- MSG_WINDOW_EVT_CUSTOM = 5; // custom event for message plugins to use
- // (custom uFlags may be used)
- MSG_WINDOW_UFLAG_MSG_FROM = $00000001;
- MSG_WINDOW_UFLAG_MSG_TO = $00000002;
- MSG_WINDOW_UFLAG_MSG_BOTH = $00000004;
const
{ wparam=0
@@ -68,8 +63,7 @@ const
MS_MSG_GETWINDOWCLASS:PAnsiChar = 'MessageAPI/WindowClass';
const
- MSG_WINDOW_STATE_EXISTS = $00000001; // Window exists should always be true
- // if hwndWindow exists
+ MSG_WINDOW_STATE_EXISTS = $00000001; // Window exists should always be true if hwndWindow exists
MSG_WINDOW_STATE_VISIBLE = $00000002;
MSG_WINDOW_STATE_FOCUS = $00000004;
MSG_WINDOW_STATE_ICONIC = $00000008;
@@ -77,9 +71,6 @@ const
type
PMessageWindowOutputData = ^TMessageWindowOutputData;
TMessageWindowOutputData = record
- hContact : TMCONTACT;
- uFlags : int; // should be same as input data unless 0, then it
- // will be the actual type
hwndWindow: HWND; // top level window for the contact or NULL if no window exists
uState : int; // see window states
local : pointer; // used to store pointer to custom data
diff --git a/include/m_message.h b/include/m_message.h
index 472e6a8f61..87fb73d92c 100644
--- a/include/m_message.h
+++ b/include/m_message.h
@@ -83,7 +83,6 @@ struct StatusTextData
struct MessageWindowData
{
- int uFlags; // should be same as input data unless 0, then it will be the actual type
HWND hwndWindow; //top level window for the contact or NULL if no window exists
int uState; // see window states
void *local; // used to store pointer to custom data
diff --git a/plugins/Dropbox/src/dropbox_utils.cpp b/plugins/Dropbox/src/dropbox_utils.cpp
index 4872e917f4..3aacbc9267 100644
--- a/plugins/Dropbox/src/dropbox_utils.cpp
+++ b/plugins/Dropbox/src/dropbox_utils.cpp
@@ -116,7 +116,7 @@ void CDropbox::SendToContact(MCONTACT hContact, const wchar_t *data)
void CDropbox::PasteToInputArea(MCONTACT hContact, const wchar_t *data)
{
- MessageWindowData mwd = { sizeof(MessageWindowData) };
+ MessageWindowData mwd;
if (!CallService(MS_MSG_GETWINDOWDATA, hContact, (LPARAM)&mwd)) {
HWND hEdit = GetDlgItem(mwd.hwndWindow, 1002 /*IDC_MESSAGE*/);
if (!hEdit) hEdit = GetDlgItem(mwd.hwndWindow, 1009 /*IDC_CHATMESSAGE*/);
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index 277ae0e0f4..4aad0b4575 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -842,7 +842,7 @@ void createEventPrefix(wchar_t *prefixName, size_t maxLen)
BOOL CheckMsgWnd(MCONTACT hContact, BOOL *focus)
{
if (hContact) {
- MessageWindowData mwd = { sizeof(MessageWindowData) };
+ MessageWindowData mwd;
if (!CallService(MS_MSG_GETWINDOWDATA, hContact, (LPARAM)&mwd) && mwd.hwndWindow) {
*focus = mwd.uState & MSG_WINDOW_STATE_FOCUS;
return TRUE;
diff --git a/plugins/MirLua/src/m_message.cpp b/plugins/MirLua/src/m_message.cpp
index c21d71335c..a7f4be9729 100644
--- a/plugins/MirLua/src/m_message.cpp
+++ b/plugins/MirLua/src/m_message.cpp
@@ -5,7 +5,7 @@ static int message_Paste(lua_State *L)
MCONTACT hContact = luaL_checkinteger(L, 1);
ptrW text(mir_utf8decodeW(luaL_checkstring(L, 2)));
- MessageWindowData mwd = { sizeof(MessageWindowData) };
+ MessageWindowData mwd;
INT_PTR res = CallService(MS_MSG_GETWINDOWDATA, hContact, (LPARAM)&mwd);
lua_pushinteger(L, res);
if (res)
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index b0c52cad36..7f15fcaff5 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -293,9 +293,6 @@ static INT_PTR GetWindowData(WPARAM hContact, LPARAM lParam)
return 1;
HWND hwnd = WindowList_Find(pci->hWindowList, hContact);
- if (hwnd == nullptr)
- hwnd = SM_FindWindowByContact(hContact);
- mwd->uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
mwd->hwndWindow = hwnd;
mwd->local = 0;
mwd->uState = SendMessage(hwnd, DM_GETWINDOWSTATE, 0, 0);
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 93955d9011..7e0d69efaf 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -396,7 +396,6 @@ INT_PTR CloseCurrentSession(WPARAM, LPARAM)
{
while (session_list[0] != 0) {
MessageWindowData mwd;
- mwd.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
CallService(MS_MSG_GETWINDOWDATA, session_list[0], (LPARAM)&mwd);
SendMessage(mwd.hwndWindow, WM_CLOSE, 0, 0);
}
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 136c85e07d..edc495cc93 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -75,7 +75,6 @@ static INT_PTR GetWindowData(WPARAM hContact, LPARAM lParam)
HWND hwnd = M.FindWindow(hContact);
if (hwnd) {
- mwd->uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
mwd->hwndWindow = hwnd;
mwd->local = GetParent(GetParent(hwnd));
SendMessage(hwnd, DM_GETWINDOWSTATE, 0, 0);
@@ -83,16 +82,6 @@ static INT_PTR GetWindowData(WPARAM hContact, LPARAM lParam)
return 0;
}
- SESSION_INFO *si = SM_FindSessionByHCONTACT(hContact);
- if (si != nullptr && si->pDlg != nullptr) {
- mwd->uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
- mwd->hwndWindow = si->pDlg->GetHwnd();
- mwd->local = GetParent(GetParent(si->pDlg->GetHwnd()));
- SendMessage(si->pDlg->GetHwnd(), DM_GETWINDOWSTATE, 0, 0);
- mwd->uState = GetWindowLongPtr(si->pDlg->GetHwnd(), DWLP_MSGRESULT);
- return 0;
- }
-
memset(mwd, 0, sizeof(*mwd));
return 1;
}
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 80463aa7a5..d0f70ba10d 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -505,7 +505,6 @@ static INT_PTR GetWindowData(WPARAM hContact, LPARAM lParam)
return 1;
HWND hwnd = WindowList_Find(pci->hWindowList, hContact);
- mwd->uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
mwd->hwndWindow = hwnd;
mwd->local = 0;
mwd->uState = MSG_WINDOW_STATE_EXISTS;