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 unit tests for CommonFunctions/ResetUnusedString
[xestiaab/.git]
/
source
/
contacteditor
/
frmContactEditorTelephone.cpp
diff --git
a/source/contacteditor/frmContactEditorTelephone.cpp
b/source/contacteditor/frmContactEditorTelephone.cpp
index
ff5d1e1
..
0df8d2b
100644
(file)
--- a/
source/contacteditor/frmContactEditorTelephone.cpp
+++ b/
source/contacteditor/frmContactEditorTelephone.cpp
@@
-24,21
+24,32
@@
frmContactEditorTelephone::frmContactEditorTelephone( wxWindow* parent )
:
frmContactEditorTelephoneADT( parent )
{
:
frmContactEditorTelephoneADT( parent )
{
+
+ // Setup the window.
+
EditorMode = FALSE;
sliPriority->Disable();
EditorMode = FALSE;
sliPriority->Disable();
+
}
void frmContactEditorTelephone::EnablePriority( wxCommandEvent& event )
{
}
void frmContactEditorTelephone::EnablePriority( wxCommandEvent& event )
{
+
+ // Enable/disable the priority setting.
+
if (chkUsePref->IsChecked()){
sliPriority->Enable();
} else {
sliPriority->Disable();
}
if (chkUsePref->IsChecked()){
sliPriority->Enable();
} else {
sliPriority->Disable();
}
+
}
void frmContactEditorTelephone::ProcessAction( wxCommandEvent& event )
{
}
void frmContactEditorTelephone::ProcessAction( wxCommandEvent& event )
{
+
+ // Process action.
+
long ListCtrlIndex;
if (EditorMode == FALSE){
long ListCtrlIndex;
if (EditorMode == FALSE){
@@
-353,6
+364,9
@@
void frmContactEditorTelephone::ProcessAction( wxCommandEvent& event )
TelephoneListTypePtr->erase(TelephoneListIndex);
TelephoneListTypePtr->insert(std::make_pair(TelephoneListIndex, strTelTypes));
TelephoneListTypePtr->erase(TelephoneListIndex);
TelephoneListTypePtr->insert(std::make_pair(TelephoneListIndex, strTelTypes));
+ TelephoneListTypeInfoPtr->erase(TelephoneListIndex);
+ TelephoneListTypeInfoPtr->insert(std::make_pair(TelephoneListIndex, strTelTypes));
+
// Edit the Telephone Priority.
TelephoneListPrefPtr->erase(TelephoneListIndex);
// Edit the Telephone Priority.
TelephoneListPrefPtr->erase(TelephoneListIndex);
@@
-399,12
+413,17
@@
void frmContactEditorTelephone::ProcessAction( wxCommandEvent& event )
void frmContactEditorTelephone::CloseWindow( wxCommandEvent& event )
{
void frmContactEditorTelephone::CloseWindow( wxCommandEvent& event )
{
+ // Close the window.
+
this->Close();
}
void frmContactEditorTelephone::SetEditorMode(bool EditMode, SectionType SectType)
{
this->Close();
}
void frmContactEditorTelephone::SetEditorMode(bool EditMode, SectionType SectType)
{
+
+ // Set the editor mode.
+
// Set if the editor is adding or editing an address.
// FALSE = Add
// TRUE = Edit
// Set if the editor is adding or editing an address.
// FALSE = Add
// TRUE = Edit
@@
-519,7
+538,8
@@
void frmContactEditorTelephone::SetEditorMode(bool EditMode, SectionType SectTyp
intiter = TelephoneListPrefPtr->find(TelephoneListIndex);
intiter = TelephoneListPrefPtr->find(TelephoneListIndex);
- if (intiter->first == TelephoneListIndex && intiter->second > 0){
+ if (intiter->first == TelephoneListIndex && intiter->second > 0 &&
+ intiter != TelephoneListPrefPtr->end()){
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
@@
-544,6
+564,8
@@
void frmContactEditorTelephone::SetupPointers(std::map<int, wxString> *Telephone
int TelephoneIndex )
{
int TelephoneIndex )
{
+ // Setup the pointers.
+
TelephoneListPtr = TelephoneList;
TelephoneListAltIDPtr = TelephoneListAltID;
TelephoneListPIDPtr = TelephoneListPID;
TelephoneListPtr = TelephoneList;
TelephoneListAltIDPtr = TelephoneListAltID;
TelephoneListPIDPtr = TelephoneListPID;
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy