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) --- plugins/BASS_interface/src/Main.cpp | 3 - plugins/Boltun/src/boltun.cpp | 6 +- plugins/BossKeyPlus/src/BossKey.cpp | 5 +- plugins/BossKeyPlus/src/Options.cpp | 2 +- plugins/BossKeyPlus/src/stdafx.h | 2 +- plugins/BuddyPounce/src/dialog.cpp | 17 ++--- plugins/BuddyPounce/src/main.cpp | 6 -- plugins/BuddyPounce/src/stdafx.h | 5 +- plugins/Clist_blind/src/clcopts.cpp | 6 -- plugins/Clist_blind/src/contact.cpp | 4 +- plugins/Clist_modern/src/modern_clcopts.cpp | 6 -- plugins/Clist_modern/src/modern_clcpaint.cpp | 12 +-- plugins/Clist_modern/src/modern_clisttray.cpp | 3 - plugins/Clist_modern/src/modern_clui.cpp | 10 +-- plugins/Clist_modern/src/modern_commonprototypes.h | 4 +- plugins/Clist_modern/src/modern_contact.cpp | 3 - plugins/Clist_modern/src/modern_viewmodebar.cpp | 20 ++--- plugins/Clist_modern/src/resource.h | 6 -- plugins/Clist_nicer/src/clcopts.cpp | 6 +- plugins/Clist_nicer/src/clcpaint.cpp | 4 +- plugins/Clist_nicer/src/clui.cpp | 2 +- plugins/Clist_nicer/src/contact.cpp | 3 - plugins/Clist_nicer/src/extBackg.cpp | 12 --- plugins/Clist_nicer/src/viewmodes.cpp | 21 ++--- plugins/CmdLine/src/mimcmd_handlers.cpp | 6 -- plugins/ExternalAPI/m_account.h | 6 +- plugins/FloatingContacts/src/main.cpp | 3 - plugins/KeyboardNotify/res/resources.rc | 5 +- plugins/KeyboardNotify/src/constants.h | 5 +- plugins/KeyboardNotify/src/main.cpp | 3 - plugins/KeyboardNotify/src/options.cpp | 32 +++----- plugins/KeyboardNotify/src/resource.h | 3 - plugins/MirandaG15/src/CAppletManager.cpp | 2 - plugins/MirandaG15/src/CAppletManager.h | 2 +- plugins/MyDetails/res/resource.rc | 3 - plugins/MyDetails/src/data.cpp | 3 - plugins/MyDetails/src/frame.cpp | 3 +- plugins/MyDetails/src/services.cpp | 2 +- plugins/NewAwaySysMod/res/NewAwaySys.rc | 15 ---- plugins/NewAwaySysMod/src/AwayOpt.cpp | 89 +++++++--------------- plugins/NewAwaySysMod/src/AwaySys.cpp | 15 ++-- plugins/NewAwaySysMod/src/Client.cpp | 5 +- plugins/NewAwaySysMod/src/ContactList.cpp | 2 +- plugins/NewAwaySysMod/src/MsgEventAdded.cpp | 21 +++-- plugins/NewAwaySysMod/src/MsgTree.cpp | 24 +++--- plugins/NewAwaySysMod/src/Properties.cpp | 5 +- plugins/NewAwaySysMod/src/Properties.h | 24 +++--- plugins/NewAwaySysMod/src/Services.cpp | 2 +- plugins/NewAwaySysMod/src/resource.h | 19 +---- plugins/NewXstatusNotify/res/resource.rc | 3 - plugins/NewXstatusNotify/src/indsnd.cpp | 2 +- plugins/NewXstatusNotify/src/main.cpp | 36 --------- plugins/NewXstatusNotify/src/stdafx.h | 63 ++++++++------- plugins/NewXstatusNotify/src/utils.cpp | 3 - plugins/NotifyAnything/src/main.cpp | 3 - plugins/Nudge/src/main.cpp | 10 +-- plugins/Nudge/src/nudge.h | 5 +- plugins/Nudge/src/options.cpp | 8 +- plugins/Ping/src/options.cpp | 2 +- plugins/Popup/res/resource.rc | 6 -- plugins/Popup/src/opt_class.cpp | 29 ++----- plugins/Popup/src/opt_gen.cpp | 9 --- plugins/Popup/src/resource.h | 6 -- plugins/Scriver/src/msgoptions.cpp | 5 +- plugins/Scriver/src/msgs.cpp | 6 -- plugins/SeenPlugin/res/resource.rc | 10 +-- plugins/SeenPlugin/src/options.cpp | 10 +-- plugins/SeenPlugin/src/resource.h | 13 ---- plugins/SeenPlugin/src/utils.cpp | 2 +- plugins/SimpleAR/src/Main.cpp | 6 +- plugins/SimpleAR/src/Options.cpp | 23 +++--- plugins/SimpleStatusMsg/src/main.cpp | 7 +- plugins/SimpleStatusMsg/src/options.cpp | 14 ++-- plugins/SimpleStatusMsg/src/utils.cpp | 6 -- plugins/SkypeStatusChange/src/main.cpp | 5 +- plugins/SkypeStatusChange/src/stdafx.h | 8 +- plugins/StatusChange/res/resource.rc | 8 +- plugins/StatusChange/src/main.cpp | 40 ---------- plugins/StatusChange/src/resource.h | 10 +-- plugins/StatusChange/src/stdafx.h | 3 - plugins/StatusManager/src/advancedautoaway.cpp | 2 +- plugins/StatusManager/src/commonstatus.cpp | 11 +-- plugins/StatusManager/src/ss_options.cpp | 3 - plugins/StatusManager/src/startupstatus.cpp | 6 -- plugins/TabSRMM/res/resource.rc | 3 - plugins/TabSRMM/src/msgoptions.cpp | 6 +- plugins/TabSRMM/src/sendlater.cpp | 2 +- plugins/TipperYM/src/popwin.cpp | 4 +- plugins/TooltipNotify/src/TooltipNotify.cpp | 2 +- plugins/TrafficCounter/src/TrafficCounter.cpp | 2 +- plugins/Utils.pas/protocols.pas | 28 ++----- plugins/Watrack/status/i_status.inc | 3 - plugins/WinterSpeak/res/Speak.rc | 2 - plugins/WinterSpeak/src/AnnounceDatabase.h | 1 - plugins/WinterSpeak/src/AnnounceDialog.cpp | 3 - plugins/WinterSpeak/src/ConfigDatabase.h | 1 - plugins/WinterSpeak/src/DialogConfigActive.cpp | 3 - plugins/WinterSpeak/src/SpeakAnnounce.cpp | 3 - plugins/WinterSpeak/src/SpeakConfig.cpp | 3 - plugins/WinterSpeak/src/UserInformation.cpp | 1 - plugins/WinterSpeak/src/resource.h | 2 - plugins/XSoundNotify/src/xsn_main.cpp | 3 - plugins/YARelay/res/yaRelay.rc | 2 - plugins/YARelay/src/main.cpp | 1 - plugins/YARelay/src/options.cpp | 6 +- plugins/YARelay/src/resource.h | 1 - plugins/YARelay/src/stdafx.h | 3 +- plugins/ZeroNotification/src/options.cpp | 3 - plugins/wbOSD/src/options.cpp | 2 +- plugins/wbOSD/src/stdafx.h | 3 - 110 files changed, 235 insertions(+), 708 deletions(-) (limited to 'plugins') diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index 2abe66e2bf..44b9082d58 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -81,10 +81,7 @@ static int OnPlaySnd(WPARAM wParam, LPARAM lParam) WORD currstat = 1; switch (CallService(MS_CLIST_GETSTATUSMODE, 0, 0)) { - case ID_STATUS_OUTTOLUNCH: currstat <<= 1; - case ID_STATUS_ONTHEPHONE: currstat <<= 1; case ID_STATUS_INVISIBLE: currstat <<= 1; - case ID_STATUS_FREECHAT: currstat <<= 1; case ID_STATUS_DND: currstat <<= 1; case ID_STATUS_OCCUPIED: currstat <<= 1; case ID_STATUS_NA: currstat <<= 1; diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index 9150f943bc..e50af48380 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -87,7 +87,7 @@ wchar_t* GetFullName(const wchar_t *filename) static bool LoadMind(const wchar_t* filename, int &line) { wchar_t* fullname = GetFullName(filename); - HCURSOR newCur = LoadCursor(nullptr, MAKEINTRESOURCE(IDC_WAIT)); + HCURSOR newCur = LoadCursorA(nullptr, MAKEINTRESOURCEA(IDC_WAIT)); HCURSOR oldCur = SetCursor(newCur); #ifdef DEBUG_LOAD_TIME unsigned __int64 t = __rdtsc(); @@ -177,9 +177,7 @@ static bool BoltunAutoChat(MCONTACT hContact) if (status == ID_STATUS_AWAY || status == ID_STATUS_DND || status == ID_STATUS_NA || - status == ID_STATUS_OCCUPIED || - status == ID_STATUS_ONTHEPHONE || - status == ID_STATUS_OUTTOLUNCH) + status == ID_STATUS_OCCUPIED) return true; } diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 43b09fbd89..6907c3dbdf 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -207,9 +207,8 @@ static int ChangeAllProtoStatuses(unsigned statusMode, wchar_t *msg) unsigned status = Proto_GetStatus(proto[i]->szModuleName); if ( (g_wMask & OPT_ONLINEONLY) ? // check "Change only if current status is Online" option - ((status == ID_STATUS_ONLINE) || (status == ID_STATUS_FREECHAT)) // process only "online" and "free for chat" - : - ((status > ID_STATUS_OFFLINE) && (status < ID_STATUS_IDLE) && (status != ID_STATUS_INVISIBLE))) // process all existing statuses except for "invisible" & "offline" + ((status == ID_STATUS_ONLINE)) // process only "online" and "free for chat" + : ((status > ID_STATUS_OFFLINE) && (status < ID_STATUS_IDLE) && (status != ID_STATUS_INVISIBLE))) // process all existing statuses except for "invisible" & "offline" { if (g_wMask & OPT_SETONLINEBACK) { // need to save old statuses & status messages oldStatus[i] = status; diff --git a/plugins/BossKeyPlus/src/Options.cpp b/plugins/BossKeyPlus/src/Options.cpp index ccd861cdc0..006354b216 100644 --- a/plugins/BossKeyPlus/src/Options.cpp +++ b/plugins/BossKeyPlus/src/Options.cpp @@ -111,7 +111,7 @@ public: m_chkUsrDefMsg.SetState(g_wMask & OPT_USEDEFMSG); m_chkTrayIcon.SetState(g_wMask & OPT_TRAYICON); - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) m_cbStatusList.InsertString(Clist_GetStatusModeDescription(i, 0), -1); m_cbStatusList.SetCurSel(g_plugin.getByte("stattype", 2)); diff --git a/plugins/BossKeyPlus/src/stdafx.h b/plugins/BossKeyPlus/src/stdafx.h index c8acdebd5e..1b04427190 100644 --- a/plugins/BossKeyPlus/src/stdafx.h +++ b/plugins/BossKeyPlus/src/stdafx.h @@ -86,7 +86,7 @@ struct CMPlugin : public PLUGIN #define MS_BOSSKEY_HIDE "BossKey/HideMiranda" #define MS_BOSSKEY_ISMIRANDAHIDDEN "BossKey/IsMirandaHidden" -const unsigned STATUS_ARR_TO_ID[8] = { ID_STATUS_OFFLINE, ID_STATUS_ONLINE, ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND, ID_STATUS_FREECHAT, ID_STATUS_INVISIBLE }; +const unsigned STATUS_ARR_TO_ID[] = { ID_STATUS_OFFLINE, ID_STATUS_ONLINE, ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND, ID_STATUS_INVISIBLE }; extern bool g_fOptionsOpen; // options dialog is open. be sure not to hide anything while we're there. extern WORD g_wMask, g_wMaskAdv; extern bool g_bWindowHidden; diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp index 210d11dce3..9421b8e51d 100644 --- a/plugins/BuddyPounce/src/dialog.cpp +++ b/plugins/BuddyPounce/src/dialog.cpp @@ -165,16 +165,13 @@ void statusModes(windowInfo *wi, int myStatusMode) // myStatusMode=1 sendIfMySta SetDlgItemText(hwnd, IDC_CHECK10, TranslateT("To Out to lunch")); } } - CheckDlgButton(hwnd, IDC_CHECK1, statusFlag&ANY ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwnd, IDC_CHECK2, (statusFlag&ONLINE) >> 1 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwnd, IDC_CHECK3, (statusFlag&AWAY) >> 2 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwnd, IDC_CHECK4, (statusFlag&NA) >> 3 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwnd, IDC_CHECK5, (statusFlag&OCCUPIED) >> 4 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwnd, IDC_CHECK6, (statusFlag&DND) >> 5 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwnd, IDC_CHECK7, (statusFlag&FFC) >> 6 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwnd, IDC_CHECK8, (statusFlag&INVISIBLE) >> 7 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwnd, IDC_CHECK9, (statusFlag&PHONE) >> 8 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwnd, IDC_CHECK10, (statusFlag&LUNCH) >> 9 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwnd, IDC_CHECK1, (statusFlag & ANY) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwnd, IDC_CHECK2, (statusFlag & ONLINE) >> 1 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwnd, IDC_CHECK3, (statusFlag & AWAY) >> 2 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwnd, IDC_CHECK4, (statusFlag & NA) >> 3 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwnd, IDC_CHECK5, (statusFlag & OCCUPIED) >> 4 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwnd, IDC_CHECK6, (statusFlag & DND) >> 5 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwnd, IDC_CHECK8, (statusFlag & INVISIBLE) >> 7 ? BST_CHECKED : BST_UNCHECKED); } void deletePounce(MCONTACT hContact) diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index ea2fd39dba..c20ac1913a 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -97,14 +97,8 @@ int statusCheck(int statusFlag, int status) return (statusFlag & OCCUPIED); case ID_STATUS_DND: return (statusFlag & DND); - case ID_STATUS_FREECHAT: - return (statusFlag & FFC); case ID_STATUS_INVISIBLE: return (statusFlag & INVISIBLE); - case ID_STATUS_OUTTOLUNCH: - return (statusFlag & LUNCH); - case ID_STATUS_ONTHEPHONE: - return (statusFlag & PHONE); } return 0; } diff --git a/plugins/BuddyPounce/src/stdafx.h b/plugins/BuddyPounce/src/stdafx.h index 71bf03508d..14808a2ac5 100644 --- a/plugins/BuddyPounce/src/stdafx.h +++ b/plugins/BuddyPounce/src/stdafx.h @@ -43,10 +43,7 @@ struct CMPlugin : public PLUGIN #define NA 8 #define OCCUPIED 16 #define DND 32 -#define FFC 64 -#define INVISIBLE 128 -#define PHONE 256 -#define LUNCH 512 +#define INVISIBLE 64 //======================================================= // Variables diff --git a/plugins/Clist_blind/src/clcopts.cpp b/plugins/Clist_blind/src/clcopts.cpp index c2c2744972..526d7536f5 100644 --- a/plugins/Clist_blind/src/clcopts.cpp +++ b/plugins/Clist_blind/src/clcopts.cpp @@ -62,10 +62,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") } }; static const struct CheckBoxValues_t offlineValues[] = { @@ -75,10 +72,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/plugins/Clist_blind/src/contact.cpp b/plugins/Clist_blind/src/contact.cpp index 61b8c1660e..8265e70aec 100644 --- a/plugins/Clist_blind/src/contact.cpp +++ b/plugins/Clist_blind/src/contact.cpp @@ -37,10 +37,8 @@ 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 } }; +}; static int GetStatusModeOrdering(int statusMode) { diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 3181688df1..07bb701d71 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -256,10 +256,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") } }; static const struct CheckBoxValues_t offlineValues[] = { @@ -269,10 +266,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/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 07ec357523..1d8df8f040 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -173,10 +173,7 @@ int CLCPaint::GetBasicFontID(ClcContact *contact) case ID_STATUS_DND: return FONTID_DND; case ID_STATUS_NA: return FONTID_NA; case ID_STATUS_OCCUPIED: return FONTID_OCCUPIED; - case ID_STATUS_FREECHAT: return FONTID_CHAT; case ID_STATUS_INVISIBLE: return FONTID_INVISIBLE; - case ID_STATUS_ONTHEPHONE: return FONTID_PHONE; - case ID_STATUS_OUTTOLUNCH: return FONTID_LUNCH; } default: @@ -527,10 +524,7 @@ MODERNMASK* CLCPaint::_GetCLCContactRowBackModernMask(ClcGroup *group, ClcContac case ID_STATUS_DND: _AddParamShort(mpModernMask, hi_Status, hi_DND); break; case ID_STATUS_NA: _AddParamShort(mpModernMask, hi_Status, hi_NA); break; case ID_STATUS_OCCUPIED: _AddParamShort(mpModernMask, hi_Status, hi_OCCUPIED); break; - case ID_STATUS_FREECHAT: _AddParamShort(mpModernMask, hi_Status, hi_FREECHAT); break; case ID_STATUS_INVISIBLE: _AddParamShort(mpModernMask, hi_Status, hi_INVISIBLE); break; - case ID_STATUS_OUTTOLUNCH: _AddParamShort(mpModernMask, hi_Status, hi_OUTTOLUNCH); break; - case ID_STATUS_ONTHEPHONE: _AddParamShort(mpModernMask, hi_Status, hi_ONTHEPHONE); break; case ID_STATUS_IDLE: _AddParamShort(mpModernMask, hi_Status, hi_IDLE); break; default: _AddParamShort(mpModernMask, hi_Status, hi_OFFLINE); } @@ -907,8 +901,10 @@ void CLCPaint::_DrawStatusIcon(ClcContact *Drawing, ClcData *dat, int iImage, HD else if (iImage != -1 && HIWORD(iImage) && dat->drawOverlayedStatus) { int status = GetContactCachedStatus(Drawing->hContact); - if (status < ID_STATUS_OFFLINE) status = ID_STATUS_OFFLINE; - else if (status > ID_STATUS_OUTTOLUNCH) status = ID_STATUS_ONLINE; + if (status < ID_STATUS_OFFLINE) + status = ID_STATUS_OFFLINE; + else if (status > ID_STATUS_MAX) + status = ID_STATUS_ONLINE; ske_ImageList_DrawEx(g_himlCListClc, HIWORD(iImage), hdcMem, x, y, cx, cy, colorbg, colorfg, mode); if (dat->drawOverlayedStatus & 2) //draw overlay ske_ImageList_DrawEx(hAvatarOverlays, g_pStatusOverlayIcons[status - ID_STATUS_OFFLINE].listID, hdcMem, x, y, cx, cy, colorbg, colorfg, mode); diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index 3168c4ccc3..596a7256df 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -63,14 +63,11 @@ int GetStatusVal(int status) switch (status) { case ID_STATUS_OFFLINE: return 50; case ID_STATUS_ONLINE: return 100; - case ID_STATUS_FREECHAT: return 110; case ID_STATUS_INVISIBLE: return 120; case ID_STATUS_AWAY: return 200; case ID_STATUS_DND: return 210; case ID_STATUS_NA: return 220; case ID_STATUS_OCCUPIED: return 230; - case ID_STATUS_ONTHEPHONE: return 400; - case ID_STATUS_OUTTOLUNCH: return 410; } return 0; diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index b4f1d998f6..cf75e7b84e 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -111,7 +111,7 @@ static int nAnimatedIconStep = 100; HIMAGELIST hAvatarOverlays = nullptr; -OVERLAYICONINFO g_pAvatarOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1] = +OVERLAYICONINFO g_pAvatarOverlayIcons[MAX_STATUS_COUNT] = { { "AVATAR_OVERLAY_OFFLINE", LPGEN("Offline"), IDI_AVATAR_OVERLAY_OFFLINE, -1 }, { "AVATAR_OVERLAY_ONLINE", LPGEN("Online"), IDI_AVATAR_OVERLAY_ONLINE, -1 }, @@ -119,13 +119,10 @@ OVERLAYICONINFO g_pAvatarOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + { "AVATAR_OVERLAY_DND", LPGEN("Do not disturb"), IDI_AVATAR_OVERLAY_DND, -1 }, { "AVATAR_OVERLAY_NA", LPGEN("Not available"), IDI_AVATAR_OVERLAY_NA, -1 }, { "AVATAR_OVERLAY_OCCUPIED", LPGEN("Occupied"), IDI_AVATAR_OVERLAY_OCCUPIED, -1 }, - { "AVATAR_OVERLAY_CHAT", LPGEN("Free for chat"), IDI_AVATAR_OVERLAY_CHAT, -1 }, { "AVATAR_OVERLAY_INVISIBLE", LPGEN("Invisible"), IDI_AVATAR_OVERLAY_INVISIBLE, -1 }, - { "AVATAR_OVERLAY_PHONE", LPGEN("On the phone"), IDI_AVATAR_OVERLAY_PHONE, -1 }, - { "AVATAR_OVERLAY_LUNCH", LPGEN("Out to lunch"), IDI_AVATAR_OVERLAY_LUNCH, -1 } }; -OVERLAYICONINFO g_pStatusOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1] = +OVERLAYICONINFO g_pStatusOverlayIcons[MAX_STATUS_COUNT] = { { "STATUS_OVERLAY_OFFLINE", LPGEN("Offline"), IDI_STATUS_OVERLAY_OFFLINE, -1 }, { "STATUS_OVERLAY_ONLINE", LPGEN("Online"), IDI_STATUS_OVERLAY_ONLINE, -1 }, @@ -133,10 +130,7 @@ OVERLAYICONINFO g_pStatusOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + { "STATUS_OVERLAY_DND", LPGEN("Do not disturb"), IDI_STATUS_OVERLAY_DND, -1 }, { "STATUS_OVERLAY_NA", LPGEN("Not available"), IDI_STATUS_OVERLAY_NA, -1 }, { "STATUS_OVERLAY_OCCUPIED", LPGEN("Occupied"), IDI_STATUS_OVERLAY_OCCUPIED, -1 }, - { "STATUS_OVERLAY_CHAT", LPGEN("Free for chat"), IDI_STATUS_OVERLAY_CHAT, -1 }, { "STATUS_OVERLAY_INVISIBLE", LPGEN("Invisible"), IDI_STATUS_OVERLAY_INVISIBLE, -1 }, - { "STATUS_OVERLAY_PHONE", LPGEN("On the phone"), IDI_STATUS_OVERLAY_PHONE, -1 }, - { "STATUS_OVERLAY_LUNCH", LPGEN("Out to lunch"), IDI_STATUS_OVERLAY_LUNCH, -1 } }; //////////////// CLUI CLASS IMPLEMENTATION // /////////////////////////////// diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h index f313232167..ca1d6870cb 100644 --- a/plugins/Clist_modern/src/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/modern_commonprototypes.h @@ -262,7 +262,7 @@ extern HRESULT(WINAPI *g_proc_DWMEnableBlurBehindWindow)(HWND hWnd, DWM_BLURBEHI BYTE SkinDBGetContactSettingByte(MCONTACT hContact, const char* szSection, const char*szKey, BYTE bDefault); -extern OVERLAYICONINFO g_pAvatarOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1]; -extern OVERLAYICONINFO g_pStatusOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1]; +extern OVERLAYICONINFO g_pAvatarOverlayIcons[MAX_STATUS_COUNT]; +extern OVERLAYICONINFO g_pStatusOverlayIcons[MAX_STATUS_COUNT]; #endif diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp index a6558e095c..d3592fb2f7 100644 --- a/plugins/Clist_modern/src/modern_contact.cpp +++ b/plugins/Clist_modern/src/modern_contact.cpp @@ -36,10 +36,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 } }; static int LocaleId = -1; diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index dde2d18340..ef58779033 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -158,7 +158,7 @@ static void ShowPage(HWND hwnd, int page) static int UpdateClistItem(MCONTACT hContact, DWORD mask) { - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, hContact, MAKELONG(i - ID_STATUS_OFFLINE, (1 << (i - ID_STATUS_OFFLINE)) & mask ? i - ID_STATUS_OFFLINE : nullImage)); @@ -169,7 +169,7 @@ static DWORD GetMaskForItem(HANDLE hItem) { DWORD dwMask = 0; - for (int i = 0; i <= ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE; i++) + for (int i = 0; i <= ID_STATUS_MAX - ID_STATUS_OFFLINE; i++) dwMask |= (SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, i) == nullImage ? 0 : 1 << i); return dwMask; @@ -186,13 +186,13 @@ static void UpdateStickies() UpdateClistItem(hItem, (localMask == 0 || localMask == stickyStatusMask) ? stickyStatusMask : localMask); } - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) - SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hInfoItem, MAKELONG(i - ID_STATUS_OFFLINE, (1 << (i - ID_STATUS_OFFLINE)) & stickyStatusMask ? i - ID_STATUS_OFFLINE : ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1)); + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) + SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hInfoItem, MAKELONG(i - ID_STATUS_OFFLINE, (1 << (i - ID_STATUS_OFFLINE)) & stickyStatusMask ? i - ID_STATUS_OFFLINE : MAX_STATUS_COUNT)); HANDLE hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_ROOT, 0); hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_NEXTGROUP, (LPARAM)hItem); while (hItem) { - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELONG(i - ID_STATUS_OFFLINE, nullImage)); hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_NEXTGROUP, (LPARAM)hItem); } @@ -253,7 +253,7 @@ static int FillDialog(HWND hwnd) lvc.mask = LVCF_FMT; lvc.fmt = LVCFMT_IMAGE | LVCFMT_LEFT; ListView_InsertColumn(hwndList, 0, &lvc); - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) { + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) { LVITEM item = { 0 }; item.mask = LVIF_TEXT; item.pszText = Clist_GetStatusModeDescription(i, 0); @@ -416,7 +416,7 @@ void SaveState() } { HWND hwndList = GetDlgItem(clvmHwnd, IDC_STATUSMODES); - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) if (ListView_GetCheckState(hwndList, i - ID_STATUS_OFFLINE)) statusMask |= (1 << (i - ID_STATUS_OFFLINE)); } @@ -566,7 +566,7 @@ static void UpdateFilters() { HWND hwndList = GetDlgItem(clvmHwnd, IDC_STATUSMODES); - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) { + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) { if ((1 << (i - ID_STATUS_OFFLINE)) & statusMask) ListView_SetCheckState(hwndList, i - ID_STATUS_OFFLINE, TRUE) else @@ -639,7 +639,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP himlViewModes = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 12, 0); { int i; - for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) { + for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) { HICON hIcon = Skin_LoadProtoIcon(nullptr, i); ImageList_AddIcon(himlViewModes, hIcon); IcoLib_ReleaseIcon(hIcon); @@ -673,7 +673,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP } SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)himlViewModes); - SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETEXTRACOLUMNS, ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE, 0); + SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETEXTRACOLUMNS, ID_STATUS_MAX - ID_STATUS_OFFLINE, 0); CLCINFOITEM cii = { sizeof(cii) }; cii.hParentGroup = nullptr; diff --git a/plugins/Clist_modern/src/resource.h b/plugins/Clist_modern/src/resource.h index c8872ff9c2..4d1e111c47 100644 --- a/plugins/Clist_modern/src/resource.h +++ b/plugins/Clist_modern/src/resource.h @@ -68,12 +68,9 @@ #define IDI_AVATAR_OVERLAY_OCCUPIED 358 #define IDI_AVATAR_OVERLAY_OFFLINE 359 #define IDI_AVATAR_OVERLAY_ONLINE 360 -#define IDI_AVATAR_OVERLAY_PHONE 361 #define IDI_AVATAR_OVERLAY_AWAY 362 #define IDI_AVATAR_OVERLAY_DND 363 #define IDI_AVATAR_OVERLAY_INVISIBLE 364 -#define IDI_AVATAR_OVERLAY_LUNCH 365 -#define IDI_AVATAR_OVERLAY_CHAT 366 #define IDI_ICQC1 367 #define IDI_ICQC2 368 #define IDI_ICQC3 369 @@ -93,12 +90,9 @@ #define IDI_STATUS_OVERLAY_OCCUPIED 401 #define IDI_STATUS_OVERLAY_OFFLINE 402 #define IDI_STATUS_OVERLAY_ONLINE 403 -#define IDI_STATUS_OVERLAY_PHONE 404 #define IDI_STATUS_OVERLAY_AWAY 405 #define IDI_STATUS_OVERLAY_DND 406 #define IDI_STATUS_OVERLAY_INVISIBLE 407 -#define IDI_STATUS_OVERLAY_LUNCH 408 -#define IDI_STATUS_OVERLAY_CHAT 409 #define IDR_TGA_DEFAULT_SKIN 413 #define IDR_MSF_DEFAULT_SKIN 413 #define IDD_OPT_CLUI_2 451 diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp index 9ef0c5d109..92f5503a22 100644 --- a/plugins/Clist_nicer/src/clcopts.cpp +++ b/plugins/Clist_nicer/src/clcopts.cpp @@ -67,13 +67,11 @@ struct CheckBoxValues_t { static const struct CheckBoxValues_t greyoutValues[] = { { GREYF_UNFOCUS, LPGENW("Not focused") }, { MODEF_OFFLINE, LPGENW("Offline") }, { PF2_ONLINE, LPGENW("Online") }, { PF2_SHORTAWAY, LPGENW("Away") }, - { 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_LONGAWAY, LPGENW("Not available") }, { PF2_LIGHTDND, LPGENW("Occupied") }, { PF2_HEAVYDND, LPGENW("Do not disturb") }, { PF2_INVISIBLE, LPGENW("Invisible") }, }; static const struct CheckBoxValues_t offlineValues[] = { { MODEF_OFFLINE, LPGENW("Offline") }, { PF2_ONLINE, LPGENW("Online") }, { PF2_SHORTAWAY, LPGENW("Away") }, { 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_LIGHTDND, LPGENW("Occupied") }, { PF2_HEAVYDND, LPGENW("Do not disturb") }, { PF2_INVISIBLE, LPGENW("Invisible") } }; static UINT sortCtrlIDs[] = { IDC_SORTPRIMARY, IDC_SORTTHEN, IDC_SORTFINALLY, 0 }; diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp index 1bdeca1db5..5274ffa3f3 100644 --- a/plugins/Clist_nicer/src/clcpaint.cpp +++ b/plugins/Clist_nicer/src/clcpaint.cpp @@ -490,7 +490,7 @@ set_bg_l: StatusItems_t *sitem, *sfirstitem, *ssingleitem, *slastitem, *slastitem_NG, *sfirstitem_NG, *ssingleitem_NG, *sevencontact_pos, *soddcontact_pos, *pp_item; - if (cstatus >= ID_STATUS_OFFLINE && cstatus <= ID_STATUS_OUTTOLUNCH) { + if (cstatus >= ID_STATUS_OFFLINE && cstatus <= ID_STATUS_MAX) { BYTE perstatus_ignored; if ((flags & CONTACTF_IDLE) && !arStatusItems[ID_EXTBKIDLE - ID_STATUS_OFFLINE]->IGNORED) @@ -1105,7 +1105,7 @@ bgskipped: // SetTextColor(hdcMem, dat->selTextColour); rcContent.bottom = y + rowHeight; - if (cstatus >= ID_STATUS_OFFLINE && cstatus <= ID_STATUS_OUTTOLUNCH) { + if (cstatus >= ID_STATUS_OFFLINE && cstatus <= ID_STATUS_MAX) { BYTE smsgValid = cEntry->bStatusMsgValid; if ((dwFlags & CLUI_FRAME_SHOWSTATUSMSG && smsgValid > STATUSMSG_XSTATUSID) || smsgValid == STATUSMSG_XSTATUSNAME) diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index c524c64a9a..182e2970be 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -795,7 +795,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l ConfigureCLUIGeometry(0); CluiProtocolStatusChanged(0, nullptr); - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) statusNames[i - ID_STATUS_OFFLINE] = Clist_GetStatusModeDescription(i, 0); //delay creation of CLC so that it can get the status icons right the first time (needs protocol modules loaded) diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp index 3303b45919..9b97456527 100644 --- a/plugins/Clist_nicer/src/contact.cpp +++ b/plugins/Clist_nicer/src/contact.cpp @@ -36,10 +36,7 @@ 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 } }; static int GetContactStatus(MCONTACT hContact) diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index 2181f18511..0357fe0d22 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -68,22 +68,10 @@ static StatusItems_t _StatusItems[] = { CLCDEFAULT_GRADIENT,CLCDEFAULT_CORNER, CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT, CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE - }, {"Free for chat", "EXBK_FFC", ID_STATUS_FREECHAT, - CLCDEFAULT_GRADIENT,CLCDEFAULT_CORNER, - CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT, - CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE }, {"Invisible", "EXBK_Invisible", ID_STATUS_INVISIBLE, CLCDEFAULT_GRADIENT,CLCDEFAULT_CORNER, CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT, CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE - }, {"On the phone", "EXBK_OTP", ID_STATUS_ONTHEPHONE, - CLCDEFAULT_GRADIENT,CLCDEFAULT_CORNER, - CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT, - CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE - }, {"Out to lunch", "EXBK_OTL", ID_STATUS_OUTTOLUNCH, - CLCDEFAULT_GRADIENT,CLCDEFAULT_CORNER, - CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT, - CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE }, {"Idle", "EXBK_IDLE", ID_EXTBKIDLE, CLCDEFAULT_GRADIENT,CLCDEFAULT_CORNER, CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT, diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index 055eaa91a2..727897455e 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -115,7 +115,7 @@ static void ShowPage(HWND hwnd, int page) static int UpdateClistItem(MCONTACT hContact, DWORD mask) { - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, hContact, MAKELONG(i - ID_STATUS_OFFLINE, (1 << (i - ID_STATUS_OFFLINE)) & mask ? i - ID_STATUS_OFFLINE : nullImage)); @@ -126,7 +126,7 @@ static DWORD GetMaskForItem(HANDLE hItem) { DWORD dwMask = 0; - for (int i = 0; i <= ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE; i++) + for (int i = 0; i <= ID_STATUS_MAX - ID_STATUS_OFFLINE; i++) dwMask |= (SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, i) == nullImage ? 0 : 1 << i); return dwMask; @@ -142,13 +142,14 @@ static void UpdateStickies() UpdateClistItem(hItem, (localMask == 0 || localMask == sttStickyStatusMask) ? sttStickyStatusMask : localMask); } - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) - SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hInfoItem, MAKELONG(i - ID_STATUS_OFFLINE, (1 << (i - ID_STATUS_OFFLINE)) & sttStickyStatusMask ? i - ID_STATUS_OFFLINE : ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1)); + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) + SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hInfoItem, + MAKELONG(i - ID_STATUS_OFFLINE, (1 << (i - ID_STATUS_OFFLINE)) & sttStickyStatusMask ? i - ID_STATUS_OFFLINE : MAX_STATUS_COUNT)); HANDLE hItem = (HANDLE)SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_ROOT, 0); hItem = (HANDLE)SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_NEXTGROUP, (LPARAM)hItem); while (hItem) { - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELONG(i - ID_STATUS_OFFLINE, nullImage)); hItem = (HANDLE)SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_NEXTGROUP, (LPARAM)hItem); } @@ -205,7 +206,7 @@ static int FillDialog(HWND hwnd) lvc.fmt = LVCFMT_IMAGE | LVCFMT_LEFT; ListView_InsertColumn(hwndList, 0, &lvc); - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) { + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) { item.pszText = TranslateW(Clist_GetStatusModeDescription(i, 0)); item.iItem = i - ID_STATUS_OFFLINE; ListView_InsertItem(hwndList, &item); @@ -358,7 +359,7 @@ void SaveState() } HWND hwndList = GetDlgItem(sttClvmHwnd, IDC_STATUSMODES); - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) if (ListView_GetCheckState(hwndList, i - ID_STATUS_OFFLINE)) statusMask |= (1 << (i - ID_STATUS_OFFLINE)); @@ -496,7 +497,7 @@ void UpdateFilters() { HWND hwndList = GetDlgItem(sttClvmHwnd, IDC_STATUSMODES); - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) { + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) { if ((1 << (i - ID_STATUS_OFFLINE)) & statusMask) ListView_SetCheckState(hwndList, i - ID_STATUS_OFFLINE, TRUE) else @@ -546,7 +547,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP EnableThemeDialogTexture(hwndDlg, ETDT_ENABLETAB); himlViewModes = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 12, 0); - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) ImageList_AddIcon(himlViewModes, Skin_LoadProtoIcon(nullptr, i)); { HICON hIcon = (HICON)LoadImage(g_plugin.getInst(), MAKEINTRESOURCE(IDI_MINIMIZE), IMAGE_ICON, 16, 16, 0); @@ -573,7 +574,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP Utils::enableDlgControl(hwndDlg, IDC_ADDVIEWMODE, FALSE); SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)himlViewModes); - SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETEXTRACOLUMNS, ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE, 0); + SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETEXTRACOLUMNS, ID_STATUS_MAX - ID_STATUS_OFFLINE, 0); { CLCINFOITEM cii = { 0 }; cii.cbSize = sizeof(cii); diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index 3ac2a26b0a..c871496362 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -166,14 +166,8 @@ int ParseStatusParam(const wchar_t *status) return ID_STATUS_NA; if (!mir_wstrcmp(lower, L"occupied")) return ID_STATUS_OCCUPIED; - if (!mir_wstrcmp(lower, L"freechat")) - return ID_STATUS_FREECHAT; if (!mir_wstrcmp(lower, L"invisible")) return ID_STATUS_INVISIBLE; - if (!mir_wstrcmp(lower, L"onthephone")) - return ID_STATUS_ONTHEPHONE; - if (!mir_wstrcmp(lower, L"outtolunch")) - return ID_STATUS_OUTTOLUNCH; return 0; } diff --git a/plugins/ExternalAPI/m_account.h b/plugins/ExternalAPI/m_account.h index ed342bafeb..fe01813f33 100644 --- a/plugins/ExternalAPI/m_account.h +++ b/plugins/ExternalAPI/m_account.h @@ -127,10 +127,8 @@ typedef struct CAccount #define YAMN_ACC_ST3 0x00000008 //Check (countdown) when Not available #define YAMN_ACC_ST4 0x00000010 //Check (countdown) when Occupied #define YAMN_ACC_ST5 0x00000020 //Check (countdown) when DND - #define YAMN_ACC_ST6 0x00000040 //Check (countdown) when Free for chat - #define YAMN_ACC_ST7 0x00000080 //Check (countdown) when Invisible - #define YAMN_ACC_ST8 0x00000100 //Check (countdown) when On the phone - #define YAMN_ACC_ST9 0x00000200 //Check (countdown) when Out to lunch + #define YAMN_ACC_ST6 0x00000040 //Check (countdown) when Invisible + #define YAMN_ACC_STARTA 0x00010000 //Check on start anyway #define YAMN_ACC_STARTS 0x00020000 //Check on start regarding to status setting #define YAMN_ACC_FORCE 0x00040000 //Check when "check new mail" item pressed (it is called forced checking) diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index 7656b7f229..05949a2092 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -596,10 +596,7 @@ static int 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/plugins/KeyboardNotify/res/resources.rc b/plugins/KeyboardNotify/res/resources.rc index 8ba35da2f4..6291f253a1 100644 --- a/plugins/KeyboardNotify/res/resources.rc +++ b/plugins/KeyboardNotify/res/resources.rc @@ -80,10 +80,7 @@ BEGIN CONTROL "Occupied",IDC_OCCUPIED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,118,128,9 CONTROL "Not available",IDC_NA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,108,128,9 CONTROL "Do not disturb",IDC_DND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,128,85,9 - CONTROL "Free for chat",IDC_FREECHAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,138,127,9 - CONTROL "Invisible",IDC_INVISIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,148,128,9 - CONTROL "On the phone",IDC_ONTHEPHONE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,158,128,9 - CONTROL "Out to lunch",IDC_OUTTOLUNCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,168,127,9 + CONTROL "Invisible",IDC_INVISIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,138,128,9 GROUPBOX "Pending Events",IDC_STATIC,155,189,147,28 LTEXT "Remind me every",IDC_STATIC,168,200,58,9 EDITTEXT IDC_SREMCHECK,226,198,37,13,ES_NUMBER diff --git a/plugins/KeyboardNotify/src/constants.h b/plugins/KeyboardNotify/src/constants.h index d6637469bf..d8f36a41b9 100644 --- a/plugins/KeyboardNotify/src/constants.h +++ b/plugins/KeyboardNotify/src/constants.h @@ -41,10 +41,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MAP_NA 4 #define MAP_OCCUPIED 8 #define MAP_DND 16 -#define MAP_FREECHAT 32 -#define MAP_INVISIBLE 64 -#define MAP_ONTHEPHONE 128 -#define MAP_OUTTOLUNCH 256 +#define MAP_INVISIBLE 32 #define MAP_OFFLINE 512 // Default settings diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index def163577f..1abeb64cb1 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -156,10 +156,7 @@ BOOL isStatusEnabled(int status) case ID_STATUS_NA: return wStatusMap & MAP_NA; case ID_STATUS_OCCUPIED: return wStatusMap & MAP_OCCUPIED; case ID_STATUS_DND: return wStatusMap & MAP_DND; - case ID_STATUS_FREECHAT: return wStatusMap & MAP_FREECHAT; case ID_STATUS_INVISIBLE: return wStatusMap & MAP_INVISIBLE; - case ID_STATUS_ONTHEPHONE: return wStatusMap & MAP_ONTHEPHONE; - case ID_STATUS_OUTTOLUNCH: return wStatusMap & MAP_OUTTOLUNCH; } return FALSE; } diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp index 47fbb0a007..780efa029b 100644 --- a/plugins/KeyboardNotify/src/options.cpp +++ b/plugins/KeyboardNotify/src/options.cpp @@ -636,19 +636,16 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara SendDlgItemMessage(hwndDlg, IDC_MIRORWIN, CB_SETCURSEL, (WPARAM)bMirandaOrWindows, 0); if (!(bFlashUntil & UNTIL_REATTENDED)) EnableWindow(GetDlgItem(hwndDlg, IDC_MIRORWIN), FALSE); - CheckDlgButton(hwndDlg, IDC_UNTILOPEN, bFlashUntil&UNTIL_EVENTSOPEN ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_UNTILCOND, bFlashUntil&UNTIL_CONDITIONS ? BST_CHECKED : BST_UNCHECKED); - - CheckDlgButton(hwndDlg, IDC_ONLINE, wStatusMap&MAP_ONLINE ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_AWAY, wStatusMap&MAP_AWAY ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_NA, wStatusMap&MAP_NA ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_OCCUPIED, wStatusMap&MAP_OCCUPIED ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_DND, wStatusMap&MAP_DND ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_FREECHAT, wStatusMap&MAP_FREECHAT ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_INVISIBLE, wStatusMap&MAP_INVISIBLE ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_ONTHEPHONE, wStatusMap&MAP_ONTHEPHONE ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_OUTTOLUNCH, wStatusMap&MAP_OUTTOLUNCH ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_OFFLINE, wStatusMap&MAP_OFFLINE ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_UNTILOPEN, bFlashUntil & UNTIL_EVENTSOPEN ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_UNTILCOND, bFlashUntil & UNTIL_CONDITIONS ? BST_CHECKED : BST_UNCHECKED); + + CheckDlgButton(hwndDlg, IDC_ONLINE, wStatusMap & MAP_ONLINE ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_AWAY, wStatusMap & MAP_AWAY ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_NA, wStatusMap & MAP_NA ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_OCCUPIED, wStatusMap & MAP_OCCUPIED ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_DND, wStatusMap & MAP_DND ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_INVISIBLE, wStatusMap & MAP_INVISIBLE ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_OFFLINE, wStatusMap & MAP_OFFLINE ? BST_CHECKED : BST_UNCHECKED); SendDlgItemMessage(hwndDlg, IDC_REMCHECK, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_SREMCHECK), 0); SendDlgItemMessage(hwndDlg, IDC_REMCHECK, UDM_SETRANGE32, 0, MAKELONG(UD_MAXVAL, 0)); @@ -689,10 +686,7 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara case IDC_NA: case IDC_OCCUPIED: case IDC_DND: - case IDC_FREECHAT: case IDC_INVISIBLE: - case IDC_ONTHEPHONE: - case IDC_OUTTOLUNCH: case IDC_OFFLINE: EnableWindow(GetDlgItem(hwndDlg, IDC_IFNOTTOP), IsDlgButtonChecked(hwndDlg, IDC_IFOPEN) == BST_CHECKED); EnableWindow(GetDlgItem(hwndDlg, IDC_SOLDER), IsDlgButtonChecked(hwndDlg, IDC_IFOLDER) == BST_CHECKED); @@ -785,14 +779,8 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara statusMap |= MAP_OCCUPIED; if (IsDlgButtonChecked(hwndDlg, IDC_DND) == BST_CHECKED) statusMap |= MAP_DND; - if (IsDlgButtonChecked(hwndDlg, IDC_FREECHAT) == BST_CHECKED) - statusMap |= MAP_FREECHAT; if (IsDlgButtonChecked(hwndDlg, IDC_INVISIBLE) == BST_CHECKED) statusMap |= MAP_INVISIBLE; - if (IsDlgButtonChecked(hwndDlg, IDC_ONTHEPHONE) == BST_CHECKED) - statusMap |= MAP_ONTHEPHONE; - if (IsDlgButtonChecked(hwndDlg, IDC_OUTTOLUNCH) == BST_CHECKED) - statusMap |= MAP_OUTTOLUNCH; if (IsDlgButtonChecked(hwndDlg, IDC_OFFLINE) == BST_CHECKED) statusMap |= MAP_OFFLINE; g_plugin.setWord("status", statusMap); diff --git a/plugins/KeyboardNotify/src/resource.h b/plugins/KeyboardNotify/src/resource.h index 87528e8fec..af747a03fe 100644 --- a/plugins/KeyboardNotify/src/resource.h +++ b/plugins/KeyboardNotify/src/resource.h @@ -39,10 +39,7 @@ #define IDC_NA 1024 #define IDC_OCCUPIED 1025 #define IDC_DND 1026 -#define IDC_FREECHAT 1027 #define IDC_INVISIBLE 1028 -#define IDC_ONTHEPHONE 1029 -#define IDC_OUTTOLUNCH 1030 #define IDC_OFFLINE 1031 #define IDC_REMCHECK 1032 #define IDC_SREMCHECK 1033 diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index c0625f81c2..3534f2ea7f 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -506,8 +506,6 @@ HBITMAP CAppletManager::GetStatusBitmap(int iStatus) return m_ahStatusBitmaps[5]; case ID_STATUS_INVISIBLE: return m_ahStatusBitmaps[6]; - case ID_STATUS_FREECHAT: - return m_ahStatusBitmaps[7]; case ID_STATUS_AWAY: default: return m_ahStatusBitmaps[2]; diff --git a/plugins/MirandaG15/src/CAppletManager.h b/plugins/MirandaG15/src/CAppletManager.h index 80a29d9603..35cc98ac7e 100644 --- a/plugins/MirandaG15/src/CAppletManager.h +++ b/plugins/MirandaG15/src/CAppletManager.h @@ -181,7 +181,7 @@ private: bool m_bScreensaver = false; - HBITMAP m_ahStatusBitmaps[8]; + HBITMAP m_ahStatusBitmaps[7]; HBITMAP m_ahEventBitmaps[4]; HBITMAP m_ahLargeEventBitmaps[4]; }; diff --git a/plugins/MyDetails/res/resource.rc b/plugins/MyDetails/res/resource.rc index ca70d0ab43..bc260f831a 100644 --- a/plugins/MyDetails/res/resource.rc +++ b/plugins/MyDetails/res/resource.rc @@ -196,10 +196,7 @@ BEGIN MENUITEM "&Not available", ID_STATUS_NA MENUITEM "Occ&upied", ID_STATUS_OCCUPIED MENUITEM "&Do not disturb", ID_STATUS_DND - MENUITEM "&Free for chat", ID_STATUS_FREECHAT MENUITEM "&Invisible", ID_STATUS_INVISIBLE - MENUITEM "On the &phone", ID_STATUS_ONTHEPHONE - MENUITEM "Out to &lunch", ID_STATUS_OUTTOLUNCH END POPUP "Context popup" BEGIN diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp index adb014400f..3f68fdb273 100644 --- a/plugins/MyDetails/src/data.cpp +++ b/plugins/MyDetails/src/data.cpp @@ -532,12 +532,9 @@ static 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; } diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index 0674df3f1b..f2b75f23df 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -1456,8 +1456,7 @@ void ShowProtocolStatusMenu(HWND hwnd, MyDetailsFrameData *data, Protocol *proto } else { // Well, lets do it by hand - static unsigned statusModePf2List[] = { 0xFFFFFFFF, PF2_ONLINE, PF2_SHORTAWAY, PF2_LONGAWAY, PF2_LIGHTDND, PF2_HEAVYDND, PF2_FREECHAT, - PF2_INVISIBLE, PF2_ONTHEPHONE, PF2_OUTTOLUNCH }; + static unsigned statusModePf2List[] = { 0xFFFFFFFF, PF2_ONLINE, PF2_SHORTAWAY, PF2_LONGAWAY, PF2_LIGHTDND, PF2_HEAVYDND, PF2_INVISIBLE }; menu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_MENU1)); submenu = GetSubMenu(menu, 0); diff --git a/plugins/MyDetails/src/services.cpp b/plugins/MyDetails/src/services.cpp index 89c84fb860..04f3e795c2 100644 --- a/plugins/MyDetails/src/services.cpp +++ b/plugins/MyDetails/src/services.cpp @@ -386,7 +386,7 @@ INT_PTR PluginCommand_SetMyStatusMessageUI(WPARAM wParam, LPARAM lParam) int proto_num = -1; Protocol *proto = nullptr; - if (status != 0 && (status < ID_STATUS_OFFLINE || status > ID_STATUS_OUTTOLUNCH)) + if (status != 0 && (status < ID_STATUS_OFFLINE || status > ID_STATUS_MAX)) return -10; if (proto_name != nullptr) { diff --git a/plugins/NewAwaySysMod/res/NewAwaySys.rc b/plugins/NewAwaySysMod/res/NewAwaySys.rc index f6e339efb3..a5055cf6b4 100644 --- a/plugins/NewAwaySysMod/res/NewAwaySys.rc +++ b/plugins/NewAwaySysMod/res/NewAwaySys.rc @@ -100,10 +100,7 @@ BEGIN CONTROL "&Not available",IDC_REPLYDLG_DISABLE_NA,"MButtonClass",WS_TABSTOP,53,146,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "Occ&upied",IDC_REPLYDLG_DISABLE_OCC,"MButtonClass",WS_TABSTOP,69,146,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "&Do not disturb",IDC_REPLYDLG_DISABLE_DND,"MButtonClass",WS_TABSTOP,85,146,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "&Free for chat",IDC_REPLYDLG_DISABLE_FFC,"MButtonClass",WS_TABSTOP,101,146,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "&Invisible",IDC_REPLYDLG_DISABLE_INV,"MButtonClass",WS_TABSTOP,117,146,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "On the &phone",IDC_REPLYDLG_DISABLE_OTP,"MButtonClass",WS_TABSTOP,133,146,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "Out to &lunch",IDC_REPLYDLG_DISABLE_OTL,"MButtonClass",WS_TABSTOP,149,146,16,14,WS_EX_NOACTIVATE | 0x10000000L LTEXT "Autoreply format:",IDC_REPLYDLG_STATIC_FORMAT,13,168,283,8 EDITTEXT IDC_REPLYDLG_PREFIX,21,180,209,30,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL CONTROL "V",IDC_REPLYDLG_VARS,"MButtonClass",WS_TABSTOP,231,180,16,14,WS_EX_NOACTIVATE | 0x10000000L @@ -147,10 +144,7 @@ BEGIN CONTROL "&Not available",IDC_MESSAGEDLG_DEF_NA,"MButtonClass",WS_TABSTOP,181,197,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "Occ&upied",IDC_MESSAGEDLG_DEF_OCC,"MButtonClass",WS_TABSTOP,197,197,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "&Do not disturb",IDC_MESSAGEDLG_DEF_DND,"MButtonClass",WS_TABSTOP,213,197,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "&Free for chat",IDC_MESSAGEDLG_DEF_FFC,"MButtonClass",WS_TABSTOP,229,197,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "&Invisible",IDC_MESSAGEDLG_DEF_INV,"MButtonClass",WS_TABSTOP,245,197,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "On the &phone",IDC_MESSAGEDLG_DEF_OTP,"MButtonClass",WS_TABSTOP,261,197,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "Out to &lunch",IDC_MESSAGEDLG_DEF_OTL,"MButtonClass",WS_TABSTOP,277,197,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "New message",IDC_MESSAGEDLG_NEWMSG,"MButtonClass",WS_TABSTOP,138,166,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "New category",IDC_MESSAGEDLG_NEWCAT,"MButtonClass",WS_TABSTOP,154,166,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "Delete",IDC_MESSAGEDLG_DEL,"MButtonClass",WS_TABSTOP,170,166,16,14,WS_EX_NOACTIVATE | 0x10000000L @@ -204,13 +198,7 @@ BEGIN CONTROL "&Not available",IDC_MOREOPTDLG_DONTPOPDLG_NA,"MButtonClass",WS_TABSTOP,44,212,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "Occ&upied",IDC_MOREOPTDLG_DONTPOPDLG_OCC,"MButtonClass",WS_TABSTOP,60,212,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "&Do not disturb",IDC_MOREOPTDLG_DONTPOPDLG_DND,"MButtonClass",WS_TABSTOP,76,212,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "&Free for chat",IDC_MOREOPTDLG_DONTPOPDLG_FFC, - "MButtonClass",WS_TABSTOP,92,212,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "&Invisible",IDC_MOREOPTDLG_DONTPOPDLG_INV,"MButtonClass",WS_TABSTOP,108,212,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "On the &phone",IDC_MOREOPTDLG_DONTPOPDLG_OTP, - "MButtonClass",WS_TABSTOP,124,212,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "Out to &lunch",IDC_MOREOPTDLG_DONTPOPDLG_OTL, - "MButtonClass",WS_TABSTOP,140,212,16,14,WS_EX_NOACTIVATE | 0x10000000L END IDD_READAWAYMSG DIALOGEX 0, 0, 186, 72 @@ -366,10 +354,7 @@ BEGIN MENUITEM "&Not available", IDR_MSGTREEMENU_DEF_NA MENUITEM "Occ&upied", IDR_MSGTREEMENU_DEF_OCC MENUITEM "&Do not disturb", IDR_MSGTREEMENU_DEF_DND - MENUITEM "&Free for chat", IDR_MSGTREEMENU_DEF_FFC MENUITEM "&Invisible", IDR_MSGTREEMENU_DEF_INV - MENUITEM "On the &phone", IDR_MSGTREEMENU_DEF_OTP - MENUITEM "Out to &lunch", IDR_MSGTREEMENU_DEF_OTL END MENUITEM SEPARATOR MENUITEM "Create new &message", 40022 diff --git a/plugins/NewAwaySysMod/src/AwayOpt.cpp b/plugins/NewAwaySysMod/src/AwayOpt.cpp index 9e1400381f..9169604e39 100644 --- a/plugins/NewAwaySysMod/src/AwayOpt.cpp +++ b/plugins/NewAwaySysMod/src/AwayOpt.cpp @@ -99,15 +99,12 @@ struct { int DlgItem, Status, IconIndex; } static Dlg1DefMsgDlgItems[] = { - IDC_MESSAGEDLG_DEF_ONL, ID_STATUS_ONLINE, ILI_PROTO_ONL, - IDC_MESSAGEDLG_DEF_AWAY, ID_STATUS_AWAY, ILI_PROTO_AWAY, - IDC_MESSAGEDLG_DEF_NA, ID_STATUS_NA, ILI_PROTO_NA, - IDC_MESSAGEDLG_DEF_OCC, ID_STATUS_OCCUPIED, ILI_PROTO_OCC, - IDC_MESSAGEDLG_DEF_DND, ID_STATUS_DND, ILI_PROTO_DND, - IDC_MESSAGEDLG_DEF_FFC, ID_STATUS_FREECHAT, ILI_PROTO_FFC, - IDC_MESSAGEDLG_DEF_INV, ID_STATUS_INVISIBLE, ILI_PROTO_INV, - IDC_MESSAGEDLG_DEF_OTP, ID_STATUS_ONTHEPHONE, ILI_PROTO_OTP, - IDC_MESSAGEDLG_DEF_OTL, ID_STATUS_OUTTOLUNCH, ILI_PROTO_OTL + { IDC_MESSAGEDLG_DEF_ONL, ID_STATUS_ONLINE, ILI_PROTO_ONL }, + { IDC_MESSAGEDLG_DEF_AWAY, ID_STATUS_AWAY, ILI_PROTO_AWAY }, + { IDC_MESSAGEDLG_DEF_NA, ID_STATUS_NA, ILI_PROTO_NA }, + { IDC_MESSAGEDLG_DEF_OCC, ID_STATUS_OCCUPIED, ILI_PROTO_OCC }, + { IDC_MESSAGEDLG_DEF_DND, ID_STATUS_DND, ILI_PROTO_DND }, + { IDC_MESSAGEDLG_DEF_INV, ID_STATUS_INVISIBLE, ILI_PROTO_INV } }; struct { @@ -265,10 +262,7 @@ static INT_PTR CALLBACK MessagesOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_MESSAGEDLG_DEF_NA: case IDC_MESSAGEDLG_DEF_OCC: case IDC_MESSAGEDLG_DEF_DND: - case IDC_MESSAGEDLG_DEF_FFC: case IDC_MESSAGEDLG_DEF_INV: - case IDC_MESSAGEDLG_DEF_OTP: - case IDC_MESSAGEDLG_DEF_OTL: for (int i = 0; i < _countof(Dlg1DefMsgDlgItems); i++) { if (LOWORD(wParam) == Dlg1DefMsgDlgItems[i].DlgItem) { MsgTree->SetDefMsg(Dlg1DefMsgDlgItems[i].Status, MsgTree->GetSelection()->ID); // PSM_CHANGED is sent here through MTN_DEFMSGCHANGED, so we don't need to send it once more @@ -345,15 +339,12 @@ struct { int DlgItem, Status, IconIndex; } static Dlg2StatusButtons[] = { - IDC_MOREOPTDLG_DONTPOPDLG_ONL, ID_STATUS_ONLINE, ILI_PROTO_ONL, - IDC_MOREOPTDLG_DONTPOPDLG_AWAY, ID_STATUS_AWAY, ILI_PROTO_AWAY, - IDC_MOREOPTDLG_DONTPOPDLG_NA, ID_STATUS_NA, ILI_PROTO_NA, - IDC_MOREOPTDLG_DONTPOPDLG_OCC, ID_STATUS_OCCUPIED, ILI_PROTO_OCC, - IDC_MOREOPTDLG_DONTPOPDLG_DND, ID_STATUS_DND, ILI_PROTO_DND, - IDC_MOREOPTDLG_DONTPOPDLG_FFC, ID_STATUS_FREECHAT, ILI_PROTO_FFC, - IDC_MOREOPTDLG_DONTPOPDLG_INV, ID_STATUS_INVISIBLE, ILI_PROTO_INV, - IDC_MOREOPTDLG_DONTPOPDLG_OTP, ID_STATUS_ONTHEPHONE, ILI_PROTO_OTP, - IDC_MOREOPTDLG_DONTPOPDLG_OTL, ID_STATUS_OUTTOLUNCH, ILI_PROTO_OTL + { IDC_MOREOPTDLG_DONTPOPDLG_ONL, ID_STATUS_ONLINE, ILI_PROTO_ONL }, + { IDC_MOREOPTDLG_DONTPOPDLG_AWAY, ID_STATUS_AWAY, ILI_PROTO_AWAY }, + { IDC_MOREOPTDLG_DONTPOPDLG_NA, ID_STATUS_NA, ILI_PROTO_NA }, + { IDC_MOREOPTDLG_DONTPOPDLG_OCC, ID_STATUS_OCCUPIED, ILI_PROTO_OCC }, + { IDC_MOREOPTDLG_DONTPOPDLG_DND, ID_STATUS_DND, ILI_PROTO_DND }, + { IDC_MOREOPTDLG_DONTPOPDLG_INV, ID_STATUS_INVISIBLE, ILI_PROTO_INV } }; static INT_PTR CALLBACK MoreOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -419,10 +410,7 @@ static INT_PTR CALLBACK MoreOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case IDC_MOREOPTDLG_DONTPOPDLG_NA: case IDC_MOREOPTDLG_DONTPOPDLG_OCC: case IDC_MOREOPTDLG_DONTPOPDLG_DND: - case IDC_MOREOPTDLG_DONTPOPDLG_FFC: case IDC_MOREOPTDLG_DONTPOPDLG_INV: - case IDC_MOREOPTDLG_DONTPOPDLG_OTP: - case IDC_MOREOPTDLG_DONTPOPDLG_OTL: SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); return 0; } @@ -471,15 +459,12 @@ static struct { int DlgItem, Status, IconIndex; } Dlg3StatusButtons[] = { - IDC_REPLYDLG_DISABLE_ONL, ID_STATUS_ONLINE, ILI_PROTO_ONL, - IDC_REPLYDLG_DISABLE_AWAY, ID_STATUS_AWAY, ILI_PROTO_AWAY, - IDC_REPLYDLG_DISABLE_NA, ID_STATUS_NA, ILI_PROTO_NA, - IDC_REPLYDLG_DISABLE_OCC, ID_STATUS_OCCUPIED, ILI_PROTO_OCC, - IDC_REPLYDLG_DISABLE_DND, ID_STATUS_DND, ILI_PROTO_DND, - IDC_REPLYDLG_DISABLE_FFC, ID_STATUS_FREECHAT, ILI_PROTO_FFC, - IDC_REPLYDLG_DISABLE_INV, ID_STATUS_INVISIBLE, ILI_PROTO_INV, - IDC_REPLYDLG_DISABLE_OTP, ID_STATUS_ONTHEPHONE, ILI_PROTO_OTP, - IDC_REPLYDLG_DISABLE_OTL, ID_STATUS_OUTTOLUNCH, ILI_PROTO_OTL + { IDC_REPLYDLG_DISABLE_ONL, ID_STATUS_ONLINE, ILI_PROTO_ONL }, + { IDC_REPLYDLG_DISABLE_AWAY, ID_STATUS_AWAY, ILI_PROTO_AWAY }, + { IDC_REPLYDLG_DISABLE_NA, ID_STATUS_NA, ILI_PROTO_NA }, + { IDC_REPLYDLG_DISABLE_OCC, ID_STATUS_OCCUPIED, ILI_PROTO_OCC }, + { IDC_REPLYDLG_DISABLE_DND, ID_STATUS_DND, ILI_PROTO_DND }, + { IDC_REPLYDLG_DISABLE_INV, ID_STATUS_INVISIBLE, ILI_PROTO_INV }, }; INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -603,10 +588,7 @@ INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_REPLYDLG_DISABLE_NA: case IDC_REPLYDLG_DISABLE_OCC: case IDC_REPLYDLG_DISABLE_DND: - case IDC_REPLYDLG_DISABLE_FFC: case IDC_REPLYDLG_DISABLE_INV: - case IDC_REPLYDLG_DISABLE_OTP: - case IDC_REPLYDLG_DISABLE_OTL: if (!ChangeLock) SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); break; @@ -649,15 +631,12 @@ static struct { int DlgItem, Status, IconIndex; } Dlg4DefMsgDlgItems[] = { - IDC_MESSAGEDLG_DEF_ONL, ID_STATUS_ONLINE, ILI_PROTO_ONL, - IDC_MESSAGEDLG_DEF_AWAY, ID_STATUS_AWAY, ILI_PROTO_AWAY, - IDC_MESSAGEDLG_DEF_NA, ID_STATUS_NA, ILI_PROTO_NA, - IDC_MESSAGEDLG_DEF_OCC, ID_STATUS_OCCUPIED, ILI_PROTO_OCC, - IDC_MESSAGEDLG_DEF_DND, ID_STATUS_DND, ILI_PROTO_DND, - IDC_MESSAGEDLG_DEF_FFC, ID_STATUS_FREECHAT, ILI_PROTO_FFC, - IDC_MESSAGEDLG_DEF_INV, ID_STATUS_INVISIBLE, ILI_PROTO_INV, - IDC_MESSAGEDLG_DEF_OTP, ID_STATUS_ONTHEPHONE, ILI_PROTO_OTP, - IDC_MESSAGEDLG_DEF_OTL, ID_STATUS_OUTTOLUNCH, ILI_PROTO_OTL + { IDC_MESSAGEDLG_DEF_ONL, ID_STATUS_ONLINE, ILI_PROTO_ONL }, + { IDC_MESSAGEDLG_DEF_AWAY, ID_STATUS_AWAY, ILI_PROTO_AWAY }, + { IDC_MESSAGEDLG_DEF_NA, ID_STATUS_NA, ILI_PROTO_NA }, + { IDC_MESSAGEDLG_DEF_OCC, ID_STATUS_OCCUPIED, ILI_PROTO_OCC }, + { IDC_MESSAGEDLG_DEF_DND, ID_STATUS_DND, ILI_PROTO_DND }, + { IDC_MESSAGEDLG_DEF_INV, ID_STATUS_INVISIBLE, ILI_PROTO_INV } }; static struct { @@ -833,7 +812,7 @@ static void SaveItemState(HWND hwndList, MCONTACT hContact, HANDLE hItem) if (hContact != INVALID_CONTACT_ID && g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_PERSTATUSPERSONALSETTINGS)) { int iMode; - for (iMode = ID_STATUS_AWAY; iMode < ID_STATUS_OUTTOLUNCH; iMode++) { + for (iMode = ID_STATUS_AWAY; iMode < ID_STATUS_MAX; iMode++) { if (Ignore != VAL_INDEFINITE) CContactSettings(iMode, hContact).Ignore = Ignore; @@ -856,7 +835,7 @@ static void SetAllContactIcons(HWND hwndList, HANDLE hItemUnknown) int Reply = CContactSettings(ID_STATUS_ONLINE, hContact).Autoreply; if (g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_PERSTATUSPERSONALSETTINGS)) { int iMode; - for (iMode = ID_STATUS_AWAY; iMode < ID_STATUS_OUTTOLUNCH; iMode++) { + for (iMode = ID_STATUS_AWAY; iMode < ID_STATUS_MAX; iMode++) { if (CContactSettings(iMode, hContact).Ignore != Ignore) Ignore = VAL_INDEFINITE; @@ -1055,10 +1034,8 @@ void InitOptions() g_MessagesOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MESSAGEDLG_DEF_NA, nullptr, DBVT_BYTE, 0, 0, IDC_MESSAGEDLG_MSGTREE)); g_MessagesOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MESSAGEDLG_DEF_OCC, nullptr, DBVT_BYTE, 0, 0, IDC_MESSAGEDLG_MSGTREE)); g_MessagesOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MESSAGEDLG_DEF_DND, nullptr, DBVT_BYTE, 0, 0, IDC_MESSAGEDLG_MSGTREE)); - g_MessagesOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MESSAGEDLG_DEF_FFC, nullptr, DBVT_BYTE, 0, 0, IDC_MESSAGEDLG_MSGTREE)); g_MessagesOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MESSAGEDLG_DEF_INV, nullptr, DBVT_BYTE, 0, 0, IDC_MESSAGEDLG_MSGTREE)); - g_MessagesOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MESSAGEDLG_DEF_OTP, nullptr, DBVT_BYTE, 0, 0, IDC_MESSAGEDLG_MSGTREE)); - g_MessagesOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MESSAGEDLG_DEF_OTL, nullptr, DBVT_BYTE, 0, 0, IDC_MESSAGEDLG_MSGTREE)); + TreeItemArray DefMsgTree; int ParentID1; int ID = 0; @@ -1078,14 +1055,8 @@ void InitOptions() DefMsgTree.AddElem(CTreeItem(TranslateT("Occupied"), ParentID1, ID++, 0, TranslateT("Not right now."))); g_MsgTreePage.Items.AddElem(new COptItem_IntDBSetting(IDS_MESSAGEDLG_DEF_DND, StatusToDBSetting(ID_STATUS_DND, MESSAGES_DB_MSGTREEDEF), DBVT_WORD, false, ID)); DefMsgTree.AddElem(CTreeItem(TranslateT("Do not disturb"), ParentID1, ID++, 0, TranslateT("Give a guy some peace, would ya?"))); - g_MsgTreePage.Items.AddElem(new COptItem_IntDBSetting(IDS_MESSAGEDLG_DEF_FFC, StatusToDBSetting(ID_STATUS_FREECHAT, MESSAGES_DB_MSGTREEDEF), DBVT_WORD, false, ID)); - DefMsgTree.AddElem(CTreeItem(TranslateT("Free for chat"), ParentID1, ID++, 0, TranslateT("I'm a chatbot!"))); g_MsgTreePage.Items.AddElem(new COptItem_IntDBSetting(IDS_MESSAGEDLG_DEF_INV, StatusToDBSetting(ID_STATUS_INVISIBLE, MESSAGES_DB_MSGTREEDEF), DBVT_WORD, false, ID)); DefMsgTree.AddElem(CTreeItem(TranslateT("Invisible"), ParentID1, ID++, 0, TranslateT("I'm hiding from the mafia."))); - g_MsgTreePage.Items.AddElem(new COptItem_IntDBSetting(IDS_MESSAGEDLG_DEF_OTP, StatusToDBSetting(ID_STATUS_ONTHEPHONE, MESSAGES_DB_MSGTREEDEF), DBVT_WORD, false, ID)); - DefMsgTree.AddElem(CTreeItem(TranslateT("On the phone"), ParentID1, ID++, 0, TranslateT("I've been on the phone since %nas_awaysince_time%, give me a sec!"))); - g_MsgTreePage.Items.AddElem(new COptItem_IntDBSetting(IDS_MESSAGEDLG_DEF_OTL, StatusToDBSetting(ID_STATUS_OUTTOLUNCH, MESSAGES_DB_MSGTREEDEF), DBVT_WORD, false, ID)); - DefMsgTree.AddElem(CTreeItem(TranslateT("Out to lunch"), ParentID1, ID++, 0, TranslateT("Been having ?ifgreater(?ctime(H),2,?ifgreater(?ctime(H),10,?ifgreater(?ctime(H),16,supper,dinner),breakfast),supper) since %nas_awaysince_time%."))); g_MsgTreePage.Items.AddElem(new COptItem_TreeCtrl(IDV_MSGTREE, "MsgTree", DefMsgTree, RootItems, 0, "Text")); g_SetAwayMsgPage.Items.AddElem(new COptItem_BitDBSetting(IDS_SAWAYMSG_SHOWMSGTREE, "SAMDlgFlags", DBVT_BYTE, DF_SAM_DEFDLGFLAGS, DF_SAM_SHOWMSGTREE)); @@ -1113,10 +1084,7 @@ void InitOptions() g_MoreOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MOREOPTDLG_DONTPOPDLG_NA, "DontPopDlg", DBVT_WORD, MOREOPTDLG_DEF_DONTPOPDLG, SF_NA)); g_MoreOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MOREOPTDLG_DONTPOPDLG_OCC, "DontPopDlg", DBVT_WORD, MOREOPTDLG_DEF_DONTPOPDLG, SF_OCC)); g_MoreOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MOREOPTDLG_DONTPOPDLG_DND, "DontPopDlg", DBVT_WORD, MOREOPTDLG_DEF_DONTPOPDLG, SF_DND)); - g_MoreOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MOREOPTDLG_DONTPOPDLG_FFC, "DontPopDlg", DBVT_WORD, MOREOPTDLG_DEF_DONTPOPDLG, SF_FFC)); g_MoreOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MOREOPTDLG_DONTPOPDLG_INV, "DontPopDlg", DBVT_WORD, MOREOPTDLG_DEF_DONTPOPDLG, SF_INV)); - g_MoreOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MOREOPTDLG_DONTPOPDLG_OTP, "DontPopDlg", DBVT_WORD, MOREOPTDLG_DEF_DONTPOPDLG, SF_OTP)); - g_MoreOptPage.Items.AddElem(new COptItem_Checkbox(IDC_MOREOPTDLG_DONTPOPDLG_OTL, "DontPopDlg", DBVT_WORD, MOREOPTDLG_DEF_DONTPOPDLG, SF_OTL)); g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_ENABLEREPLY, DB_ENABLEREPLY, DBVT_BYTE, AUTOREPLY_DEF_REPLY)); g_AutoreplyOptPage.Items.AddElem(new COptItem_Generic(IDC_REPLYDLG_STATIC_ONEVENT, IDC_REPLYDLG_ENABLEREPLY)); @@ -1137,10 +1105,7 @@ void InitOptions() g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_DISABLE_NA, "DisableReply", DBVT_WORD, AUTOREPLY_DEF_DISABLEREPLY, SF_NA, IDC_REPLYDLG_ENABLEREPLY)); g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_DISABLE_OCC, "DisableReply", DBVT_WORD, AUTOREPLY_DEF_DISABLEREPLY, SF_OCC, IDC_REPLYDLG_ENABLEREPLY)); g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_DISABLE_DND, "DisableReply", DBVT_WORD, AUTOREPLY_DEF_DISABLEREPLY, SF_DND, IDC_REPLYDLG_ENABLEREPLY)); - g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_DISABLE_FFC, "DisableReply", DBVT_WORD, AUTOREPLY_DEF_DISABLEREPLY, SF_FFC, IDC_REPLYDLG_ENABLEREPLY)); g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_DISABLE_INV, "DisableReply", DBVT_WORD, AUTOREPLY_DEF_DISABLEREPLY, SF_INV, IDC_REPLYDLG_ENABLEREPLY)); - g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_DISABLE_OTP, "DisableReply", DBVT_WORD, AUTOREPLY_DEF_DISABLEREPLY, SF_OTP, IDC_REPLYDLG_ENABLEREPLY)); - g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_DISABLE_OTL, "DisableReply", DBVT_WORD, AUTOREPLY_DEF_DISABLEREPLY, SF_OTL, IDC_REPLYDLG_ENABLEREPLY)); g_AutoreplyOptPage.Items.AddElem(new COptItem_Generic(IDC_REPLYDLG_STATIC_FORMAT, IDC_REPLYDLG_ENABLEREPLY)); g_AutoreplyOptPage.Items.AddElem(new COptItem_Edit(IDC_REPLYDLG_PREFIX, "ReplyPrefix", AWAY_MSGDATA_MAX, AUTOREPLY_DEF_PREFIX, IDC_REPLYDLG_ENABLEREPLY)); g_AutoreplyOptPage.Items.AddElem(new COptItem_Generic(IDC_REPLYDLG_VARS, IDC_REPLYDLG_ENABLEREPLY)); diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index 2d8fbf1c6e..93872e8f48 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -129,15 +129,12 @@ struct int Status, DisableReplyCtlID, DontShowDialogCtlID; } static StatusModeList[] = { - ID_STATUS_ONLINE, IDC_REPLYDLG_DISABLE_ONL, IDC_MOREOPTDLG_DONTPOPDLG_ONL, - ID_STATUS_AWAY, IDC_REPLYDLG_DISABLE_AWAY, IDC_MOREOPTDLG_DONTPOPDLG_AWAY, - ID_STATUS_NA, IDC_REPLYDLG_DISABLE_NA, IDC_MOREOPTDLG_DONTPOPDLG_NA, - ID_STATUS_OCCUPIED, IDC_REPLYDLG_DISABLE_OCC, IDC_MOREOPTDLG_DONTPOPDLG_OCC, - ID_STATUS_DND, IDC_REPLYDLG_DISABLE_DND, IDC_MOREOPTDLG_DONTPOPDLG_DND, - ID_STATUS_FREECHAT, IDC_REPLYDLG_DISABLE_FFC, IDC_MOREOPTDLG_DONTPOPDLG_FFC, - ID_STATUS_INVISIBLE, IDC_REPLYDLG_DISABLE_INV, IDC_MOREOPTDLG_DONTPOPDLG_INV, - ID_STATUS_ONTHEPHONE, IDC_REPLYDLG_DISABLE_OTP, IDC_MOREOPTDLG_DONTPOPDLG_OTP, - ID_STATUS_OUTTOLUNCH, IDC_REPLYDLG_DISABLE_OTL, IDC_MOREOPTDLG_DONTPOPDLG_OTL + { ID_STATUS_ONLINE, IDC_REPLYDLG_DISABLE_ONL, IDC_MOREOPTDLG_DONTPOPDLG_ONL }, + { ID_STATUS_AWAY, IDC_REPLYDLG_DISABLE_AWAY, IDC_MOREOPTDLG_DONTPOPDLG_AWAY }, + { ID_STATUS_NA, IDC_REPLYDLG_DISABLE_NA, IDC_MOREOPTDLG_DONTPOPDLG_NA }, + { ID_STATUS_OCCUPIED, IDC_REPLYDLG_DISABLE_OCC, IDC_MOREOPTDLG_DONTPOPDLG_OCC }, + { ID_STATUS_DND, IDC_REPLYDLG_DISABLE_DND, IDC_MOREOPTDLG_DONTPOPDLG_DND }, + { ID_STATUS_INVISIBLE, IDC_REPLYDLG_DISABLE_INV, IDC_MOREOPTDLG_DONTPOPDLG_INV }, }; int StatusChanged(WPARAM wParam, LPARAM lParam) diff --git a/plugins/NewAwaySysMod/src/Client.cpp b/plugins/NewAwaySysMod/src/Client.cpp index 7a2e696aac..33f6eb3e6d 100644 --- a/plugins/NewAwaySysMod/src/Client.cpp +++ b/plugins/NewAwaySysMod/src/Client.cpp @@ -37,7 +37,7 @@ void __cdecl UpdateMsgsThreadProc(void *) for (auto &p : Accounts()) { if (CallProtoService(p->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) { int Status = Proto_GetStatus(p->szModuleName); - if (Status < ID_STATUS_OFFLINE || Status > ID_STATUS_OUTTOLUNCH) { + if (Status < ID_STATUS_OFFLINE || Status > ID_STATUS_MAX) { Status = g_ProtoStates[p->szModuleName].m_status; } if (CallProtoService(p->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(Status) && g_ProtoStates[p->szModuleName].CurStatusMsg.GetUpdateTimeDifference() >= MinUpdateTimeDifference) { @@ -110,10 +110,7 @@ void ChangeProtoMessages(char* szProto, int iMode, const TCString &Msg) ID_STATUS_NA, "Na", ID_STATUS_DND, "Dnd", ID_STATUS_OCCUPIED, "Occupied", - ID_STATUS_FREECHAT, "FreeChat", ID_STATUS_INVISIBLE, "Inv", - ID_STATUS_ONTHEPHONE, "Otp", - ID_STATUS_OUTTOLUNCH, "Otl", ID_STATUS_IDLE, "Idl" }; diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp index a473696887..791c95e108 100644 --- a/plugins/NewAwaySysMod/src/ContactList.cpp +++ b/plugins/NewAwaySysMod/src/ContactList.cpp @@ -51,7 +51,7 @@ void LoadCListModule() HookEvent(ME_SKIN_ICONSCHANGED, CLIconsChanged); } -LRESULT CALLBACK ParentSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) +static LRESULT CALLBACK ParentSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { CCList *dat = CWndUserData(hWnd).GetCList(); switch (Msg) { diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp index c3cfb99c54..72dcceb839 100644 --- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp +++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp @@ -22,19 +22,18 @@ #include "stdafx.h" #include "Properties.h" -static struct +struct { int Status, DisableReplyCtlID, DontShowDialogCtlID; -} StatusModeList[] = { - ID_STATUS_ONLINE, IDC_REPLYDLG_DISABLE_ONL, IDC_MOREOPTDLG_DONTPOPDLG_ONL, - ID_STATUS_AWAY, IDC_REPLYDLG_DISABLE_AWAY, IDC_MOREOPTDLG_DONTPOPDLG_AWAY, - ID_STATUS_NA, IDC_REPLYDLG_DISABLE_NA, IDC_MOREOPTDLG_DONTPOPDLG_NA, - ID_STATUS_OCCUPIED, IDC_REPLYDLG_DISABLE_OCC, IDC_MOREOPTDLG_DONTPOPDLG_OCC, - ID_STATUS_DND, IDC_REPLYDLG_DISABLE_DND, IDC_MOREOPTDLG_DONTPOPDLG_DND, - ID_STATUS_FREECHAT, IDC_REPLYDLG_DISABLE_FFC, IDC_MOREOPTDLG_DONTPOPDLG_FFC, - ID_STATUS_INVISIBLE, IDC_REPLYDLG_DISABLE_INV, IDC_MOREOPTDLG_DONTPOPDLG_INV, - ID_STATUS_ONTHEPHONE, IDC_REPLYDLG_DISABLE_OTP, IDC_MOREOPTDLG_DONTPOPDLG_OTP, - ID_STATUS_OUTTOLUNCH, IDC_REPLYDLG_DISABLE_OTL, IDC_MOREOPTDLG_DONTPOPDLG_OTL +} +static StatusModeList[] = +{ + { ID_STATUS_ONLINE, IDC_REPLYDLG_DISABLE_ONL, IDC_MOREOPTDLG_DONTPOPDLG_ONL }, + { ID_STATUS_AWAY, IDC_REPLYDLG_DISABLE_AWAY, IDC_MOREOPTDLG_DONTPOPDLG_AWAY }, + { ID_STATUS_NA, IDC_REPLYDLG_DISABLE_NA, IDC_MOREOPTDLG_DONTPOPDLG_NA }, + { ID_STATUS_OCCUPIED, IDC_REPLYDLG_DISABLE_OCC, IDC_MOREOPTDLG_DONTPOPDLG_OCC }, + { ID_STATUS_DND, IDC_REPLYDLG_DISABLE_DND, IDC_MOREOPTDLG_DONTPOPDLG_DND }, + { ID_STATUS_INVISIBLE, IDC_REPLYDLG_DISABLE_INV, IDC_MOREOPTDLG_DONTPOPDLG_INV }, }; diff --git a/plugins/NewAwaySysMod/src/MsgTree.cpp b/plugins/NewAwaySysMod/src/MsgTree.cpp index 891789651e..7304da2dd8 100644 --- a/plugins/NewAwaySysMod/src/MsgTree.cpp +++ b/plugins/NewAwaySysMod/src/MsgTree.cpp @@ -31,19 +31,18 @@ #define IMGLIST_NEWCATEGORY 1 #define IMGLIST_DELETE 2 -struct { +struct +{ int DBSetting, Status, MenuItemID; } -SettingsList[] = { - IDS_MESSAGEDLG_DEF_ONL, ID_STATUS_ONLINE, IDR_MSGTREEMENU_DEF_ONL, - IDS_MESSAGEDLG_DEF_AWAY, ID_STATUS_AWAY, IDR_MSGTREEMENU_DEF_AWAY, - IDS_MESSAGEDLG_DEF_NA, ID_STATUS_NA, IDR_MSGTREEMENU_DEF_NA, - IDS_MESSAGEDLG_DEF_OCC, ID_STATUS_OCCUPIED, IDR_MSGTREEMENU_DEF_OCC, - IDS_MESSAGEDLG_DEF_DND, ID_STATUS_DND, IDR_MSGTREEMENU_DEF_DND, - IDS_MESSAGEDLG_DEF_FFC, ID_STATUS_FREECHAT, IDR_MSGTREEMENU_DEF_FFC, - IDS_MESSAGEDLG_DEF_INV, ID_STATUS_INVISIBLE, IDR_MSGTREEMENU_DEF_INV, - IDS_MESSAGEDLG_DEF_OTP, ID_STATUS_ONTHEPHONE, IDR_MSGTREEMENU_DEF_OTP, - IDS_MESSAGEDLG_DEF_OTL, ID_STATUS_OUTTOLUNCH, IDR_MSGTREEMENU_DEF_OTL +SettingsList[] = +{ + { IDS_MESSAGEDLG_DEF_ONL, ID_STATUS_ONLINE, IDR_MSGTREEMENU_DEF_ONL }, + { IDS_MESSAGEDLG_DEF_AWAY, ID_STATUS_AWAY, IDR_MSGTREEMENU_DEF_AWAY }, + { IDS_MESSAGEDLG_DEF_NA, ID_STATUS_NA, IDR_MSGTREEMENU_DEF_NA }, + { IDS_MESSAGEDLG_DEF_OCC, ID_STATUS_OCCUPIED, IDR_MSGTREEMENU_DEF_OCC }, + { IDS_MESSAGEDLG_DEF_DND, ID_STATUS_DND, IDR_MSGTREEMENU_DEF_DND }, + { IDS_MESSAGEDLG_DEF_INV, ID_STATUS_INVISIBLE, IDR_MSGTREEMENU_DEF_INV }, }; static MWindowList hMTWindowList; @@ -419,10 +418,7 @@ LRESULT CALLBACK MsgTreeSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM case IDR_MSGTREEMENU_DEF_NA: case IDR_MSGTREEMENU_DEF_OCC: case IDR_MSGTREEMENU_DEF_DND: - case IDR_MSGTREEMENU_DEF_FFC: case IDR_MSGTREEMENU_DEF_INV: - case IDR_MSGTREEMENU_DEF_OTP: - case IDR_MSGTREEMENU_DEF_OTL: for (int i = 0; i < _countof(SettingsList); i++) { if (SettingsList[i].MenuItemID == MenuResult) { dat->SetDefMsg(SettingsList[i].Status, tvi.lParam); diff --git a/plugins/NewAwaySysMod/src/Properties.cpp b/plugins/NewAwaySysMod/src/Properties.cpp index b746c6d6fc..cc8af2b09a 100644 --- a/plugins/NewAwaySysMod/src/Properties.cpp +++ b/plugins/NewAwaySysMod/src/Properties.cpp @@ -48,7 +48,7 @@ void ResetSettingsOnStatusChange(const char *szProto = nullptr, int bResetPerson CProtoState::CStatus& CProtoState::CStatus::operator=(int Status) { _ASSERT(Status >= ID_STATUS_OFFLINE && Status <= ID_STATUS_OUTTOLUNCH); - if (Status < ID_STATUS_OFFLINE || Status > ID_STATUS_OUTTOLUNCH) + if (Status < ID_STATUS_OFFLINE || Status > ID_STATUS_MAX) return *this; // ignore status change if the new status is unknown bool bModified = false; @@ -305,10 +305,7 @@ TCString CProtoSettings::GetMsgFormat(int Flags, int *pOrder) IDS_MESSAGEDLG_DEF_NA, ID_STATUS_NA, IDS_MESSAGEDLG_DEF_OCC, ID_STATUS_OCCUPIED, IDS_MESSAGEDLG_DEF_DND, ID_STATUS_DND, - IDS_MESSAGEDLG_DEF_FFC, ID_STATUS_FREECHAT, IDS_MESSAGEDLG_DEF_INV, ID_STATUS_INVISIBLE, - IDS_MESSAGEDLG_DEF_OTP, ID_STATUS_ONTHEPHONE, - IDS_MESSAGEDLG_DEF_OTL, ID_STATUS_OUTTOLUNCH }; for (int i = 0; i < _countof(DefMsgDlgItems); i++) { diff --git a/plugins/NewAwaySysMod/src/Properties.h b/plugins/NewAwaySysMod/src/Properties.h index 8c8ca7261a..9a445d8a2d 100644 --- a/plugins/NewAwaySysMod/src/Properties.h +++ b/plugins/NewAwaySysMod/src/Properties.h @@ -82,10 +82,7 @@ private: #define ILI_PROTO_NA 4 #define ILI_PROTO_OCC 5 #define ILI_PROTO_DND 6 -#define ILI_PROTO_FFC 7 #define ILI_PROTO_INV 8 -#define ILI_PROTO_OTP 9 -#define ILI_PROTO_OTL 10 #define ILI_DOT 11 #define ILI_MSGICON 12 #define ILI_IGNORE 13 @@ -100,7 +97,7 @@ private: static unsigned Icons[] = { SKINICON_EVENT_MESSAGE | IL_SKINICON, SKINICON_EVENT_FILE | IL_SKINICON, - ID_STATUS_ONLINE | IL_PROTOICON, ID_STATUS_AWAY | IL_PROTOICON, ID_STATUS_NA | IL_PROTOICON, ID_STATUS_OCCUPIED | IL_PROTOICON, ID_STATUS_DND | IL_PROTOICON, ID_STATUS_FREECHAT | IL_PROTOICON, ID_STATUS_INVISIBLE | IL_PROTOICON, ID_STATUS_ONTHEPHONE | IL_PROTOICON, ID_STATUS_OUTTOLUNCH | IL_PROTOICON, + ID_STATUS_ONLINE | IL_PROTOICON, ID_STATUS_AWAY | IL_PROTOICON, ID_STATUS_NA | IL_PROTOICON, ID_STATUS_OCCUPIED | IL_PROTOICON, ID_STATUS_DND | IL_PROTOICON, ID_STATUS_INVISIBLE | IL_PROTOICON, IDI_DOT, IDI_MSGICON, IDI_IGNORE, IDI_SOE_ENABLED, IDI_SOE_DISABLED, IDI_NEWMESSAGE, IDI_NEWCATEGORY, IDI_SAVE, IDI_SAVEASNEW, IDI_DELETE, IDI_SETTINGS }; @@ -283,17 +280,14 @@ static struct char *Setting; } StatusSettings[] = { - ID_STATUS_OFFLINE, "Off", - ID_STATUS_ONLINE, "Onl", - ID_STATUS_AWAY, "Away", - ID_STATUS_NA, "Na", - ID_STATUS_DND, "Dnd", - ID_STATUS_OCCUPIED, "Occ", - ID_STATUS_FREECHAT, "Ffc", - ID_STATUS_INVISIBLE, "Inv", - ID_STATUS_ONTHEPHONE, "Otp", - ID_STATUS_OUTTOLUNCH, "Otl", - ID_STATUS_IDLE, "Idle" + { ID_STATUS_OFFLINE, "Off" }, + { ID_STATUS_ONLINE, "Onl" }, + { ID_STATUS_AWAY, "Away" }, + { ID_STATUS_NA, "Na" }, + { ID_STATUS_DND, "Dnd" }, + { ID_STATUS_OCCUPIED, "Occ" }, + { ID_STATUS_INVISIBLE, "Inv" }, + { ID_STATUS_IDLE, "Idle" } }; diff --git a/plugins/NewAwaySysMod/src/Services.cpp b/plugins/NewAwaySysMod/src/Services.cpp index 1300c7c556..52f4f55fc8 100644 --- a/plugins/NewAwaySysMod/src/Services.cpp +++ b/plugins/NewAwaySysMod/src/Services.cpp @@ -86,7 +86,7 @@ int GetState(WPARAM wParam, LPARAM lParam, int Widechar) int Flags = (pi->cbSize > sizeof(NAS_PROTOINFOv1)) ? pi->Flags : 0; LogMessage("%d (received): cbSize=%d, status=%d, szProto=%s, Flags=0x%x", i + 1, pi->cbSize, pi->status, pi->szProto ? pi->szProto : "NULL", Flags); - if ((pi->status >= ID_STATUS_ONLINE && pi->status <= ID_STATUS_OUTTOLUNCH) || !pi->status) { + if ((pi->status >= ID_STATUS_ONLINE && pi->status <= ID_STATUS_MAX) || !pi->status) { TCString Msg(pi->status ? CProtoSettings(pi->szProto, pi->status).GetMsgFormat(GMF_LASTORDEFAULT) : CProtoSettings(pi->szProto).GetMsgFormat(((Flags & PIF_NOTTEMPORARY) ? 0 : GMF_TEMPORARY) | GMF_PERSONAL)); if (Msg != nullptr) { if (Widechar) diff --git a/plugins/NewAwaySysMod/src/resource.h b/plugins/NewAwaySysMod/src/resource.h index b1443d888b..b29355eb11 100644 --- a/plugins/NewAwaySysMod/src/resource.h +++ b/plugins/NewAwaySysMod/src/resource.h @@ -144,9 +144,6 @@ #define IDC_MESSAGEDLG_DEF_NA 1114 #define IDC_MESSAGEDLG_DEF_OCC 1115 #define IDC_MESSAGEDLG_DEF_DND 1116 -#define IDC_MESSAGEDLG_DEF_FFC 1117 -#define IDC_MESSAGEDLG_DEF_OTP 1118 -#define IDC_MESSAGEDLG_DEF_OTL 1119 #define IDC_MESSAGEDLG_MSGTITLE 1120 #define IDC_MOREOPTDLG_DONTPOPDLG_INV 1120 #define IDC_MESSAGEDLG_MSGTREE 1121 @@ -156,9 +153,6 @@ #define IDC_MESSAGEDLG_NEWMSG 1123 #define IDC_REPLYDLG_DISABLE_OCC 1123 #define IDC_REPLYDLG_DISABLE_DND 1124 -#define IDC_REPLYDLG_DISABLE_FFC 1125 -#define IDC_REPLYDLG_DISABLE_OTP 1126 -#define IDC_REPLYDLG_DISABLE_OTL 1127 #define IDC_REPLYDLG_DISABLE_INV 1128 #define IDC_MOREOPTDLG_RECENTMSGSCOUNT 1129 #define IDC_MOREOPTDLG_UPDATEMSGSPERIOD 1130 @@ -169,9 +163,6 @@ #define IDC_MOREOPTDLG_DONTPOPDLG_NA 1135 #define IDC_MOREOPTDLG_DONTPOPDLG_OCC 1136 #define IDC_MOREOPTDLG_DONTPOPDLG_DND 1137 -#define IDC_MOREOPTDLG_DONTPOPDLG_FFC 1138 -#define IDC_MOREOPTDLG_DONTPOPDLG_OTP 1139 -#define IDC_MOREOPTDLG_DONTPOPDLG_OTL 1140 #define IDC_REPLYDLG_STATIC_TIMES 1141 #define IDC_MESSAGEDLG_TEST 1142 #define IDC_MOREOPTDLG_EDITMESSAGES 1142 @@ -211,10 +202,7 @@ #define IDS_MESSAGEDLG_DEF_NA 20002 #define IDS_MESSAGEDLG_DEF_OCC 20003 #define IDS_MESSAGEDLG_DEF_DND 20004 -#define IDS_MESSAGEDLG_DEF_FFC 20005 -#define IDS_MESSAGEDLG_DEF_INV 20006 -#define IDS_MESSAGEDLG_DEF_OTP 20007 -#define IDS_MESSAGEDLG_DEF_OTL 20008 +#define IDS_MESSAGEDLG_DEF_INV 20005 #define IDV_MSGTREE 20009 #define IDS_SAWAYMSG_SHOWMSGTREE 20100 #define IDS_SAWAYMSG_SHOWCONTACTTREE 20101 @@ -235,10 +223,7 @@ #define IDR_MSGTREEMENU_DEF_NA 40039 #define IDR_MSGTREEMENU_DEF_OCC 40040 #define IDR_MSGTREEMENU_DEF_DND 40041 -#define IDR_MSGTREEMENU_DEF_FFC 40042 -#define IDR_MSGTREEMENU_DEF_INV 40043 -#define IDR_MSGTREEMENU_DEF_OTP 40044 -#define IDR_MSGTREEMENU_DEF_OTL 40045 +#define IDR_MSGTREEMENU_DEF_INV 40042 #define IDM_SAM_OPTIONS_DISABLEVARIABLES 40047 #define IDC_READAWAYMSG_MSG 54765 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 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: diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp index 7c3995e97e..231751a9f8 100644 --- a/plugins/NotifyAnything/src/main.cpp +++ b/plugins/NotifyAnything/src/main.cpp @@ -167,10 +167,7 @@ HICON getIcon(const std::wstring &name) icons[L"na"] = Skin_LoadIcon(SKINICON_STATUS_NA); icons[L"occupied"] = Skin_LoadIcon(SKINICON_STATUS_OCCUPIED); icons[L"dnd"] = Skin_LoadIcon(SKINICON_STATUS_DND); - icons[L"free4chat"] = Skin_LoadIcon(SKINICON_STATUS_FREE4CHAT); icons[L"invisible"] = Skin_LoadIcon(SKINICON_STATUS_INVISIBLE); - icons[L"onthephone"] = Skin_LoadIcon(SKINICON_STATUS_ONTHEPHONE); - icons[L"outtolunch"] = Skin_LoadIcon(SKINICON_STATUS_OUTTOLUNCH); icons[L"message"] = Skin_LoadIcon(SKINICON_EVENT_MESSAGE); icons[L"url"] = Skin_LoadIcon(SKINICON_EVENT_URL); diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index ef5d07d993..de3edb2e3d 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -121,10 +121,7 @@ static int NudgeReceived(WPARAM hContact, LPARAM lParam) ((p->statusFlags & NUDGE_ACC_ST3) && (Status == ID_STATUS_DND)) || ((p->statusFlags & NUDGE_ACC_ST4) && (Status == ID_STATUS_NA)) || ((p->statusFlags & NUDGE_ACC_ST5) && (Status == ID_STATUS_OCCUPIED)) || - ((p->statusFlags & NUDGE_ACC_ST6) && (Status == ID_STATUS_FREECHAT)) || - ((p->statusFlags & NUDGE_ACC_ST7) && (Status == ID_STATUS_INVISIBLE)) || - ((p->statusFlags & NUDGE_ACC_ST8) && (Status == ID_STATUS_ONTHEPHONE)) || - ((p->statusFlags & NUDGE_ACC_ST9) && (Status == ID_STATUS_OUTTOLUNCH))) + ((p->statusFlags & NUDGE_ACC_ST6) && (Status == ID_STATUS_INVISIBLE))) { if (diff >= GlobalNudge.recvTimeSec) { if (p->showPopup) @@ -164,10 +161,7 @@ static int NudgeReceived(WPARAM hContact, LPARAM lParam) ((DefaultNudge.statusFlags & NUDGE_ACC_ST3) && (Status == ID_STATUS_DND)) || ((DefaultNudge.statusFlags & NUDGE_ACC_ST4) && (Status == ID_STATUS_NA)) || ((DefaultNudge.statusFlags & NUDGE_ACC_ST5) && (Status == ID_STATUS_OCCUPIED)) || - ((DefaultNudge.statusFlags & NUDGE_ACC_ST6) && (Status == ID_STATUS_FREECHAT)) || - ((DefaultNudge.statusFlags & NUDGE_ACC_ST7) && (Status == ID_STATUS_INVISIBLE)) || - ((DefaultNudge.statusFlags & NUDGE_ACC_ST8) && (Status == ID_STATUS_ONTHEPHONE)) || - ((DefaultNudge.statusFlags & NUDGE_ACC_ST9) && (Status == ID_STATUS_OUTTOLUNCH))) + ((DefaultNudge.statusFlags & NUDGE_ACC_ST6) && (Status == ID_STATUS_INVISIBLE))) { if (diff >= GlobalNudge.recvTimeSec) { if (DefaultNudge.showPopup) diff --git a/plugins/Nudge/src/nudge.h b/plugins/Nudge/src/nudge.h index d1fd358795..792a98444d 100644 --- a/plugins/Nudge/src/nudge.h +++ b/plugins/Nudge/src/nudge.h @@ -10,10 +10,7 @@ #define NUDGE_ACC_ST3 0x00000008 //Check (countdown) when Not available #define NUDGE_ACC_ST4 0x00000010 //Check (countdown) when Occupied #define NUDGE_ACC_ST5 0x00000020 //Check (countdown) when DND -#define NUDGE_ACC_ST6 0x00000040 //Check (countdown) when Free for chat -#define NUDGE_ACC_ST7 0x00000080 //Check (countdown) when Invisible -#define NUDGE_ACC_ST8 0x00000100 //Check (countdown) when On the phone -#define NUDGE_ACC_ST9 0x00000200 //Check (countdown) when Out to lunch +#define NUDGE_ACC_ST6 0x00000040 //Check (countdown) when Invisible #define TEXT_LEN 1024 diff --git a/plugins/Nudge/src/options.cpp b/plugins/Nudge/src/options.cpp index 3952cc040b..97b1925047 100644 --- a/plugins/Nudge/src/options.cpp +++ b/plugins/Nudge/src/options.cpp @@ -49,9 +49,6 @@ static void UpdateControls(HWND hwnd) CheckDlgButton(hwnd, IDC_CHECKST4, ActualNudge->statusFlags & NUDGE_ACC_ST4 ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwnd, IDC_CHECKST5, ActualNudge->statusFlags & NUDGE_ACC_ST5 ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwnd, IDC_CHECKST6, ActualNudge->statusFlags & NUDGE_ACC_ST6 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwnd, IDC_CHECKST7, ActualNudge->statusFlags & NUDGE_ACC_ST7 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwnd, IDC_CHECKST8, ActualNudge->statusFlags & NUDGE_ACC_ST8 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwnd, IDC_CHECKST9, ActualNudge->statusFlags & NUDGE_ACC_ST9 ? BST_CHECKED : BST_UNCHECKED); SetDlgItemText(hwnd, IDC_SENDTEXT, ActualNudge->senText); SetDlgItemText(hwnd, IDC_RECVTEXT, ActualNudge->recText); } @@ -321,10 +318,7 @@ static INT_PTR CALLBACK DlgProcNudgeOpt(HWND hwnd, UINT msg, WPARAM wParam, LPAR ((IsDlgButtonChecked(hwnd, IDC_CHECKST3) == BST_CHECKED) ? NUDGE_ACC_ST3 : 0) | ((IsDlgButtonChecked(hwnd, IDC_CHECKST4) == BST_CHECKED) ? NUDGE_ACC_ST4 : 0) | ((IsDlgButtonChecked(hwnd, IDC_CHECKST5) == BST_CHECKED) ? NUDGE_ACC_ST5 : 0) | - ((IsDlgButtonChecked(hwnd, IDC_CHECKST6) == BST_CHECKED) ? NUDGE_ACC_ST6 : 0) | - ((IsDlgButtonChecked(hwnd, IDC_CHECKST7) == BST_CHECKED) ? NUDGE_ACC_ST7 : 0) | - ((IsDlgButtonChecked(hwnd, IDC_CHECKST8) == BST_CHECKED) ? NUDGE_ACC_ST8 : 0) | - ((IsDlgButtonChecked(hwnd, IDC_CHECKST9) == BST_CHECKED) ? NUDGE_ACC_ST9 : 0); + ((IsDlgButtonChecked(hwnd, IDC_CHECKST6) == BST_CHECKED) ? NUDGE_ACC_ST6 : 0); GetDlgItemText(hwnd, IDC_SENDTEXT, ActualNudge->senText, TEXT_LEN); GetDlgItemText(hwnd, IDC_RECVTEXT, ActualNudge->recText, TEXT_LEN); diff --git a/plugins/Ping/src/options.cpp b/plugins/Ping/src/options.cpp index 72971b0309..0c672435a8 100644 --- a/plugins/Ping/src/options.cpp +++ b/plugins/Ping/src/options.cpp @@ -163,7 +163,7 @@ INT_PTR CALLBACK DlgProcDestEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM) switch (msg) { case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); - for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) { + for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++) { wchar_t *ret = Clist_GetStatusModeDescription(i, 0); SendDlgItemMessage(hwndDlg, IDC_COMBO_DESTSTAT, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)ret); SendDlgItemMessage(hwndDlg, IDC_COMBO_DESTSTAT2, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)ret); diff --git a/plugins/Popup/res/resource.rc b/plugins/Popup/res/resource.rc index 9bdf0f69d3..8f211e2d4a 100644 --- a/plugins/Popup/res/resource.rc +++ b/plugins/Popup/res/resource.rc @@ -231,10 +231,7 @@ BEGIN CONTROL "",IDC_SNA,"MButtonClass",WS_TABSTOP,180,120,15,14 CONTROL "",IDC_SOCCUPIED,"MButtonClass",WS_TABSTOP,196,120,15,14 CONTROL "",IDC_SDND,"MButtonClass",WS_TABSTOP,212,120,15,14 - CONTROL "",IDC_SFREE4CHAT,"MButtonClass",WS_TABSTOP,228,120,15,14 CONTROL "",IDC_SINVISIBLE,"MButtonClass",WS_TABSTOP,244,120,15,14 - CONTROL "",IDC_SPHONE,"MButtonClass",WS_TABSTOP,260,120,15,14 - CONTROL "",IDC_SLUNCH,"MButtonClass",WS_TABSTOP,276,120,16,14 LTEXT "Disable when relevant protocol's status is...",IDC_TXT_TITLE4,112,138,180,8 CONTROL "",IDC_SOFFLINE2,"MButtonClass",WS_TABSTOP,132,151,15,14 CONTROL "",IDC_SONLINE2,"MButtonClass",WS_TABSTOP,148,151,15,14 @@ -242,10 +239,7 @@ BEGIN CONTROL "",IDC_SNA2,"MButtonClass",WS_TABSTOP,180,151,15,14 CONTROL "",IDC_SOCCUPIED2,"MButtonClass",WS_TABSTOP,196,151,15,14 CONTROL "",IDC_SDND2,"MButtonClass",WS_TABSTOP,212,151,15,14 - CONTROL "",IDC_SFREE4CHAT2,"MButtonClass",WS_TABSTOP,228,151,15,14 CONTROL "",IDC_SINVISIBLE2,"MButtonClass",WS_TABSTOP,244,151,15,14 - CONTROL "",IDC_SPHONE2,"MButtonClass",WS_TABSTOP,260,151,15,14 - CONTROL "",IDC_SLUNCH2,"MButtonClass",WS_TABSTOP,276,151,16,14 ICON IDI_MB_INFO,IDC_ICO_INFO,112,170,20,20,SS_CENTERIMAGE | SS_REALSIZEIMAGE LTEXT "Colors can be configured in\r\nCustomize -> Fonts and colors",IDC_TXT_COLORS,132,171,108,24 PUSHBUTTON "More...",IDC_MORE,242,176,50,14 diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index d2eb116c6e..3bcb6c722e 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -71,10 +71,7 @@ static ctrlsAll[] = { { IDC_SNA, 0, 1, 0 }, { IDC_SOCCUPIED, 0, 1, 0 }, { IDC_SDND, 0, 1, 0 }, - { IDC_SFREE4CHAT, 0, 1, 0 }, { IDC_SINVISIBLE, 0, 1, 0 }, - { IDC_SPHONE, 0, 1, 0 }, - { IDC_SLUNCH, 0, 1, 0 }, { IDC_TXT_TITLE4, 0, 0, 0 }, { IDC_SOFFLINE2, 0, 0, 0 }, @@ -83,10 +80,7 @@ static ctrlsAll[] = { { IDC_SNA2, 0, 0, 0 }, { IDC_SOCCUPIED2, 0, 0, 0 }, { IDC_SDND2, 0, 0, 0 }, - { IDC_SFREE4CHAT2, 0, 0, 0 }, { IDC_SINVISIBLE2, 0, 0, 0 }, - { IDC_SPHONE2, 0, 0, 0 }, - { IDC_SLUNCH2, 0, 0, 0 }, { IDC_ICO_INFO, 0, 1, 1 }, { IDC_TXT_COLORS, 0, 1, 1 }, @@ -110,23 +104,20 @@ static UINT ctrlsEnable[] = { IDC_TXT_TIMEOUT_SEC, IDC_TXT_TIMEOUT_DEFAULT, IDC_TXT_TIMEOUT_INFINITE, IDC_TXT_LACTION, IDC_LACTION, IDC_TXT_RACTION, IDC_RACTION, - /*IDC_CHECKWINDOW,*/ IDC_TXT_TITLE3, IDC_TXT_TITLE4, + IDC_TXT_TITLE3, IDC_TXT_TITLE4, IDC_ICO_INFO, IDC_TXT_COLORS, IDC_MORE, IDC_SOFFLINE, IDC_SONLINE, IDC_SAWAY, IDC_SNA, - IDC_SOCCUPIED, IDC_SDND, IDC_SFREE4CHAT, - IDC_SINVISIBLE, IDC_SPHONE, IDC_SLUNCH, + IDC_SOCCUPIED, IDC_SDND, IDC_SINVISIBLE, IDC_SOFFLINE2, IDC_SONLINE2, IDC_SAWAY2, IDC_SNA2, - IDC_SOCCUPIED2, IDC_SDND2, IDC_SFREE4CHAT2, - IDC_SINVISIBLE2, IDC_SPHONE2, IDC_SLUNCH2, + IDC_SOCCUPIED2, IDC_SDND2, IDC_SINVISIBLE2, }; static UINT ctrlsContact[] = { - /*IDC_CHECKWINDOW,*/ IDC_TXT_TITLE4, + IDC_TXT_TITLE4, IDC_SOFFLINE2, IDC_SONLINE2, IDC_SAWAY2, IDC_SNA2, - IDC_SOCCUPIED2, IDC_SDND2, IDC_SFREE4CHAT2, - IDC_SINVISIBLE2, IDC_SPHONE2, IDC_SLUNCH2, + IDC_SOCCUPIED2, IDC_SDND2, IDC_SINVISIBLE2, }; static int titleIds[] = { @@ -149,10 +140,7 @@ static statusButtons[] = { { IDC_SNA, SKINICON_STATUS_NA, "Not available", PF2_LONGAWAY, PF2_LONGAWAY }, { IDC_SOCCUPIED, SKINICON_STATUS_OCCUPIED, "Occupied", PF2_LIGHTDND, PF2_LIGHTDND }, { IDC_SDND, SKINICON_STATUS_DND, "Do not disturb", PF2_HEAVYDND, PF2_HEAVYDND }, - { IDC_SFREE4CHAT, SKINICON_STATUS_FREE4CHAT, "Free for chat", PF2_FREECHAT, PF2_FREECHAT }, { IDC_SINVISIBLE, SKINICON_STATUS_INVISIBLE, "Invisible", PF2_INVISIBLE, PF2_INVISIBLE }, - { IDC_SPHONE, SKINICON_STATUS_ONTHEPHONE, "On the phone", PF2_ONTHEPHONE, PF2_ONTHEPHONE }, - { IDC_SLUNCH, SKINICON_STATUS_OUTTOLUNCH, "Out to lunch", PF2_OUTTOLUNCH, PF2_OUTTOLUNCH }, { IDC_SOFFLINE2, SKINICON_STATUS_OFFLINE, "Offline", PF2_IDLE, PF2_IDLE << 16 }, { IDC_SONLINE2, SKINICON_STATUS_ONLINE, "Online", PF2_ONLINE, PF2_ONLINE << 16 }, @@ -160,10 +148,7 @@ static statusButtons[] = { { IDC_SNA2, SKINICON_STATUS_NA, "Not available", PF2_LONGAWAY, PF2_LONGAWAY << 16 }, { IDC_SOCCUPIED2, SKINICON_STATUS_OCCUPIED, "Occupied", PF2_LIGHTDND, PF2_LIGHTDND << 16 }, { IDC_SDND2, SKINICON_STATUS_DND, "Do not disturb", PF2_HEAVYDND, PF2_HEAVYDND << 16 }, - { IDC_SFREE4CHAT2, SKINICON_STATUS_FREE4CHAT, "Free for chat", PF2_FREECHAT, PF2_FREECHAT << 16 }, { IDC_SINVISIBLE2, SKINICON_STATUS_INVISIBLE, "Invisible", PF2_INVISIBLE, PF2_INVISIBLE << 16 }, - { IDC_SPHONE2, SKINICON_STATUS_ONTHEPHONE, "On the phone", PF2_ONTHEPHONE, PF2_ONTHEPHONE << 16 }, - { IDC_SLUNCH2, SKINICON_STATUS_OUTTOLUNCH, "Out to lunch", PF2_OUTTOLUNCH, PF2_OUTTOLUNCH << 16 }, }; INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) @@ -372,9 +357,9 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l break; case IDC_SOFFLINE: case IDC_SONLINE: case IDC_SAWAY: case IDC_SNA: case IDC_SOCCUPIED: - case IDC_SDND: case IDC_SFREE4CHAT: case IDC_SINVISIBLE: case IDC_SPHONE: case IDC_SLUNCH: + case IDC_SDND: case IDC_SINVISIBLE: case IDC_SOFFLINE2: case IDC_SONLINE2: case IDC_SAWAY2: case IDC_SNA2: case IDC_SOCCUPIED2: - case IDC_SDND2: case IDC_SFREE4CHAT2: case IDC_SINVISIBLE2: case IDC_SPHONE2: case IDC_SLUNCH2: + case IDC_SDND2: case IDC_SINVISIBLE2: ptd->disableWhen = 0; for (auto &it : statusButtons) { if (IsDlgButtonChecked(hwnd, it.idCtrl)) diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp index 6503332b2c..1938b05e6e 100644 --- a/plugins/Popup/src/opt_gen.cpp +++ b/plugins/Popup/src/opt_gen.cpp @@ -35,9 +35,6 @@ static int CountStatusModes(DWORD flags) if (flags & PF2_LONGAWAY) ++res; if (flags & PF2_LIGHTDND) ++res; if (flags & PF2_HEAVYDND) ++res; - if (flags & PF2_FREECHAT) ++res; - if (flags & PF2_OUTTOLUNCH) ++res; - if (flags & PF2_ONTHEPHONE) ++res; if (res) ++res; // Offline return res; } @@ -62,9 +59,6 @@ int AddStatusMode(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flag) case PF2_LONGAWAY: mir_wstrcat(options[pos].pszOptionName, LPGENW("Not available")); break; case PF2_LIGHTDND: mir_wstrcat(options[pos].pszOptionName, LPGENW("Occupied")); break; case PF2_HEAVYDND: mir_wstrcat(options[pos].pszOptionName, LPGENW("Do not disturb")); break; - case PF2_FREECHAT: mir_wstrcat(options[pos].pszOptionName, LPGENW("Free for chat")); break; - case PF2_OUTTOLUNCH: mir_wstrcat(options[pos].pszOptionName, LPGENW("Out to lunch")); break; - case PF2_ONTHEPHONE: mir_wstrcat(options[pos].pszOptionName, LPGENW("On the phone")); break; } return pos + 1; } @@ -78,9 +72,6 @@ int AddStatusModes(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flags) pos = AddStatusMode(options, pos, prefix, flags & PF2_LONGAWAY); pos = AddStatusMode(options, pos, prefix, flags & PF2_LIGHTDND); pos = AddStatusMode(options, pos, prefix, flags & PF2_HEAVYDND); - pos = AddStatusMode(options, pos, prefix, flags & PF2_FREECHAT); - pos = AddStatusMode(options, pos, prefix, flags & PF2_OUTTOLUNCH); - pos = AddStatusMode(options, pos, prefix, flags & PF2_ONTHEPHONE); return pos; } diff --git a/plugins/Popup/src/resource.h b/plugins/Popup/src/resource.h index 9609d49527..8dd0e96ff2 100644 --- a/plugins/Popup/src/resource.h +++ b/plugins/Popup/src/resource.h @@ -76,10 +76,7 @@ #define IDC_SNA 1102 #define IDC_SOCCUPIED 1103 #define IDC_SDND 1104 -#define IDC_SFREE4CHAT 1105 #define IDC_SINVISIBLE 1106 -#define IDC_SPHONE 1107 -#define IDC_SLUNCH 1108 #define IDC_TIMEOUT 1110 #define IDC_SOFFLINE2 1111 #define IDC_SONLINE2 1112 @@ -90,12 +87,9 @@ #define IDC_TREE1 1117 #define IDC_SKINLIST 1118 #define IDC_SINVISIBLE2 1119 -#define IDC_SPHONE2 1120 -#define IDC_SLUNCH2 1121 #define IDC_TXT_TIMEOUT_SEC 1122 #define IDC_PREVIEWBOX 1123 #define IDC_TXT_TIMEOUT_INFINITE 1124 -#define IDC_SFREE4CHAT2 1125 #define IDC_TXT_TIMEOUT_DEFAULT 1126 #define IDC_POPUP_LIST 1134 #define IDC_SHOWHISTORY 1135 diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 393ecddc0c..cbf965d353 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -215,10 +215,7 @@ static const struct CheckBoxValues_t 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") } + { PF2_INVISIBLE, LPGENW("Invisible") } }; class CMainOptionsDlg : public CBaseOptionDlg diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 990d3dd326..98f80447fc 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -44,14 +44,8 @@ static int SRMMStatusToPf2(int status) 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; } 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"; diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp index c2585fbb11..593bc0f2c4 100644 --- a/plugins/SimpleAR/src/Main.cpp +++ b/plugins/SimpleAR/src/Main.cpp @@ -100,7 +100,7 @@ INT CheckDefaults(WPARAM, LPARAM) mir_free(ptszVal); for (int c = ID_STATUS_ONLINE; c < ID_STATUS_IDLE; c++) { - if (c == ID_STATUS_ONLINE || c == ID_STATUS_FREECHAT || c == ID_STATUS_INVISIBLE) + if (c == ID_STATUS_ONLINE || c == ID_STATUS_INVISIBLE) continue; else { char szStatus[6] = { 0 }; @@ -108,7 +108,7 @@ INT CheckDefaults(WPARAM, LPARAM) ptszVal = g_plugin.getWStringA(szStatus); if (ptszVal == nullptr) { wchar_t *ptszDefault; - if (c < ID_STATUS_FREECHAT) + if (c < ID_STATUS_OCCUPIED) // This mode does not have a preset message ptszDefault = ptszDefaultMsg[c - ID_STATUS_ONLINE - 1]; else if (c > ID_STATUS_INVISIBLE) @@ -142,7 +142,7 @@ INT addEvent(WPARAM hContact, LPARAM hDBEvent) char* pszProto = GetContactProto(hContact); int status = Proto_GetStatus(pszProto); - if (status == ID_STATUS_ONLINE || status == ID_STATUS_FREECHAT || status == ID_STATUS_INVISIBLE) + if (status == ID_STATUS_ONLINE || status == ID_STATUS_INVISIBLE) return FALSE; // detect size of msg diff --git a/plugins/SimpleAR/src/Options.cpp b/plugins/SimpleAR/src/Options.cpp index 6fd17f3adb..391020267b 100644 --- a/plugins/SimpleAR/src/Options.cpp +++ b/plugins/SimpleAR/src/Options.cpp @@ -23,13 +23,13 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara for (INT c = ID_STATUS_ONLINE; c < ID_STATUS_IDLE; c++) { mir_snprintf(tszStatus, "%d", c); wchar_t *pszStatus = Clist_GetStatusModeDescription(c, 0); - if (c == ID_STATUS_ONLINE || c == ID_STATUS_FREECHAT || c == ID_STATUS_INVISIBLE) + if (c == ID_STATUS_ONLINE || c == ID_STATUS_INVISIBLE) continue; else { SendDlgItemMessage(hwndDlg, IDC_STATUSMODE, CB_ADDSTRING, 0, (LPARAM)pszStatus); if (!g_plugin.getWString(tszStatus, &dbv)) { - if (c < ID_STATUS_FREECHAT) + if (c < ID_STATUS_OCCUPIED) ptszMessage[c - ID_STATUS_ONLINE - 1] = wcsdup(dbv.pwszVal); else if (c > ID_STATUS_INVISIBLE) ptszMessage[c - ID_STATUS_ONLINE - 3] = wcsdup(dbv.pwszVal); @@ -99,15 +99,15 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara GetDlgItemText(hwndDlg, IDC_MESSAGE, ptszMessage[lastIndex], size); for (int c = ID_STATUS_ONLINE; c < ID_STATUS_IDLE; c++) { - if (c == ID_STATUS_ONLINE || c == ID_STATUS_FREECHAT || c == ID_STATUS_INVISIBLE) + if (c == ID_STATUS_ONLINE || c == ID_STATUS_INVISIBLE) continue; else { char szStatus[6] = { 0 }; mir_snprintf(szStatus, "%d", c); - if (cID_STATUS_INVISIBLE && ptszMessage[c - ID_STATUS_ONLINE - 3]) + else if (c > ID_STATUS_INVISIBLE && ptszMessage[c - ID_STATUS_ONLINE - 3]) g_plugin.setWString(szStatus, ptszMessage[c - ID_STATUS_ONLINE - 3]); else g_plugin.delSetting(szStatus); @@ -119,14 +119,13 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara case WM_DESTROY: for (int c = ID_STATUS_ONLINE; c < ID_STATUS_IDLE; c++) { - if (c == ID_STATUS_ONLINE || c == ID_STATUS_FREECHAT || c == ID_STATUS_INVISIBLE) + if (c == ID_STATUS_ONLINE || c == ID_STATUS_INVISIBLE) continue; - else { - if (cID_STATUS_INVISIBLE) - ptszMessage[c - ID_STATUS_ONLINE - 3] = nullptr; - } + + if (c < ID_STATUS_OCCUPIED) + ptszMessage[c - ID_STATUS_ONLINE - 1] = nullptr; + else if (c > ID_STATUS_INVISIBLE) + ptszMessage[c - ID_STATUS_ONLINE - 3] = nullptr; } break; } diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index ff3b8dde0e..ca42180c0f 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -492,8 +492,7 @@ int CheckProtoSettings(const char *szProto, int iInitialStatus) case 2: return ID_STATUS_AWAY; case 3: return ID_STATUS_NA; case 4: return ID_STATUS_DND; - case 5: return ID_STATUS_FREECHAT; - case 6: return ID_STATUS_INVISIBLE; + case 5: return ID_STATUS_INVISIBLE; default: return iInitialStatus; } } @@ -561,7 +560,7 @@ int HasProtoStaticStatusMsg(const char *szProto, int iInitialStatus, int iStatus INT_PTR SetStatusModeFromExtern(WPARAM wParam, LPARAM lParam) { - if ((wParam < ID_STATUS_OFFLINE && wParam != 0) || (wParam > ID_STATUS_OUTTOLUNCH && wParam != ID_STATUS_CURRENT)) + if ((wParam < ID_STATUS_OFFLINE && wParam != 0) || (wParam > ID_STATUS_MAX && wParam != ID_STATUS_CURRENT)) return 0; int newStatus = (int)wParam; @@ -1353,7 +1352,7 @@ static int OnIdleChanged(WPARAM, LPARAM lParam) // we're entering idle if (lParam & IDF_ISIDLE) { - if (!db_get_b(0, "AutoAway", pa->szModuleName, 0) && iCurrentStatus != ID_STATUS_ONLINE && iCurrentStatus != ID_STATUS_FREECHAT) + if (!db_get_b(0, "AutoAway", pa->szModuleName, 0) && iCurrentStatus != ID_STATUS_ONLINE) return 0; } else { diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp index e5cdae1fde..d733c4a376 100644 --- a/plugins/SimpleStatusMsg/src/options.cpp +++ b/plugins/SimpleStatusMsg/src/options.cpp @@ -122,7 +122,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l data->status_msg = (struct SingleStatusMsg *)mir_alloc(sizeof(struct SingleStatusMsg)*(accounts->count + 1)); - for (i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) { + for (i = ID_STATUS_ONLINE; i <= ID_STATUS_MAX; i++) { if (accounts->statusMsgFlags & Proto_Status2Flag(i)) { index = SendDlgItemMessage(hwndDlg, IDC_CBOPTSTATUS, CB_INSERTSTRING, -1, (LPARAM)Clist_GetStatusModeDescription(i, 0)); if (index != CB_ERR && index != CB_ERRSPACE) { @@ -365,7 +365,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l int j = SendDlgItemMessage(hwndDlg, IDC_CBOPTSTATUS, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_CBOPTSTATUS, CB_GETCURSEL, 0, 0), 0); SendDlgItemMessage(hwndDlg, IDC_CBOPTSTATUS, CB_RESETCONTENT, 0, 0); - for (l = ID_STATUS_ONLINE; l <= ID_STATUS_OUTTOLUNCH; l++) { + for (l = ID_STATUS_ONLINE; l <= ID_STATUS_MAX; l++) { int index; if (status_modes & Proto_Status2Flag(l)) { index = SendDlgItemMessage(hwndDlg, IDC_CBOPTSTATUS, CB_INSERTSTRING, -1, (LPARAM)Clist_GetStatusModeDescription(l, 0)); @@ -797,7 +797,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l int j = SendDlgItemMessage(hwndDlg, IDC_CBOPTPROTO, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_CBOPTPROTO, CB_GETCURSEL, 0, 0), 0); if (j) { - for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) { + for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_MAX; i++) { if (accounts->statusMsgFlags & Proto_Status2Flag(i)) { data->status_msg[0].flags[i - ID_STATUS_ONLINE] = data->status_msg[j].flags[i - ID_STATUS_ONLINE]; if (data->status_msg[j].flags[i - ID_STATUS_ONLINE] & STATUS_THIS_MSG) @@ -834,7 +834,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l } } else if (data->proto_msg[j].flags & PROTO_POPUPDLG) { - for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) { + for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_MAX; i++) { if (CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(i)) { data->status_msg[k + 1].flags[i - ID_STATUS_ONLINE] = data->status_msg[j].flags[i - ID_STATUS_ONLINE]; if (data->status_msg[j].flags[i - ID_STATUS_ONLINE] & STATUS_THIS_MSG) @@ -858,7 +858,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l else status_modes = accounts->statusMsgFlags; - for (int k = ID_STATUS_ONLINE; k <= ID_STATUS_OUTTOLUNCH; k++) { + for (int k = ID_STATUS_ONLINE; k <= ID_STATUS_MAX; k++) { if (k - ID_STATUS_ONLINE != i && status_modes & Proto_Status2Flag(k)) { data->status_msg[j].flags[k - ID_STATUS_ONLINE] = data->status_msg[j].flags[i]; if (data->status_msg[j].flags[i] & STATUS_THIS_MSG) @@ -873,7 +873,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l case WM_NOTIFY: if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) { char szSetting[80]; - for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) { + for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_MAX; i++) { if (accounts->statusMsgFlags & Proto_Status2Flag(i)) { db_set_ws(0, "SRAway", StatusModeToDbSetting(i, "Default"), data->status_msg[0].msg[i - ID_STATUS_ONLINE]); g_plugin.setByte(StatusModeToDbSetting(i, "Flags"), (BYTE)data->status_msg[0].flags[i - ID_STATUS_ONLINE]); @@ -1419,7 +1419,7 @@ static INT_PTR CALLBACK DlgStatusOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wPa int status_modes = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) & ~CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0); SendDlgItemMessage(hwndDlg, IDC_LISTSTATUS, LB_RESETCONTENT, 0, 0); - for (int l = ID_STATUS_OFFLINE; l <= ID_STATUS_OUTTOLUNCH; l++) { + for (int l = ID_STATUS_OFFLINE; l <= ID_STATUS_MAX; l++) { if (status_modes & Proto_Status2Flag(l) || l == ID_STATUS_OFFLINE) { int index = SendDlgItemMessage(hwndDlg, IDC_LISTSTATUS, LB_INSERTSTRING, -1, (LPARAM)Clist_GetStatusModeDescription(l, 0)); if (index != LB_ERR && index != LB_ERRSPACE) { diff --git a/plugins/SimpleStatusMsg/src/utils.cpp b/plugins/SimpleStatusMsg/src/utils.cpp index a3ba96c977..3fd0d1b8d2 100644 --- a/plugins/SimpleStatusMsg/src/utils.cpp +++ b/plugins/SimpleStatusMsg/src/utils.cpp @@ -79,12 +79,9 @@ 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; @@ -100,12 +97,9 @@ 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; } diff --git a/plugins/SkypeStatusChange/src/main.cpp b/plugins/SkypeStatusChange/src/main.cpp index 1abb83ad54..61a529e27b 100644 --- a/plugins/SkypeStatusChange/src/main.cpp +++ b/plugins/SkypeStatusChange/src/main.cpp @@ -52,18 +52,15 @@ enum LPCTSTR g_pszSkypeWndClassName = L"SkypeHelperWindow{155198f0-8749-47b7-ac53-58f2ac70844c}"; -const CMirandaStatus2SkypeStatus g_aStatusCode[10] = +const CMirandaStatus2SkypeStatus g_aStatusCode[MAX_STATUS_COUNT] = { {ID_STATUS_AWAY, "AWAY",L"Away"}, {ID_STATUS_NA, "AWAY",L"Not available"}, // removed in Skype 5 {ID_STATUS_DND, "DND",L"Do not disturb"}, {ID_STATUS_ONLINE, "ONLINE",L"Online"}, - {ID_STATUS_FREECHAT, "ONLINE",L"Free for chat"}, // SKYPEME status doesn't work in Skype 4! {ID_STATUS_OFFLINE, "OFFLINE",L"Offline"}, {ID_STATUS_INVISIBLE, "INVISIBLE",L"Invisible"}, {ID_STATUS_OCCUPIED,"DND",L"Occupied"}, - {ID_STATUS_ONTHEPHONE,"DND",L"On the phone"}, - {ID_STATUS_OUTTOLUNCH,"DND",L"Out to lunch"} }; enum { INVALID_INDEX = 0xFFFFFFFF }; diff --git a/plugins/SkypeStatusChange/src/stdafx.h b/plugins/SkypeStatusChange/src/stdafx.h index 1aaead0247..20a71727e0 100644 --- a/plugins/SkypeStatusChange/src/stdafx.h +++ b/plugins/SkypeStatusChange/src/stdafx.h @@ -33,9 +33,6 @@ class COptions cssLongAway = 0x00000010, cssLightDND = 0x00000020, cssHeavyDND = 0x00000040, - cssFreeChart = 0x00000080, - cssOutToLunch = 0x00000100, - cssOnThePhone = 0x00000200, cssIdle = 0x00000400, cssAll = 0x80000000 }; @@ -46,13 +43,10 @@ class COptions case ID_STATUS_ONLINE: return cssOnline; case ID_STATUS_OFFLINE: return cssOffline; case ID_STATUS_INVISIBLE: return cssInvisible; - case ID_STATUS_OUTTOLUNCH: return cssOutToLunch; - case ID_STATUS_ONTHEPHONE: return cssOnThePhone; case ID_STATUS_AWAY: return cssShortAway; case ID_STATUS_NA: return cssLongAway; case ID_STATUS_OCCUPIED: return cssLightDND; case ID_STATUS_DND: return cssHeavyDND; - case ID_STATUS_FREECHAT: return cssFreeChart; case ID_STATUS_IDLE: return cssIdle; } return 0; @@ -168,4 +162,4 @@ struct CMirandaStatus2SkypeStatus LPCTSTR m_ptszStatusName; }; -extern const CMirandaStatus2SkypeStatus g_aStatusCode[10]; +extern const CMirandaStatus2SkypeStatus g_aStatusCode[MAX_STATUS_COUNT]; diff --git a/plugins/StatusChange/res/resource.rc b/plugins/StatusChange/res/resource.rc index 9da9ba995f..dbe60e5071 100644 --- a/plugins/StatusChange/res/resource.rc +++ b/plugins/StatusChange/res/resource.rc @@ -41,20 +41,14 @@ BEGIN CONTROL "Not available",IDC_RAD_NA,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,60,131,95,10 CONTROL "Occupied",IDC_RAD_OCCUPIED,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,60,141,95,10 CONTROL "Do not disturb",IDC_RAD_DND,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,165,101,95,10 - CONTROL "Free for chat",IDC_RAD_FREECHAT,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,165,111,95,10 - CONTROL "Invisible",IDC_RAD_INVISIBLE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,165,121,95,10 - CONTROL "On the phone",IDC_RAD_ONTHEPHONE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,165,131,95,10 - CONTROL "Out to lunch",IDC_RAD_OUTTOLUNCH,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,165,141,95,10 + CONTROL "Invisible",IDC_RAD_INVISIBLE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,165,111,95,10 CONTROL "Offline",IDC_CHK_OFFLINE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,60,178,95,10 CONTROL "Online",IDC_CHK_ONLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,60,188,95,10 CONTROL "Away",IDC_CHK_AWAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,60,198,95,10 CONTROL "Not available",IDC_CHK_NA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,60,208,95,10 CONTROL "Occupied",IDC_CHK_OCCUPIED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,60,217,95,10 CONTROL "Do not disturb",IDC_CHK_DND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,165,178,95,10 - CONTROL "Free for chat",IDC_CHK_FREECHAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,165,188,95,10 CONTROL "Invisible",IDC_CHK_INVISIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,165,198,95,10 - CONTROL "On the phone",IDC_CHK_ONTHEPHONE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,165,208,95,10 - CONTROL "Out to lunch",IDC_CHK_OUTTOLUNCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,165,218,95,10 GROUPBOX "On events...",-1,45,10,220,73,WS_GROUP CTEXT "Send",-1,149,17,41,9,NOT WS_GROUP CTEXT "Receive",-1,187,17,41,9,NOT WS_GROUP diff --git a/plugins/StatusChange/src/main.cpp b/plugins/StatusChange/src/main.cpp index 16b81f6d24..723cb289c3 100644 --- a/plugins/StatusChange/src/main.cpp +++ b/plugins/StatusChange/src/main.cpp @@ -42,10 +42,7 @@ void LoadOptions() Options.IfNA = (BOOL)g_plugin.getByte("IfNA", TRUE); Options.IfOccupied = (BOOL)g_plugin.getByte("IfOccupied", FALSE); Options.IfDND = (BOOL)g_plugin.getByte("IfDND", FALSE); - Options.IfFreeforchat = (BOOL)g_plugin.getByte("IfFreeforchat", FALSE); Options.IfInvisible = (BOOL)g_plugin.getByte("IfInvisible", FALSE); - Options.IfOnthephone = (BOOL)g_plugin.getByte("IfOnthephone", FALSE); - Options.IfOuttolunch = (BOOL)g_plugin.getByte("IfOuttolunch", FALSE); } static int StatusChangeGetMessage(WPARAM, LPARAM hDbEvent) @@ -69,10 +66,7 @@ static int StatusChangeGetMessage(WPARAM, LPARAM hDbEvent) case ID_STATUS_NA: change_status = Options.IfNA; break; case ID_STATUS_OCCUPIED: change_status = Options.IfOccupied; break; case ID_STATUS_DND: change_status = Options.IfDND; break; - case ID_STATUS_FREECHAT: change_status = Options.IfFreeforchat; break; case ID_STATUS_INVISIBLE: change_status = Options.IfInvisible; break; - case ID_STATUS_ONTHEPHONE: change_status = Options.IfOnthephone; break; - case ID_STATUS_OUTTOLUNCH: change_status = Options.IfOuttolunch; break; default: change_status = FALSE; break; } @@ -133,11 +127,7 @@ static INT_PTR CALLBACK DlgProcStatusChangeOpts(HWND hwndDlg, UINT msg, WPARAM w case ID_STATUS_DND: CheckDlgButton(hwndDlg, IDC_RAD_DND, BST_CHECKED); break; case ID_STATUS_NA: CheckDlgButton(hwndDlg, IDC_RAD_NA, BST_CHECKED); break; case ID_STATUS_OCCUPIED: CheckDlgButton(hwndDlg, IDC_RAD_OCCUPIED, BST_CHECKED); break; - case ID_STATUS_FREECHAT: CheckDlgButton(hwndDlg, IDC_RAD_FREECHAT, BST_CHECKED); break; case ID_STATUS_INVISIBLE: CheckDlgButton(hwndDlg, IDC_RAD_INVISIBLE, BST_CHECKED); break; - case ID_STATUS_ONTHEPHONE: CheckDlgButton(hwndDlg, IDC_RAD_ONTHEPHONE, BST_CHECKED); break; - case ID_STATUS_OUTTOLUNCH: CheckDlgButton(hwndDlg, IDC_RAD_OUTTOLUNCH, BST_CHECKED); break; - break; } CheckDlgButton(hwndDlg, IDC_CHK_OFFLINE, Options.IfOffline ? BST_CHECKED : BST_UNCHECKED); @@ -146,10 +136,7 @@ static INT_PTR CALLBACK DlgProcStatusChangeOpts(HWND hwndDlg, UINT msg, WPARAM w CheckDlgButton(hwndDlg, IDC_CHK_DND, Options.IfDND ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_CHK_NA, Options.IfNA ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_CHK_OCCUPIED, Options.IfOccupied ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CHK_FREECHAT, Options.IfFreeforchat ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_CHK_INVISIBLE, Options.IfInvisible ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CHK_ONTHEPHONE, Options.IfOnthephone ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CHK_OUTTOLUNCH, Options.IfOuttolunch ? BST_CHECKED : BST_UNCHECKED); return TRUE; case WM_COMMAND: @@ -195,22 +182,10 @@ static INT_PTR CALLBACK DlgProcStatusChangeOpts(HWND hwndDlg, UINT msg, WPARAM w Options.ChangeTo = ID_STATUS_OCCUPIED; PostMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); break; - case IDC_RAD_FREECHAT: - Options.ChangeTo = ID_STATUS_FREECHAT; - PostMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; case IDC_RAD_INVISIBLE: Options.ChangeTo = ID_STATUS_INVISIBLE; PostMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); break; - case IDC_RAD_ONTHEPHONE: - Options.ChangeTo = ID_STATUS_ONTHEPHONE; - PostMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - case IDC_RAD_OUTTOLUNCH: - Options.ChangeTo = ID_STATUS_OUTTOLUNCH; - PostMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; case IDC_CHK_OFFLINE: Options.IfOffline = !Options.IfOffline; @@ -236,22 +211,10 @@ static INT_PTR CALLBACK DlgProcStatusChangeOpts(HWND hwndDlg, UINT msg, WPARAM w Options.IfOccupied = !Options.IfOccupied; PostMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); break; - case IDC_CHK_FREECHAT: - Options.IfFreeforchat = !Options.IfFreeforchat; - PostMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; case IDC_CHK_INVISIBLE: Options.IfInvisible = !Options.IfInvisible; PostMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); break; - case IDC_CHK_ONTHEPHONE: - Options.IfOnthephone = !Options.IfOnthephone; - PostMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - case IDC_CHK_OUTTOLUNCH: - Options.IfOuttolunch = !Options.IfOuttolunch; - PostMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; } break; @@ -275,10 +238,7 @@ static INT_PTR CALLBACK DlgProcStatusChangeOpts(HWND hwndDlg, UINT msg, WPARAM w g_plugin.setByte("IfNA", (BYTE)Options.IfNA); g_plugin.setByte("IfDND", (BYTE)Options.IfDND); g_plugin.setByte("IfOccupied", (BYTE)Options.IfOccupied); - g_plugin.setByte("IfFreeforchat", (BYTE)Options.IfFreeforchat); g_plugin.setByte("IfInvisible", (BYTE)Options.IfInvisible); - g_plugin.setByte("IfOnthephone", (BYTE)Options.IfOnthephone); - g_plugin.setByte("IfOuttolunch", (BYTE)Options.IfOuttolunch); return TRUE; } break; diff --git a/plugins/StatusChange/src/resource.h b/plugins/StatusChange/src/resource.h index 668f5c35fc..1b0a7294da 100644 --- a/plugins/StatusChange/src/resource.h +++ b/plugins/StatusChange/src/resource.h @@ -9,20 +9,14 @@ #define IDC_CHK_DND 1004 #define IDC_CHK_NA 1005 #define IDC_CHK_OCCUPIED 1006 -#define IDC_CHK_FREECHAT 1007 -#define IDC_CHK_INVISIBLE 1008 -#define IDC_CHK_ONTHEPHONE 1009 -#define IDC_CHK_OUTTOLUNCH 1010 +#define IDC_CHK_INVISIBLE 1007 #define IDC_RAD_OFFLINE 2001 #define IDC_RAD_ONLINE 2002 #define IDC_RAD_AWAY 2003 #define IDC_RAD_DND 2004 #define IDC_RAD_NA 2005 #define IDC_RAD_OCCUPIED 2006 -#define IDC_RAD_FREECHAT 2007 -#define IDC_RAD_INVISIBLE 2008 -#define IDC_RAD_ONTHEPHONE 2009 -#define IDC_RAD_OUTTOLUNCH 2010 +#define IDC_RAD_INVISIBLE 2007 #define IDC_CHK_MESSAGEREAD 3001 #define IDC_CHK_MESSAGESEND 3002 #define IDC_CHK_FILEREAD 3005 diff --git a/plugins/StatusChange/src/stdafx.h b/plugins/StatusChange/src/stdafx.h index 7d6e3b3146..5424e7de8d 100644 --- a/plugins/StatusChange/src/stdafx.h +++ b/plugins/StatusChange/src/stdafx.h @@ -38,8 +38,5 @@ struct TOPTIONS BOOL IfNA; BOOL IfOccupied; BOOL IfDND; - BOOL IfFreeforchat; BOOL IfInvisible; - BOOL IfOnthephone; - BOOL IfOuttolunch; }; diff --git a/plugins/StatusManager/src/advancedautoaway.cpp b/plugins/StatusManager/src/advancedautoaway.cpp index aa630ccb36..39c6418a99 100644 --- a/plugins/StatusManager/src/advancedautoaway.cpp +++ b/plugins/StatusManager/src/advancedautoaway.cpp @@ -439,7 +439,7 @@ int LoadAutoAwaySetting(SMProto &autoAwaySetting, char *protoName) mir_snprintf(setting, "%s_NATime", protoName); autoAwaySetting.naTime = AAAPlugin.getWord(setting, SETTING_NATIME_DEFAULT); mir_snprintf(setting, "%s_StatusFlags", protoName); - autoAwaySetting.statusFlags = AAAPlugin.getWord(setting, StatusModeToProtoFlag(ID_STATUS_ONLINE) | StatusModeToProtoFlag(ID_STATUS_FREECHAT)); + autoAwaySetting.statusFlags = AAAPlugin.getWord(setting, StatusModeToProtoFlag(ID_STATUS_ONLINE)); int flags; if (g_bAAASettingSame) diff --git a/plugins/StatusManager/src/commonstatus.cpp b/plugins/StatusManager/src/commonstatus.cpp index d513d87208..365ce16081 100644 --- a/plugins/StatusManager/src/commonstatus.cpp +++ b/plugins/StatusManager/src/commonstatus.cpp @@ -29,10 +29,7 @@ StatusModeMap statusModes[MAX_STATUS_COUNT] = { ID_STATUS_NA, PF2_LONGAWAY }, { ID_STATUS_OCCUPIED, PF2_LIGHTDND }, { ID_STATUS_DND, PF2_HEAVYDND }, - { ID_STATUS_FREECHAT, PF2_FREECHAT }, { ID_STATUS_INVISIBLE, PF2_INVISIBLE }, - { ID_STATUS_ONTHEPHONE, PF2_ONTHEPHONE }, - { ID_STATUS_OUTTOLUNCH, PF2_OUTTOLUNCH } }; // handles for hooks and other Miranda thingies @@ -90,12 +87,9 @@ 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; default: return nullptr; } mir_strcpy(str, prefix); mir_strcat(str, suffix); @@ -109,13 +103,10 @@ DWORD StatusModeToProtoFlag(int status) case ID_STATUS_ONLINE: return PF2_ONLINE; case ID_STATUS_OFFLINE: return PF2_OFFLINE; case ID_STATUS_INVISIBLE: return PF2_INVISIBLE; - case ID_STATUS_OUTTOLUNCH: return PF2_OUTTOLUNCH; - case ID_STATUS_ONTHEPHONE: return PF2_ONTHEPHONE; case ID_STATUS_AWAY: return PF2_SHORTAWAY; case ID_STATUS_NA: return PF2_LONGAWAY; case ID_STATUS_OCCUPIED: return PF2_LIGHTDND; case ID_STATUS_DND: return PF2_HEAVYDND; - case ID_STATUS_FREECHAT: return PF2_FREECHAT; } return 0; } @@ -132,7 +123,7 @@ int GetActualStatus(PROTOCOLSETTINGEX *protoSetting) if (protoSetting->m_status == ID_STATUS_CURRENT) return Proto_GetStatus(protoSetting->m_szName); - if ((protoSetting->m_status < ID_STATUS_OFFLINE) || (protoSetting->m_status > ID_STATUS_OUTTOLUNCH)) { + if ((protoSetting->m_status < ID_STATUS_OFFLINE) || (protoSetting->m_status > ID_STATUS_MAX)) { log_debug(0, "invalid status detected: %d", protoSetting->m_status); return 0; } diff --git a/plugins/StatusManager/src/ss_options.cpp b/plugins/StatusManager/src/ss_options.cpp index 2c5cdccd48..b9b903eaf7 100644 --- a/plugins/StatusManager/src/ss_options.cpp +++ b/plugins/StatusManager/src/ss_options.cpp @@ -36,12 +36,9 @@ static char* GetStatusDesc(int status) case ID_STATUS_NA: return "na"; case ID_STATUS_DND: return "dnd"; case ID_STATUS_OCCUPIED: return "occupied"; - case ID_STATUS_FREECHAT: return "freechat"; case ID_STATUS_ONLINE: return "online"; case ID_STATUS_OFFLINE: return "offline"; case ID_STATUS_INVISIBLE: return "invisible"; - case ID_STATUS_ONTHEPHONE: return "onthephone"; - case ID_STATUS_OUTTOLUNCH: return "outtolunch"; case ID_STATUS_LAST: return "last"; } return "offline"; diff --git a/plugins/StatusManager/src/startupstatus.cpp b/plugins/StatusManager/src/startupstatus.cpp index 45075ebf3a..bbca4a5843 100644 --- a/plugins/StatusManager/src/startupstatus.cpp +++ b/plugins/StatusManager/src/startupstatus.cpp @@ -54,18 +54,12 @@ static int IsValidStatusDesc(char* statusDesc) return ID_STATUS_DND; if (!strncmp("occupied", statusDesc, 8)) return ID_STATUS_OCCUPIED; - if (!strncmp("freechat", statusDesc, 8)) - return ID_STATUS_FREECHAT; if (!strncmp("online", statusDesc, 6)) return ID_STATUS_ONLINE; if (!strncmp("offline", statusDesc, 7)) return ID_STATUS_OFFLINE; if (!strncmp("invisible", statusDesc, 9)) return ID_STATUS_INVISIBLE; - if (!strncmp("onthephone", statusDesc, 10)) - return ID_STATUS_ONTHEPHONE; - if (!strncmp("outtolunch", statusDesc, 10)) - return ID_STATUS_OUTTOLUNCH; if (!strncmp("last", statusDesc, 4)) return ID_STATUS_LAST; diff --git a/plugins/TabSRMM/res/resource.rc b/plugins/TabSRMM/res/resource.rc index e1a33dedaa..931e2c4948 100644 --- a/plugins/TabSRMM/res/resource.rc +++ b/plugins/TabSRMM/res/resource.rc @@ -131,9 +131,6 @@ BEGIN CONTROL "",ID_STATUS_DND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,84,82,11 CONTROL "",ID_STATUS_OCCUPIED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,39,82,11 CONTROL "",ID_STATUS_INVISIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,54,82,11 - CONTROL "",ID_STATUS_ONTHEPHONE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,69,82,11 - CONTROL "",ID_STATUS_OUTTOLUNCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,84,82,11 - CONTROL "",ID_STATUS_FREECHAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,99,82,11 END IDD_MSGCONTAINER DIALOGEX 0, 0, 436, 233 diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 643068e4ad..9963d465cd 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -1392,7 +1392,7 @@ INT_PTR CALLBACK DlgProcSetupStatusModes(HWND hwndDlg, UINT msg, WPARAM wParam, SetWindowText(hwndDlg, TranslateT("Choose status modes")); { - for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) { + for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_MAX; i++) { SetDlgItemText(hwndDlg, i, Clist_GetStatusModeDescription(i, 0)); if (dwStatusMask != -1 && (dwStatusMask & (1 << (i - ID_STATUS_ONLINE)))) CheckDlgButton(hwndDlg, i, BST_CHECKED); @@ -1409,7 +1409,7 @@ INT_PTR CALLBACK DlgProcSetupStatusModes(HWND hwndDlg, UINT msg, WPARAM wParam, dwNewStatusMask = -1; else { dwNewStatusMask = 0; - for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_MAX; i++) dwNewStatusMask |= (IsDlgButtonChecked(hwndDlg, i) ? (1 << (i - ID_STATUS_ONLINE)) : 0); } break; @@ -1426,7 +1426,7 @@ INT_PTR CALLBACK DlgProcSetupStatusModes(HWND hwndDlg, UINT msg, WPARAM wParam, break; case IDC_ALWAYS: - for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_MAX; i++) Utils::enableDlgControl(hwndDlg, i, !IsDlgButtonChecked(hwndDlg, IDC_ALWAYS)); break; } diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index 06ce68d9db..a56b3c20be 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -384,7 +384,7 @@ int CSendLater::sendIt(CSendLaterJob *job) return 0; } if (job->szId[0] == 'S') { - if (!(wMyStatus == ID_STATUS_ONLINE || wMyStatus == ID_STATUS_FREECHAT)) { + if (wMyStatus != ID_STATUS_ONLINE) { job->bCode = CSendLaterJob::JOB_MYSTATUS; return 0; } diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index c760bce335..b322ea68d4 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -123,7 +123,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (swzText) AddRow(pwd, TranslateT("Status:"), swzText, nullptr, false, false, false); - if (wStatus >= ID_STATUS_ONLINE && wStatus <= ID_STATUS_OUTTOLUNCH) { + if (wStatus >= ID_STATUS_ONLINE && wStatus <= ID_STATUS_MAX) { // status message ptrW ptszStatus(GetProtoStatusMessage(pwd->clcit.szProto, wStatus)); if (ptszStatus) { @@ -1500,7 +1500,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa AddRow(pwd, TranslateT("Status:"), swzText, nullptr, false, false, false); } - if (pa->iRealStatus >= ID_STATUS_ONLINE && pa->iRealStatus <= ID_STATUS_OUTTOLUNCH) { + if (pa->iRealStatus >= ID_STATUS_ONLINE && pa->iRealStatus <= ID_STATUS_MAX) { if (dwItems & TRAYTIP_STATUS_MSG) { wchar_t *swzText = GetProtoStatusMessage(pa->szModuleName, pa->iRealStatus); if (swzText) { diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 503aebfa5c..efb801e967 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -776,7 +776,7 @@ BOOL CTooltipNotify::ContactsDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM) wchar_t* CTooltipNotify::StatusToString(int iStatus, wchar_t *szStatus, int iBufSize) { - if (iStatus >= ID_STATUS_OFFLINE && iStatus <= ID_STATUS_OUTTOLUNCH) + if (iStatus >= ID_STATUS_OFFLINE && iStatus <= ID_STATUS_MAX) mir_wstrncpy(szStatus, Clist_GetStatusModeDescription(iStatus, 0), iBufSize); else { switch (iStatus) { diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index b99ab58fb3..d30b307942 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -997,7 +997,7 @@ static int ProtocolAckHook(WPARAM, LPARAM lParam) } } else { - if ((pAck->lParam >= ID_STATUS_ONLINE) && (pAck->lParam <= ID_STATUS_OUTTOLUNCH)) { + if ((pAck->lParam >= ID_STATUS_ONLINE) && (pAck->lParam <= ID_STATUS_MAX)) { for (int i = 0; i < NumberOfAccounts; i++) if (!mir_strcmp(ProtoList[i].name, pAck->szModule)) { ProtocolIsOnLine(i); diff --git a/plugins/Utils.pas/protocols.pas b/plugins/Utils.pas/protocols.pas index 8a76d794d0..3d039e7511 100644 --- a/plugins/Utils.pas/protocols.pas +++ b/plugins/Utils.pas/protocols.pas @@ -41,9 +41,6 @@ const psf_longaway = $0008; psf_lightdnd = $0010; psf_heavydnd = $0020; - psf_freechat = $0040; - psf_outtolunch = $0080; - psf_onthephone = $0100; psf_enabled = $0800; psf_all = $08FF; // protocol properties @@ -60,22 +57,18 @@ const defproto = '- default -'; const - NumStatus = 10; - StatCodes:array [0..NumStatus-1] of integer=( + StatCodes:array [0..MAX_STATUS_COUNT-1] of integer=( ID_STATUS_OFFLINE, ID_STATUS_ONLINE, ID_STATUS_INVISIBLE, ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, - ID_STATUS_DND, - ID_STATUS_FREECHAT, - ID_STATUS_OUTTOLUNCH, - ID_STATUS_ONTHEPHONE); + ID_STATUS_DND); const - StatNames:array [0..NumStatus-1] of PWideChar=( - 'Default'{'Offline'},'Online','Invisible','Away','Not available','Occupied','Do not disturb', - 'Free for chat','Out to lunch','On the phone'); + StatNames:array [0..MAX_STATUS_COUNT-1] of PWideChar=( + 'Default'{'Offline'},'Online','Invisible','Away','Not available','Occupied','Do not disturb' + ); type pMyProto = ^tMyProto; @@ -172,7 +165,7 @@ function GetStatusNum(status:integer):integer; var i:integer; begin - for i:=0 to NumStatus-1 do + for i:=0 to MAX_STATUS_COUNT-1 do if StatCodes[i]=status then begin result:=i; @@ -332,9 +325,6 @@ begin if (status and psf_longaway )<>0 then AddString(4,(enabled and psf_longaway )<>0); if (status and psf_lightdnd )<>0 then AddString(5,(enabled and psf_lightdnd )<>0); if (status and psf_heavydnd )<>0 then AddString(6,(enabled and psf_heavydnd )<>0); - if (status and psf_freechat )<>0 then AddString(7,(enabled and psf_freechat )<>0); - if (status and psf_outtolunch)<>0 then AddString(8,(enabled and psf_outtolunch)<>0); - if (status and psf_onthephone)<>0 then AddString(9,(enabled and psf_onthephone)<>0); end; ListView_SetColumnWidth(list,0,LVSCW_AUTOSIZE); end; @@ -352,9 +342,6 @@ procedure CheckStatusList(list:HWND;ProtoNum:uint_ptr); ID_STATUS_NA: i:=psf_longaway; ID_STATUS_OCCUPIED: i:=psf_lightdnd; ID_STATUS_DND: i:=psf_heavydnd; - ID_STATUS_FREECHAT: i:=psf_freechat; - ID_STATUS_OUTTOLUNCH: i:=psf_outtolunch; - ID_STATUS_ONTHEPHONE: i:=psf_onthephone; else exit; end; @@ -434,9 +421,6 @@ begin if (flag and PF2_LONGAWAY) <>0 then status:=status or psf_longaway; if (flag and PF2_LIGHTDND) <>0 then status:=status or psf_lightdnd; if (flag and PF2_HEAVYDND) <>0 then status:=status or psf_heavydnd; - if (flag and PF2_FREECHAT) <>0 then status:=status or psf_freechat; - if (flag and PF2_OUTTOLUNCH)<>0 then status:=status or psf_outtolunch; - if (flag and PF2_ONTHEPHONE)<>0 then status:=status or psf_onthephone; flag:=CallProtoService(name,PS_GETCAPS,PFLAGNUM_1,0); if ((flag and PF1_CHAT)<>0) or diff --git a/plugins/Watrack/status/i_status.inc b/plugins/Watrack/status/i_status.inc index 934e69810b..1dba7db29d 100644 --- a/plugins/Watrack/status/i_status.inc +++ b/plugins/Watrack/status/i_status.inc @@ -30,9 +30,6 @@ begin else if status=ID_STATUS_NA then mask:=psf_longaway else if status=ID_STATUS_DND then mask:=psf_heavydnd else if status=ID_STATUS_OCCUPIED then mask:=psf_lightdnd - else if status=ID_STATUS_FREECHAT then mask:=psf_freechat - else if status=ID_STATUS_ONTHEPHONE then mask:=psf_onthephone - else if status=ID_STATUS_OUTTOLUNCH then mask:=psf_outtolunch else mask:=0; result:=(protomask and mask)<>0; end; diff --git a/plugins/WinterSpeak/res/Speak.rc b/plugins/WinterSpeak/res/Speak.rc index 318ca0dc6b..0c96a907b4 100644 --- a/plugins/WinterSpeak/res/Speak.rc +++ b/plugins/WinterSpeak/res/Speak.rc @@ -58,7 +58,6 @@ BEGIN CONTROL "Do not disturb",IDC_STATUS_DND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,52,85,10 CONTROL "Not available",IDC_STATUS_NA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,63,85,10 CONTROL "Occupied",IDC_STATUS_OCCUPIED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,74,85,10 - CONTROL "Free for chat",IDC_STATUS_FREEFORCHAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,85,85,10 CONTROL "Invisible",IDC_STATUS_INVISIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,96,85,10 GROUPBOX "Occurring Events",IDC_STATIC,7,117,99,74 CONTROL "Incoming message",IDC_EVENT_MESSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,131,85,10 @@ -89,7 +88,6 @@ BEGIN CONTROL "Do not disturb",IDC_ACTIVE_DND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,35,75,10 CONTROL "Not available",IDC_ACTIVE_NA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,46,75,10 CONTROL "Occupied",IDC_ACTIVE_OCCUPIED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,57,75,10 - CONTROL "Free for chat",IDC_ACTIVE_FREEFORCHAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,68,75,10 CONTROL "Invisible",IDC_ACTIVE_INVISIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,79,75,10 GROUPBOX "Active Users",IDC_STATIC,95,0,210,240 LTEXT "The following events are being ignored:",IDC_STATIC,100,10,200,8 diff --git a/plugins/WinterSpeak/src/AnnounceDatabase.h b/plugins/WinterSpeak/src/AnnounceDatabase.h index 06014843ac..1d1629851a 100644 --- a/plugins/WinterSpeak/src/AnnounceDatabase.h +++ b/plugins/WinterSpeak/src/AnnounceDatabase.h @@ -14,7 +14,6 @@ class AnnounceDatabase StatusFlag_Dnd, StatusFlag_Na, StatusFlag_Occupied, - StatusFlag_FreeForChat, StatusFlag_Invisible, StatusFlag_SpeakStatusMsg, StatusFlag_SuppressConnect, diff --git a/plugins/WinterSpeak/src/AnnounceDialog.cpp b/plugins/WinterSpeak/src/AnnounceDialog.cpp index eb07e5fa5b..1fd67a492a 100644 --- a/plugins/WinterSpeak/src/AnnounceDialog.cpp +++ b/plugins/WinterSpeak/src/AnnounceDialog.cpp @@ -60,7 +60,6 @@ void AnnounceDialog::command(HWND window, int control) case IDC_STATUS_DND: case IDC_STATUS_NA: case IDC_STATUS_OCCUPIED: - case IDC_STATUS_FREEFORCHAT: case IDC_STATUS_INVISIBLE: case IDC_SPEAK_STATUS_MSG: case IDC_SUPPRESS_CONNECT: @@ -97,7 +96,6 @@ AnnounceDialog::load(HWND window) CheckDlgButton(window, IDC_STATUS_DND, m_db.getStatusFlag(AnnounceDatabase::StatusFlag_Dnd) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(window, IDC_STATUS_NA, m_db.getStatusFlag(AnnounceDatabase::StatusFlag_Na) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(window, IDC_STATUS_OCCUPIED, m_db.getStatusFlag(AnnounceDatabase::StatusFlag_Occupied) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(window, IDC_STATUS_FREEFORCHAT, m_db.getStatusFlag(AnnounceDatabase::StatusFlag_FreeForChat) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(window, IDC_STATUS_INVISIBLE, m_db.getStatusFlag(AnnounceDatabase::StatusFlag_Invisible) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(window, IDC_SPEAK_STATUS_MSG, m_db.getStatusFlag(AnnounceDatabase::StatusFlag_SpeakStatusMsg) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(window, IDC_SUPPRESS_CONNECT, m_db.getStatusFlag(AnnounceDatabase::StatusFlag_SuppressConnect) ? BST_CHECKED : BST_UNCHECKED); @@ -125,7 +123,6 @@ AnnounceDialog::save(HWND window) m_db.setStatusFlag(AnnounceDatabase::StatusFlag_Dnd, (IsDlgButtonChecked(window, IDC_STATUS_DND) != 0)); m_db.setStatusFlag(AnnounceDatabase::StatusFlag_Na, (IsDlgButtonChecked(window, IDC_STATUS_NA) != 0)); m_db.setStatusFlag(AnnounceDatabase::StatusFlag_Occupied, (IsDlgButtonChecked(window, IDC_STATUS_OCCUPIED) != 0)); - m_db.setStatusFlag(AnnounceDatabase::StatusFlag_FreeForChat, (IsDlgButtonChecked(window, IDC_STATUS_FREEFORCHAT) != 0)); m_db.setStatusFlag(AnnounceDatabase::StatusFlag_Invisible, (IsDlgButtonChecked(window, IDC_STATUS_INVISIBLE) != 0)); m_db.setStatusFlag(AnnounceDatabase::StatusFlag_SpeakStatusMsg, (IsDlgButtonChecked(window, IDC_SPEAK_STATUS_MSG) != 0)); m_db.setStatusFlag(AnnounceDatabase::StatusFlag_SuppressConnect, (IsDlgButtonChecked(window, IDC_SUPPRESS_CONNECT) != 0)); diff --git a/plugins/WinterSpeak/src/ConfigDatabase.h b/plugins/WinterSpeak/src/ConfigDatabase.h index 4e7f546aa1..668f38d47d 100644 --- a/plugins/WinterSpeak/src/ConfigDatabase.h +++ b/plugins/WinterSpeak/src/ConfigDatabase.h @@ -17,7 +17,6 @@ public: ActiveFlag_Dnd, ActiveFlag_Na, ActiveFlag_Occupied, - ActiveFlag_FreeForChat, ActiveFlag_Invisible }; diff --git a/plugins/WinterSpeak/src/DialogConfigActive.cpp b/plugins/WinterSpeak/src/DialogConfigActive.cpp index dad1d5153b..be288305d9 100644 --- a/plugins/WinterSpeak/src/DialogConfigActive.cpp +++ b/plugins/WinterSpeak/src/DialogConfigActive.cpp @@ -58,7 +58,6 @@ INT_PTR CALLBACK DialogConfigActive::process(HWND window, UINT message, WPARAM w case IDC_ACTIVE_DND: case IDC_ACTIVE_NA: case IDC_ACTIVE_OCCUPIED: - case IDC_ACTIVE_FREEFORCHAT: case IDC_ACTIVE_INVISIBLE: m_instance->changed(window); break; @@ -150,7 +149,6 @@ void DialogConfigActive::load(HWND window) CheckDlgButton(window, IDC_ACTIVE_DND, m_db.getActiveFlag(ConfigDatabase::ActiveFlag_Dnd) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(window, IDC_ACTIVE_NA, m_db.getActiveFlag(ConfigDatabase::ActiveFlag_Na) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(window, IDC_ACTIVE_OCCUPIED, m_db.getActiveFlag(ConfigDatabase::ActiveFlag_Occupied) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(window, IDC_ACTIVE_FREEFORCHAT, m_db.getActiveFlag(ConfigDatabase::ActiveFlag_FreeForChat) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(window, IDC_ACTIVE_INVISIBLE, m_db.getActiveFlag(ConfigDatabase::ActiveFlag_Invisible) ? BST_CHECKED : BST_UNCHECKED); HWND listview = GetDlgItem(window, IDC_ACTIVE_USERS); @@ -322,7 +320,6 @@ void DialogConfigActive::save(HWND window) m_db.setActiveFlag(ConfigDatabase::ActiveFlag_Dnd, (IsDlgButtonChecked(window, IDC_ACTIVE_DND) != 0)); m_db.setActiveFlag(ConfigDatabase::ActiveFlag_Na, (IsDlgButtonChecked(window, IDC_ACTIVE_NA) != 0)); m_db.setActiveFlag(ConfigDatabase::ActiveFlag_Occupied, (IsDlgButtonChecked(window, IDC_ACTIVE_OCCUPIED) != 0)); - m_db.setActiveFlag(ConfigDatabase::ActiveFlag_FreeForChat, (IsDlgButtonChecked(window, IDC_ACTIVE_FREEFORCHAT) != 0)); m_db.setActiveFlag(ConfigDatabase::ActiveFlag_Invisible, (IsDlgButtonChecked(window, IDC_ACTIVE_INVISIBLE) != 0)); for (auto &hContact : Contacts()) { diff --git a/plugins/WinterSpeak/src/SpeakAnnounce.cpp b/plugins/WinterSpeak/src/SpeakAnnounce.cpp index e9b8160138..87f01038d4 100644 --- a/plugins/WinterSpeak/src/SpeakAnnounce.cpp +++ b/plugins/WinterSpeak/src/SpeakAnnounce.cpp @@ -48,9 +48,6 @@ void SpeakAnnounce::statusChange(DBCONTACTWRITESETTING *write_setting, MCONTACT case ID_STATUS_OCCUPIED: speak = m_db.getStatusFlag(AnnounceDatabase::StatusFlag_Occupied); break; - case ID_STATUS_FREECHAT: - speak = m_db.getStatusFlag(AnnounceDatabase::StatusFlag_FreeForChat); - break; case ID_STATUS_INVISIBLE: speak = m_db.getStatusFlag(AnnounceDatabase::StatusFlag_Invisible); break; diff --git a/plugins/WinterSpeak/src/SpeakConfig.cpp b/plugins/WinterSpeak/src/SpeakConfig.cpp index 1d0d4185d7..b02de945c3 100644 --- a/plugins/WinterSpeak/src/SpeakConfig.cpp +++ b/plugins/WinterSpeak/src/SpeakConfig.cpp @@ -68,9 +68,6 @@ bool SpeakConfig::say(const std::wstring &sentence, MCONTACT user, bool message) case ID_STATUS_OCCUPIED: active = m_db.getActiveFlag(ConfigDatabase::ActiveFlag_Occupied); break; - case ID_STATUS_FREECHAT: - active = m_db.getActiveFlag(ConfigDatabase::ActiveFlag_FreeForChat); - break; case ID_STATUS_INVISIBLE: active = m_db.getActiveFlag(ConfigDatabase::ActiveFlag_Invisible); break; diff --git a/plugins/WinterSpeak/src/UserInformation.cpp b/plugins/WinterSpeak/src/UserInformation.cpp index 7769261257..bdf89ec6e6 100644 --- a/plugins/WinterSpeak/src/UserInformation.cpp +++ b/plugins/WinterSpeak/src/UserInformation.cpp @@ -11,7 +11,6 @@ UserInformation::UserInformation() : m_status_info(), m_status_strings() { m_status_strings[ID_STATUS_NA] = LPGENW("%u is not available"); m_status_strings[ID_STATUS_DND] = LPGENW("%u does not want to be disturbed"); m_status_strings[ID_STATUS_OCCUPIED] = LPGENW("%u is occupied"); - m_status_strings[ID_STATUS_FREECHAT] = LPGENW("%u is free for chat"); } //------------------------------------------------------------------------------ diff --git a/plugins/WinterSpeak/src/resource.h b/plugins/WinterSpeak/src/resource.h index a4e8e7ed1c..c7aca68d1a 100644 --- a/plugins/WinterSpeak/src/resource.h +++ b/plugins/WinterSpeak/src/resource.h @@ -23,7 +23,6 @@ #define IDC_ACTIVE_DND 1011 #define IDC_ACTIVE_NA 1012 #define IDC_ACTIVE_OCCUPIED 1013 -#define IDC_ACTIVE_FREEFORCHAT 1014 #define IDC_ACTIVE_INVISIBLE 1015 #define IDC_BUTTON_TEST 1016 #define IDC_STATUS_OFFLINE 1100 @@ -32,7 +31,6 @@ #define IDC_STATUS_DND 1103 #define IDC_STATUS_NA 1104 #define IDC_STATUS_OCCUPIED 1105 -#define IDC_STATUS_FREEFORCHAT 1106 #define IDC_STATUS_INVISIBLE 1107 #define IDC_SPEAK_STATUS_MSG 1108 #define IDC_EVENT_MESSAGE 1109 diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index 9b0da63ff9..0a1aba74a0 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -51,10 +51,7 @@ static selfSounds[] = { ID_STATUS_DND, "SelfDND" }, { ID_STATUS_NA, "SelfNA" }, { ID_STATUS_OCCUPIED, "SelfOccupied" }, - { ID_STATUS_FREECHAT, "SelfFreeForChat" }, { ID_STATUS_INVISIBLE, "SelfInvisible" }, - { ID_STATUS_ONTHEPHONE, "SelfOnThePhone" }, - { ID_STATUS_OUTTOLUNCH, "SelfOutToLunch" } }; void InitSelfSounds() diff --git a/plugins/YARelay/res/yaRelay.rc b/plugins/YARelay/res/yaRelay.rc index 9a09e0dab8..19b6141cbd 100644 --- a/plugins/YARelay/res/yaRelay.rc +++ b/plugins/YARelay/res/yaRelay.rc @@ -55,8 +55,6 @@ BEGIN 78,75,67,10 CONTROL "Free for chat",IDC_CHECK7,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,78,86,67,10 - CONTROL "Invisible",IDC_CHECK8,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,78,97,67,10 GROUPBOX "Forward messages to...",IDC_STATIC,158,3,147,45 GROUPBOX "Template",IDC_STATIC,158,51,147,61 EDITTEXT IDC_EDIT_TEMPLATE,163,62,138,27,ES_MULTILINE | diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp index 4a29fedc9f..db2ddb9847 100644 --- a/plugins/YARelay/src/main.cpp +++ b/plugins/YARelay/src/main.cpp @@ -105,7 +105,6 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDBEvent) case ID_STATUS_NA: statMask = STATUS_NA ;break; case ID_STATUS_OCCUPIED: statMask = STATUS_OCCUPIED ;break; case ID_STATUS_DND: statMask = STATUS_DND ;break; - case ID_STATUS_FREECHAT: statMask = STATUS_FREECHAT ;break; case ID_STATUS_INVISIBLE:statMask = STATUS_INVISIBLE;break; default: return 0; } diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp index 7e4d1eceef..3f0f2639d2 100644 --- a/plugins/YARelay/src/options.cpp +++ b/plugins/YARelay/src/options.cpp @@ -95,8 +95,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (iForwardOnStatus & STATUS_NA ) CheckDlgButton(hwndDlg, IDC_CHECK4, BST_CHECKED); if (iForwardOnStatus & STATUS_OCCUPIED ) CheckDlgButton(hwndDlg, IDC_CHECK5, BST_CHECKED); if (iForwardOnStatus & STATUS_DND ) CheckDlgButton(hwndDlg, IDC_CHECK6, BST_CHECKED); - if (iForwardOnStatus & STATUS_FREECHAT ) CheckDlgButton(hwndDlg, IDC_CHECK7, BST_CHECKED); - if (iForwardOnStatus & STATUS_INVISIBLE) CheckDlgButton(hwndDlg, IDC_CHECK8, BST_CHECKED); + if (iForwardOnStatus & STATUS_INVISIBLE) CheckDlgButton(hwndDlg, IDC_CHECK7, BST_CHECKED); // template SetDlgItemText(hwndDlg, IDC_EDIT_TEMPLATE, tszForwardTemplate); @@ -156,8 +155,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (IsDlgButtonChecked(hwndDlg, IDC_CHECK4) == BST_CHECKED) iForwardOnStatus |= STATUS_NA; if (IsDlgButtonChecked(hwndDlg, IDC_CHECK5) == BST_CHECKED) iForwardOnStatus |= STATUS_OCCUPIED; if (IsDlgButtonChecked(hwndDlg, IDC_CHECK6) == BST_CHECKED) iForwardOnStatus |= STATUS_DND; - if (IsDlgButtonChecked(hwndDlg, IDC_CHECK7) == BST_CHECKED) iForwardOnStatus |= STATUS_FREECHAT; - if (IsDlgButtonChecked(hwndDlg, IDC_CHECK8) == BST_CHECKED) iForwardOnStatus |= STATUS_INVISIBLE; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK7) == BST_CHECKED) iForwardOnStatus |= STATUS_INVISIBLE; GetDlgItemText(hwndDlg, IDC_EDIT_TEMPLATE, tszForwardTemplate, _countof(tszForwardTemplate)); if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_SPLIT) == BST_CHECKED) iSplit = 1; else iSplit = 0; iSplitMaxSize = GetDlgItemInt(hwndDlg, IDC_EDIT_MAXSIZE, nullptr, FALSE); diff --git a/plugins/YARelay/src/resource.h b/plugins/YARelay/src/resource.h index b9104ff1a1..b894e2d895 100644 --- a/plugins/YARelay/src/resource.h +++ b/plugins/YARelay/src/resource.h @@ -16,7 +16,6 @@ #define IDC_CHECK5 1008 #define IDC_CHECK6 1009 #define IDC_CHECK7 1010 -#define IDC_CHECK8 1011 #define IDC_EDIT_TEMPLATE 1012 #define IDC_CHECK_SPLIT 1013 #define IDC_EDIT_MAXSIZE 1014 diff --git a/plugins/YARelay/src/stdafx.h b/plugins/YARelay/src/stdafx.h index 85acbb020a..11a4d8fe31 100644 --- a/plugins/YARelay/src/stdafx.h +++ b/plugins/YARelay/src/stdafx.h @@ -41,8 +41,7 @@ Features: #define STATUS_NA 0x8 #define STATUS_OCCUPIED 0x10 #define STATUS_DND 0x20 -#define STATUS_FREECHAT 0x40 -#define STATUS_INVISIBLE 0x80 +#define STATUS_INVISIBLE 0x40 #define MAXTEMPLATESIZE 1024 diff --git a/plugins/ZeroNotification/src/options.cpp b/plugins/ZeroNotification/src/options.cpp index e96ff53441..4a3d1df6bf 100644 --- a/plugins/ZeroNotification/src/options.cpp +++ b/plugins/ZeroNotification/src/options.cpp @@ -29,10 +29,7 @@ static const statusValues[] = { PF2_LONGAWAY, TEXT("Not available") }, { PF2_LIGHTDND, TEXT("Occupied") }, { PF2_HEAVYDND, TEXT("Do not disturb") }, - { PF2_FREECHAT, TEXT("Free for chat") }, { PF2_INVISIBLE, TEXT("Invisible") }, - { PF2_OUTTOLUNCH, TEXT("Out to lunch") }, - { PF2_ONTHEPHONE, TEXT("On the phone") } }; static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *values, int nValues, DWORD style) diff --git a/plugins/wbOSD/src/options.cpp b/plugins/wbOSD/src/options.cpp index 9136649854..3b2e777958 100644 --- a/plugins/wbOSD/src/options.cpp +++ b/plugins/wbOSD/src/options.cpp @@ -21,7 +21,7 @@ void FillCheckBoxTree(HWND hwndTree, DWORD style) tvis.hParent = nullptr; tvis.hInsertAfter = TVI_LAST; tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE; - for (WORD status = ID_STATUS_OFFLINE; status <= ID_STATUS_OUTTOLUNCH; status++) { + for (WORD status = ID_STATUS_OFFLINE; status <= ID_STATUS_MAX; status++) { tvis.item.lParam = status - ID_STATUS_OFFLINE; tvis.item.pszText = Clist_GetStatusModeDescription(status, 0); tvis.item.stateMask = TVIS_STATEIMAGEMASK; diff --git a/plugins/wbOSD/src/stdafx.h b/plugins/wbOSD/src/stdafx.h index 2d903930f9..0f029ab5f0 100644 --- a/plugins/wbOSD/src/stdafx.h +++ b/plugins/wbOSD/src/stdafx.h @@ -85,9 +85,6 @@ int HookedNewEvent(WPARAM wParam, LPARAM lParam); // Announcing messages from outside INT_PTR OSDAnnounce(WPARAM wParam, LPARAM lParam); -#define ID_STATUS_MIN ID_STATUS_OFFLINE -#define ID_STATUS_MAX ID_STATUS_OUTTOLUNCH - typedef struct _plgsettings { int align, salign, altShadow, showShadow, a_user, distance, onlyfromlist, showmystatus; int showMsgWindow; -- cgit v1.2.3