summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-08-15 13:49:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-08-15 13:49:37 +0300
commitf52b5cc86d9eff2494902157c8fc0a4e019a3c95 (patch)
tree9f668bf7b89decd53757589d74e476aac81eb451 /include
parentd05dd78157058eea348f0d7666c7c6b0570ef25b (diff)
fixes #799 (Crash on receiving msg in FB group chat)
Diffstat (limited to 'include')
-rw-r--r--include/delphi/m_message.inc19
-rw-r--r--include/m_chat_int.h1
-rw-r--r--include/m_message.h18
3 files changed, 9 insertions, 29 deletions
diff --git a/include/delphi/m_message.inc b/include/delphi/m_message.inc
index 764287720a..c564f602f6 100644
--- a/include/delphi/m_message.inc
+++ b/include/delphi/m_message.inc
@@ -78,19 +78,10 @@ type
function Srmm_GetWindowData(hContact:TMCONTACT; pResult:PMessageWindowData) : int; stdcall; external AppDll;
-type
- PStatusTextData = ^TStatusTextData;
- TStatusTextData = record
- hIcon :HICON;
- tszText:array [0..99] of WideChar;
- end;
-
-{ wparam=(TMCONTACT)hContact
- lparam=PStatusTextData or NIL to clear statusbar
- Sets a statusbar line text for the appropriate contact
+{ wparam=0(unused)
+ lparam=(pMessageWindowEvent) event written
+ fired before SRMM writes an entered message into the database
}
-const
- MS_MSG_SETSTATUSTEXT:PAnsiChar = 'MessageAPI/SetStatusText';
type
pMessageWindowEvent = ^tMessageWindowEvent;
@@ -101,10 +92,6 @@ type
end;
const
-{ wparam=0(unused)
- lparam=(pMessageWindowEvent) event written
- fired before SRMM writes an entered message into the database
-}
ME_MSG_PRECREATEEVENT:PAnsiChar = 'MessageAPI/PreCreateEvent';
{ wParam = 0
diff --git a/include/m_chat_int.h b/include/m_chat_int.h
index 83d81e3405..c1bee5babe 100644
--- a/include/m_chat_int.h
+++ b/include/m_chat_int.h
@@ -457,6 +457,7 @@ public:
virtual void LoadSettings() PURE;
virtual void RedrawLog() {}
virtual void ScrollToBottom() {}
+ virtual void SetStatusText(const wchar_t*, HICON) {}
virtual void ShowFilterMenu() {}
virtual void StreamInEvents(LOGINFO*, bool) {}
virtual void UpdateNickList() {}
diff --git a/include/m_message.h b/include/m_message.h
index 1af56057d0..f892f10219 100644
--- a/include/m_message.h
+++ b/include/m_message.h
@@ -68,19 +68,6 @@ struct MessageWindowEventData
#define ME_MSG_WINDOWEVENT "MessageAPI/WindowEvent"
/////////////////////////////////////////////////////////////////////////////////////////
-// wparam = (MCONTACT)hContact
-// lparam = (StatusTextData*) or NULL to clear statusbar
-// Sets a statusbar line text for the appropriate contact
-
-struct StatusTextData
-{
- HICON hIcon;
- wchar_t tszText[100];
-};
-
-#define MS_MSG_SETSTATUSTEXT "MessageAPI/SetStatusText"
-
-/////////////////////////////////////////////////////////////////////////////////////////
// retrieves some particular info about a SRMM window by contact
// returns 0 if a window was found or an error code otherwise
@@ -99,6 +86,11 @@ struct MessageWindowData
EXTERN_C MIR_APP_DLL(int) Srmm_GetWindowData(MCONTACT hContact, MessageWindowData &mwd);
/////////////////////////////////////////////////////////////////////////////////////////
+// sets the status text & icon in a window associated with hContact
+
+EXTERN_C MIR_APP_DLL(void) Srmm_SetStatusText(MCONTACT hContact, const wchar_t *wszText, HICON hIcon = nullptr);
+
+/////////////////////////////////////////////////////////////////////////////////////////
// wparam = 0 (unused)
// lparam = (MessageWindowEvent*)
// fired before SRMM writes an entered message into the database