summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-20 08:33:41 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-20 08:33:41 +0000
commitcf07690cddca7d8e7fd92219897bca5b12c87aa7 (patch)
tree37854ae6fa58428db615e1f7d8fe17c8987d20d8 /protocols
parent7b687c774158c03b6f5d508382219ae0863952b5 (diff)
SkypeWeb: Small improvement.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12958 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/SkypeWeb/src/skype_history_sync.cpp8
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp9
2 files changed, 14 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp
index df5d4044a7..ed75061658 100644
--- a/protocols/SkypeWeb/src/skype_history_sync.cpp
+++ b/protocols/SkypeWeb/src/skype_history_sync.cpp
@@ -125,7 +125,13 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response)
if (iType == 1)
text.Append(Translate("Call started"));
else if (iType == 0)
- text.AppendFormat("%s\n%s: %d", Translate("Call ended"), Translate("Duration"), iDuration != NULL ? iDuration : 0);
+ {
+ int hours=0, mins=0, sec=0;
+ hours = iDuration != NULL ? iDuration / 3600 : 0;
+ mins = iDuration != NULL ? iDuration / 60 : 0;
+ sec = iDuration != NULL ? iDuration % 60 : 0;
+ text.AppendFormat("%s\n%s: %d:%d:%d", Translate("Call ended"), Translate("Duration"), hours, mins, sec);
+ }
AddMessageToDb(hContact, timestamp, flags, clientMsgId, text.GetBuffer());
}
}
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index 33d0944ad7..bc0aa74669 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -284,8 +284,13 @@ void CSkypeProto::OnPrivateMessageEvent(JSONNODE *node)
if (iType == 1)
text.Append(Translate("Call started"));
else if (iType == 0)
- text.AppendFormat("%s\n%s: %d", Translate("Call ended"), Translate("Duration"), iDuration != NULL ? iDuration : 0);
-
+ {
+ int hours=0, mins=0, sec=0;
+ hours = iDuration != NULL ? iDuration / 3600 : 0;
+ mins = iDuration != NULL ? iDuration / 60 : 0;
+ sec = iDuration != NULL ? iDuration % 60 : 0;
+ text.AppendFormat("%s\n%s: %d:%d:%d", Translate("Call ended"), Translate("Duration"), hours, mins, sec);
+ }
if (IsMe(from))
AddMessageToDb(hContact, timestamp, DBEF_UTF | DBEF_SENT, clientMsgId, text.GetBuffer());
else