diff options
author | George Hazan <ghazan@miranda.im> | 2019-05-27 18:45:43 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-05-27 18:45:43 +0300 |
commit | ef1a349d88912a89a8dd20ca1dcb342b6dc9c2ff (patch) | |
tree | 78e6344d923966b7a8f1866763d6bacaf054a9e2 /plugins/NewXstatusNotify | |
parent | 189f6be24f11066a3c711b783cf98f79f703e3a5 (diff) |
fixes #1963 (Remove Free for Chat, On the Phone and Out to Lunch statuses completely)
Diffstat (limited to 'plugins/NewXstatusNotify')
-rw-r--r-- | plugins/NewXstatusNotify/res/resource.rc | 3 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/indsnd.cpp | 2 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/main.cpp | 36 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/stdafx.h | 63 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/utils.cpp | 3 |
5 files changed, 32 insertions, 75 deletions
diff --git a/plugins/NewXstatusNotify/res/resource.rc b/plugins/NewXstatusNotify/res/resource.rc index 8d02607d96..5012458ee7 100644 --- a/plugins/NewXstatusNotify/res/resource.rc +++ b/plugins/NewXstatusNotify/res/resource.rc @@ -33,13 +33,10 @@ BEGIN CONTROL "Online",IDC_CHK_ONLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,14,89,8
CONTROL "Offline",IDC_CHK_OFFLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,14,87,8
CONTROL "Invisible",IDC_CHK_INVISIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,196,14,94,8
- CONTROL "Free for chat",IDC_CHK_FREECHAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,25,89,8
CONTROL "Away",IDC_CHK_AWAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,25,87,8
CONTROL "Not available",IDC_CHK_NA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,196,25,94,8
CONTROL "Occupied",IDC_CHK_OCCUPIED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,36,89,8
CONTROL "Do not disturb",IDC_CHK_DND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,36,87,8
- CONTROL "Out to lunch",IDC_CHK_OUTTOLUNCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,196,36,94,8
- CONTROL "On the phone",IDC_CHK_ONTHEPHONE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,47,89,8
CONTROL "Always when changing from offline",IDC_CHK_FROMOFFLINE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,47,187,8
GROUPBOX "Notify when contact changes",IDC_STATIC,3,64,294,25,WS_GROUP
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 1dbbf99795..65224d27af 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -137,7 +137,7 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA for (int i = ID_STATUS_MAX; i >= ID_STATUS_MIN; i--) {
int flags = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_2, 0);
if (flags == 0)
- flags = PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE;
+ flags = PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND;
if ((flags & Proto_Status2Flag(i)) || i == ID_STATUS_OFFLINE) {
LV_ITEM lvi = { 0 };
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 46c3e475a8..a1a1187bdb 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -881,18 +881,6 @@ void InitStatusList() StatusList[index].colorBack = g_plugin.getDword("40078bg", COLOR_BG_AVAILDEFAULT);
StatusList[index].colorText = g_plugin.getDword("40078tx", COLOR_TX_DEFAULT);
- //Free for chat
- index = Index(ID_STATUS_FREECHAT);
- mir_wstrncpy(StatusList[index].lpzMStatusText, TranslateT("(M) feels talkative!"), MAX_STATUSTEXT);
- mir_wstrncpy(StatusList[index].lpzFStatusText, TranslateT("(F) feels talkative!"), MAX_STATUSTEXT);
- mir_wstrncpy(StatusList[index].lpzUStatusText, TranslateT("(U) feels talkative!"), MAX_STATUSTEXT);
- mir_wstrncpy(StatusList[index].lpzStandardText, TranslateT("Free for chat"), MAX_STANDARDTEXT);
- mir_strncpy(StatusList[index].lpzSkinSoundName, "UserFreeForChat", MAX_SKINSOUNDNAME);
- mir_wstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENW("User: Free for chat"), MAX_SKINSOUNDDESC);
- mir_wstrncpy(StatusList[index].lpzSkinSoundFile, L"free4chat.wav", MAX_PATH);
- StatusList[index].colorBack = g_plugin.getDword("40077bg", COLOR_BG_AVAILDEFAULT);
- StatusList[index].colorText = g_plugin.getDword("40077tx", COLOR_TX_DEFAULT);
-
//Away
index = Index(ID_STATUS_AWAY);
mir_wstrncpy(StatusList[index].lpzMStatusText, TranslateT("(M) went away"), MAX_STATUSTEXT);
@@ -941,30 +929,6 @@ void InitStatusList() StatusList[index].colorBack = g_plugin.getDword("40074bg", COLOR_BG_NAVAILDEFAULT);
StatusList[index].colorText = g_plugin.getDword("40074tx", COLOR_TX_DEFAULT);
- //Out to lunch
- index = Index(ID_STATUS_OUTTOLUNCH);
- mir_wstrncpy(StatusList[index].lpzMStatusText, TranslateT("(M) is eating something"), MAX_STATUSTEXT);
- mir_wstrncpy(StatusList[index].lpzFStatusText, TranslateT("(F) is eating something"), MAX_STATUSTEXT);
- mir_wstrncpy(StatusList[index].lpzUStatusText, TranslateT("(U) is eating something"), MAX_STATUSTEXT);
- mir_wstrncpy(StatusList[index].lpzStandardText, TranslateT("Out to lunch"), MAX_STANDARDTEXT);
- mir_strncpy(StatusList[index].lpzSkinSoundName, "UserOutToLunch", MAX_SKINSOUNDNAME);
- mir_wstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENW("User: Out to lunch"), MAX_SKINSOUNDDESC);
- mir_wstrncpy(StatusList[index].lpzSkinSoundFile, L"lunch.wav", MAX_PATH);
- StatusList[index].colorBack = g_plugin.getDword("40080bg", COLOR_BG_NAVAILDEFAULT);
- StatusList[index].colorText = g_plugin.getDword("40080tx", COLOR_TX_DEFAULT);
-
- //On the phone
- index = Index(ID_STATUS_ONTHEPHONE);
- mir_wstrncpy(StatusList[index].lpzMStatusText, TranslateT("(M) had to answer the phone"), MAX_STATUSTEXT);
- mir_wstrncpy(StatusList[index].lpzFStatusText, TranslateT("(F) had to answer the phone"), MAX_STATUSTEXT);
- mir_wstrncpy(StatusList[index].lpzUStatusText, TranslateT("(U) had to answer the phone"), MAX_STATUSTEXT);
- mir_wstrncpy(StatusList[index].lpzStandardText, TranslateT("On the phone"), MAX_STANDARDTEXT);
- mir_strncpy(StatusList[index].lpzSkinSoundName, "UserOnThePhone", MAX_SKINSOUNDNAME);
- mir_wstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENW("User: On the phone"), MAX_SKINSOUNDDESC);
- mir_wstrncpy(StatusList[index].lpzSkinSoundFile, L"phone.wav", MAX_PATH);
- StatusList[index].colorBack = g_plugin.getDword("40079bg", COLOR_BG_NAVAILDEFAULT);
- StatusList[index].colorText = g_plugin.getDword("40079tx", COLOR_TX_DEFAULT);
-
//Extra status
index = Index(ID_STATUS_EXTRASTATUS);
StatusList[index].colorBack = g_plugin.getDword("40081bg", COLOR_BG_AVAILDEFAULT);
diff --git a/plugins/NewXstatusNotify/src/stdafx.h b/plugins/NewXstatusNotify/src/stdafx.h index 86ddad6298..af10c6de0a 100644 --- a/plugins/NewXstatusNotify/src/stdafx.h +++ b/plugins/NewXstatusNotify/src/stdafx.h @@ -75,35 +75,34 @@ struct CMPlugin : public PLUGIN<CMPlugin> int Unload() override;
};
-#define MAX_STATUSTEXT 36
-#define MAX_STANDARDTEXT 36
-#define MAX_SKINSOUNDNAME 36
-#define MAX_SKINSOUNDDESC 36
-
-#define GENDER_UNSPECIFIED 0
-#define GENDER_MALE 1
-#define GENDER_FEMALE 2
-
-#define ID_STATUS_FROMOFFLINE 0
-#define ID_STATUS_SMSGREMOVED 1
-#define ID_STATUS_SMSGCHANGED 2
-#define ID_STATUS_XREMOVED 3
-#define ID_STATUS_XCHANGED 4
-#define ID_STATUS_XMSGCHANGED 5
-#define ID_STATUS_XMSGREMOVED 6
-#define ID_STATUSEX_MAX 6
-#define STATUSEX_COUNT ID_STATUSEX_MAX + 1
-#define ID_STATUS_EXTRASTATUS 40081
-#define ID_STATUS_STATUSMSG 40082
-#define ID_STATUS_MIN ID_STATUS_OFFLINE
-#define ID_STATUS_MAX ID_STATUS_OUTTOLUNCH
-#define ID_STATUS_MAX2 ID_STATUS_STATUSMSG
-#define STATUS_COUNT ID_STATUS_MAX2 - ID_STATUS_MIN + 1
-#define Index(ID_STATUS) ID_STATUS - ID_STATUS_OFFLINE
-
-#define COLOR_BG_AVAILDEFAULT RGB(173,206,247)
-#define COLOR_BG_NAVAILDEFAULT RGB(255,189,189)
-#define COLOR_TX_DEFAULT RGB(0,0,0)
+#define MAX_STATUSTEXT 36
+#define MAX_STANDARDTEXT 36
+#define MAX_SKINSOUNDNAME 36
+#define MAX_SKINSOUNDDESC 36
+
+#define GENDER_UNSPECIFIED 0
+#define GENDER_MALE 1
+#define GENDER_FEMALE 2
+
+#define ID_STATUS_FROMOFFLINE 0
+#define ID_STATUS_SMSGREMOVED 1
+#define ID_STATUS_SMSGCHANGED 2
+#define ID_STATUS_XREMOVED 3
+#define ID_STATUS_XCHANGED 4
+#define ID_STATUS_XMSGCHANGED 5
+#define ID_STATUS_XMSGREMOVED 6
+#define ID_STATUSEX_MAX 6
+
+#define STATUSEX_COUNT ID_STATUSEX_MAX + 1
+#define ID_STATUS_EXTRASTATUS 40081
+#define ID_STATUS_STATUSMSG 40082
+#define ID_STATUS_MAX2 ID_STATUS_STATUSMSG
+#define STATUS_COUNT ID_STATUS_MAX2 - ID_STATUS_MIN + 1
+#define Index(ID_STATUS) ID_STATUS - ID_STATUS_OFFLINE
+
+#define COLOR_BG_AVAILDEFAULT RGB(173,206,247)
+#define COLOR_BG_NAVAILDEFAULT RGB(255,189,189)
+#define COLOR_TX_DEFAULT RGB(0,0,0)
enum
{
@@ -123,9 +122,9 @@ enum #define JS_PARSE_XMPP_URI "/ParseXmppURI"
-#define COMPARE_SAME 0
-#define COMPARE_DIFF 1
-#define COMPARE_DEL 2
+#define COMPARE_SAME 0
+#define COMPARE_DIFF 1
+#define COMPARE_DEL 2
typedef struct tagSTATUS
{
diff --git a/plugins/NewXstatusNotify/src/utils.cpp b/plugins/NewXstatusNotify/src/utils.cpp index e1d977bdd6..2133bcda7e 100644 --- a/plugins/NewXstatusNotify/src/utils.cpp +++ b/plugins/NewXstatusNotify/src/utils.cpp @@ -66,9 +66,6 @@ BOOL StatusHasAwayMessage(char *szProto, int status) case ID_STATUS_NA:
case ID_STATUS_OCCUPIED:
case ID_STATUS_DND:
- case ID_STATUS_FREECHAT:
- case ID_STATUS_ONTHEPHONE:
- case ID_STATUS_OUTTOLUNCH:
return TRUE;
default:
|