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) --- src/mir_app/res/resource.rc | 5 +---- src/mir_app/src/clcidents.cpp | 3 --- src/mir_app/src/clcutils.cpp | 3 --- src/mir_app/src/clistmod.cpp | 9 --------- src/mir_app/src/menu_clist.cpp | 6 +----- src/mir_app/src/meta_services.cpp | 6 +++--- src/mir_app/src/meta_utils.cpp | 13 +++++-------- src/mir_app/src/skinicons.cpp | 3 --- 8 files changed, 10 insertions(+), 38 deletions(-) (limited to 'src/mir_app') diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc index 5b38ef109c..a6931e5905 100644 --- a/src/mir_app/res/resource.rc +++ b/src/mir_app/res/resource.rc @@ -1310,10 +1310,7 @@ BEGIN MENUITEM "&Not available\tCtrl+3", ID_STATUS_NA MENUITEM "Occ&upied\tCtrl+4", ID_STATUS_OCCUPIED MENUITEM "&Do not disturb\tCtrl+5", ID_STATUS_DND - MENUITEM "&Free for chat\tCtrl+6", ID_STATUS_FREECHAT - MENUITEM "&Invisible\tCtrl+7", ID_STATUS_INVISIBLE - MENUITEM "On the &phone\tCtrl+8", ID_STATUS_ONTHEPHONE - MENUITEM "Out to &lunch\tCtrl+9", ID_STATUS_OUTTOLUNCH + MENUITEM "&Invisible\tCtrl+6", ID_STATUS_INVISIBLE END END diff --git a/src/mir_app/src/clcidents.cpp b/src/mir_app/src/clcidents.cpp index fd1bcbd3b2..35a2552c0d 100644 --- a/src/mir_app/src/clcidents.cpp +++ b/src/mir_app/src/clcidents.cpp @@ -244,13 +244,10 @@ MIR_APP_DLL(int) Clist_GetGeneralizedStatus(char **szProto) int iStatusWeight; switch (pa->iRealStatus) { - case ID_STATUS_FREECHAT: iStatusWeight = 110; break; case ID_STATUS_ONLINE: iStatusWeight = 100; break; case ID_STATUS_OCCUPIED: iStatusWeight = 60; break; - case ID_STATUS_ONTHEPHONE: iStatusWeight = 50; break; case ID_STATUS_DND: iStatusWeight = 40; break; case ID_STATUS_AWAY: iStatusWeight = 30; break; - case ID_STATUS_OUTTOLUNCH: iStatusWeight = 20; break; case ID_STATUS_NA: iStatusWeight = 10; break; case ID_STATUS_INVISIBLE: iStatusWeight = 5; break; default: diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index 58fb0184f1..980a424d57 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -624,10 +624,7 @@ MIR_APP_DLL(int) Clist_ClcStatusToPf2(int status) case ID_STATUS_DND: return PF2_HEAVYDND; case ID_STATUS_NA: return PF2_LONGAWAY; case ID_STATUS_OCCUPIED: return PF2_LIGHTDND; - case ID_STATUS_FREECHAT: return PF2_FREECHAT; case ID_STATUS_INVISIBLE: return PF2_INVISIBLE; - case ID_STATUS_ONTHEPHONE: return PF2_ONTHEPHONE; - case ID_STATUS_OUTTOLUNCH: return PF2_OUTTOLUNCH; case ID_STATUS_OFFLINE: return MODEF_OFFLINE; } return 0; diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp index ed4c445e2a..70a5fde409 100644 --- a/src/mir_app/src/clistmod.cpp +++ b/src/mir_app/src/clistmod.cpp @@ -74,18 +74,9 @@ MIR_APP_DLL(wchar_t*) Clist_GetStatusModeDescription(int mode, int flags) case ID_STATUS_OCCUPIED: descr = LPGENW("Occupied"); break; - case ID_STATUS_FREECHAT: - descr = LPGENW("Free for chat"); - break; case ID_STATUS_INVISIBLE: descr = LPGENW("Invisible"); break; - case ID_STATUS_OUTTOLUNCH: - descr = LPGENW("Out to lunch"); - break; - case ID_STATUS_ONTHEPHONE: - descr = LPGENW("On the phone"); - break; case ID_STATUS_IDLE: descr = LPGENW("Idle"); break; diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp index f47364a1a0..e266b712d5 100644 --- a/src/mir_app/src/menu_clist.cpp +++ b/src/mir_app/src/menu_clist.cpp @@ -63,10 +63,7 @@ MStatus g_statuses[MAX_STATUS_COUNT] = { ID_STATUS_NA, SKINICON_STATUS_NA, PF2_LONGAWAY }, { ID_STATUS_OCCUPIED, SKINICON_STATUS_OCCUPIED, PF2_LIGHTDND }, { ID_STATUS_DND, SKINICON_STATUS_DND, PF2_HEAVYDND }, - { ID_STATUS_FREECHAT, SKINICON_STATUS_FREE4CHAT, PF2_FREECHAT }, { ID_STATUS_INVISIBLE, SKINICON_STATUS_INVISIBLE, PF2_INVISIBLE }, - { ID_STATUS_ONTHEPHONE, SKINICON_STATUS_ONTHEPHONE, PF2_ONTHEPHONE }, - { ID_STATUS_OUTTOLUNCH, SKINICON_STATUS_OUTTOLUNCH, PF2_OUTTOLUNCH }, }; static int statustopos(int status) @@ -588,7 +585,7 @@ static INT_PTR FreeOwnerDataStatusMenu(WPARAM, LPARAM lParam) MIR_APP_DLL(BOOL) Clist_MenuProcessCommand(int menu_id, int flags, MCONTACT hContact) { if (flags & MPCF_MAINMENU) { - if (menu_id >= ID_STATUS_OFFLINE && menu_id <= ID_STATUS_OUTTOLUNCH) { + if (menu_id >= ID_STATUS_OFFLINE && menu_id <= ID_STATUS_MAX) { int pos = statustopos(menu_id); if (pos != -1) return Menu_ProcessCommand(g_statuses[pos].hStatusMenu, hContact); @@ -783,7 +780,6 @@ void RebuildMenuOrder(void) smep->szProto = mir_strdup(pa->szModuleName); pa->protoindex = i; - pa->protostatus[j] = g_statuses[j].iStatus; pa->menuhandle[j] = Menu_AddItem(hStatusMenuObject, &mi, smep); mir_snprintf(buf, "ProtocolIcon_%s_%s", pa->szModuleName, mi.name.a); diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp index 49547f73f1..7b89a95b1a 100644 --- a/src/mir_app/src/meta_services.cpp +++ b/src/mir_app/src/meta_services.cpp @@ -56,16 +56,16 @@ INT_PTR Meta_GetCaps(WPARAM wParam, LPARAM) return PF1_IM | PF1_CHAT | PF1_FILESEND | PF1_MODEMSGRECV | PF1_NUMERICUSERID; case PFLAGNUM_2: - return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE; + return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; case PFLAGNUM_3: - return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE; + return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; case PFLAGNUM_4: return PF4_SUPPORTTYPING | PF4_AVATARS; case PFLAGNUM_5: - return PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE; + return PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; case PFLAG_MAXLENOFMESSAGE: return 2000; diff --git a/src/mir_app/src/meta_utils.cpp b/src/mir_app/src/meta_utils.cpp index 8b2d5af91e..2b7ccab6a2 100644 --- a/src/mir_app/src/meta_utils.cpp +++ b/src/mir_app/src/meta_utils.cpp @@ -209,14 +209,11 @@ MCONTACT Meta_GetMostOnline(DBCachedContact *cc) static int GetStatusPriority(int status) { switch (status) { - case ID_STATUS_OFFLINE: return 8; - case ID_STATUS_AWAY: return 4; - case ID_STATUS_DND: return 7; - case ID_STATUS_NA: return 6; - case ID_STATUS_OCCUPIED: return 5; - case ID_STATUS_FREECHAT: return 1; - case ID_STATUS_ONTHEPHONE: return 2; - case ID_STATUS_OUTTOLUNCH: return 3; + case ID_STATUS_AWAY: return 1; + case ID_STATUS_OCCUPIED: return 2; + case ID_STATUS_NA: return 3; + case ID_STATUS_DND: return 4; + case ID_STATUS_OFFLINE: return 5; } return 0; diff --git a/src/mir_app/src/skinicons.cpp b/src/mir_app/src/skinicons.cpp index 5c5c4b5a2b..ce1d786010 100644 --- a/src/mir_app/src/skinicons.cpp +++ b/src/mir_app/src/skinicons.cpp @@ -108,10 +108,7 @@ static struct StandardIconDescription statusIcons[] = { ID_STATUS_NA, LPGEN("Not available"), -IDI_NA, PF2_LONGAWAY }, { ID_STATUS_OCCUPIED, LPGEN("Occupied"), -IDI_OCCUPIED, PF2_LIGHTDND }, { ID_STATUS_DND, LPGEN("Do not disturb"), -IDI_DND, PF2_HEAVYDND }, - { ID_STATUS_FREECHAT, LPGEN("Free for chat"), -IDI_FREE4CHAT, PF2_FREECHAT }, { ID_STATUS_INVISIBLE, LPGEN("Invisible"), -IDI_INVISIBLE, PF2_INVISIBLE }, - { ID_STATUS_ONTHEPHONE, LPGEN("On the phone"), -IDI_ONTHEPHONE, PF2_ONTHEPHONE }, - { ID_STATUS_OUTTOLUNCH, LPGEN("Out to lunch"), -IDI_OUTTOLUNCH, PF2_OUTTOLUNCH } }; const char mainIconsFmt[] = "core_main_"; -- cgit v1.2.3