diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-10-03 07:16:31 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-10-03 07:16:31 +0000 |
commit | 5bc3f00e4f75370e923b2c49994ac0ea3280397a (patch) | |
tree | ed3cb881c6fb2b33b399a530f7baff7623e564e8 | |
parent | aa38198e2410050b91cde59d40e907a8f82b7ebb (diff) |
Clist: Ability to show contacts as "LastName FirstName"
git-svn-id: http://svn.miranda-ng.org/main/trunk@6317 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | src/modules/clist/contacts.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/clist/contacts.cpp b/src/modules/clist/contacts.cpp index cc95f496c6..579212eea4 100644 --- a/src/modules/clist/contacts.cpp +++ b/src/modules/clist/contacts.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "..\..\core\commonheaders.h"
-#define NAMEORDERCOUNT 8
+#define NAMEORDERCOUNT 9
static TCHAR* nameOrderDescr[ NAMEORDERCOUNT ] =
{
LPGENT("My custom name (not moveable)"),
@@ -33,6 +33,7 @@ static TCHAR* nameOrderDescr[ NAMEORDERCOUNT ] = LPGENT("LastName"),
LPGENT("Username"),
LPGENT("FirstName LastName"),
+ LPGENT("LastName FirstName"),
LPGENT("'(Unknown Contact)' (not moveable)")
};
@@ -290,9 +291,10 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { break;
}
case 6: // first + last name
- if ( !GetDatabaseString(ci, "FirstName", &dbv)) {
+ case 7: // last + first name
+ if ( !GetDatabaseString(ci, nameOrder[i] == 6 ? "FirstName" : "LastName", &dbv)) {
DBVARIANT dbv2;
- if ( !GetDatabaseString(ci, "LastName", &dbv2)) {
+ if ( !GetDatabaseString(ci, nameOrder[i] == 6 ? "LastName" : "FirstName", &dbv2)) {
ci->type = CNFT_ASCIIZ;
if (ci->dwFlag & CNF_UNICODE) {
@@ -318,7 +320,7 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { }
break;
- case 7:
+ case 8:
if (ci->dwFlag & CNF_UNICODE)
ci->pszVal = (TCHAR*)mir_wstrdup(TranslateW(L"'(Unknown Contact)'"));
else
|