From ef1a349d88912a89a8dd20ca1dcb342b6dc9c2ff Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 27 May 2019 18:45:43 +0300 Subject: fixes #1963 (Remove Free for Chat, On the Phone and Out to Lunch statuses completely) --- protocols/Gadu-Gadu/src/core.cpp | 19 ++----------------- protocols/Gadu-Gadu/src/dialogs.cpp | 7 ------- protocols/Gadu-Gadu/src/gg_proto.cpp | 7 ++----- protocols/Gadu-Gadu/src/services.cpp | 7 ------- 4 files changed, 4 insertions(+), 36 deletions(-) (limited to 'protocols/Gadu-Gadu/src') diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 7653d48e17..ba9d0597b2 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -98,17 +98,6 @@ void GaduProto::disconnect() } break; - case ID_STATUS_FREECHAT: - gg_EnterCriticalSection(&modemsg_mutex, "disconnect", 9, "modemsg_mutex", 1); - szMsg = mir_utf8encodeW(modemsg.freechat); - gg_LeaveCriticalSection(&modemsg_mutex, "disconnect", 9, 1, "modemsg_mutex", 1); - if (!szMsg && !db_get_s(0, "SRAway", gg_status2db(ID_STATUS_FREECHAT, "Default"), &dbv, DBVT_WCHAR)) { - if (dbv.pwszVal && *(dbv.pwszVal)) - szMsg = mir_utf8encodeW(dbv.pwszVal); - db_free(&dbv); - } - break; - case ID_STATUS_INVISIBLE: gg_EnterCriticalSection(&modemsg_mutex, "disconnect", 10, "modemsg_mutex", 1); szMsg = mir_utf8encodeW(modemsg.invisible); @@ -1547,7 +1536,6 @@ int GaduProto::status_m2gg(int status, int descr) case ID_STATUS_ONLINE: return GG_STATUS_AVAIL_DESCR | mask; case ID_STATUS_AWAY: return GG_STATUS_BUSY_DESCR | mask; case ID_STATUS_DND: return GG_STATUS_DND_DESCR | mask; - case ID_STATUS_FREECHAT: return GG_STATUS_FFC_DESCR | mask; case ID_STATUS_INVISIBLE: return GG_STATUS_INVISIBLE_DESCR | mask; default: return GG_STATUS_BUSY_DESCR | mask; } @@ -1558,7 +1546,6 @@ int GaduProto::status_m2gg(int status, int descr) case ID_STATUS_ONLINE: return GG_STATUS_AVAIL | mask; case ID_STATUS_AWAY: return GG_STATUS_BUSY | mask; case ID_STATUS_DND: return GG_STATUS_DND | mask; - case ID_STATUS_FREECHAT: return GG_STATUS_FFC | mask; case ID_STATUS_INVISIBLE: return GG_STATUS_INVISIBLE | mask; default: return GG_STATUS_BUSY | mask; } @@ -1582,6 +1569,8 @@ int GaduProto::status_gg2m(int status) case GG_STATUS_AVAIL: case GG_STATUS_AVAIL_DESCR: + case GG_STATUS_FFC: + case GG_STATUS_FFC_DESCR: return ID_STATUS_ONLINE; case GG_STATUS_BUSY: @@ -1592,10 +1581,6 @@ int GaduProto::status_gg2m(int status) case GG_STATUS_DND_DESCR: return ID_STATUS_DND; - case GG_STATUS_FFC: - case GG_STATUS_FFC_DESCR: - return ID_STATUS_FREECHAT; - case GG_STATUS_INVISIBLE: case GG_STATUS_INVISIBLE_DESCR: return ID_STATUS_INVISIBLE; diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index 4302ba3cbd..a9d5bb73c9 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -263,7 +263,6 @@ static INT_PTR CALLBACK gg_genoptsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_ADDSTRING, 0, (LPARAM)Clist_GetStatusModeDescription(ID_STATUS_ONLINE, 0)); SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_ADDSTRING, 0, (LPARAM)Clist_GetStatusModeDescription(ID_STATUS_AWAY, 0)); SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_ADDSTRING, 0, (LPARAM)Clist_GetStatusModeDescription(ID_STATUS_DND, 0)); - SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_ADDSTRING, 0, (LPARAM)Clist_GetStatusModeDescription(ID_STATUS_FREECHAT, 0)); SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_ADDSTRING, 0, (LPARAM)Clist_GetStatusModeDescription(ID_STATUS_INVISIBLE, 0)); switch (gg->getWord(GG_KEY_LEAVESTATUS, GG_KEYDEF_LEAVESTATUS)) { @@ -276,9 +275,6 @@ static INT_PTR CALLBACK gg_genoptsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, case ID_STATUS_DND: SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_SETCURSEL, 3, 0); break; - case ID_STATUS_FREECHAT: - SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_SETCURSEL, 4, 0); - break; case ID_STATUS_INVISIBLE: SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_SETCURSEL, 5, 0); break; @@ -468,9 +464,6 @@ static INT_PTR CALLBACK gg_genoptsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, gg->setWord(GG_KEY_LEAVESTATUS, ID_STATUS_DND); break; case 4: - gg->setWord(GG_KEY_LEAVESTATUS, ID_STATUS_FREECHAT); - break; - case 5: gg->setWord(GG_KEY_LEAVESTATUS, ID_STATUS_INVISIBLE); break; default: diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 186a283c06..53aa06b23f 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -146,10 +146,10 @@ INT_PTR GaduProto::GetCaps(int type, MCONTACT) return PF1_IM | PF1_BASICSEARCH | PF1_EXTSEARCH | PF1_EXTSEARCHUI | PF1_SEARCHBYNAME | PF1_MODEMSG | PF1_NUMERICUSERID | PF1_VISLIST | PF1_FILE; case PFLAGNUM_2: - return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_FREECHAT | PF2_INVISIBLE | + return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_INVISIBLE | PF2_LONGAWAY; case PFLAGNUM_3: - return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_FREECHAT | PF2_INVISIBLE; + return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_INVISIBLE; case PFLAGNUM_4: return PF4_NOCUSTOMAUTH | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_IMSENDOFFLINE; case PFLAGNUM_5: @@ -632,9 +632,6 @@ int GaduProto::SetAwayMsg(int iStatus, const wchar_t *newMsg) case ID_STATUS_DND: msgPtr = &modemsg.dnd; break; - case ID_STATUS_FREECHAT: - msgPtr = &modemsg.freechat; - break; case ID_STATUS_INVISIBLE: msgPtr = &modemsg.invisible; break; diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index 9c5b3ac64f..eac7fcbd63 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -32,12 +32,9 @@ char *gg_status2db(int status, const char *suffix) case ID_STATUS_NA: prefix = "Na"; break; case ID_STATUS_DND: prefix = "Dnd"; break; case ID_STATUS_OCCUPIED: prefix = "Occupied"; break; - case ID_STATUS_FREECHAT: prefix = "FreeChat"; break; case ID_STATUS_ONLINE: prefix = "On"; break; case ID_STATUS_OFFLINE: prefix = "Off"; break; case ID_STATUS_INVISIBLE: prefix = "Inv"; break; - case ID_STATUS_ONTHEPHONE: prefix = "Otp"; break; - case ID_STATUS_OUTTOLUNCH: prefix = "Otl"; break; default: return nullptr; } @@ -59,9 +56,6 @@ wchar_t* GaduProto::getstatusmsg(int status) case ID_STATUS_DND: return modemsg.dnd; break; - case ID_STATUS_FREECHAT: - return modemsg.freechat; - break; case ID_STATUS_INVISIBLE: return modemsg.invisible; break; @@ -134,7 +128,6 @@ int gg_normalizestatus(int status) switch (status) { case ID_STATUS_ONLINE: return ID_STATUS_ONLINE; case ID_STATUS_DND: return ID_STATUS_DND; - case ID_STATUS_FREECHAT: return ID_STATUS_FREECHAT; case ID_STATUS_OFFLINE: return ID_STATUS_OFFLINE; case ID_STATUS_INVISIBLE: return ID_STATUS_INVISIBLE; } -- cgit v1.2.3