diff options
author | George Hazan <george.hazan@gmail.com> | 2013-12-27 18:53:50 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-12-27 18:53:50 +0000 |
commit | eea8926b61889ea80c76f9fb6b5bf5d1afe6c6eb (patch) | |
tree | b951626b03237050cdd72c501e8408ac1163e1d8 /src | |
parent | b1dc0111247ffd219585458edcf24c07c0b55ddf (diff) |
old nasty perversion EVENTTYPE_STATUSCHANGE removed forever
git-svn-id: http://svn.miranda-ng.org/main/trunk@7396 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 36 | ||||
-rw-r--r-- | src/core/stdmsg/src/msglog.cpp | 7 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.h | 1 | ||||
-rw-r--r-- | src/modules/database/dbutils.cpp | 5 |
4 files changed, 3 insertions, 46 deletions
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
{
diff --git a/src/modules/database/dbutils.cpp b/src/modules/database/dbutils.cpp index 83824c8315..81693aa23b 100644 --- a/src/modules/database/dbutils.cpp +++ b/src/modules/database/dbutils.cpp @@ -175,11 +175,6 @@ static INT_PTR DbEventGetText(WPARAM wParam, LPARAM lParam) return 0;
}
- // temporary fix for bug with event types conflict between jabber chat states notifications
- // and srmm's status changes, must be commented out in future releases
- if (dbei->eventType == 25368 && dbei->cbBlob == 1 && dbei->pBlob[0] == 1)
- return 0;
-
// by default treat an event's blob as a string
if (egt->datatype == DBVT_WCHAR) {
char *str = (char*)alloca(dbei->cbBlob + 1);
|