summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin
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 /plugins/SeenPlugin
parent189f6be24f11066a3c711b783cf98f79f703e3a5 (diff)
fixes #1963 (Remove Free for Chat, On the Phone and Out to Lunch statuses completely)
Diffstat (limited to 'plugins/SeenPlugin')
-rw-r--r--plugins/SeenPlugin/res/resource.rc10
-rw-r--r--plugins/SeenPlugin/src/options.cpp10
-rw-r--r--plugins/SeenPlugin/src/resource.h13
-rw-r--r--plugins/SeenPlugin/src/utils.cpp2
4 files changed, 7 insertions, 28 deletions
diff --git a/plugins/SeenPlugin/res/resource.rc b/plugins/SeenPlugin/res/resource.rc
index 548af8b9c4..abfd36e220 100644
--- a/plugins/SeenPlugin/res/resource.rc
+++ b/plugins/SeenPlugin/res/resource.rc
@@ -1,6 +1,7 @@
// Microsoft Visual C++ generated resource script.
//
#include "..\src\resource.h"
+#include "statusmodes.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
@@ -102,15 +103,6 @@ BEGIN
RTEXT "Do not disturb",IDC_STATIC,10,163,60,10
CONTROL "",ID_STATUS_DND,"ColourPicker",WS_TABSTOP,80,160,20,14
CONTROL "",40094,"ColourPicker",WS_TABSTOP,105,160,20,14
- RTEXT "On the phone",IDC_STATIC,140,83,60,10
- CONTROL "",ID_STATUS_ONTHEPHONE,"ColourPicker",WS_TABSTOP,210,80,20,14
- CONTROL "",40099,"ColourPicker",WS_TABSTOP,235,80,20,14
- RTEXT "Out to lunch",IDC_STATIC,140,103,60,10
- CONTROL "",ID_STATUS_OUTTOLUNCH,"ColourPicker",WS_TABSTOP,210,100,20,14
- CONTROL "",40100,"ColourPicker",WS_TABSTOP,235,100,20,14
- RTEXT "Free for chat",IDC_STATIC,140,123,60,10
- CONTROL "",ID_STATUS_FREECHAT,"ColourPicker",WS_TABSTOP,210,120,20,14
- CONTROL "",40097,"ColourPicker",WS_TABSTOP,235,120,20,14
RTEXT "Invisible",IDC_STATIC,140,143,60,10
CONTROL "",ID_STATUS_INVISIBLE,"ColourPicker",WS_TABSTOP,210,140,20,14
CONTROL "",40098,"ColourPicker",WS_TABSTOP,235,140,20,14
diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp
index 2fb2bb6536..9ee4aa4a57 100644
--- a/plugins/SeenPlugin/src/options.cpp
+++ b/plugins/SeenPlugin/src/options.cpp
@@ -101,7 +101,7 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
EnableWindow(GetDlgItem(hdlg, IDC_POPUPSTAMP), hasPopups);
EnableWindow(GetDlgItem(hdlg, IDC_POPUPSTAMPTEXT), hasPopups);
- for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
+ for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) {
char szSetting[100];
mir_snprintf(szSetting, "Col_%d", i - ID_STATUS_OFFLINE);
DWORD sett = g_plugin.getDword(szSetting, StatusColors15bits[i - ID_STATUS_OFFLINE]);
@@ -133,7 +133,7 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
SendMessage(GetParent(hdlg), PSM_CHANGED, 0, 0);
else if (HIWORD(wparam) == CPN_COLOURCHANGED) {
WORD idText, idBack;
- if (LOWORD(wparam) > ID_STATUS_OUTTOLUNCH) // we have clicked a text color
+ if (LOWORD(wparam) > ID_STATUS_MAX) // we have clicked a text color
idText = wparam, idBack = wparam - 20;
else
idText = wparam + 20, idBack = wparam;
@@ -164,7 +164,7 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
int hasPopups = IsDlgButtonChecked(hdlg, IDC_POPUPS);
EnableWindow(GetDlgItem(hdlg, IDC_POPUPSTAMP), hasPopups);
EnableWindow(GetDlgItem(hdlg, IDC_POPUPSTAMPTEXT), hasPopups);
- for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
+ for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) {
EnableWindow(GetDlgItem(hdlg, i), hasPopups);
EnableWindow(GetDlgItem(hdlg, i + 20), hasPopups);
}
@@ -172,7 +172,7 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
break;
case IDC_DEFAULTCOL:
- for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
+ for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) {
DWORD sett = StatusColors15bits[i - ID_STATUS_OFFLINE];
COLORREF back, text;
GetColorsFromDWord(&back, &text, sett);
@@ -199,7 +199,7 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
if (g_plugin.getByte("UsePopups", 0) != bchecked)
g_plugin.setByte("UsePopups", bchecked);
- for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
+ for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) {
COLORREF back = SendDlgItemMessage(hdlg, i, CPM_GETCOLOUR, 0, 0);
COLORREF text = SendDlgItemMessage(hdlg, i + 20, CPM_GETCOLOUR, 0, 0);
DWORD sett = GetDWordFromColors(back, text);
diff --git a/plugins/SeenPlugin/src/resource.h b/plugins/SeenPlugin/src/resource.h
index 99c712ce5a..049fbe8011 100644
--- a/plugins/SeenPlugin/src/resource.h
+++ b/plugins/SeenPlugin/src/resource.h
@@ -7,19 +7,6 @@
#define TVS_NOTOOLTIPS 0x0080
#endif
-#define ID_STATUS_OFFLINE 40071
-#define ID_STATUS_ONLINE 40072
-#define ID_STATUS_AWAY 40073
-#define ID_STATUS_DND 40074
-#define ID_STATUS_NA 40075
-#define ID_STATUS_OCCUPIED 40076
-#define ID_STATUS_FREECHAT 40077
-#define ID_STATUS_INVISIBLE 40078
-#define ID_STATUS_ONTHEPHONE 40079
-#define ID_STATUS_OUTTOLUNCH 40080
-#define ID_STATUS_IDLE 40081 /* do not use as a status */
-
-
#define IDD_SETTINGS 101
#define IDD_USERINFO 102
#define IDD_MISSED 103
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index 50ae378bb1..ac5c17ff91 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -499,7 +499,7 @@ void myPlaySound(MCONTACT hcontact, WORD newStatus, WORD oldStatus)
if (CallService(MS_IGNORE_ISIGNORED, (WPARAM)hcontact, IGNOREEVENT_USERONLINE)) return;
//oldStatus and hcontact are not used yet
char *soundname = nullptr;
- if ((newStatus == ID_STATUS_ONLINE) || (newStatus == ID_STATUS_FREECHAT)) soundname = "LastSeenTrackedStatusOnline";
+ if (newStatus == ID_STATUS_ONLINE) soundname = "LastSeenTrackedStatusOnline";
else if (newStatus == ID_STATUS_OFFLINE) soundname = "LastSeenTrackedStatusOffline";
else if (oldStatus == ID_STATUS_OFFLINE) soundname = "LastSeenTrackedStatusFromOffline";
else soundname = "LastSeenTrackedStatusChange";