Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiaab
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added comment to describe Connect in carddav/carddav-connect.cpp
[xestiaab/.git]
/
source
/
contacteditor
/
frmContactEditorAddress.cpp
diff --git
a/source/contacteditor/frmContactEditorAddress.cpp
b/source/contacteditor/frmContactEditorAddress.cpp
index
abd1d1f
..
1556618
100644
(file)
--- a/
source/contacteditor/frmContactEditorAddress.cpp
+++ b/
source/contacteditor/frmContactEditorAddress.cpp
@@
-72,7
+72,10
@@
void frmContactEditorAddress::ProcessData( wxCommandEvent& event )
// Add the label to the list (maps).
// Add the label to the list (maps).
- AddressListLabelPtr->insert(std::make_pair(AddressListIndex, txtLabel->GetValue()));
+ wxString LabelData = txtLabel->GetValue();
+ LabelData.Prepend("\"");
+ LabelData.Append("\"");
+ AddressListLabelPtr->insert(std::make_pair(AddressListIndex, LabelData));
// Add the language to the list (maps).
// Add the language to the list (maps).
@@
-193,7
+196,11
@@
void frmContactEditorAddress::ProcessData( wxCommandEvent& event )
// Add the label to the list (maps).
AddressListLabelPtr->erase(AddressListIndex);
// Add the label to the list (maps).
AddressListLabelPtr->erase(AddressListIndex);
- AddressListLabelPtr->insert(std::make_pair(AddressListIndex, txtLabel->GetValue()));
+
+ wxString LabelData = txtLabel->GetValue();
+ LabelData.Prepend("\"");
+ LabelData.Append("\"");
+ AddressListLabelPtr->insert(std::make_pair(AddressListIndex, LabelData));
// Add the language to the list (maps).
// Add the language to the list (maps).
@@
-381,7
+388,8
@@
void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType
striter = AddressListPtr->find(AddressListIndex);
striter = AddressListPtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex &&
+ striter != AddressListPtr->end()){
txtAddress->SetValue(striter->second);
txtAddress->SetValue(striter->second);
@@
-389,7
+397,8
@@
void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType
striter = AddressListTownPtr->find(AddressListIndex);
striter = AddressListTownPtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex &&
+ striter != AddressListTownPtr->end()){
txtTownCity->SetValue(striter->second);
txtTownCity->SetValue(striter->second);
@@
-397,7
+406,8
@@
void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType
striter = AddressListCountyPtr->find(AddressListIndex);
striter = AddressListCountyPtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex &&
+ striter != AddressListCountyPtr->end()){
txtCounty->SetValue(striter->second);
txtCounty->SetValue(striter->second);
@@
-405,7
+415,8
@@
void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType
striter = AddressListPostCodePtr->find(AddressListIndex);
striter = AddressListPostCodePtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex &&
+ striter != AddressListPostCodePtr->end()){
txtPostCode->SetValue(striter->second);
txtPostCode->SetValue(striter->second);
@@
-413,7
+424,8
@@
void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType
striter = AddressListCountryPtr->find(AddressListIndex);
striter = AddressListCountryPtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex &&
+ striter != AddressListCountryPtr->end()){
txtCountry->SetValue(striter->second);
txtCountry->SetValue(striter->second);
@@
-426,7
+438,8
@@
void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType
intiter = AddressListPrefPtr->find(AddressListIndex);
intiter = AddressListPrefPtr->find(AddressListIndex);
- if (intiter->first == AddressListIndex && intiter->second > 0){
+ if (intiter->first == AddressListIndex && intiter->second > 0 && intiter != AddressListPrefPtr->end() &&
+ intiter != AddressListPrefPtr->end()){
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
@@
-438,9
+451,14
@@
void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType
striter = AddressListLabelPtr->find(AddressListIndex);
striter = AddressListLabelPtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex && striter != AddressListLabelPtr->end() &&
+ striter != AddressListLabelPtr->end()){
strValue = striter->second;
strValue = striter->second;
+ if (strValue.Left(1) == "\"" && strValue.Right(1) == "\""){
+ strValue.erase(0, 1);
+ strValue.RemoveLast();
+ }
}
}
@@
-450,17
+468,17
@@
void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType
striter = AddressListLangPtr->find(AddressListIndex);
striter = AddressListLangPtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex
&& striter != AddressListLangPtr->end()
){
strValue = striter->second;
strValue = striter->second;
-
+
}
cmbLanguage->SetValue(strValue);
striter = AddressListGeoPtr->find(AddressListIndex);
}
cmbLanguage->SetValue(strValue);
striter = AddressListGeoPtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex
&& striter != AddressListGeoPtr->end()
){
strValue = striter->second;
strValue = striter->second;
@@
-470,7
+488,7
@@
void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType
striter = AddressListTimezonePtr->find(AddressListIndex);
striter = AddressListTimezonePtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex
&& striter != AddressListTimezonePtr->end()
){
strValue = striter->second;
strValue = striter->second;
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy