diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-29 17:03:21 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-29 17:03:21 +0300 |
commit | 9536e0bb47b12ea2ae01ab070dd9f6aa5bb360c2 (patch) | |
tree | a6663fa7d5aa9afcb51fe1b914e457acdcf5fa8f /plugins | |
parent | 28535b12d00c1ccfa98250dd2c7e87402545adba (diff) |
fixes #4085 (Удалить настройки невидимости)
Diffstat (limited to 'plugins')
30 files changed, 13 insertions, 216 deletions
diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp index 80b1e46ae3..010235afa2 100644 --- a/plugins/AVS/src/poll.cpp +++ b/plugins/AVS/src/poll.cpp @@ -93,8 +93,7 @@ static BOOL PollCheckProtocol(const char *szProto) static BOOL PollContactCanHaveAvatar(MCONTACT hContact, const char *szProto)
{
int status = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
- return (Proto_IsFetchingWhenContactOfflineAllowed(szProto) || status != ID_STATUS_OFFLINE)
- && Contact::OnList(hContact) && db_get_b(hContact, "CList", "ApparentMode", 0) != ID_STATUS_OFFLINE;
+ return (Proto_IsFetchingWhenContactOfflineAllowed(szProto) || status != ID_STATUS_OFFLINE) && Contact::OnList(hContact);
}
// Return true if this contact has to be checked
diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp index cf8897d329..caada9b0dc 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.cpp +++ b/plugins/Clist_modern/src/modern_awaymsg.cpp @@ -90,9 +90,7 @@ static void amThreadProc(void *) ClcCacheEntry *pdnce = Clist_GetCacheEntry(hContact);
- HANDLE ACK = nullptr;
- if (pdnce->ApparentMode != ID_STATUS_OFFLINE) //don't ask if contact is always invisible (should be done with protocol)
- ACK = (HANDLE)ProtoChainSend(hContact, PSS_GETAWAYMSG, 0, 0);
+ HANDLE ACK = (HANDLE)ProtoChainSend(hContact, PSS_GETAWAYMSG, 0, 0);
if (!ACK) {
ACKDATA ack;
ack.hContact = hContact;
diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h index 4d06174025..9245fae6aa 100644 --- a/plugins/Clist_modern/src/modern_clc.h +++ b/plugins/Clist_modern/src/modern_clc.h @@ -94,8 +94,6 @@ void clcSetDelayTimer(UINT_PTR uIDEvent, HWND hwnd, int nDelay = -1); #define DROPTARGET_ONSUBCONTACT 7
#define CONTACTF_ONLINE 1
-#define CONTACTF_INVISTO 2
-#define CONTACTF_VISTO 4
#define CONTACTF_NOTONLIST 8
#define CONTACTF_CHECKED 16
#define CONTACTF_IDLE 32
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index 8ee400d56b..cb958b7857 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -75,10 +75,6 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) char *szProto = pdnce->szProto;
if (szProto != nullptr && !Clist_IsHiddenMode(dat, wStatus))
p.flags |= CONTACTF_ONLINE;
- int apparentMode = szProto != nullptr ? pdnce->ApparentMode : 0;
- if (apparentMode == ID_STATUS_OFFLINE) p.flags |= CONTACTF_INVISTO;
- else if (apparentMode == ID_STATUS_ONLINE) p.flags |= CONTACTF_VISTO;
- else if (apparentMode) p.flags |= CONTACTF_VISTO | CONTACTF_INVISTO;
if (pdnce->NotOnList) p.flags |= CONTACTF_NOTONLIST;
int idleMode = szProto != nullptr ? pdnce->IdleTS : 0;
if (idleMode) p.flags |= CONTACTF_IDLE;
@@ -132,19 +128,6 @@ static void _LoadDataToContact(ClcContact *cont, ClcCacheEntry *pdnce, ClcGroup if (szProto != nullptr && !Clist_IsHiddenMode(dat, pdnce->m_iStatus))
cont->flags |= CONTACTF_ONLINE;
- uint16_t apparentMode = szProto != nullptr ? pdnce->ApparentMode : 0;
- if (apparentMode)
- switch (apparentMode) {
- case ID_STATUS_OFFLINE:
- cont->flags |= CONTACTF_INVISTO;
- break;
- case ID_STATUS_ONLINE:
- cont->flags |= CONTACTF_VISTO;
- break;
- default:
- cont->flags |= CONTACTF_VISTO | CONTACTF_INVISTO;
- }
-
if (pdnce->NotOnList)
cont->flags |= CONTACTF_NOTONLIST;
@@ -331,7 +314,6 @@ ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact) pdnce->m_bIsSub = db_mc_isSub(hContact) != 0;
pdnce->m_bNoHiddenOffline = g_plugin.getByte(hContact, "noOffline");
pdnce->IdleTS = db_get_dw(hContact, pdnce->szProto, "IdleTS", 0);
- pdnce->ApparentMode = db_get_w(hContact, pdnce->szProto, "ApparentMode", 0);
pdnce->NotOnList = !Contact::OnList(hContact);
pdnce->IsExpanded = g_plugin.getByte(hContact, "Expanded");
pdnce->dwLastOnlineTime = db_get_dw(hContact, pdnce->szProto, "LastSeen", 0);
diff --git a/plugins/Clist_modern/src/modern_clist.h b/plugins/Clist_modern/src/modern_clist.h index c04ab2562b..e794394c05 100644 --- a/plugins/Clist_modern/src/modern_clist.h +++ b/plugins/Clist_modern/src/modern_clist.h @@ -79,7 +79,6 @@ struct ClcCacheEntry : public ClcCacheEntryBase bool m_bIsSub;
bool m_bIsUnknown;
- int ApparentMode;
int NotOnList;
int IdleTS;
void* ClcContact;
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index 0f5ea19bb5..24bea1d207 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -147,8 +147,6 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) if ((g_plugin.secondLine.getType() == TEXT_STATUS_MESSAGE || g_plugin.thirdLine.getType() == TEXT_STATUS_MESSAGE) && pdnce->hContact && pdnce->szProto)
amRequestAwayMsg(hContact);
}
- else if (!strcmp(cws->szSetting, "ApparentMode"))
- pdnce->ApparentMode = cws->value.wVal;
else if (!strcmp(cws->szSetting, "IdleTS"))
pdnce->IdleTS = cws->value.dVal;
else if (!strcmp(cws->szSetting, "IsSubcontact")) {
diff --git a/plugins/Clist_modern/src/resource.h b/plugins/Clist_modern/src/resource.h index 4d98b08646..8e46e99484 100644 --- a/plugins/Clist_modern/src/resource.h +++ b/plugins/Clist_modern/src/resource.h @@ -32,7 +32,6 @@ #define IDI_FILLEDBLOB 212
#define IDI_EMPTYBLOB 213
#define IDD_OPT_IGNORE 214
-#define IDD_OPT_VISIBILITY 215
#define IDC_DROPUSER 215
#define IDI_DETAILSLOGO 216
#define IDI_HIDE_AVATAR 217
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index a1265dba97..21ae19ad5f 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -228,8 +228,6 @@ static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) // Only on these 2 events we need to refresh
if (0 == strcmp(pdbcws->szSetting, "Status"))
idStatus = pdbcws->value.wVal;
- else if (0 == strcmp(pdbcws->szSetting, "ApparentMode"))
- idStatus = GetContactStatus(hContact);
else if (0 == strcmp(pdbcws->szSetting, "Nick"))
idStatus = GetContactStatus(hContact);
else if (0 == strcmp(pdbcws->szSetting, "MyHandle"))
diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp index 51e7e5d3cd..39da92f65f 100644 --- a/plugins/FloatingContacts/src/thumbs.cpp +++ b/plugins/FloatingContacts/src/thumbs.cpp @@ -247,18 +247,8 @@ void ThumbInfo::ResizeThumb() if (Contact::OnList(hContact)) {
char *szProto = Proto_GetBaseAccountName(hContact);
if (nullptr != szProto) {
- int nStatus = Proto_GetStatus(szProto);
int nContactStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
- int nApparentMode = db_get_w(hContact, szProto, "ApparentMode", 0);
-
- if ((nStatus == ID_STATUS_INVISIBLE && nApparentMode == ID_STATUS_ONLINE) ||
- (nStatus != ID_STATUS_INVISIBLE && nApparentMode == ID_STATUS_OFFLINE)) {
- if (ID_STATUS_OFFLINE == nContactStatus)
- index = FLT_FONTID_OFFINVIS;
- else
- index = FLT_FONTID_INVIS;
- }
- else if (ID_STATUS_OFFLINE == nContactStatus)
+ if (ID_STATUS_OFFLINE == nContactStatus)
index = FLT_FONTID_OFFLINE;
else
index = FLT_FONTID_CONTACTS;
@@ -575,23 +565,9 @@ void ThumbInfo::UpdateContent() if (Contact::OnList(hContact)) {
char *szProto = Proto_GetBaseAccountName(hContact);
if (nullptr != szProto) {
- int nStatus = Proto_GetStatus(szProto);
int nContactStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
- int nApparentMode = db_get_w(hContact, szProto, "ApparentMode", 0);
-
- if ((nStatus == ID_STATUS_INVISIBLE && nApparentMode == ID_STATUS_ONLINE) ||
- (nStatus != ID_STATUS_INVISIBLE && nApparentMode == ID_STATUS_OFFLINE)) {
- if (ID_STATUS_OFFLINE == nContactStatus)
- index = FLT_FONTID_OFFINVIS;
- else {
- index = FLT_FONTID_INVIS;
- if (fcOpt.bShowIdle && db_get_dw(hContact, szProto, "IdleTS", 0))
- fStyle |= ILD_BLEND50;
- }
- }
- else if (ID_STATUS_OFFLINE == nContactStatus) {
+ if (ID_STATUS_OFFLINE == nContactStatus)
index = FLT_FONTID_OFFLINE;
- }
else {
index = FLT_FONTID_CONTACTS;
if (fcOpt.bShowIdle && db_get_dw(hContact, szProto, "IdleTS", 0))
diff --git a/plugins/MenuItemEx/res/resource.rc b/plugins/MenuItemEx/res/resource.rc index a21a9df1ba..4c0eb66367 100644 --- a/plugins/MenuItemEx/res/resource.rc +++ b/plugins/MenuItemEx/res/resource.rc @@ -62,7 +62,6 @@ EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
GROUPBOX "Shown menu items",IDC_STATIC,7,3,266,151
- CONTROL "Visibility",IDC_VIS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,18,131,10
CONTROL "Show alpha icons",IDC_SHOWALPHAICONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,151,18,116,10
CONTROL "Hide from list",IDC_HIDE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,30,251,10
CONTROL "Ignore",IDC_IGNORE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,42,253,10
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index fdca3118e8..4cbf357fbd 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -1,7 +1,5 @@ #include "stdafx.h"
-#define MS_SETINVIS "MenuEx/SetInvis"
-#define MS_SETVIS "MenuEx/SetVis"
#define MS_HIDE "MenuEx/Hide"
#define MS_IGNORE "MenuEx/Ignore"
#define MS_PROTO "MenuEx/ChangeProto"
@@ -12,9 +10,9 @@ #define MS_COPYMIRVER "MenuEx/CopyMirVer"
#define MS_OPENIGNORE "MenuEx/OpenIgnoreOptions"
-const int vf_default = VF_VS | VF_HFL | VF_IGN | VF_CID | VF_SHOWID | VF_RECV | VF_STAT | VF_SMNAME | VF_CIDN | VF_CIP;
+const int vf_default = VF_HFL | VF_IGN | VF_CID | VF_SHOWID | VF_RECV | VF_STAT | VF_SMNAME | VF_CIDN | VF_CIP;
-HGENMENU hmenuVis, hmenuOff, hmenuHide, hmenuIgnore, hmenuProto;
+HGENMENU hmenuOff, hmenuHide, hmenuIgnore, hmenuProto;
HGENMENU hmenuCopyID, hmenuRecvFiles, hmenuStatusMsg, hmenuCopyIP, hmenuCopyMirVer;
static HGENMENU hIgnoreItem[9], hProtoItem[MAX_PROTOS];
HICON hIcons[5];
@@ -305,22 +303,6 @@ static BOOL isProtoOnline(char *szProto) return (protoStatus > ID_STATUS_OFFLINE && protoStatus < ID_STATUS_IDLE);
}
-// set the invisible-flag in db
-static INT_PTR onSetInvis(WPARAM wparam, LPARAM)
-{
- MCONTACT hContact = (MCONTACT)wparam;
- ProtoChainSend(hContact, PSS_SETAPPARENTMODE, (db_get_w(hContact, Proto_GetBaseAccountName(hContact), "ApparentMode", 0) == ID_STATUS_OFFLINE) ? 0 : ID_STATUS_OFFLINE, 0);
- return 0;
-}
-
-// set visible-flag in db
-static INT_PTR onSetVis(WPARAM wparam, LPARAM)
-{
- MCONTACT hContact = (MCONTACT)wparam;
- ProtoChainSend(hContact, PSS_SETAPPARENTMODE, (db_get_w(hContact, Proto_GetBaseAccountName(hContact), "ApparentMode", 0) == ID_STATUS_ONLINE) ? 0 : ID_STATUS_ONLINE, 0);
- return 0;
-}
-
static INT_PTR onHide(WPARAM wparam, LPARAM)
{
MCONTACT hContact = (MCONTACT)wparam;
@@ -328,17 +310,6 @@ static INT_PTR onHide(WPARAM wparam, LPARAM) return 0;
}
-// following 4 functions should be self-explanatory
-static void ModifyVisibleSet(int mode, BOOL alpha)
-{
- Menu_ModifyItem(hmenuVis, nullptr, (mode) ? hIcons[1] : (alpha ? hIcons[3] : Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT)));
-}
-
-static void ModifyInvisSet(int mode, BOOL alpha)
-{
- Menu_ModifyItem(hmenuOff, nullptr, (mode) ? hIcons[2] : (alpha ? hIcons[4] : Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT)));
-}
-
static void ModifyCopyID(MCONTACT hContact, BOOL bShowID, BOOL bTrimID)
{
if (isMetaContact(hContact)) {
@@ -636,11 +607,9 @@ static int BuildMenu(WPARAM wparam, LPARAM) bIsOnline = isProtoOnline(pszProto);
- bool bEnabled = bShowAll || (flags & VF_VS);
- Menu_ShowItem(hmenuVis, bEnabled);
- Menu_ShowItem(hmenuOff, bEnabled);
+ Menu_ShowItem(hmenuOff, bShowAll);
- bEnabled = bShowAll || (flags & VF_HFL);
+ bool bEnabled = bShowAll || (flags & VF_HFL);
Menu_ShowItem(hmenuHide, bEnabled);
if (bEnabled) {
if (Contact::IsHidden(hContact))
@@ -704,19 +673,6 @@ static int BuildMenu(WPARAM wparam, LPARAM) Menu_ShowItem(hmenuCopyMirVer, bEnabled);
if (bEnabled)
ModifyCopyMirVer(hContact);
-
- if ((bShowAll || (flags & VF_VS)) && pszProto) {
- INT_PTR caps = CallProtoService(pszProto, PS_GETCAPS, PFLAGNUM_1, 0);
- int apparent = db_get_w(hContact, Proto_GetBaseAccountName(hContact), "ApparentMode", 0);
-
- Menu_ShowItem(hmenuVis, (caps & PF1_VISLIST) != 0);
- if (caps & PF1_VISLIST)
- ModifyVisibleSet(apparent == ID_STATUS_ONLINE, flags & VF_SAI);
-
- Menu_ShowItem(hmenuOff, (caps & PF1_INVISLIST) != 0);
- if (caps & PF1_INVISLIST)
- ModifyInvisSet(apparent == ID_STATUS_OFFLINE, flags & VF_SAI);
- }
return 0;
}
@@ -794,18 +750,6 @@ static int PluginInit(WPARAM, LPARAM) CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE;
- SET_UID(mi, 0x2616aa3f, 0x535a, 0x464c, 0xbd, 0x26, 0x1b, 0x15, 0xbe, 0xfa, 0x1f, 0xf);
- mi.position = 120000;
- mi.name.w = LPGENW("Always visible");
- mi.pszService = MS_SETVIS;
- hmenuVis = Menu_AddContactMenuItem(&mi);
-
- SET_UID(mi, 0x7d93de78, 0xb1c, 0x4c51, 0x8c, 0x88, 0x33, 0x72, 0x12, 0xb5, 0xb8, 0xe7);
- mi.position++;
- mi.name.w = LPGENW("Never visible");
- mi.pszService = MS_SETINVIS;
- hmenuOff = Menu_AddContactMenuItem(&mi);
-
SET_UID(mi, 0x724f6ac0, 0x7f69, 0x407d, 0x85, 0x98, 0x9c, 0x80, 0x32, 0xdb, 0x66, 0x2d);
mi.position++;
mi.name.w = LPGENW("Hide from list");
@@ -889,8 +833,6 @@ int CMPlugin::Load() {
g_plugin.registerIcon(LPGEN("MenuItemEx"), iconList, "miex");
- CreateServiceFunction(MS_SETINVIS, onSetInvis);
- CreateServiceFunction(MS_SETVIS, onSetVis);
CreateServiceFunction(MS_HIDE, onHide);
CreateServiceFunction(MS_IGNORE, onIgnore);
CreateServiceFunction(MS_PROTO, onChangeProto);
diff --git a/plugins/MenuItemEx/src/options.cpp b/plugins/MenuItemEx/src/options.cpp index cf84d6daa6..b17894b790 100644 --- a/plugins/MenuItemEx/src/options.cpp +++ b/plugins/MenuItemEx/src/options.cpp @@ -10,7 +10,6 @@ static const checkboxes[] = { { IDC_STATUSMSG, VF_STAT },
{ IDC_COPYIP, VF_CIP },
{ IDC_COPYMIRVER, VF_CMV },
- { IDC_VIS, VF_VS },
{ IDC_SHOWALPHAICONS, VF_SAI },
{ IDC_HIDE, VF_HFL },
{ IDC_IGNORE, VF_IGN },
@@ -27,14 +26,13 @@ class COptDialog : public CDlgBase {
uint32_t m_flags;
- CCtrlCheck m_chkVis, m_chkAlpha, m_chkHide, m_chkIgnore, m_chkProtos, m_chkRecvFiles, m_chkCopyIP, m_chkCopyMirver, m_chkStatusMsg,
+ CCtrlCheck m_chkAlpha, m_chkHide, m_chkIgnore, m_chkProtos, m_chkRecvFiles, m_chkCopyIP, m_chkCopyMirver, m_chkStatusMsg,
m_chkSMName, m_chkCopyID, m_chkCopyIDName, m_chkShowID, m_chkTrimID, m_chkIgnoreHide;
CCtrlLabel m_lblHint;
public:
COptDialog() :
CDlgBase(g_plugin, IDD_OPTIONS),
- m_chkVis(this, IDC_VIS),
m_chkAlpha(this, IDC_SHOWALPHAICONS),
m_chkHide(this, IDC_HIDE),
m_chkIgnore(this, IDC_IGNORE),
@@ -53,7 +51,6 @@ public: {
m_flags = g_plugin.getDword("flags", vf_default);
- m_chkVis.OnChange = Callback(this, &COptDialog::onChange_Vis);
m_chkIgnore.OnChange = Callback(this, &COptDialog::onChange_Ignore);
m_chkStatusMsg.OnChange = Callback(this, &COptDialog::onChange_StatusMsg);
m_chkCopyID.OnChange = m_chkShowID.OnChange = Callback(this, &COptDialog::onChange_CopyID);
@@ -88,11 +85,6 @@ public: return true;
}
- void onChange_Vis(CCtrlBase *)
- {
- m_chkAlpha.Enable(m_chkVis.GetState());
- }
-
void onChange_Ignore(CCtrlBase *)
{
m_chkIgnoreHide.Enable(m_chkIgnore.GetState());
diff --git a/plugins/MenuItemEx/src/resource.h b/plugins/MenuItemEx/src/resource.h index c8c493cfaf..a97b5fa080 100644 --- a/plugins/MenuItemEx/src/resource.h +++ b/plugins/MenuItemEx/src/resource.h @@ -16,7 +16,6 @@ #define IDI_COPYIP 121
#define IDI_BROWSE 122
#define IDI_MIRVER 123
-#define IDC_VIS 1000
#define IDC_REASON 1001
#define IDC_HIDE 1002
#define IDC_IGNORE 1003
diff --git a/plugins/MenuItemEx/src/stdafx.h b/plugins/MenuItemEx/src/stdafx.h index 94bf0ea81b..1ff9aa7ce5 100644 --- a/plugins/MenuItemEx/src/stdafx.h +++ b/plugins/MenuItemEx/src/stdafx.h @@ -47,7 +47,6 @@ int OptionsInit(WPARAM, LPARAM); #define MAX_GROUPS 32
#define MAX_IDLEN 16
-#define VF_VS 0x00000001
#define VF_SMNAME 0x00000002
#define VF_HFL 0x00000004
#define VF_IGN 0x00000008
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index a4fcb5df39..3ef8bca1c4 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -714,11 +714,6 @@ void CAppletManager::SendTypingNotification(MCONTACT hContact, bool bEnable) if (protoStatus < ID_STATUS_ONLINE) return; - uint32_t protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0); - if (protoCaps & PF1_VISLIST && db_get_w(hContact, szProto, "ApparentMode", 0) == ID_STATUS_OFFLINE) - return; - if (protoCaps & PF1_INVISLIST && protoStatus == ID_STATUS_INVISIBLE && db_get_w(hContact, szProto, "ApparentMode", 0) != ID_STATUS_ONLINE) - return; if (!Contact::OnList(hContact) && !db_get_b(0, "SRMsg", "UnknownTyping", 1)) return; // End user check diff --git a/plugins/NewAwaySysMod/res/NewAwaySys.rc b/plugins/NewAwaySysMod/res/NewAwaySys.rc index 797364bea4..1623cb3944 100644 --- a/plugins/NewAwaySysMod/res/NewAwaySys.rc +++ b/plugins/NewAwaySysMod/res/NewAwaySys.rc @@ -81,8 +81,6 @@ BEGIN CONTROL "",IDC_REPLYDLG_EVENTFILE,"Button",BS_AUTOCHECKBOX | BS_ICON | WS_TABSTOP,145,17,29,12
CONTROL "Don't reply to ICQ contacts",IDC_REPLYDLG_DONTSENDTOICQ,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,119,275,10
- CONTROL "Don't reply when I'm invisible to the contact",IDC_REPLYDLG_DONTREPLYINVISIBLE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,107,275,10
CONTROL "Save autoreply to the history",IDC_REPLYDLG_LOGREPLY,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,34,275,10
CONTROL "Reply only when Idle",IDC_REPLYDLG_ONLYIDLEREPLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,48,275,10
diff --git a/plugins/NewAwaySysMod/src/AwayOpt.cpp b/plugins/NewAwaySysMod/src/AwayOpt.cpp index b12c350604..3f1778524a 100644 --- a/plugins/NewAwaySysMod/src/AwayOpt.cpp +++ b/plugins/NewAwaySysMod/src/AwayOpt.cpp @@ -579,7 +579,6 @@ INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l EnableAutoreplyOptDlgControls();
// go through
case IDC_REPLYDLG_DONTSENDTOICQ:
- case IDC_REPLYDLG_DONTREPLYINVISIBLE:
case IDC_REPLYDLG_ONLYCLOSEDDLGREPLY:
case IDC_REPLYDLG_ONLYIDLEREPLY:
case IDC_REPLYDLG_RESETCOUNTERWHENSAMEICON:
@@ -1099,7 +1098,6 @@ void InitOptions() g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_EVENTMSG, "ReplyOnEvent", DBVT_BYTE, AUTOREPLY_DEF_REPLYONEVENT, EF_MSG, IDC_REPLYDLG_ENABLEREPLY));
g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_EVENTFILE, "ReplyOnEvent", DBVT_BYTE, AUTOREPLY_DEF_REPLYONEVENT, EF_FILE, IDC_REPLYDLG_ENABLEREPLY));
g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_DONTSENDTOICQ, "DontSendToICQ", DBVT_BYTE, 0, 0, IDC_REPLYDLG_ENABLEREPLY));
- g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_DONTREPLYINVISIBLE, "DontReplyInvisible", DBVT_BYTE, 1, 0, IDC_REPLYDLG_ENABLEREPLY));
g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_LOGREPLY, "LogReply", DBVT_BYTE, 1, 0, IDC_REPLYDLG_ENABLEREPLY));
g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_ONLYIDLEREPLY, "OnlyIdleReply", DBVT_BYTE, 0, 0, IDC_REPLYDLG_ENABLEREPLY));
g_AutoreplyOptPage.Items.AddElem(new COptItem_Checkbox(IDC_REPLYDLG_ONLYCLOSEDDLGREPLY, "OnlyClosedDlgReply", DBVT_BYTE, 1, 0, IDC_REPLYDLG_ENABLEREPLY));
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp index 3fbf7fedaf..8262b848bc 100644 --- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp +++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp @@ -187,11 +187,6 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam) if (!CContactSettings(iMode, hContactForSettings).Autoreply.IncludingParents(szProto) || CContactSettings(iMode, hContactForSettings).Ignore)
return 0;
- if (AutoreplyOptData.GetValue(IDC_REPLYDLG_DONTREPLYINVISIBLE)) {
- uint16_t ApparentMode = db_get_w(hContact, szProto, "ApparentMode", 0);
- if ((iMode == ID_STATUS_INVISIBLE && (!(Flags1 & PF1_INVISLIST) || ApparentMode != ID_STATUS_ONLINE)) || (Flags1 & PF1_VISLIST && ApparentMode == ID_STATUS_OFFLINE))
- return 0;
- }
if (AutoreplyOptData.GetValue(IDC_REPLYDLG_ONLYCLOSEDDLGREPLY)) {
if (bMsgWindowIsOpen && bMsgWindowIsOpen != MSGWNDOPEN_UNDEFINED)
return 0;
diff --git a/plugins/NewAwaySysMod/src/resource.h b/plugins/NewAwaySysMod/src/resource.h index 7e590aab28..eab7730797 100644 --- a/plugins/NewAwaySysMod/src/resource.h +++ b/plugins/NewAwaySysMod/src/resource.h @@ -186,7 +186,6 @@ #define IDC_REPLYDLG_VARS 1165
#define IDC_MOREOPTDLG_UPDATEMSGS 1166
#define IDC_CONTACTSDLG_LIST 1168
-#define IDC_REPLYDLG_DONTREPLYINVISIBLE 1169
#define IDC_REPLYDLG_ONLYIDLEREPLY_COMBO 1170
#define IDC_REPLYDLG_ONLYCLOSEDDLGREPLY 1171
#define IDC_REPLYDLG_RESETCOUNTERWHENSAMEICON 1172
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp index 62429f8c9c..2132d124f4 100644 --- a/plugins/Scriver/src/msgutils.cpp +++ b/plugins/Scriver/src/msgutils.cpp @@ -241,13 +241,6 @@ bool CMsgDialog::IsTypingNotificationEnabled() if (protoStatus < ID_STATUS_ONLINE) return FALSE; - uint32_t protoCaps = CallProtoService(m_szProto, PS_GETCAPS, PFLAGNUM_1, 0); - if (protoCaps & PF1_VISLIST && db_get_w(m_hContact, m_szProto, "ApparentMode", 0) == ID_STATUS_OFFLINE) - return FALSE; - - if (protoCaps & PF1_INVISLIST && protoStatus == ID_STATUS_INVISIBLE && db_get_w(m_hContact, m_szProto, "ApparentMode", 0) != ID_STATUS_ONLINE) - return FALSE; - if (!Contact::OnList(m_hContact) && !g_plugin.bTypingUnknown) return FALSE; return TRUE; diff --git a/plugins/SecureIM/src/crypt_check.cpp b/plugins/SecureIM/src/crypt_check.cpp index 7990de8f99..abe32b29a1 100644 --- a/plugins/SecureIM/src/crypt_check.cpp +++ b/plugins/SecureIM/src/crypt_check.cpp @@ -99,18 +99,6 @@ bool isContactInvisible(MCONTACT hContact) if (!db_mc_isSub(hContact) && Contact::IsHidden(hContact))
return true;
- pUinKey p = findUinKey(hContact);
- if (!p || p->waitForExchange || !p->proto || !p->proto->inspecting)
- return false;
-
- switch (db_get_w(hContact, p->proto->name, "ApparentMode", 0)) {
- case 0:
- return Proto_GetStatus(p->proto->name) == ID_STATUS_INVISIBLE;
- case ID_STATUS_ONLINE:
- return false;
- case ID_STATUS_OFFLINE:
- return true;
- }
return false;
}
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp index ee707d0da8..c27ff9cfdb 100644 --- a/plugins/ShellExt/src/shlcom.cpp +++ b/plugins/ShellExt/src/shlcom.cpp @@ -276,10 +276,6 @@ bool ipcGetSortedContacts(THeaderIPC * ipch, int* pSlot, bool bGroupMode) if (Contact::IsHidden(hContact) || !Contact::OnList(hContact) || Ignore_IsIgnored(hContact, IGNOREEVENT_MESSAGE | IGNOREEVENT_FILE) != 0)
continue;
}
- // is HIT2 off?
- if (BST_UNCHECKED == g_plugin.getByte(SHLExt_UseHIT2Contacts, BST_UNCHECKED))
- if (db_get_w(hContact, szProto, "ApparentMode", 0) == ID_STATUS_OFFLINE)
- continue;
// store
pContacts[i].hContact = hContact;
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp index ec80f97f3b..8ac386e370 100644 --- a/plugins/StopSpamMod/src/stopspam.cpp +++ b/plugins/StopSpamMod/src/stopspam.cpp @@ -45,12 +45,9 @@ int OnDbEventAdded(WPARAM, LPARAM hDbEvent) if (gbIgnoreURL) isMessage = !IsUrlContains(Utf2T(blob.get_reason())); - if (gbInvisDisable) { + if (gbInvisDisable) if (Proto_GetStatus(dbei.szModule) == ID_STATUS_INVISIBLE) isMessage = false; - else if (db_get_w(hContact, dbei.szModule, "ApparentMode", 0) == ID_STATUS_OFFLINE) - isMessage = false; //is it useful ? - } // ...send message if (isMessage) { @@ -119,8 +116,6 @@ int OnDbEventFilterAdd(WPARAM hContact, LPARAM l) if (gbInvisDisable) { if (Proto_GetStatus(dbei->szModule) == ID_STATUS_INVISIBLE) bSendMsg = false; - else if (db_get_w(hContact, dbei->szModule, "ApparentMode", 0) == ID_STATUS_OFFLINE) - bSendMsg = false; //is it useful ? } bool answered = false; if (gbMathExpression) { diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 6a23ee654a..3bbc6bef60 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -800,15 +800,6 @@ void CMsgDialog::DM_NotifyTyping(int mode) if (protoStatus < ID_STATUS_ONLINE)
return;
- // check visibility/invisibility lists to not "accidentially" send MTN to contacts who
- // should not see them (privacy issue)
- uint32_t protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
- if (protoCaps & PF1_VISLIST && db_get_w(hContact, szProto, "ApparentMode", 0) == ID_STATUS_OFFLINE)
- return;
-
- if (protoCaps & PF1_INVISLIST && protoStatus == ID_STATUS_INVISIBLE && db_get_w(hContact, szProto, "ApparentMode", 0) != ID_STATUS_ONLINE)
- return;
-
// don't send to contacts which are not permanently added to the contact list,
// unless the option to ignore added status is set.
if (!Contact::OnList(m_hContact) && !g_plugin.bTypingUnknown)
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index 0aada80e85..c9d095acee 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -1909,13 +1909,7 @@ void CMsgDialog::SendHBitmapAsFile(HBITMAP hbmp) const if ((ID_STATUS_OFFLINE == wMyStatus) || (ID_STATUS_OFFLINE == m_cache->getActiveStatus() && !(typeCaps & PF4_OFFLINEFILES)))
fSend = false;
-
- if (protoCaps & PF1_VISLIST && db_get_w(m_cache->getActiveContact(), szProto, "ApparentMode", 0) == ID_STATUS_OFFLINE)
- fSend = false;
-
- if (protoCaps & PF1_INVISLIST && wMyStatus == ID_STATUS_INVISIBLE && db_get_w(m_cache->getActiveContact(), szProto, "ApparentMode", 0) != ID_STATUS_ONLINE)
- fSend = false;
-
+
if (!fSend) {
CWarning::show(CWarning::WARN_SENDFILE, MB_OK | MB_ICONEXCLAMATION | CWarning::CWF_NOALLOWHIDE);
return;
diff --git a/plugins/TipperYM/res/resource.rc b/plugins/TipperYM/res/resource.rc index 85627b5345..ace600f6e4 100644 --- a/plugins/TipperYM/res/resource.rc +++ b/plugins/TipperYM/res/resource.rc @@ -170,10 +170,8 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,108,273,10
CONTROL "Retrieve new status message",IDC_CHK_GETSTATUSMSG,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,123,273,10
- CONTROL "Disable in invisible status",IDC_CHK_DISABLEINVISIBLE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,27,138,258,10
CONTROL "Retrieve xStatus details if auto-retrieve is disabled",IDC_CHK_RETRIEVEXSTATUS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,153,273,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,138,273,10
GROUPBOX "Status bar and tray tooltip",IDC_STATIC,7,176,284,46
CONTROL "Limit status messages in status bar and tray tooltips to:",IDC_CHK_LIMITMSG,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,189,273,10
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index 2cd292dd53..175e9d1ded 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -619,7 +619,6 @@ void LoadOptions() // extra setting
opt.bWaitForContent = g_plugin.getByte("WaitForContent", 0) ? true : false;
opt.bGetNewStatusMsg = g_plugin.getByte("GetNewStatusMsg", 0) ? true : false;
- opt.bDisableIfInvisible = g_plugin.getByte("DisableInvisible", 1) ? true : false;
opt.bRetrieveXstatus = g_plugin.getByte("RetrieveXStatus", 0) ? true : false;
opt.bOriginalAvatarSize = g_plugin.getByte("OriginalAvSize", 0) ? true : false;
opt.bAvatarBorder = g_plugin.getByte("AvatarBorder", 0) ? true : false;
@@ -1587,15 +1586,12 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM CheckDlgButton(hwndDlg, IDC_CHK_WAITFORCONTENT, opt.bWaitForContent ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHK_GETSTATUSMSG, opt.bGetNewStatusMsg ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CHK_DISABLEINVISIBLE, opt.bDisableIfInvisible ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHK_RETRIEVEXSTATUS, opt.bRetrieveXstatus ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHK_LIMITMSG, opt.bLimitMsg ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHK_ENABLESMILEYS, opt.iSmileyAddFlags & SMILEYADD_ENABLE ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHK_USEPROTOSMILEYS, opt.iSmileyAddFlags & SMILEYADD_USEPROTO ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHK_ONLYISOLATED, opt.iSmileyAddFlags & SMILEYADD_ONLYISOLATED ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHK_RESIZESMILEYS, opt.iSmileyAddFlags & SMILEYADD_RESIZE ? BST_CHECKED : BST_UNCHECKED);
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_DISABLEINVISIBLE), opt.bGetNewStatusMsg);
{
BOOL bEnable = opt.iSmileyAddFlags & SMILEYADD_ENABLE;
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_USEPROTOSMILEYS), bEnable);
@@ -1646,10 +1642,6 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case IDC_CHK_LIMITMSG:
EnableWindow(GetDlgItem(hwndDlg, IDC_ED_CHARCOUNT), IsDlgButtonChecked(hwndDlg, IDC_CHK_LIMITMSG));
break;
-
- case IDC_CHK_GETSTATUSMSG:
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_DISABLEINVISIBLE), IsDlgButtonChecked(hwndDlg, IDC_CHK_GETSTATUSMSG));
- break;
}
if ((HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == EN_CHANGE) && (HWND)lParam == GetFocus())
@@ -1683,7 +1675,6 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM opt.bWaitForContent = IsDlgButtonChecked(hwndDlg, IDC_CHK_WAITFORCONTENT) ? true : false;
opt.bGetNewStatusMsg = IsDlgButtonChecked(hwndDlg, IDC_CHK_GETSTATUSMSG) ? true : false;
- opt.bDisableIfInvisible = IsDlgButtonChecked(hwndDlg, IDC_CHK_DISABLEINVISIBLE) ? true : false;
opt.bRetrieveXstatus = IsDlgButtonChecked(hwndDlg, IDC_CHK_RETRIEVEXSTATUS) ? true : false;
opt.bLimitMsg = IsDlgButtonChecked(hwndDlg, IDC_CHK_LIMITMSG) ? true : false;
opt.iLimitCharCount = GetDlgItemInt(hwndDlg, IDC_ED_CHARCOUNT, nullptr, FALSE);
@@ -1691,7 +1682,6 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM g_plugin.setDword("SmileyAddFlags", opt.iSmileyAddFlags);
g_plugin.setByte("WaitForContent", opt.bWaitForContent ? 1 : 0);
g_plugin.setByte("GetNewStatusMsg", opt.bGetNewStatusMsg ? 1 : 0);
- g_plugin.setByte("DisableInvisible", opt.bDisableIfInvisible ? 1 : 0);
g_plugin.setByte("RetrieveXStatus", opt.bRetrieveXstatus ? 1 : 0);
g_plugin.setByte("LimitMsg", opt.bLimitMsg ? 1 : 0);
g_plugin.setByte("LimitCharCount", opt.iLimitCharCount);
diff --git a/plugins/TipperYM/src/options.h b/plugins/TipperYM/src/options.h index fe3a491f12..cb949ab316 100644 --- a/plugins/TipperYM/src/options.h +++ b/plugins/TipperYM/src/options.h @@ -153,7 +153,6 @@ struct OPTIONS bool bAvatarBorder;
bool bWaitForContent;
bool bGetNewStatusMsg;
- bool bDisableIfInvisible;
bool bRetrieveXstatus;
bool bLimitMsg;
int iLimitCharCount;
diff --git a/plugins/TipperYM/src/resource.h b/plugins/TipperYM/src/resource.h index e3f053db01..3555d9b572 100644 --- a/plugins/TipperYM/src/resource.h +++ b/plugins/TipperYM/src/resource.h @@ -84,7 +84,6 @@ #define IDC_CMB_VV 1054
#define IDC_CMB_LH 1055
#define IDC_CMB_VH 1056
-#define IDC_CHK_DISABLEINVISIBLE 1059
#define IDC_CHK_RETRIEVEXSTATUS 1060
#define IDC_TREE_EXTRAICONS 1061
#define IDC_CHK_ENABLESMILEYS 1062
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 34ab44cceb..9f929b59fd 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -190,17 +190,8 @@ bool CanRetrieveStatusMsg(MCONTACT hContact, char *szProto) if (opt.bGetNewStatusMsg) { int iFlags = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0); uint16_t wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE); - if ((CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) && (iFlags & Proto_Status2Flag(wStatus))) { - iFlags = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & (PF1_VISLIST | PF1_INVISLIST); - if (opt.bDisableIfInvisible && iFlags) { - int iVisMode = db_get_w(hContact, szProto, "ApparentMode", 0); - int wProtoStatus = Proto_GetStatus(szProto); - if ((iVisMode == ID_STATUS_OFFLINE) || (wProtoStatus == ID_STATUS_INVISIBLE && iVisMode != ID_STATUS_ONLINE)) - return false; - return true; - } + if ((CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) && (iFlags & Proto_Status2Flag(wStatus))) return true; - } } return false; |