From eea8926b61889ea80c76f9fb6b5bf5d1afe6c6eb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 27 Dec 2013 18:53:50 +0000 Subject: old nasty perversion EVENTTYPE_STATUSCHANGE removed forever git-svn-id: http://svn.miranda-ng.org/main/trunk@7396 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdmsg/src/msgdialog.cpp | 36 +----------------------------------- src/core/stdmsg/src/msglog.cpp | 7 ++----- src/core/stdmsg/src/msgs.h | 1 - 3 files changed, 3 insertions(+), 41 deletions(-) (limited to 'src/core/stdmsg') diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index d43bb152e7..c17ecab0be 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -1161,40 +1161,6 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP SendMessage(hwndDlg, DM_UPDATEWINICON, 0, 0); } - // log - if ((dat->wStatus != dat->wOldStatus || lParam != 0) && - db_get_b(NULL, SRMMMOD, SRMSGSET_SHOWSTATUSCH, SRMSGDEFSET_SHOWSTATUSCH)) { - TCHAR buffer[200]; - int iLen; - - TCHAR *szOldStatus = pcli->pfnGetStatusModeDescription(dat->wOldStatus, 0); - TCHAR *szNewStatus = pcli->pfnGetStatusModeDescription(dat->wStatus, 0); - - if (dat->wStatus == ID_STATUS_OFFLINE) { - iLen = mir_sntprintf(buffer, SIZEOF(buffer), TranslateT("signed off (was %s)"), szOldStatus); - SendMessage(hwndDlg, DM_TYPING, 0, 0); - } - else if (dat->wOldStatus == ID_STATUS_OFFLINE) - iLen = mir_sntprintf(buffer, SIZEOF(buffer), TranslateT("signed on (%s)"), szNewStatus); - else - iLen = mir_sntprintf(buffer, SIZEOF(buffer), TranslateT("is now %s (was %s)"), szNewStatus, szOldStatus); - - char* blob = ( char* )alloca(1000); - int ansiLen = WideCharToMultiByte(CP_ACP, 0, buffer, -1, blob, 1000, 0, 0); - memcpy( blob+ansiLen, buffer, sizeof(TCHAR)*(iLen+1)); - - DBEVENTINFO dbei = { sizeof(dbei) }; - dbei.cbBlob = ansiLen + sizeof(TCHAR)*(iLen+1); - dbei.pBlob = (PBYTE) blob; - dbei.eventType = EVENTTYPE_STATUSCHANGE; - dbei.timestamp = (DWORD)time(NULL); - dbei.szModule = dat->szProto; - HANDLE hNewEvent = db_event_add(dat->hContact, &dbei); - if (dat->hDbEventFirst == NULL) { - dat->hDbEventFirst = hNewEvent; - SendMessage(hwndDlg, DM_REMAKELOG, 0, 0); - } - } dat->wOldStatus = dat->wStatus; } } @@ -1386,7 +1352,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP else SendMessage(hwndDlg, DM_REMAKELOG, 0, 0); - if ( !(dbei.flags & DBEF_SENT) && dbei.eventType != EVENTTYPE_STATUSCHANGE) { + if ( !(dbei.flags & DBEF_SENT)) { if (GetActiveWindow() == hwndDlg && GetForegroundWindow() == hwndDlg) { HWND hwndLog = GetDlgItem(hwndDlg, IDC_LOG); if (GetWindowLongPtr(hwndLog, GWL_STYLE) & WS_VSCROLL) { diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index 53f1ef7582..c18fe893a9 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -256,7 +256,6 @@ int DbEventIsShown(DBEVENTINFO * dbei, SrmmWindowData *dat) return 1; case EVENTTYPE_JABBER_CHATSTATES: case EVENTTYPE_JABBER_PRESENCE: - case EVENTTYPE_STATUSCHANGE: case EVENTTYPE_FILE: return (dbei->flags & DBEF_READ) == 0; } @@ -285,7 +284,7 @@ static char *CreateRTFFromDbEvent(SrmmWindowData *dat, HANDLE hContact, HANDLE h db_event_markRead(hContact, hDbEvent); CallService(MS_CLIST_REMOVEEVENT, (WPARAM) hContact, (LPARAM) hDbEvent); } - else if (dbei.eventType == EVENTTYPE_STATUSCHANGE || dbei.eventType == EVENTTYPE_JABBER_CHATSTATES || dbei.eventType == EVENTTYPE_JABBER_PRESENCE) { + else if (dbei.eventType == EVENTTYPE_JABBER_CHATSTATES || dbei.eventType == EVENTTYPE_JABBER_PRESENCE) { db_event_markRead(hContact, hDbEvent); } bufferEnd = 0; @@ -324,7 +323,6 @@ static char *CreateRTFFromDbEvent(SrmmWindowData *dat, HANDLE hContact, HANDLE h case EVENTTYPE_JABBER_CHATSTATES: case EVENTTYPE_JABBER_PRESENCE: - case EVENTTYPE_STATUSCHANGE: case EVENTTYPE_FILE: default: i = LOGICON_MSG_NOTICE; @@ -354,7 +352,7 @@ static char *CreateRTFFromDbEvent(SrmmWindowData *dat, HANDLE hContact, HANDLE h showColon = 1; } - if (!(g_dat.flags&SMF_HIDENAMES) && dbei.eventType != EVENTTYPE_STATUSCHANGE && dbei.eventType != EVENTTYPE_JABBER_CHATSTATES && dbei.eventType != EVENTTYPE_JABBER_PRESENCE) { + if (!(g_dat.flags & SMF_HIDENAMES) && dbei.eventType != EVENTTYPE_JABBER_CHATSTATES && dbei.eventType != EVENTTYPE_JABBER_PRESENCE) { TCHAR* szName; CONTACTINFO ci = {0}; @@ -392,7 +390,6 @@ static char *CreateRTFFromDbEvent(SrmmWindowData *dat, HANDLE hContact, HANDLE h } case EVENTTYPE_JABBER_CHATSTATES: case EVENTTYPE_JABBER_PRESENCE: - case EVENTTYPE_STATUSCHANGE: { TCHAR *msg, *szName; CONTACTINFO ci = {0}; diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index d459efa56f..b3cfc3bf92 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -88,7 +88,6 @@ struct SrmmWindowData #define EVENTTYPE_JABBER_CHATSTATES 2000 #define EVENTTYPE_JABBER_PRESENCE 2001 -#define EVENTTYPE_STATUSCHANGE 25368 struct CREOleCallback : public IRichEditOleCallback { -- cgit v1.2.3