diff options
author | dartraiden <wowemuh@gmail.com> | 2019-07-21 19:59:18 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2019-07-21 19:59:18 +0300 |
commit | b078dfb78c89aea87cd422eae52694738e473cf3 (patch) | |
tree | ca896e82a8a5ce81f80d041f4aee7fdeeb007162 /plugins/NewXstatusNotify | |
parent | ee7e29d02e94e969c1154515cd0c408c591a2414 (diff) |
Restore "Free for chat" status support (fixes #1963)
Diffstat (limited to 'plugins/NewXstatusNotify')
-rw-r--r-- | plugins/NewXstatusNotify/res/resource.rc | 20 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/indsnd.cpp | 2 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/main.cpp | 12 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/resource.h | 14 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/utils.cpp | 1 |
5 files changed, 36 insertions, 13 deletions
diff --git a/plugins/NewXstatusNotify/res/resource.rc b/plugins/NewXstatusNotify/res/resource.rc index 2055800986..d4793b9347 100644 --- a/plugins/NewXstatusNotify/res/resource.rc +++ b/plugins/NewXstatusNotify/res/resource.rc @@ -33,6 +33,7 @@ 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
@@ -124,9 +125,12 @@ BEGIN LTEXT "Do not disturb",IDC_STATIC,10,103,56,8
CONTROL "",IDC_DND_BG,"ColourPicker",WS_TABSTOP,73,101,24,12
CONTROL "",IDC_DND_TX,"ColourPicker",WS_TABSTOP,106,101,24,12
- LTEXT "Invisible",IDC_STATIC,10,118,56,8
- CONTROL "",IDC_INVISIBLE_BG,"ColourPicker",WS_TABSTOP,73,116,24,12
- CONTROL "",IDC_INVISIBLE_TX,"ColourPicker",WS_TABSTOP,106,116,24,12
+ LTEXT "Free for chat",IDC_STATIC,10,118,56,8
+ CONTROL "",IDC_FREEFORCHAT_BG,"ColourPicker",WS_TABSTOP,73,116,24,12
+ CONTROL "",IDC_FREEFORCHAT_TX,"ColourPicker",WS_TABSTOP,106,116,24,12
+ CONTROL "",IDC_INVISIBLE_BG,"ColourPicker",WS_TABSTOP,73,131,24,12
+ CONTROL "",IDC_INVISIBLE_TX,"ColourPicker",WS_TABSTOP,106,131,24,12
+ LTEXT "Invisible",IDC_STATIC,10,133,56,8
LTEXT "Extra status",IDC_STATIC,10,178,56,8
CONTROL "",IDC_XSTATUS_TX,"ColourPicker",WS_TABSTOP,106,176,24,12
CONTROL "",IDC_XSTATUS_BG,"ColourPicker",WS_TABSTOP,73,176,24,12
@@ -206,15 +210,17 @@ BEGIN LTEXT "Disable when my status is:",IDC_STATIC,15,37,116,8
CONTROL "Online",IDC_CHK_ONLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,49,116,10
CONTROL "Invisible",IDC_CHK_INVISIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,59,116,10
- CONTROL "Away",IDC_CHK_AWAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,69,116,10
- CONTROL "Not available",IDC_CHK_NA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,79,116,10
- CONTROL "Occupied",IDC_CHK_OCCUPIED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,89,116,10
- CONTROL "Do not disturb",IDC_CHK_DND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,99,116,10
+ CONTROL "Free for chat",IDC_CHK_FREECHAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,69,116,10
+ CONTROL "Away",IDC_CHK_AWAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,79,116,10
+ CONTROL "Not available",IDC_CHK_NA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,89,116,10
+ CONTROL "Occupied",IDC_CHK_OCCUPIED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,99,116,10
+ CONTROL "Do not disturb",IDC_CHK_DND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,109,116,10
GROUPBOX "Sounds",IDC_STATIC,147,8,132,136
CONTROL "Disable globally",IDC_CHK_SGLOBAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,20,116,10
LTEXT "Disable when my status is:",IDC_STATIC,157,36,116,8
CONTROL "Online",IDC_CHK_ONLINE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,50,116,10
CONTROL "Invisible",IDC_CHK_INVISIBLE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,60,116,10
+ CONTROL "Free for chat",IDC_CHK_FREECHAT2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,70,116,10
CONTROL "Away",IDC_CHK_AWAY2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,80,116,10
CONTROL "Not available",IDC_CHK_NA2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,90,116,10
CONTROL "Occupied",IDC_CHK_OCCUPIED2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,100,116,10
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 65224d27af..ba3d8cedc7 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;
+ flags = PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT;
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 a1a1187bdb..c79d025169 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -880,6 +880,18 @@ void InitStatusList() mir_wstrncpy(StatusList[index].lpzSkinSoundFile, L"invisible.wav", MAX_PATH);
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);
diff --git a/plugins/NewXstatusNotify/src/resource.h b/plugins/NewXstatusNotify/src/resource.h index 8a89753da3..a9c756c42e 100644 --- a/plugins/NewXstatusNotify/src/resource.h +++ b/plugins/NewXstatusNotify/src/resource.h @@ -146,7 +146,8 @@ #define IDC_CHK_DND 40074
#define IDC_CHK_NA 40075
#define IDC_CHK_OCCUPIED 40076
-#define IDC_CHK_INVISIBLE 40077
+#define IDC_CHK_FREECHAT 40077
+#define IDC_CHK_INVISIBLE 40078
#define IDC_CHK_XSTATUS 40081
#define IDC_CHK_STATUS_MESSAGE 40082
#define IDC_CHK_FROMOFFLINE 40083
@@ -156,6 +157,7 @@ #define IDC_DND_TX 41074
#define IDC_NA_TX 41075
#define IDC_OCCUPIED_TX 41076
+#define IDC_FREEFORCHAT_TX 41077
#define IDC_INVISIBLE_TX 41078
#define IDC_XSTATUS_TX 41081
#define IDC_STATUSMSG_TX 41082
@@ -170,10 +172,12 @@ #define IDC_CHK_NA2 42075
#define IDC_OCCUPIED_BG 42076
#define IDC_CHK_OCCUPIED2 42076
-#define IDC_INVISIBLE_BG 42077
-#define IDC_CHK_INVISIBLE2 42077
-#define IDC_XSTATUS_BG 42078
-#define IDC_STATUSMSG_BG 42079
+#define IDC_FREEFORCHAT_BG 42077
+#define IDC_CHK_FREECHAT2 42077
+#define IDC_INVISIBLE_BG 42078
+#define IDC_CHK_INVISIBLE2 42078
+#define IDC_XSTATUS_BG 42079
+#define IDC_STATUSMSG_BG 42080
// Next default values for new objects
//
diff --git a/plugins/NewXstatusNotify/src/utils.cpp b/plugins/NewXstatusNotify/src/utils.cpp index 2133bcda7e..cce0b55f51 100644 --- a/plugins/NewXstatusNotify/src/utils.cpp +++ b/plugins/NewXstatusNotify/src/utils.cpp @@ -66,6 +66,7 @@ BOOL StatusHasAwayMessage(char *szProto, int status) case ID_STATUS_NA:
case ID_STATUS_OCCUPIED:
case ID_STATUS_DND:
+ case ID_STATUS_FREECHAT:
return TRUE;
default:
|