summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp2
-rw-r--r--plugins/HistoryPlusPlus/hpp_messages.pas16
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp30
-rw-r--r--plugins/WhenWasIt/src/dlg_handlers.cpp15
4 files changed, 16 insertions, 47 deletions
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index c290465a79..7ae91cb6f7 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -87,7 +87,7 @@ void Popup_DoAction(HWND hWnd, BYTE Action, PLUGIN_DATA *pdata)
switch (Action) {
case PCA_OPENMESSAGEWND: // open message window
if (hContact && hContact != INVALID_CONTACT_ID)
- CallServiceSync(ServiceExists("SRMsg/LaunchMessageWindow") ? "SRMsg/LaunchMessageWindow" : MS_MSG_SENDMESSAGE, hContact, 0);
+ CallServiceSync(MS_MSG_SENDMESSAGE, hContact, 0);
break;
case PCA_OPENMENU: // open contact menu
diff --git a/plugins/HistoryPlusPlus/hpp_messages.pas b/plugins/HistoryPlusPlus/hpp_messages.pas
index 23f5f6bfdb..8cd67bbb8d 100644
--- a/plugins/HistoryPlusPlus/hpp_messages.pas
+++ b/plugins/HistoryPlusPlus/hpp_messages.pas
@@ -58,20 +58,8 @@ function SendMessageTo(hContact: THandle; const Text: String): Boolean;
var
buff: AnsiString;
begin
- if boolean(ServiceExists(MS_MSG_SENDMESSAGEW)) then
- Result := (CallService(MS_MSG_SENDMESSAGEW,WPARAM(hContact),LPARAM(PChar(Text))) = 0)
- else
- begin
- buff := AnsiString(Text);
- Result := (CallService(MS_MSG_SENDMESSAGE,WPARAM(hContact),LPARAM(PAnsiChar(buff))) = 0);
- if not Result then
- Result := (CallService('SRMsg/LaunchMessageWindow',WPARAM(hContact),LPARAM(PAnsiChar(buff))) = 0);
- end;
+ buff := AnsiString(Text);
+ Result := (CallService(MS_MSG_SENDMESSAGE,WPARAM(hContact),LPARAM(PAnsiChar(buff))) = 0);
end;
-{function ForwardMessage(Text: AnsiString): Boolean;
-begin
- Result := (CallService(MS_MSG_FORWARDMESSAGE,0,LPARAM(PAnsiChar(Text)))=0);
-end;}
-
end.
diff --git a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp
index 79f255541e..4f6f141212 100644
--- a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp
@@ -35,7 +35,8 @@ INT_PTR (*g_MirCallService)(const char *, WPARAM, LPARAM)=NULL;
//---------------------------------------------------------------------------
CSendHTTPServer::CSendHTTPServer(HWND Owner, MCONTACT hContact, bool /*bAsync*/)
-: CSend(Owner, hContact, true){
+ : CSend(Owner, hContact, true)
+{
m_EnableItem = SS_DLG_DESCRIPTION ; //| SS_DLG_AUTOSEND | SS_DLG_DELETEAFTERSSEND;
m_pszSendTyp = LPGENT("HTTPServer transfer");
m_pszFileName = NULL;
@@ -43,7 +44,8 @@ CSendHTTPServer::CSendHTTPServer(HWND Owner, MCONTACT hContact, bool /*bAsync*/)
m_fsi_pszRealPath = NULL;
}
-CSendHTTPServer::~CSendHTTPServer(){
+CSendHTTPServer::~CSendHTTPServer()
+{
mir_free(m_pszFileName);
mir_free(m_fsi_pszSrvPath);
mir_free(m_fsi_pszRealPath);
@@ -80,7 +82,8 @@ int CSendHTTPServer::Send()
return 0;
}
-void CSendHTTPServer::SendThread() {
+void CSendHTTPServer::SendThread()
+{
INT_PTR ret;
if (ServiceExists(MS_HTTP_GET_LINK)) {
@@ -98,7 +101,7 @@ void CSendHTTPServer::SendThread() {
//send DATA and wait for reply
ret = CallService(MS_HTTP_ADD_CHANGE_REMOVE, (WPARAM)m_hContact, (LPARAM)&m_fsi);
}
-
+
if (ret != 0) {
Error(LPGENT("%s (%i):\nCould not add a share to the HTTP Server plugin."),TranslateTS(m_pszSendTyp),ret);
Exit(ret); return;
@@ -113,22 +116,7 @@ void CSendHTTPServer::SendThread() {
Exit(ACKRESULT_FAILED);
}
-void CSendHTTPServer::SendThreadWrapper(void * Obj) {
+void CSendHTTPServer::SendThreadWrapper(void * Obj)
+{
reinterpret_cast<CSendHTTPServer*>(Obj)->SendThread();
}
-
-//---------------------------------------------------------------------------
-/*
-CSendHTTPServer::CContactMapping CSendHTTPServer::_CContactMapping;
-INT_PTR CSendHTTPServer::MyCallService(const char *name, WPARAM wParam, LPARAM lParam) {
-/ *
- CContactMapping::iterator Contact(_CContactMapping.end());
- if ( wParam == m_hContact && (
- (mir_strcmp(name, MS_MSG_SENDMESSAGE)== 0) ||
- (mir_strcmp(name, "SRMsg/LaunchMessageWindow")== 0) ))
- {
- m_URL= mir_strdup((char*)lParam);
- return 0;
- }* /
- return g_MirCallService(name, wParam, lParam);
-}*/
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp
index 65ba3dcd34..8808b4b7b0 100644
--- a/plugins/WhenWasIt/src/dlg_handlers.cpp
+++ b/plugins/WhenWasIt/src/dlg_handlers.cpp
@@ -968,22 +968,15 @@ INT_PTR CALLBACK DlgProcUpcoming(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar
return 0;
}
-void __cdecl OpenMessageWindowThread(void *data)
-{
- MCONTACT hContact = (MCONTACT)data;
- CallServiceSync(MS_MSG_SENDMESSAGE, hContact, 0);
- CallServiceSync("SRMsg/LaunchMessageWindow", hContact, 0);
-}
-
int HandlePopupClick(HWND hWnd, int action)
{
+ MCONTACT hContact;
+
switch (action) {
case 2: //OPEN MESSAGE WINDOW
- {
- MCONTACT hContact = (MCONTACT)PUGetContact(hWnd);
+ hContact = (MCONTACT)PUGetContact(hWnd);
if (hContact)
- HANDLE thread = mir_forkthread(OpenMessageWindowThread, (void*)hContact);
- }//fallthrough
+ CallServiceSync(MS_MSG_SENDMESSAGE, hContact, 0);
case 1: //DISMISS
PUDeletePopup(hWnd);