diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-24 15:03:18 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-24 15:03:18 +0000 |
commit | f78628ed14bc7aa0fd3a7e10c5cb25c71e7748db (patch) | |
tree | bea3ce9919e317bb4e0a1e2a7dcfea3912b48220 /plugins/TipperYM | |
parent | 7c04dcf1f6c3ab2a669763101ebd322407c50adb (diff) |
Tipper - 2 new presets for menuex
git-svn-id: http://svn.miranda-ng.org/main/trunk@163 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r-- | plugins/TipperYM/popwin.cpp | 14 | ||||
-rw-r--r-- | plugins/TipperYM/preset_items.cpp | 6 |
2 files changed, 19 insertions, 1 deletions
diff --git a/plugins/TipperYM/popwin.cpp b/plugins/TipperYM/popwin.cpp index 38acd9e6b6..c9f6d82464 100644 --- a/plugins/TipperYM/popwin.cpp +++ b/plugins/TipperYM/popwin.cpp @@ -124,6 +124,14 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa AddRow(pwd, TranslateT("Log on:"), swzLogon, NULL, false, false, false);
}
+ // logoff info
+ TCHAR swzLogoff[64];
+ if (TimestampToTimeDifference(NULL, pwd->clcit.szProto, "LogoffTS", swzLogoff, 59))
+ {
+ _tcscat(swzLogoff, TranslateT(" ago"));
+ AddRow(pwd, TranslateT("Log off:"), swzLogoff, NULL, false, false, false);
+ }
+
// number of unread emails
TCHAR swzEmailCount[64];
if (ProtoServiceExists(pwd->clcit.szProto, "/GetUnreadEmailCount"))
@@ -1800,6 +1808,12 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa _tcscat(buff, TranslateT(" ago"));
AddRow(pwd, TranslateT("Log on:"), buff, NULL, false, false, false);
}
+
+ if (TimestampToTimeDifference(NULL, pwd->clcit.szProto, "LogoffTS", buff, 59))
+ {
+ _tcscat(buff, TranslateT(" ago"));
+ AddRow(pwd, TranslateT("Log off:"), buff, NULL, false, false, false);
+ }
}
if (dwItems & TRAYTIP_UNREAD_EMAILS && ProtoServiceExists(pa->szModuleName, "/GetUnreadEmailCount"))
diff --git a/plugins/TipperYM/preset_items.cpp b/plugins/TipperYM/preset_items.cpp index 30498da33c..629a747a28 100644 --- a/plugins/TipperYM/preset_items.cpp +++ b/plugins/TipperYM/preset_items.cpp @@ -42,9 +42,10 @@ PRESETITEM presetItems[] = "time", LPGENT("Contact time"), LPGENT("Time:"), _T("%sys:time%"), 0, 0, 0,
"xtitle", LPGENT("XStatus title"), LPGENT("XStatus title:"), _T("%xsname%"), "xname", 0, 0,
"xtext", LPGENT("XStatus text"), LPGENT("XStatus text:"), _T("%raw:/XStatusMsg%"), 0, 0, 0,
- "logon", LPGENT("[icq.dll] Logon time"), LPGENT("Logon time:"), _T("%logon_date% @ %logon_time% (před: %logon_ago%)"), "logondate", "logontime", "logonago",
"acttitle", LPGENT("[jabber.dll] Activity title"), LPGENT("Activity title:"), _T("%raw:AdvStatus/?dbsetting(%subject%,Protocol,p)/activity/title%"), 0, 0, 0,
"acttext", LPGENT("[jabber.dll] Activity text"), LPGENT("Activity text:"), _T("%raw:AdvStatus/?dbsetting(%subject%,Protocol,p)/activity/text%"), 0, 0, 0,
+ "logon", LPGENT("[menuex.dll] Logon time"), LPGENT("Logon time:"), _T("%logon_date% @ %logon_time% (%logon_ago%)"), "logondate", "logontime", "logonago",
+ "logoff", LPGENT("[menuex.dll] Logoff time"), LPGENT("Logoff time:"), _T("%logoff_date% @ %logoff_time% (%logoff_ago%)"), "logoffdate", "logofftime", "logoffago",
"lastseentime", LPGENT("[seenplugin.dll] Last seen time"), LPGENT("Last seen time:"), _T("%lastseen_date% @ %lastseen_time%"), "lsdate", "lstime", 0,
"lastseenstatus", LPGENT("[seenplugin.dll] Last seen status"), LPGENT("Last seen status:"), _T("%lastseen_status% (%lastseen_ago% ago)"), "lsstatus", "lsago", 0,
"cond", LPGENT("[weather.dll] Condition"), LPGENT("Condition:"), _T("%raw:Current/Condition%"), 0, 0, 0,
@@ -81,6 +82,9 @@ PRESETSUBST presetSubsts[] = "logondate", _T("logon_date"), DVT_PROTODB, NULL, "LogonTS", 15,
"logontime", _T("logon_time"), DVT_PROTODB, NULL, "LogonTS", 13,
"logonago", _T("logon_ago"), DVT_PROTODB, NULL, "LogonTS", 3,
+ "logoffdate", _T("logoff_date"), DVT_PROTODB, NULL, "LogoffTS", 15,
+ "logofftime", _T("logoff_time"), DVT_PROTODB, NULL, "LogoffTS", 13,
+ "logoffago", _T("logoff_ago"), DVT_PROTODB, NULL, "LogoffTS", 3,
0, 0, DVT_DB, 0, 0, 0
};
|