From d15eafcbfa1b78bb0eeacb4261402af5f918c1a5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 17 Jun 2021 12:05:34 +0300 Subject: Jabber: option to disable popups --- protocols/JabberG/src/jabber_misc.cpp | 3 +++ protocols/JabberG/src/jabber_opt.cpp | 1 + protocols/JabberG/src/jabber_proto.cpp | 1 + protocols/JabberG/src/jabber_proto.h | 1 + 4 files changed, 6 insertions(+) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 3e69ae75a5..0350f28ad3 100755 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -423,6 +423,9 @@ void CJabberProto::InitPopups(void) void CJabberProto::MsgPopup(MCONTACT hContact, const wchar_t *szMsg, const wchar_t *szTitle) { + if (!m_bUsePopups) + return; + char name[256]; mir_snprintf(name, "%s_%s", m_szModuleName, "Error"); diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index fcd78fc404..1f4bfd91b4 100755 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -793,6 +793,7 @@ public: m_options.AddOption(LPGENW("Other"), LPGENW("Automatically accept authorization requests"), m_proto->m_bAutoAcceptAuthorization); m_options.AddOption(LPGENW("Other"), LPGENW("Fix incorrect timestamps in incoming messages"), m_proto->m_bFixIncorrectTimestamps); m_options.AddOption(LPGENW("Other"), LPGENW("Disable frame"), m_proto->m_bDisableFrame); + m_options.AddOption(LPGENW("Other"), LPGENW("Display popups with errors"), m_proto->m_bUsePopups); m_options.AddOption(LPGENW("Other"), LPGENW("Enable XMPP link processing (requires AssocMgr)"), m_proto->m_bProcessXMPPLinks); m_options.AddOption(LPGENW("Other"), LPGENW("Embrace picture URLs with [img]"), m_proto->m_bEmbraceUrls); m_options.AddOption(LPGENW("Other"), LPGENW("Ignore server roster (groups and nick names)"), m_proto->m_bIgnoreRoster); diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 35725cea26..17b4eef723 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -131,6 +131,7 @@ CJabberProto::CJabberProto(const char *aProtoName, const wchar_t *aUserName) : m_bUseDomainLogin(this, "UseDomainLogin", false), m_bUseHttpUpload(this, "UseHttpUpload", false), m_bUseOMEMO(this, "UseOMEMO", false), + m_bUsePopups(this, "UsePopups", true), m_bUseSSL(this, "UseSSL", false), m_bUseTLS(this, "UseTLS", true), diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 46b388d267..e479a1ca1b 100755 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -231,6 +231,7 @@ struct CJabberProto : public PROTO, public IJabberInterface CMOption m_bUseDomainLogin; CMOption m_bUseHttpUpload; CMOption m_bUseOMEMO; + CMOption m_bUsePopups; CMOption m_bUseSSL; CMOption m_bUseTLS; -- cgit v1.2.3