diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-04-01 17:30:38 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-04-01 17:30:38 +0000 |
commit | efcd6b99eb4d3fec0bd4c6e3f7fe684b512e76d9 (patch) | |
tree | 1866faa09d5884fc81404680e60f44e2ebe490e8 | |
parent | 1cab05afa07b7a27596c43f568a15b7b342a115e (diff) |
Add %accountname% core variable which contains user-defined name of account for a given contact
git-svn-id: http://svn.miranda-ng.org/main/trunk@8815 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | include/m_utils.h | 1 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/options.cpp | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/options.cpp | 5 | ||||
-rw-r--r-- | src/modules/utils/path.cpp | 2 |
4 files changed, 9 insertions, 4 deletions
diff --git a/include/m_utils.h b/include/m_utils.h index b6490a447c..8d9abd0a3b 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -381,6 +381,7 @@ __forceinline INT_PTR Utils_AssertInsideScreen(RECT *rc) { // %nick% -> a contact nick name.
// %proto% -> internal protocol name for a given contact. NOT the user-
// defined account name.
+// %accountname% -> user-defined account name for a given contact.
// %userid% -> Unique ID for a given contact (UIN, JID etc.)
// the following variables are system variables - unrelated to miranda profiles.
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp index 12b06fc47b..5b4b451486 100644 --- a/plugins/Scriver/src/chat/options.cpp +++ b/plugins/Scriver/src/chat/options.cpp @@ -366,13 +366,14 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa RECT rect;
mir_sntprintf(tszTooltipText, SIZEOF(tszTooltipText),
- _T("%s - %s\n%s - %s\n%s - %s\n\n")
+ _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
_T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
_T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s"),
// contact vars
_T("%nick%"), TranslateT("nick of current contact (if defined)"),
_T("%proto%"), TranslateT("protocol name of current contact (if defined). Account name is used when protocol supports multiaccounts"),
- _T("%userid%"), TranslateT("User ID of current contact (if defined). It is like UIN Number for ICQ, JID for Jabber, etc."),
+ _T("%accountname%"), TranslateT("user-defined account name of current contact (if defined)."),
+ _T("%userid%"), TranslateT("user ID of current contact (if defined). It is like UIN Number for ICQ, JID for Jabber, etc."),
// global vars
_T("%miranda_path%"), TranslateT("path to Miranda root folder"),
_T("%miranda_profile%"), TranslateT("path to current Miranda profile"),
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index c946b3ab70..f6e683e21a 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -781,13 +781,14 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM TCHAR tszTooltipText[2048];
mir_sntprintf(tszTooltipText, SIZEOF(tszTooltipText),
- _T("%s - %s\n%s - %s\n%s - %s\n\n")
+ _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
_T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
_T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s"),
// contact vars
_T("%nick%"), TranslateT("nick of current contact (if defined)"),
_T("%proto%"), TranslateT("protocol name of current contact (if defined). Account name is used when protocol supports multiaccounts"),
- _T("%userid%"), TranslateT("User ID of current contact (if defined). It is like UIN Number for ICQ, JID for Jabber, etc."),
+ _T("%accountname%"), TranslateT("user-defined account name of current contact (if defined)."),
+ _T("%userid%"), TranslateT("user ID of current contact (if defined). It is like UIN Number for ICQ, JID for Jabber, etc."),
// global vars
_T("%miranda_path%"), TranslateT("path to Miranda root folder"),
_T("%miranda_profile%"), TranslateT("path to current Miranda profile"),
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp index c67a297b8c..2d9dcf9c52 100644 --- a/src/modules/utils/path.cpp +++ b/src/modules/utils/path.cpp @@ -289,6 +289,8 @@ XCHAR *GetInternalVariable(XCHAR *key, size_t keyLength, MCONTACT hContact) theValue = GetContactNickX(key, hContact);
else if (!_xcscmp(theKey, XSTR(key, "proto")))
theValue = mir_a2x(key, GetContactProto(hContact));
+ else if (!_xcscmp(theKey, XSTR(key, "accountname")))
+ theValue = mir_a2x(key, _T2A(ProtoGetAccount(GetContactProto(hContact))->tszAccountName));
else if (!_xcscmp(theKey, XSTR(key, "userid")))
theValue = GetContactIDX(key, hContact);
}
|