summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_adhoc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-23 15:06:01 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-23 15:06:01 +0300
commit4080ed23db3d8463c9c6aceddd3670dbed9c379e (patch)
treece80831675532fe2de97072b23ebbb895ec4cdc0 /protocols/JabberG/src/jabber_adhoc.cpp
parentdffa41d2751a0ae5c05a2943107abffc48fcf0dd (diff)
Jabber:
- fixes #1844 (Tab button doesn't work in Jabber registration form); - added Escape handler for any dynamic form to inform parent dialog; - massive dynamic forms-related XML code cleaning & reordering; - now form fiields without types are also processed; - vertical scrollbar is hidden if it's not needed; - hidden fields do not eat form space anymore
Diffstat (limited to 'protocols/JabberG/src/jabber_adhoc.cpp')
-rw-r--r--protocols/JabberG/src/jabber_adhoc.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp
index 61fa07179d..ea7e0a3b3e 100644
--- a/protocols/JabberG/src/jabber_adhoc.cpp
+++ b/protocols/JabberG/src/jabber_adhoc.cpp
@@ -213,7 +213,6 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, TiXmlElement *workNode
if ((xNode = commandNode->FirstChildElement("x"))) {
// use jabber:x:data form
HWND hFrame = GetDlgItem(hwndDlg, IDC_FRAME);
- ShowWindow(GetDlgItem(hwndDlg, IDC_FRAME_TEXT), SW_HIDE);
if (auto *pszText = XmlGetChildText(xNode, "instructions"))
JabberFormSetInstruction(hwndDlg, pszText);
else if (pszText = XmlGetChildText(xNode, "title"))
@@ -225,7 +224,7 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, TiXmlElement *workNode
}
else {
// NO X FORM
- int toHide[] = { IDC_FRAME_TEXT, IDC_FRAME, IDC_VSCROLL, 0 };
+ int toHide[] = { IDC_FRAME, IDC_VSCROLL, 0 };
sttShowControls(hwndDlg, FALSE, toHide);
auto *pszText = XmlGetChildText(commandNode, "note");
@@ -258,7 +257,7 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, TiXmlElement *workNode
}
else if (!mir_strcmp(type, "error")) {
// error occurred here
- int toHide[] = { IDC_FRAME, IDC_FRAME_TEXT, IDC_VSCROLL, IDC_PREV, IDC_NEXT, IDC_COMPLETE, IDC_SUBMIT, 0 };
+ int toHide[] = { IDC_FRAME, IDC_VSCROLL, IDC_PREV, IDC_NEXT, IDC_COMPLETE, IDC_SUBMIT, 0 };
sttShowControls(hwndDlg, FALSE, toHide);
const char *code = "";
@@ -295,8 +294,7 @@ int CJabberProto::AdHoc_SubmitCommandForm(HWND hwndDlg, JabberAdHocData *dat, ch
if (action)
command << XATTR("action", action);
- TiXmlElement *dataNode = JabberFormGetData(GetDlgItem(hwndDlg, IDC_FRAME), &iq, xNode);
- command->InsertEndChild(dataNode);
+ JabberFormGetData(GetDlgItem(hwndDlg, IDC_FRAME), command, xNode);
m_ThreadInfo->send(iq);
JabberFormSetInstruction(hwndDlg, TranslateU("In progress. Please Wait..."));
@@ -353,7 +351,7 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc(HWND hwndDlg, UINT msg, WPARA
frameExStyle |= WS_EX_CONTROLPARENT;
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_FRAME), GWL_EXSTYLE, frameExStyle);
- int toHide[] = { IDC_FRAME, IDC_VSCROLL, IDC_PREV, IDC_NEXT, IDC_COMPLETE, IDC_FRAME_TEXT, 0 };
+ int toHide[] = { IDC_FRAME, IDC_VSCROLL, IDC_PREV, IDC_NEXT, IDC_COMPLETE, 0 };
sttShowControls(hwndDlg, FALSE, toHide);
int toShow[] = { IDC_INSTRUCTION, IDC_SUBMIT, IDCANCEL, 0 };