diff options
author | George Hazan <ghazan@miranda.im> | 2019-05-27 18:45:43 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-05-27 18:45:43 +0300 |
commit | ef1a349d88912a89a8dd20ca1dcb342b6dc9c2ff (patch) | |
tree | 78e6344d923966b7a8f1866763d6bacaf054a9e2 /plugins/Clist_modern | |
parent | 189f6be24f11066a3c711b783cf98f79f703e3a5 (diff) |
fixes #1963 (Remove Free for Chat, On the Phone and Out to Lunch statuses completely)
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/modern_clcopts.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcpaint.cpp | 12 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clisttray.cpp | 3 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 10 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_commonprototypes.h | 4 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_contact.cpp | 3 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_viewmodebar.cpp | 20 | ||||
-rw-r--r-- | plugins/Clist_modern/src/resource.h | 6 |
8 files changed, 18 insertions, 46 deletions
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
|