diff options
author | dartraiden <wowemuh@gmail.com> | 2019-07-21 19:59:18 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2019-07-21 19:59:18 +0300 |
commit | b078dfb78c89aea87cd422eae52694738e473cf3 (patch) | |
tree | ca896e82a8a5ce81f80d041f4aee7fdeeb007162 /plugins/Popup/src | |
parent | ee7e29d02e94e969c1154515cd0c408c591a2414 (diff) |
Restore "Free for chat" status support (fixes #1963)
Diffstat (limited to 'plugins/Popup/src')
-rw-r--r-- | plugins/Popup/src/opt_class.cpp | 14 | ||||
-rw-r--r-- | plugins/Popup/src/opt_gen.cpp | 3 | ||||
-rw-r--r-- | plugins/Popup/src/resource.h | 2 |
3 files changed, 14 insertions, 5 deletions
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index 3bcb6c722e..5297481083 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -71,6 +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_TXT_TITLE4, 0, 0, 0 },
@@ -80,6 +81,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_ICO_INFO, 0, 1, 1 },
@@ -108,16 +110,16 @@ static UINT ctrlsEnable[] = { IDC_ICO_INFO, IDC_TXT_COLORS, IDC_MORE,
IDC_SOFFLINE, IDC_SONLINE, IDC_SAWAY, IDC_SNA,
- IDC_SOCCUPIED, IDC_SDND, IDC_SINVISIBLE,
+ IDC_SOCCUPIED, IDC_SDND, IDC_SFREE4CHAT, IDC_SINVISIBLE,
IDC_SOFFLINE2, IDC_SONLINE2, IDC_SAWAY2, IDC_SNA2,
- IDC_SOCCUPIED2, IDC_SDND2, IDC_SINVISIBLE2,
+ IDC_SOCCUPIED2, IDC_SDND2, IDC_SFREE4CHAT2, IDC_SINVISIBLE2,
};
static UINT ctrlsContact[] = {
IDC_TXT_TITLE4,
IDC_SOFFLINE2, IDC_SONLINE2, IDC_SAWAY2, IDC_SNA2,
- IDC_SOCCUPIED2, IDC_SDND2, IDC_SINVISIBLE2,
+ IDC_SOCCUPIED2, IDC_SDND2, IDC_SFREE4CHAT2, IDC_SINVISIBLE2,
};
static int titleIds[] = {
@@ -140,6 +142,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_SOFFLINE2, SKINICON_STATUS_OFFLINE, "Offline", PF2_IDLE, PF2_IDLE << 16 },
@@ -148,6 +151,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 },
};
@@ -357,9 +361,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_SINVISIBLE:
+ case IDC_SDND: case IDC_SFREE4CHAT: case IDC_SINVISIBLE:
case IDC_SOFFLINE2: case IDC_SONLINE2: case IDC_SAWAY2: case IDC_SNA2: case IDC_SOCCUPIED2:
- case IDC_SDND2: case IDC_SINVISIBLE2:
+ case IDC_SDND2: case IDC_SFREE4CHAT2: 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 1938b05e6e..c5e3a31340 100644 --- a/plugins/Popup/src/opt_gen.cpp +++ b/plugins/Popup/src/opt_gen.cpp @@ -35,6 +35,7 @@ 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 (res) ++res; // Offline
return res;
}
@@ -59,6 +60,7 @@ 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;
}
return pos + 1;
}
@@ -72,6 +74,7 @@ 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);
return pos;
}
diff --git a/plugins/Popup/src/resource.h b/plugins/Popup/src/resource.h index 8146f57751..58014debaa 100644 --- a/plugins/Popup/src/resource.h +++ b/plugins/Popup/src/resource.h @@ -76,6 +76,7 @@ #define IDC_SNA 1102
#define IDC_SOCCUPIED 1103
#define IDC_SDND 1104
+#define IDC_SFREE4CHAT 1105
#define IDC_SINVISIBLE 1106
#define IDC_TIMEOUT 1110
#define IDC_SOFFLINE2 1111
@@ -90,6 +91,7 @@ #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
|