summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-05-27 18:45:43 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-05-27 18:45:43 +0300
commitef1a349d88912a89a8dd20ca1dcb342b6dc9c2ff (patch)
tree78e6344d923966b7a8f1866763d6bacaf054a9e2 /src/core
parent189f6be24f11066a3c711b783cf98f79f703e3a5 (diff)
fixes #1963 (Remove Free for Chat, On the Phone and Out to Lunch statuses completely)
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdautoaway/src/autoaway.cpp4
-rw-r--r--src/core/stdautoaway/src/options.cpp2
-rw-r--r--src/core/stdaway/src/sendmsg.cpp8
-rw-r--r--src/core/stdclist/src/clcopts.cpp8
-rw-r--r--src/core/stdclist/src/contact.cpp5
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp3
-rw-r--r--src/core/stdmsg/src/msgs.cpp3
-rw-r--r--src/core/stdpopup/src/message_pump.cpp2
-rw-r--r--src/core/stduseronline/src/useronline.cpp2
9 files changed, 8 insertions, 29 deletions
diff --git a/src/core/stdautoaway/src/autoaway.cpp b/src/core/stdautoaway/src/autoaway.cpp
index 40f9c2779d..6511746e2a 100644
--- a/src/core/stdautoaway/src/autoaway.cpp
+++ b/src/core/stdautoaway/src/autoaway.cpp
@@ -75,7 +75,7 @@ static int AutoAwayEvent(WPARAM, LPARAM lParam)
status = ID_STATUS_AWAY;
if (lParam & IDF_ISIDLE) {
- if (pa->iRealStatus != ID_STATUS_ONLINE && pa->iRealStatus != ID_STATUS_FREECHAT) {
+ if (pa->iRealStatus != ID_STATUS_ONLINE) {
Netlib_Logf(0, "%s: '%s' isn't online (%d), skipping", MODULENAME, pa->szModuleName, pa->iRealStatus);
continue;
}
@@ -87,7 +87,7 @@ static int AutoAwayEvent(WPARAM, LPARAM lParam)
}
else {
int oldstatus = g_plugin.getWord(pa->szModuleName, 0);
- if (oldstatus != ID_STATUS_ONLINE && oldstatus != ID_STATUS_FREECHAT) {
+ if (oldstatus != ID_STATUS_ONLINE) {
Netlib_Logf(0, "%s: '%s' wasn't online (%d), skipping", MODULENAME, pa->szModuleName, oldstatus);
continue;
}
diff --git a/src/core/stdautoaway/src/options.cpp b/src/core/stdautoaway/src/options.cpp
index ad04fdb3a3..f8c8db394f 100644
--- a/src/core/stdautoaway/src/options.cpp
+++ b/src/core/stdautoaway/src/options.cpp
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-static const WORD aa_Status[] = { ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND, ID_STATUS_ONTHEPHONE, ID_STATUS_OUTTOLUNCH };
+static const WORD aa_Status[] = { ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND };
int IdleGetStatusIndex(WORD status)
{
diff --git a/src/core/stdaway/src/sendmsg.cpp b/src/core/stdaway/src/sendmsg.cpp
index 00a9012044..bd4b8440ee 100644
--- a/src/core/stdaway/src/sendmsg.cpp
+++ b/src/core/stdaway/src/sendmsg.cpp
@@ -34,12 +34,9 @@ static const wchar_t* GetDefaultMessage(int status)
case ID_STATUS_NA: return TranslateT("Give it up, I'm not in!");
case ID_STATUS_OCCUPIED: return TranslateT("Not right now.");
case ID_STATUS_DND: return TranslateT("Give a guy some peace, would ya?");
- case ID_STATUS_FREECHAT: return TranslateT("I'm a chatbot!");
case ID_STATUS_ONLINE: return TranslateT("Yep, I'm here.");
case ID_STATUS_OFFLINE: return TranslateT("Nope, not here.");
case ID_STATUS_INVISIBLE: return TranslateT("I'm hiding from the mafia.");
- case ID_STATUS_ONTHEPHONE: return TranslateT("That'll be the phone.");
- case ID_STATUS_OUTTOLUNCH: return TranslateT("Mmm... food.");
case ID_STATUS_IDLE: return TranslateT("idleeeeeeee");
}
return nullptr;
@@ -55,12 +52,9 @@ static const char* StatusModeToDbSetting(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;
case ID_STATUS_IDLE: prefix = "Idl"; break;
default: return nullptr;
}
@@ -340,7 +334,7 @@ static int StatusModeChange(WPARAM wParam, LPARAM lParam)
static const int statusModes[] =
{
ID_STATUS_OFFLINE, ID_STATUS_ONLINE, ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND,
- ID_STATUS_FREECHAT, ID_STATUS_INVISIBLE, ID_STATUS_OUTTOLUNCH, ID_STATUS_ONTHEPHONE, ID_STATUS_IDLE
+ ID_STATUS_INVISIBLE, ID_STATUS_IDLE
};
struct AwayMsgInfo
diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp
index 6233f348a7..c9070e91f3 100644
--- a/src/core/stdclist/src/clcopts.cpp
+++ b/src/core/stdclist/src/clcopts.cpp
@@ -66,10 +66,7 @@ static const struct CheckBoxValues_t greyoutValues[] =
{ PF2_LONGAWAY, LPGENW("Not available") },
{ PF2_LIGHTDND, LPGENW("Occupied") },
{ PF2_HEAVYDND, LPGENW("Do not disturb")},
- { PF2_FREECHAT, LPGENW("Free for chat") },
- { PF2_INVISIBLE, LPGENW("Invisible") },
- { PF2_OUTTOLUNCH, LPGENW("Out to lunch") },
- { PF2_ONTHEPHONE, LPGENW("On the phone") }
+ { PF2_INVISIBLE, LPGENW("Invisible") }
};
static const struct CheckBoxValues_t offlineValues[] =
@@ -80,10 +77,7 @@ static const struct CheckBoxValues_t offlineValues[] =
{ PF2_LONGAWAY, LPGENW("Not available") },
{ PF2_LIGHTDND, LPGENW("Occupied") },
{ PF2_HEAVYDND, LPGENW("Do not disturb")},
- { PF2_FREECHAT, LPGENW("Free for chat") },
{ PF2_INVISIBLE, LPGENW("Invisible") },
- { PF2_OUTTOLUNCH, LPGENW("Out to lunch") },
- { PF2_ONTHEPHONE, LPGENW("On the phone") }
};
static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *values, int nValues, DWORD style)
diff --git a/src/core/stdclist/src/contact.cpp b/src/core/stdclist/src/contact.cpp
index 7c77f5f465..3a561482d0 100644
--- a/src/core/stdclist/src/contact.cpp
+++ b/src/core/stdclist/src/contact.cpp
@@ -38,10 +38,7 @@ static statusModeOrder[] =
{ ID_STATUS_DND, 110 },
{ ID_STATUS_NA, 450 },
{ ID_STATUS_OCCUPIED, 100 },
- { ID_STATUS_FREECHAT, 0 },
- { ID_STATUS_INVISIBLE, 20 },
- { ID_STATUS_ONTHEPHONE, 150 },
- { ID_STATUS_OUTTOLUNCH, 425 }
+ { ID_STATUS_INVISIBLE, 20 }
};
int GetStatusModeOrdering(int statusMode)
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index c45ced4938..e4ce31045b 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -139,10 +139,7 @@ statusValues[] =
{ PF2_LONGAWAY, LPGENW("Not available") },
{ PF2_LIGHTDND, LPGENW("Occupied") },
{ PF2_HEAVYDND, LPGENW("Do not disturb") },
- { PF2_FREECHAT, LPGENW("Free for chat") },
{ PF2_INVISIBLE, LPGENW("Invisible") },
- { PF2_OUTTOLUNCH, LPGENW("Out to lunch") },
- { PF2_ONTHEPHONE, LPGENW("On the phone") }
};
class COptionMainDlg : public CDlgBase
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 84fad84fba..e78c57968a 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -108,10 +108,7 @@ static int SRMMStatusToPf2(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/core/stdpopup/src/message_pump.cpp b/src/core/stdpopup/src/message_pump.cpp
index 977f139219..8b609eafc9 100644
--- a/src/core/stdpopup/src/message_pump.cpp
+++ b/src/core/stdpopup/src/message_pump.cpp
@@ -23,7 +23,7 @@ unsigned __stdcall MessagePumpThread(void* param)
{
bool enabled = true;
int status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
- if (status >= ID_STATUS_OFFLINE && status <= ID_STATUS_OUTTOLUNCH && options.disable_status[status - ID_STATUS_OFFLINE])
+ if (status >= ID_STATUS_OFFLINE && status <= ID_STATUS_MAX && options.disable_status[status - ID_STATUS_OFFLINE])
enabled = false;
if ((options.disable_full_screen && IsFullScreen()) || IsWorkstationLocked())
enabled = false;
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp
index 1c3a6d3640..e1de0b8f03 100644
--- a/src/core/stduseronline/src/useronline.cpp
+++ b/src/core/stduseronline/src/useronline.cpp
@@ -46,7 +46,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
}
}
- if ((newStatus == ID_STATUS_ONLINE || newStatus == ID_STATUS_FREECHAT) && oldStatus != ID_STATUS_ONLINE && oldStatus != ID_STATUS_FREECHAT) {
+ if (newStatus == ID_STATUS_ONLINE && oldStatus != ID_STATUS_ONLINE) {
DWORD ticked = g_plugin.getDword(cws->szModule, GetTickCount());
// only play the sound (or show event) if this event happens at least 10 secs after the proto went from offline
if (GetTickCount() - ticked > (1000 * 10)) {