X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditorNotes.cpp;h=ab0a64de66f323393cc292653c85a1130c8768d4;hb=4ecf020f6b1aab7c70d179826e620ad25b815810;hp=e07687aaa69b1111f3b28804bf00f1626d6a2b1b;hpb=45df1265cf7e9107ce5efac410b1251e92d7018c;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditorNotes.cpp b/source/contacteditor/frmContactEditorNotes.cpp index e07687a..ab0a64d 100644 --- a/source/contacteditor/frmContactEditorNotes.cpp +++ b/source/contacteditor/frmContactEditorNotes.cpp @@ -17,28 +17,51 @@ // with Xestia Address Book. If not, see #include "frmContactEditorNotes.h" -#include "../common/textprocessing.h" -#include frmContactEditorNotes::frmContactEditorNotes( wxWindow* parent ) : frmContactEditorNotesADT( parent ) { + + // Setup the editor window. + EditorMode = FALSE; sliPriority->Disable(); + + // Setup the language combo box. + + std::vector LanguageCodeList = GetLanguageCodeList(); + + wxArrayString LanguageList; + + for (auto LanguageItem : LanguageCodeList){ + + LanguageList.Add((wxString)LanguageItem, 1); + + } + + cmbLanguage->Append(LanguageList); + } void frmContactEditorNotes::EnablePriority( wxCommandEvent& event ) { + + // Enable/disable the priority setting. + if (chkUsePref->IsChecked()){ sliPriority->Enable(); } else { sliPriority->Disable(); } + } void frmContactEditorNotes::ProcessAction( wxCommandEvent& event ) { + + // Process action. + long ListCtrlIndex; if (EditorMode == FALSE){ @@ -184,6 +207,9 @@ void frmContactEditorNotes::ProcessAction( wxCommandEvent& event ) 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 @@ -220,6 +246,8 @@ void frmContactEditorNotes::SetEditorMode(bool EditMode, SectionType SectType) striter = NotesListLangPtr->find(NotesListIndex); + strValue.clear(); + if (striter->first == NotesListIndex && striter != NotesListLangPtr->end()){ @@ -250,7 +278,11 @@ void frmContactEditorNotes::SetEditorMode(bool EditMode, SectionType SectType) void frmContactEditorNotes::CloseWindow( wxCommandEvent& event ) { + + // Close the window. + this->Close(); + } @@ -265,6 +297,8 @@ void frmContactEditorNotes::SetupPointers(std::map *NotesList, int NotesIndex ) { + // Setup the pointers. + NotesListPtr = NotesList; NotesListLangPtr = NotesListLang; NotesListAltIDPtr = NotesListAltID;