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
/
frmContactEditorNotes.cpp
diff --git
a/source/contacteditor/frmContactEditorNotes.cpp
b/source/contacteditor/frmContactEditorNotes.cpp
index
0dbfb78
..
b2b6983
100644
(file)
--- a/
source/contacteditor/frmContactEditorNotes.cpp
+++ b/
source/contacteditor/frmContactEditorNotes.cpp
@@
-24,21
+24,31
@@
frmContactEditorNotes::frmContactEditorNotes( wxWindow* parent )
:
frmContactEditorNotesADT( parent )
{
:
frmContactEditorNotesADT( parent )
{
+
+ // Setup the editor window.
+
EditorMode = FALSE;
sliPriority->Disable();
}
void frmContactEditorNotes::EnablePriority( wxCommandEvent& event )
{
EditorMode = FALSE;
sliPriority->Disable();
}
void frmContactEditorNotes::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 frmContactEditorNotes::ProcessAction( wxCommandEvent& event )
{
}
void frmContactEditorNotes::ProcessAction( wxCommandEvent& event )
{
+
+ // Process action.
+
long ListCtrlIndex;
if (EditorMode == FALSE){
long ListCtrlIndex;
if (EditorMode == FALSE){
@@
-184,6
+194,9
@@
void frmContactEditorNotes::ProcessAction( wxCommandEvent& event )
void frmContactEditorNotes::SetEditorMode(bool EditMode, SectionType SectType)
{
void frmContactEditorNotes::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
@@
-220,7
+233,8
@@
void frmContactEditorNotes::SetEditorMode(bool EditMode, SectionType SectType)
striter = NotesListLangPtr->find(NotesListIndex);
striter = NotesListLangPtr->find(NotesListIndex);
- if (striter->first == NotesListIndex){
+ if (striter->first == NotesListIndex &&
+ striter != NotesListLangPtr->end()){
strValue = striter->second;
strValue = striter->second;
@@
-232,7
+246,8
@@
void frmContactEditorNotes::SetEditorMode(bool EditMode, SectionType SectType)
intiter = NotesListPrefPtr->find(NotesListIndex);
intiter = NotesListPrefPtr->find(NotesListIndex);
- if (intiter->first == NotesListIndex && intiter->second > 0){
+ if (intiter->first == NotesListIndex && intiter->second > 0 &&
+ intiter != NotesListPrefPtr->end()){
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
@@
-248,7
+263,11
@@
void frmContactEditorNotes::SetEditorMode(bool EditMode, SectionType SectType)
void frmContactEditorNotes::CloseWindow( wxCommandEvent& event )
{
void frmContactEditorNotes::CloseWindow( wxCommandEvent& event )
{
+
+ // Close the window.
+
this->Close();
this->Close();
+
}
}
@@
-263,6
+282,8
@@
void frmContactEditorNotes::SetupPointers(std::map<int, wxString> *NotesList,
int NotesIndex )
{
int NotesIndex )
{
+ // Setup the pointers.
+
NotesListPtr = NotesList;
NotesListLangPtr = NotesListLang;
NotesListAltIDPtr = NotesListAltID;
NotesListPtr = NotesList;
NotesListLangPtr = NotesListLang;
NotesListAltIDPtr = NotesListAltID;
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy