From 5bc3f00e4f75370e923b2c49994ac0ea3280397a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Thu, 3 Oct 2013 07:16:31 +0000 Subject: Clist: Ability to show contacts as "LastName FirstName" git-svn-id: http://svn.miranda-ng.org/main/trunk@6317 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/clist/contacts.cpp | 10 ++++++---- 1 file 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 -- cgit v1.2.3