diff options
author | George Hazan <ghazan@miranda.im> | 2019-10-17 19:28:29 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-10-17 19:28:29 +0300 |
commit | e7bd2ea75d6dbec2860d52124cf3b82fad98281d (patch) | |
tree | 33cd1b8a3e715b7e84f2ce47df1d61f3005068cf | |
parent | 9994031c204ac0d3780be1a3dee41aa039539b1f (diff) |
Jabber: service-related options moved to Service Discovery menu
-rw-r--r-- | protocols/JabberG/res/jabber.rc | 30 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_caps.h | 84 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_disco.cpp | 9 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_opt.cpp | 22 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_proto.cpp | 21 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_search.cpp | 26 | ||||
-rw-r--r-- | protocols/JabberG/src/resource.h | 4 |
7 files changed, 102 insertions, 94 deletions
diff --git a/protocols/JabberG/res/jabber.rc b/protocols/JabberG/res/jabber.rc index 9eb385fca4..c02871fb5c 100644 --- a/protocols/JabberG/res/jabber.rc +++ b/protocols/JabberG/res/jabber.rc @@ -1,5 +1,7 @@ // Microsoft Visual C++ generated resource script.
//
+#pragma code_page(65001)
+
#include "..\src\resource.h"
#define APSTUDIO_READONLY_SYMBOLS
@@ -8,7 +10,6 @@ // Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
-#include "richedit.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -18,7 +19,6 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
/////////////////////////////////////////////////////////////////////////////
//
@@ -91,7 +91,7 @@ BEGIN PUSHBUTTON "Export to file",IDC_EXPORT,272,268,71,15
END
-IDD_OPT_JABBER DIALOGEX 0, 0, 304, 228
+IDD_OPT_JABBER DIALOGEX 0, 0, 304, 208
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
@@ -120,7 +120,7 @@ BEGIN CONTROL "Use TLS",IDC_USE_TLS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,189,100,97,10
PUSHBUTTON "Register new user",IDC_BUTTON_REGISTER,156,16,78,13
PUSHBUTTON "Unregister",IDC_UNREGISTER,235,16,56,13
- GROUPBOX "Expert",IDC_STATIC,4,120,295,105
+ GROUPBOX "Expert",IDC_STATIC,4,120,295,85
CONTROL "Manually specify connection host",IDC_MANUAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,134,223,10
RTEXT "Host:",IDC_STATIC,26,147,30,8
EDITTEXT IDC_HOST,57,145,90,12,ES_AUTOHSCROLL | WS_DISABLED
@@ -129,10 +129,8 @@ BEGIN CONTROL "Keep connection alive",IDC_KEEPALIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,158,221,10
CONTROL "Automatically delete contacts not in my roster",IDC_ROSTER_SYNC,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,172,221,10
- LTEXT "User directory:",IDC_JUD_LABEL,11,188,170,8
- EDITTEXT IDC_JUD,188,185,103,12,ES_AUTOHSCROLL
- LTEXT "Language for human-readable resources:",IDC_MSGLANG_LABEL,11,203,170,8
- COMBOBOX IDC_MSGLANG,188,201,103,69,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Language for human-readable resources:",IDC_MSGLANG_LABEL,11,188,170,8
+ COMBOBOX IDC_MSGLANG,188,186,103,69,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "Use Domain Login",IDC_USEDOMAINLOGIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,45,137,9
END
@@ -141,18 +139,15 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- GROUPBOX "File Transfer",IDC_STATIC,4,3,295,71
+ GROUPBOX "File Transfer",IDC_STATIC,4,3,295,62
CONTROL "Allow file sending through direct peer-to-peer connection",IDC_DIRECT,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,14,284,10
CONTROL "Specify external address:",IDC_DIRECT_MANUAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,29,27,166,10
EDITTEXT IDC_DIRECT_ADDR,200,25,94,12,ES_AUTOHSCROLL
- CONTROL "Allow file sending through bytestream proxy server:",IDC_PROXY_MANUAL,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,41,183,10
- EDITTEXT IDC_PROXY_ADDR,200,39,94,12,ES_AUTOHSCROLL | WS_GROUP
- GROUPBOX "Miscellaneous",IDC_STATIC,4,76,295,149
- RTEXT "Hint:",IDC_STATIC,12,56,27,8
- LTEXT "Try to uncheck all checkmarks above if you're experiencing troubles with sending files. But it can cause problems with transfer of large files.",IDC_STATIC,46,53,245,16
- CONTROL "",IDC_OPTTREE,"SysTreeView32",TVS_DISABLEDRAGDROP | WS_BORDER | WS_HSCROLL | WS_TABSTOP,9,88,285,132
+ GROUPBOX "Miscellaneous",IDC_STATIC,4,65,295,159
+ RTEXT "Hint:",IDC_STATIC,12,47,27,8
+ LTEXT "Try to uncheck all checkmarks above if you're experiencing troubles with sending files. But it can cause problems with transfer of large files.",IDC_STATIC,46,44,245,16
+ CONTROL "",IDC_OPTTREE,"SysTreeView32",TVS_DISABLEDRAGDROP | WS_BORDER | WS_HSCROLL | WS_TABSTOP,9,75,285,143
END
IDD_INFO_JABBER DIALOGEX 0, 0, 221, 152
@@ -561,7 +556,7 @@ BEGIN COMBOBOX IDC_COMBO_NODE,243,6,84,70,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "Go",IDC_BUTTON_BROWSE,"MButtonClass",WS_TABSTOP,332,5,16,14
CONTROL "",IDC_TREE_DISCO,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,5,21,343,180
- RTEXT "Filter:", IDC_TXT_FILTER,5,207,48,8
+ RTEXT "Filter:",IDC_TXT_FILTER,5,207,48,8
EDITTEXT IDC_FILTER,58,205,289,14,ES_AUTOHSCROLL
END
@@ -836,7 +831,6 @@ END 2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
- "#include ""richedit.h""\r\n"
"\0"
END
diff --git a/protocols/JabberG/src/jabber_caps.h b/protocols/JabberG/src/jabber_caps.h index 75beba61de..9e78c0dfb6 100755 --- a/protocols/JabberG/src/jabber_caps.h +++ b/protocols/JabberG/src/jabber_caps.h @@ -46,117 +46,159 @@ typedef unsigned __int64 JabberCapsBits; #define JABBER_FEAT_DISCO_INFO "http://jabber.org/protocol/disco#info"
#define JABBER_CAPS_DISCO_INFO ((JabberCapsBits)1)
+
#define JABBER_FEAT_DISCO_ITEMS "http://jabber.org/protocol/disco#items"
#define JABBER_CAPS_DISCO_ITEMS ((JabberCapsBits)1<<1)
+
#define JABBER_FEAT_ENTITY_CAPS "http://jabber.org/protocol/caps"
#define JABBER_CAPS_ENTITY_CAPS ((JabberCapsBits)1<<2)
+
#define JABBER_FEAT_SI "http://jabber.org/protocol/si"
#define JABBER_CAPS_SI ((JabberCapsBits)1<<3)
+
#define JABBER_FEAT_SI_FT "http://jabber.org/protocol/si/profile/file-transfer"
#define JABBER_CAPS_SI_FT ((JabberCapsBits)1<<4)
+
#define JABBER_FEAT_BYTESTREAMS "http://jabber.org/protocol/bytestreams"
#define JABBER_CAPS_BYTESTREAMS ((JabberCapsBits)1<<5)
+
#define JABBER_FEAT_IBB "http://jabber.org/protocol/ibb"
#define JABBER_CAPS_IBB ((JabberCapsBits)1<<6)
+
#define JABBER_FEAT_OOB "jabber:iq:oob"
#define JABBER_FEAT_OOB2 "jabber:x:oob"
#define JABBER_CAPS_OOB ((JabberCapsBits)1<<7)
+
#define JABBER_FEAT_COMMANDS "http://jabber.org/protocol/commands"
#define JABBER_CAPS_COMMANDS ((JabberCapsBits)1<<8)
+
#define JABBER_FEAT_REGISTER "jabber:iq:register"
#define JABBER_CAPS_REGISTER ((JabberCapsBits)1<<9)
+
#define JABBER_FEAT_MUC "http://jabber.org/protocol/muc"
#define JABBER_CAPS_MUC ((JabberCapsBits)1<<10)
+
#define JABBER_FEAT_CHATSTATES "http://jabber.org/protocol/chatstates"
#define JABBER_CAPS_CHATSTATES ((JabberCapsBits)1<<11)
+
#define JABBER_FEAT_LAST_ACTIVITY "jabber:iq:last"
#define JABBER_CAPS_LAST_ACTIVITY ((JabberCapsBits)1<<12)
+
#define JABBER_FEAT_VERSION "jabber:iq:version"
#define JABBER_CAPS_VERSION ((JabberCapsBits)1<<13)
+
#define JABBER_FEAT_ENTITY_TIME "urn:xmpp:time"
#define JABBER_CAPS_ENTITY_TIME ((JabberCapsBits)1<<14)
+
#define JABBER_FEAT_PING "urn:xmpp:ping"
#define JABBER_CAPS_PING ((JabberCapsBits)1<<15)
+
#define JABBER_FEAT_DATA_FORMS "jabber:x:data"
#define JABBER_CAPS_DATA_FORMS ((JabberCapsBits)1<<16)
+
#define JABBER_FEAT_MESSAGE_EVENTS "jabber:x:event"
#define JABBER_CAPS_MESSAGE_EVENTS ((JabberCapsBits)1<<17)
+
#define JABBER_FEAT_VCARD_TEMP "vcard-temp"
#define JABBER_CAPS_VCARD_TEMP ((JabberCapsBits)1<<18)
+
#define JABBER_FEAT_XHTML "http://jabber.org/protocol/xhtml-im"
#define JABBER_CAPS_XHTML ((JabberCapsBits)1<<20)
+
#define JABBER_FEAT_AGENTS "jabber:iq:agents"
#define JABBER_CAPS_AGENTS ((JabberCapsBits)1<<21)
+
#define JABBER_FEAT_BROWSE "jabber:iq:browse"
#define JABBER_CAPS_BROWSE ((JabberCapsBits)1<<22)
+
#define JABBER_FEAT_FEATURE_NEG "http://jabber.org/protocol/feature-neg"
#define JABBER_CAPS_FEATURE_NEG ((JabberCapsBits)1<<23)
+
#define JABBER_FEAT_AMP "http://jabber.org/protocol/amp"
#define JABBER_CAPS_AMP ((JabberCapsBits)1<<24)
+
#define JABBER_FEAT_USER_MOOD "http://jabber.org/protocol/mood"
#define JABBER_CAPS_USER_MOOD ((JabberCapsBits)1<<25)
+
#define JABBER_FEAT_USER_MOOD_NOTIFY "http://jabber.org/protocol/mood+notify"
#define JABBER_CAPS_USER_MOOD_NOTIFY ((JabberCapsBits)1<<26)
+
#define JABBER_FEAT_PUBSUB "http://jabber.org/protocol/pubsub"
#define JABBER_CAPS_PUBSUB ((JabberCapsBits)1<<27)
+
#define JABBER_FEAT_SECUREIM "http://miranda-ng.org/caps/secureim"
#define JABBER_CAPS_SECUREIM ((JabberCapsBits)1<<28)
-#define JABBER_FEAT_MIROTR "http://miranda-ng.org/caps/mirotr"
-#define JABBER_CAPS_MIROTR ((JabberCapsBits)1<<42)
-#define JABBER_FEAT_NEWGPG "http://miranda-ng.org/caps/new_gpg"
-#define JABBER_CAPS_NEWGPG ((JabberCapsBits)1<<43)
-#define JABBER_FEAT_OMEMO "eu.siacs.conversations.axolotl"
-#define JABBER_CAPS_OMEMO ((JabberCapsBits)1<<46)
-#define JABBER_FEAT_OMEMO_DEVICELIST_NOTIFY JABBER_FEAT_OMEMO ".devicelist+notify"
-#define JABBER_CAPS_OMEMO_DEVICELIST_NOTIFY ((JabberCapsBits)1<<47)
-#define JABBER_CAPS_PLATFORMX86 ((JabberCapsBits)1<<44)
-#define JABBER_CAPS_PLATFORMX64 ((JabberCapsBits)1<<45)
+
#define JABBER_FEAT_PRIVACY_LISTS "jabber:iq:privacy"
#define JABBER_CAPS_PRIVACY_LISTS ((JabberCapsBits)1<<29)
+
#define JABBER_FEAT_MESSAGE_RECEIPTS "urn:xmpp:receipts"
#define JABBER_CAPS_MESSAGE_RECEIPTS ((JabberCapsBits)1<<30)
+
#define JABBER_FEAT_USER_TUNE "http://jabber.org/protocol/tune"
#define JABBER_CAPS_USER_TUNE ((JabberCapsBits)1<<31)
+
#define JABBER_FEAT_USER_TUNE_NOTIFY "http://jabber.org/protocol/tune+notify"
#define JABBER_CAPS_USER_TUNE_NOTIFY ((JabberCapsBits)1<<32)
+
#define JABBER_FEAT_PRIVATE_STORAGE "jabber:iq:private"
#define JABBER_CAPS_PRIVATE_STORAGE ((JabberCapsBits)1<<33)
-#define JABBER_FEAT_SERVER_AVATAR "storage:client:avatar"
-#define JABBER_FEAT_ARCHIVE "urn:xmpp:archive"
#define JABBER_FEAT_ARCHIVE_AUTO "urn:xmpp:archive:auto"
#define JABBER_CAPS_ARCHIVE_AUTO ((JabberCapsBits)1<<34)
+
#define JABBER_FEAT_ARCHIVE_MANAGE "urn:xmpp:archive:manage"
#define JABBER_CAPS_ARCHIVE_MANAGE ((JabberCapsBits)1<<35)
-#define JABBER_FEAT_BIND "urn:ietf:params:xml:ns:xmpp-bind"
-#define JABBER_FEAT_CAPTCHA "urn:xmpp:captcha"
-#define JABBER_FEAT_CSI "urn:xmpp:csi:0"
-
#define JABBER_FEAT_ATTENTION "urn:xmpp:attention:0"
#define JABBER_CAPS_ATTENTION ((JabberCapsBits)1<<36)
-// deferred
#define JABBER_FEAT_USER_ACTIVITY "http://jabber.org/protocol/activity"
#define JABBER_CAPS_USER_ACTIVITY ((JabberCapsBits)1<<37)
+
#define JABBER_FEAT_USER_ACTIVITY_NOTIFY "http://jabber.org/protocol/activity+notify"
#define JABBER_CAPS_USER_ACTIVITY_NOTIFY ((JabberCapsBits)1<<38)
+
#define JABBER_FEAT_MIRANDA_NOTES "http://miranda-ng.org/storage#notes"
#define JABBER_CAPS_MIRANDA_NOTES ((JabberCapsBits)1<<39)
+
#define JABBER_FEAT_JINGLE "urn:xmpp:jingle:1"
#define JABBER_CAPS_JINGLE ((JabberCapsBits)1<<40)
+
#define JABBER_FEAT_ROSTER_EXCHANGE "http://jabber.org/protocol/rosterx"
#define JABBER_CAPS_ROSTER_EXCHANGE ((JabberCapsBits)1<<41)
+#define JABBER_FEAT_MIROTR "http://miranda-ng.org/caps/mirotr"
+#define JABBER_CAPS_MIROTR ((JabberCapsBits)1<<42)
+
+#define JABBER_FEAT_NEWGPG "http://miranda-ng.org/caps/new_gpg"
+#define JABBER_CAPS_NEWGPG ((JabberCapsBits)1<<43)
+
+#define JABBER_CAPS_PLATFORMX86 ((JabberCapsBits)1<<44)
+#define JABBER_CAPS_PLATFORMX64 ((JabberCapsBits)1<<45)
+
+#define JABBER_FEAT_OMEMO "eu.siacs.conversations.axolotl"
+#define JABBER_CAPS_OMEMO ((JabberCapsBits)1<<46)
+
+#define JABBER_FEAT_OMEMO_DEVICELIST_NOTIFY JABBER_FEAT_OMEMO ".devicelist+notify"
+#define JABBER_CAPS_OMEMO_DEVICELIST_NOTIFY ((JabberCapsBits)1<<47)
+
#define JABBER_FEAT_DIRECT_MUC_INVITE "jabber:x:conference"
-#define JABBER_CAPS_DIRECT_MUC_INVITE ((JabberCapsBits)1<<42)
+#define JABBER_CAPS_DIRECT_MUC_INVITE ((JabberCapsBits)1<<48)
+
+#define JABBER_FEAT_CARBONS "urn:xmpp:carbons:2"
+#define JABBER_CAPS_CARBONS ((JabberCapsBits)1<<49)
+
+#define JABBER_FEAT_ARCHIVE "urn:xmpp:archive"
+#define JABBER_FEAT_BIND "urn:ietf:params:xml:ns:xmpp-bind"
+#define JABBER_FEAT_CAPTCHA "urn:xmpp:captcha"
+#define JABBER_FEAT_CSI "urn:xmpp:csi:0"
+#define JABBER_FEAT_JUD "jabber:iq:search"
+#define JABBER_FEAT_SERVER_AVATAR "storage:client:avatar"
#define JABBER_FEAT_PUBSUB_EVENT "http://jabber.org/protocol/pubsub#event"
#define JABBER_FEAT_PUBSUB_NODE_CONFIG "http://jabber.org/protocol/pubsub#node_config"
-#define JABBER_FEAT_CARBONS "urn:xmpp:carbons:2"
-#define JABBER_CAPS_CARBONS ((JabberCapsBits)1<<43)
-
#define JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY ((JabberCapsBits)1<<63)
#define JABBER_CAPS_OTHER_SPECIAL (JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY|JABBER_RESOURCE_CAPS_ERROR) // must contain all the caps not listed in g_JabberFeatCapPairs, to prevent using these bits for features registered through IJabberNetInterface::RegisterFeature()
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index e9371fa477..40d3c0a53f 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -93,7 +93,7 @@ static sttNodeIcons[] = // icon suggestions based on supported features
{ "jabber:iq:gateway", nullptr, nullptr, IDI_AGENTS, 0 },
- { "jabber:iq:search", nullptr, nullptr, 0, SKINICON_OTHER_FINDUSER },
+ { JABBER_FEAT_JUD, nullptr, nullptr, 0, SKINICON_OTHER_FINDUSER },
{ JABBER_FEAT_COMMANDS, nullptr, nullptr, IDI_COMMAND, 0 },
{ JABBER_FEAT_REGISTER, nullptr, nullptr, 0, SKINICON_OTHER_KEYS },
};
@@ -1061,7 +1061,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM { nullptr, LPGENW("Add to favorites"), SD_ACT_FAVORITE},
{ nullptr, LPGENW("Add to roster"), SD_ACT_ROSTER, SD_FLG_NONODE | SD_FLG_NOTONROSTER},
{ JABBER_FEAT_MUC, LPGENW("Bookmark chatroom"), SD_ACT_BOOKMARK, SD_FLG_NORESOURCE | SD_FLG_HASUSER},
- { "jabber:iq:search", LPGENW("Add search directory"), SD_ACT_ADDDIRECTORY},
+ { JABBER_FEAT_JUD, LPGENW("Add search directory"), SD_ACT_ADDDIRECTORY},
{ JABBER_FEAT_BYTESTREAMS, LPGENW("Use this proxy"), SD_ACT_PROXY},
{ nullptr },
{ JABBER_FEAT_REGISTER, LPGENW("Register"), SD_ACT_REGISTER},
@@ -1227,12 +1227,11 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM break;
case SD_ACT_ADDDIRECTORY:
- SearchAddToRecent(pNode->GetJid());
+ setUString("Jud", pNode->GetJid());
break;
case SD_ACT_PROXY:
- m_bBsDirect = FALSE;
- m_bBsProxyManual = TRUE;
+ m_bBsProxyManual = true;
setUString("BsProxyServer", pNode->GetJid());
break;
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index c45e89aa23..a69f3c53f1 100755 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -349,7 +349,6 @@ class CDlgOptAccount : public CJabberDlgBase CCtrlEdit m_txtManualPort;
CCtrlCheck m_chkKeepAlive;
CCtrlCheck m_chkAutoDeleteContacts;
- CCtrlEdit m_txtUserDirectory;
CCtrlCombo m_cbLocale;
CCtrlButton m_btnRegister;
CCtrlButton m_btnUnregister;
@@ -375,7 +374,6 @@ public: m_txtManualPort(this, IDC_HOSTPORT),
m_chkKeepAlive(this, IDC_KEEPALIVE),
m_chkAutoDeleteContacts(this, IDC_ROSTER_SYNC),
- m_txtUserDirectory(this, IDC_JUD),
m_cbLocale(this, IDC_MSGLANG),
m_btnRegister(this, IDC_BUTTON_REGISTER),
m_btnUnregister(this, IDC_UNREGISTER),
@@ -398,7 +396,6 @@ public: CreateLink(m_txtManualPort, "ManualPort", DBVT_WORD, 0);
CreateLink(m_chkKeepAlive, proto->m_bKeepAlive);
CreateLink(m_chkAutoDeleteContacts, proto->m_bRosterSync);
- CreateLink(m_txtUserDirectory, "Jud", L"");
// Bind events
m_cbServer.OnDropdown = Callback(this, &CDlgOptAccount::cbServer_OnDropdown);
@@ -741,9 +738,7 @@ class CDlgOptAdvanced : public CJabberDlgBase CCtrlCheck m_chkDirect;
CCtrlCheck m_chkDirectManual;
- CCtrlCheck m_chkProxy;
CCtrlEdit m_txtDirect;
- CCtrlEdit m_txtProxy;
CCtrlTreeOpts m_otvOptions;
BYTE m_oldFrameValue;
@@ -753,21 +748,15 @@ public: CJabberDlgBase(proto, IDD_OPT_JABBER2),
m_chkDirect(this, IDC_DIRECT),
m_chkDirectManual(this, IDC_DIRECT_MANUAL),
- m_chkProxy(this, IDC_PROXY_MANUAL),
m_txtDirect(this, IDC_DIRECT_ADDR),
- m_txtProxy(this, IDC_PROXY_ADDR),
m_otvOptions(this, IDC_OPTTREE),
m_oldFrameValue(proto->m_bDisableFrame)
{
CreateLink(m_chkDirect, proto->m_bBsDirect);
CreateLink(m_chkDirectManual, proto->m_bBsDirectManual);
- CreateLink(m_chkProxy, proto->m_bBsProxyManual);
CreateLink(m_txtDirect, "BsDirectAddr", L"");
- CreateLink(m_txtProxy, "BsProxyServer", L"");
- m_chkDirect.OnChange =
- m_chkDirectManual.OnChange = Callback(this, &CDlgOptAdvanced::chkDirect_OnChange);
- m_chkProxy.OnChange = Callback(this, &CDlgOptAdvanced::chkProxy_OnChange);
+ m_chkDirect.OnChange = m_chkDirectManual.OnChange = Callback(this, &CDlgOptAdvanced::chkDirect_OnChange);
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Send messages slower, but with full acknowledgment"), m_proto->m_bMsgAck);
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Enable avatars"), m_proto->m_bEnableAvatars);
@@ -807,7 +796,6 @@ public: CSuper::OnInitDialog();
chkDirect_OnChange(&m_chkDirect);
- chkProxy_OnChange(&m_chkProxy);
return true;
}
@@ -861,14 +849,6 @@ public: m_chkDirectManual.Disable();
}
}
-
- void chkProxy_OnChange(CCtrlData *)
- {
- if (m_chkProxy.GetState() == BST_CHECKED)
- m_txtProxy.Enable();
- else
- m_txtProxy.Disable();
- }
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 0122da30ba..916022987e 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -734,14 +734,12 @@ HANDLE CJabberProto::SearchBasic(const wchar_t *szJid) HANDLE CJabberProto::SearchByEmail(const wchar_t *email)
{
- if (!m_bJabberOnline || email == nullptr)
- return nullptr;
-
ptrA szServerName(getStringA("Jud"));
+ if (!m_bJabberOnline || email == nullptr || szServerName == nullptr)
+ return nullptr;
- LPCSTR jid = szServerName == 0 ? "users.jabber.org" : szServerName.get();
- CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultSetSearch, JABBER_IQ_TYPE_SET, jid);
- m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY("jabber:iq:search") << XCHILD("email", T2Utf(email)));
+ CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultSetSearch, JABBER_IQ_TYPE_SET, szServerName);
+ m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(JABBER_FEAT_JUD) << XCHILD("email", T2Utf(email)));
return (HANDLE)pInfo->GetIqId();
}
@@ -750,18 +748,15 @@ HANDLE CJabberProto::SearchByEmail(const wchar_t *email) HANDLE CJabberProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName)
{
- if (!m_bJabberOnline)
+ ptrA szServerName(getStringA("Jud"));
+ if (!m_bJabberOnline || szServerName == nullptr)
return nullptr;
BOOL bIsExtFormat = m_bExtendedSearch;
- ptrA szServerName(getStringA("Jud"));
-
- CJabberIqInfo *pInfo = AddIQ(
- (bIsExtFormat) ? &CJabberProto::OnIqResultExtSearch : &CJabberProto::OnIqResultSetSearch,
- JABBER_IQ_TYPE_SET, szServerName == 0 ? "users.jabber.org" : szServerName);
+ CJabberIqInfo *pInfo = AddIQ((bIsExtFormat) ? &CJabberProto::OnIqResultExtSearch : &CJabberProto::OnIqResultSetSearch, JABBER_IQ_TYPE_SET, szServerName);
XmlNodeIq iq(pInfo);
- TiXmlElement *query = iq << XQUERY("jabber:iq:search");
+ TiXmlElement *query = iq << XQUERY(JABBER_FEAT_JUD);
if (bIsExtFormat) {
if (m_tszSelectedLang)
diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index 39c01b5af0..33fa90ea09 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -457,7 +457,7 @@ int CJabberProto::SearchRenewFields(HWND hwndDlg, JabberSearchData *dat) searchHandleDlg = hwndDlg; CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultGetSearchFields, JABBER_IQ_TYPE_GET, T2Utf(szServerName)); - m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY("jabber:iq:search")); + m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(JABBER_FEAT_JUD)); return pInfo->GetIqId(); } @@ -519,20 +519,22 @@ void CJabberProto::SearchAddToRecent(const char *szAddr, HWND hwndDialog) static INT_PTR CALLBACK JabberSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { - JabberSearchData* dat = (JabberSearchData*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + JabberSearchData *dat = (JabberSearchData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch (msg) { case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); { dat = new JabberSearchData(); - dat->ppro = (CJabberProto*)lParam; + dat->ppro = (CJabberProto *)lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat); /* Server Combo box */ ptrA jud(dat->ppro->getStringA("Jud")); - char *szServerName = (jud == nullptr) ? "users.jabber.org" : jud.get(); - SetDlgItemTextA(hwndDlg, IDC_SERVER, szServerName); - SendDlgItemMessageA(hwndDlg, IDC_SERVER, CB_ADDSTRING, 0, (LPARAM)szServerName); + if (jud != nullptr) { + SetDlgItemTextA(hwndDlg, IDC_SERVER, jud); + SendDlgItemMessageA(hwndDlg, IDC_SERVER, CB_ADDSTRING, 0, jud); + } + //TO DO: Add Transports here for (auto &it : dat->ppro->m_lstTransports) if (it != nullptr) @@ -601,7 +603,7 @@ static INT_PTR CALLBACK JabberSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPAR dat->doc.DeleteNode(dat->xNode); dat->xNode = nullptr; } - TiXmlElement *pNode = (TiXmlElement*)wParam; + TiXmlElement *pNode = (TiXmlElement *)wParam; if (pNode) { dat->xNode = pNode->DeepClone(&dat->doc)->ToElement(); JabberFormCreateUI(GetDlgItem(hwndDlg, IDC_FRAME), dat->xNode, &dat->CurrentHeight, TRUE); @@ -613,7 +615,7 @@ static INT_PTR CALLBACK JabberSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPAR case WM_USER + 10: { - Data *MyDat = (Data*)lParam; + Data *MyDat = (Data *)lParam; if (MyDat) { dat->fSearchRequestIsXForm = (BOOL)wParam; dat->CurrentHeight = JabberSearchAddField(hwndDlg, MyDat); @@ -636,7 +638,7 @@ static INT_PTR CALLBACK JabberSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPAR short zDelta = GET_WHEEL_DELTA_WPARAM(wParam); if (zDelta) { int nScrollLines = 0; - SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, (void*)&nScrollLines, 0); + SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, (void *)&nScrollLines, 0); for (int i = 0; i < (nScrollLines + 1) / 2; i++) SendMessage(hwndDlg, WM_VSCROLL, (zDelta < 0) ? SB_LINEDOWN : SB_LINEUP, 0); } @@ -673,7 +675,7 @@ static INT_PTR CALLBACK JabberSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPAR ScrollWindow(GetDlgItem(hwndDlg, IDC_FRAME), 0, dat->curPos - pos, nullptr, &(dat->frameRect)); SetScrollPos(GetDlgItem(hwndDlg, IDC_VSCROLL), SB_CTL, pos, TRUE); RECT Invalid = dat->frameRect; - if (dat->curPos - pos >0) + if (dat->curPos - pos > 0) Invalid.bottom = Invalid.top + (dat->curPos - pos); else Invalid.top = Invalid.bottom + (dat->curPos - pos); @@ -714,7 +716,7 @@ HWND CJabberProto::SearchAdvanced(HWND hwndDlg) if (!m_bJabberOnline || !hwndDlg) return nullptr; //error - JabberSearchData * dat = (JabberSearchData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + JabberSearchData *dat = (JabberSearchData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); if (!dat) return nullptr; //error @@ -732,7 +734,7 @@ HWND CJabberProto::SearchAdvanced(HWND hwndDlg) // formating query CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultAdvancedSearch, JABBER_IQ_TYPE_SET, T2Utf(szServerName)); XmlNodeIq iq(pInfo); - TiXmlElement *query = iq << XQUERY("jabber:iq:search"); + TiXmlElement *query = iq << XQUERY(JABBER_FEAT_JUD); if (m_tszSelectedLang) iq << XATTR("xml:lang", m_tszSelectedLang); // i'm sure :) diff --git a/protocols/JabberG/src/resource.h b/protocols/JabberG/src/resource.h index 20c587c95d..e6e77f4784 100644 --- a/protocols/JabberG/src/resource.h +++ b/protocols/JabberG/src/resource.h @@ -156,21 +156,17 @@ #define IDC_LOAD 1093
#define IDC_CANVAS 1094
#define IDC_GENDER 1096
-#define IDC_JUD 1097
-#define IDC_JUD_LABEL 1098
#define IDC_MSGLANG_LABEL 1099
#define IDC_PRIORITY_SPIN 1104
#define IDC_PRIORITY 1105
#define IDC_PRIORITY_LABEL 1106
#define IDC_NEWPASSWD 1107
-#define IDC_PROXY_ADDR 1112
#define IDC_DIRECT_ADDR 1114
#define IDC_DIRECT_MANUAL 1121
#define IDC_REG_STATUS 1122
#define IDC_JOIN 1123
#define IDC_DIRECT 1123
#define IDC_ROOM 1124
-#define IDC_PROXY_MANUAL 1124
#define IDC_SERVER 1125
#define IDC_VSCROLL 1128
#define IDC_NICK 1129
|