summaryrefslogtreecommitdiff
path: root/protocols/Sametime/src/utils.cpp
diff options
context:
space:
mode:
authorSzymon Tokarz <wsx22@o2.pl>2014-11-11 01:04:07 +0000
committerSzymon Tokarz <wsx22@o2.pl>2014-11-11 01:04:07 +0000
commiteabafdf4b42139ff85a8c8212cd0a9d287171e73 (patch)
treeef952efd34dddb609a4590f79cdc5e481f647a8e /protocols/Sametime/src/utils.cpp
parentb43b7abf33f5b2ab480a85584df0e3ce8c76a8ca (diff)
Sametime protocol:
- Add more options to client major/minor version settings, add gui combobox (db settings ClientVersionMajor, ClientVersionMinor used and still works if set from db) Enables connect to more modern servers - More ClientIDs on combobox list. - Better list of error codes, now translateable. - Merge some 3rd party patches to meanwhile lib. https://gist.github.com/jricesterenator/c67dfbdd0887f7ecc26a https://github.com/mrcsparker/meanwhile/commit/e2299d3c70a3351ab148f4febdebceb71f7b526d https://github.com/mrcsparker/meanwhile/commit/2e68651f13aebeab9e71312e59da204d3d72092c git-svn-id: http://svn.miranda-ng.org/main/trunk@10949 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Sametime/src/utils.cpp')
-rw-r--r--protocols/Sametime/src/utils.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/protocols/Sametime/src/utils.cpp b/protocols/Sametime/src/utils.cpp
index 6c8964e8a0..eeccb5a661 100644
--- a/protocols/Sametime/src/utils.cpp
+++ b/protocols/Sametime/src/utils.cpp
@@ -138,6 +138,22 @@ void CSametimeProto::showPopup(const TCHAR* msg, SametimePopupEnum flag)
CallFunctionAsync(sttMainThreadCallback, puData);
}
+void CSametimeProto::showPopup(guint32 code)
+{
+ struct mwReturnCodeDesc *rcDesc = mwGetReturnCodeDesc(code);
+
+ SametimePopupEnum flag = (rcDesc->type == mwReturnCodeError ? SAMETIME_POPUP_ERROR : SAMETIME_POPUP_INFO);
+ TCHAR buff[512];
+ mir_sntprintf(buff, SIZEOF(buff), TranslateT("%s\n\nSametime error %S\n%s"), TranslateTS(_A2T(rcDesc->name)), rcDesc->codeString, TranslateTS(_A2T(rcDesc->description)));
+
+ showPopup(buff, flag);
+ debugLog(buff);
+
+ g_free(rcDesc->codeString);
+ g_free(rcDesc->name);
+ g_free(rcDesc->description);
+ g_free(rcDesc);
+}
void LogFromGLib(const gchar* log_domain, GLogLevelFlags log_level, const gchar* message, gpointer user_data)
{