Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiaab
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0275a73
)
frmMain: Use Display As name if no first/last name exists
author
Steve Brokenshire
<sbrokenshire@xestia.co.uk>
Fri, 12 Jan 2018 00:12:26 +0000
(
00:12
+0000)
committer
Steve Brokenshire
<sbrokenshire@xestia.co.uk>
Fri, 12 Jan 2018 00:12:26 +0000
(
00:12
+0000)
source/frmMain.cpp
patch
|
blob
|
history
diff --git
a/source/frmMain.cpp
b/source/frmMain.cpp
index
c32e61d
..
228c7a6
100644
(file)
--- a/
source/frmMain.cpp
+++ b/
source/frmMain.cpp
@@
-737,8
+737,6
@@
void frmMain::LoadContactList( wxTreeEvent& event )
// Split the name into sections.
// Split the name into sections.
- vCardDataString = Person.Get(wxT("N"));
-
vCardName NameData = Person.GetName();
vCardDataString = NameData.Forename + wxT(" ") + NameData.Surname;
vCardName NameData = Person.GetName();
vCardDataString = NameData.Forename + wxT(" ") + NameData.Surname;
@@
-1715,19
+1713,40
@@
void frmMain::UpdateContactList(wxCommandEvent& event){
// First Name, Last Name.
// First Name, Last Name.
- lstContacts->SetItem(longSelected, 0, ucd->ContactNameArray.Forename + wxT(" ") + ucd->ContactNameArray.Surname);
+ if (ucd->ContactNameArray.Forename == wxT("") && ucd->ContactNameArray.Surname == wxT(""))
+ {
+ lstContacts->SetItem(longSelected, 0, ucd->ContactName);
+ }
+ else
+ {
+ lstContacts->SetItem(longSelected, 0, ucd->ContactNameArray.Forename + wxT(" ") + ucd->ContactNameArray.Surname);
+ }
} else if (SortMode == 2){
// Last Name, First Name.
} else if (SortMode == 2){
// Last Name, First Name.
-
- lstContacts->SetItem(longSelected, 0, ucd->ContactNameArray.Surname + wxT(", ") + ucd->ContactNameArray.Forename);
+
+ if (ucd->ContactNameArray.Forename == wxT("") && ucd->ContactNameArray.Surname == wxT(""))
+ {
+ lstContacts->SetItem(longSelected, 0, wxT(", ") + ucd->ContactName);
+ }
+ else
+ {
+ lstContacts->SetItem(longSelected, 0, ucd->ContactNameArray.Surname + wxT(", ") + ucd->ContactNameArray.Forename);
+ }
} else if (SortMode == 3){
// Nickname.
} else if (SortMode == 3){
// Nickname.
- lstContacts->SetItem(longSelected, 0, ucd->ContactNickname);
+ if (ucd->ContactNickname == wxT(""))
+ {
+ lstContacts->SetItem(longSelected, 0, _("(no nickname)"));
+ }
+ else
+ {
+ lstContacts->SetItem(longSelected, 0, ucd->ContactNickname);
+ }
} else if (SortMode == 4){
} else if (SortMode == 4){
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy