diff options
author | dartraiden <wowemuh@gmail.com> | 2022-06-20 22:18:12 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2022-06-20 22:18:12 +0300 |
commit | 9b11886082e701672552c7500581242dd3529467 (patch) | |
tree | 500c373fb78db175cc1f1ca6e3a0e5635da93da4 | |
parent | 7a63caf8e9bd3b47fe4378c17ac01b00e678228d (diff) |
Revert "fixes #3072 (GoogleTalk removed from templates)"
This reverts commit c2f60849cd6f5c2c66f7a306e031aa56d85760ab.
-rw-r--r-- | protocols/JabberG/src/jabber_opt.cpp | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index da80244154..361ca9e073 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -909,7 +909,7 @@ public: }
protected:
- enum { ACC_PUBLIC, ACC_TLS, ACC_SSL, ACC_HIPCHAT, ACC_LJTALK, ACC_LOL_EN, ACC_LOL_EW, ACC_LOL_OC, ACC_LOL_US, ACC_OK, ACC_SMS };
+ enum { ACC_PUBLIC, ACC_TLS, ACC_SSL, ACC_GTALK, ACC_HIPCHAT, ACC_LJTALK, ACC_LOL_EN, ACC_LOL_EW, ACC_LOL_OC, ACC_LOL_US, ACC_OK, ACC_SMS };
bool OnInitDialog() override
{
@@ -943,6 +943,7 @@ protected: m_cbType.AddString(TranslateT("Public XMPP Network"), ACC_PUBLIC);
m_cbType.AddString(TranslateT("Secure XMPP Network"), ACC_TLS);
m_cbType.AddString(TranslateT("Secure XMPP Network (old style)"), ACC_SSL);
+ m_cbType.AddString(TranslateT("Google Talk!"), ACC_GTALK);
m_cbType.AddString(TranslateT("Hipchat"), ACC_HIPCHAT);
m_cbType.AddString(TranslateT("LiveJournal Talk"), ACC_LJTALK);
m_cbType.AddString(TranslateT("League Of Legends (EU Nordic)"), ACC_LOL_EN);
@@ -959,7 +960,11 @@ protected: mir_strncpy(manualServer, dbManualServer, _countof(manualServer));
m_canregister = true;
- if (!mir_strcmp(server, "chat.hipchat.com")) {
+ if (!mir_strcmp(manualServer, "talk.google.com")) {
+ m_cbType.SetCurSel(ACC_GTALK);
+ m_canregister = false;
+ }
+ else if (!mir_strcmp(server, "chat.hipchat.com")) {
m_cbType.SetCurSel(ACC_HIPCHAT);
m_canregister = false;
}
@@ -1065,6 +1070,21 @@ protected: m_proto->m_bUseSSL = m_proto->m_bUseTLS = false;
break;
+ case ACC_GTALK:
+ m_proto->setDword("Priority", 24);
+ {
+ int port = m_txtPort.GetInt();
+ if (port == 443 || port == 5223) {
+ m_proto->m_bUseSSL = true;
+ m_proto->m_bUseTLS = false;
+ }
+ else if (port == 5222) {
+ m_proto->m_bUseSSL = false;
+ m_proto->m_bUseTLS = true;
+ }
+ }
+ break;
+
case ACC_OK:
m_proto->m_bIgnoreRoster = true;
m_proto->m_bUseSSL = false;
@@ -1227,6 +1247,7 @@ private: case ACC_PUBLIC: setupPublic(); break;
case ACC_TLS: setupSecure(); break;
case ACC_SSL: setupSecureSSL(); break;
+ case ACC_GTALK: setupGoogle(); break;
case ACC_HIPCHAT: setupHipchat(); break;
case ACC_LJTALK: setupLJ(); break;
case ACC_LOL_EN: setupLOLEN(); break;
@@ -1280,6 +1301,20 @@ private: m_btnRegister.Enable();
}
+ void setupGoogle()
+ {
+ m_canregister = false;
+ m_txtServer.SetTextA("gmail.com");
+ m_chkManualHost.SetState(BST_CHECKED);
+ m_txtManualHost.SetTextA("talk.google.com");
+ m_txtPort.SetInt(443);
+
+ m_txtServer.Enable();
+ m_chkManualHost.Disable();
+ m_txtManualHost.Disable();
+ m_btnRegister.Disable();
+ }
+
void setupHipchat()
{
m_canregister = false;
|