diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-11 11:24:56 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-11 11:24:56 +0000 |
commit | b47d3f2a1fae41ac9c7438f4903692e417020db6 (patch) | |
tree | 4f552f81dec22f41fa4dbc810c27c00d7296f6cd /protocols | |
parent | 4451fe1381e185036a7037b3a0cda50de5b9d9b3 (diff) |
SkypeWeb: Added UseLocalTime setting (please, test it).
git-svn-id: http://svn.miranda-ng.org/main/trunk@12763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/SkypeWeb/res/resource.rc | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_messages.cpp | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_options.cpp | 1 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_poll_processing.cpp | 9 |
4 files changed, 5 insertions, 11 deletions
diff --git a/protocols/SkypeWeb/res/resource.rc b/protocols/SkypeWeb/res/resource.rc index 31f6dbcd79..24a62ac7c1 100644 --- a/protocols/SkypeWeb/res/resource.rc +++ b/protocols/SkypeWeb/res/resource.rc @@ -114,8 +114,8 @@ BEGIN LTEXT "Default group:",IDC_STATIC,12,51,69,12
EDITTEXT IDC_GROUP,81,49,217,12,ES_AUTOHSCROLL
GROUPBOX "Others",IDC_STATIC,5,79,298,71
- CONTROL "Automatic messages synchronization",IDC_AUTOSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,94,160,10
- CONTROL "Use local time for received messages",IDC_LOCALTIME,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,12,108,133,10
+ CONTROL "Automatic messages synchronization",IDC_AUTOSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,94,282,10
+ CONTROL "Use local time for received messages",IDC_LOCALTIME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,108,282,10
END
IDD_PASSWORD_EDITOR DIALOGEX 0, 0, 209, 75
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 15b9f1501e..bc9431da38 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -194,7 +194,7 @@ void CSkypeProto::OnPrivateMessageEvent(JSONNODE *node) //ptrA skypeEditedId(mir_t2a(ptrT(json_as_string(json_get(node, "skypeeditedid")))));
ptrT composeTime(json_as_string(json_get(node, "composetime")));
- time_t timestamp = IsoToUnixTime(composeTime);
+ time_t timestamp = getByte("UseLocalTime", 0) ? time(NULL) : IsoToUnixTime(composeTime);
ptrA from(mir_t2a(ptrT(json_as_string(json_get(node, "from")))));
ptrA skypename(ContactUrlToName(from));
diff --git a/protocols/SkypeWeb/src/skype_options.cpp b/protocols/SkypeWeb/src/skype_options.cpp index fdd6aff5ac..82f12ae358 100644 --- a/protocols/SkypeWeb/src/skype_options.cpp +++ b/protocols/SkypeWeb/src/skype_options.cpp @@ -27,6 +27,7 @@ CSkypeOptionsMain::CSkypeOptionsMain(CSkypeProto *proto, int idDialog, HWND hwnd {
CreateLink(m_group, SKYPE_SETTINGS_GROUP, _T("Skype"));
CreateLink(m_autosync, "AutoSync", DBVT_BYTE, 1);
+ CreateLink(m_localtime, "UseLocalTime", DBVT_BYTE, 0);
}
void CSkypeOptionsMain::OnInitDialog()
diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp index 94c8d58d06..ae14cee480 100644 --- a/protocols/SkypeWeb/src/skype_poll_processing.cpp +++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp @@ -91,15 +91,8 @@ void CSkypeProto::ProcessUserPresenceRes(JSONNODE *node) void CSkypeProto::ProcessNewMessageRes(JSONNODE *node)
{
debugLogA("CSkypeProto::ProcessNewMessageRes");
- ptrA clientMsgId(mir_t2a(ptrT(json_as_string(json_get(node, "clientmessageid")))));
- ptrA skypeEditedId(mir_t2a(ptrT(json_as_string(json_get(node, "skypeeditedid")))));
- ptrA messageType(mir_t2a(ptrT(json_as_string(json_get(node, "messagetype")))));
- ptrA from(mir_t2a(ptrT(json_as_string(json_get(node, "from")))));
- ptrA content(mir_t2a(ptrT(json_as_string(json_get(node, "content")))));
- ptrT composeTime(json_as_string(json_get(node, "composetime")));
+
ptrA conversationLink(mir_t2a(ptrT(json_as_string(json_get(node, "conversationLink")))));
- time_t timestamp = IsoToUnixTime(composeTime);
- int emoteOffset = json_as_int(json_get(node, "skypeemoteoffset"));
if (strstr(conversationLink, "/8:"))
OnPrivateMessageEvent(node);
|