Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmContactEditorNickname/Notes: Use list of ISO 639-1 languages
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 6 Mar 2017 11:14:03 +0000 (11:14 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 6 Mar 2017 11:14:03 +0000 (11:14 +0000)
source/contacteditor/frmContactEditorNickname.cpp
source/contacteditor/frmContactEditorNickname.h
source/contacteditor/frmContactEditorNotes.cpp
source/contacteditor/frmContactEditorNotes.h

index 9c909a9..c67302c 100644 (file)
 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
 
 #include "frmContactEditorNickname.h"
-#include "../common/textprocessing.h"
 
 frmContactEditorNickname::frmContactEditorNickname( wxWindow* parent )
 :
 frmContactEditorNicknameADT( parent )
 {
 
+       std::vector<std::string> LanguageCodeList = GetLanguageCodeList();
+       
+       wxArrayString LanguageList;
+       
+       for (auto LanguageItem : LanguageCodeList){
+               
+               LanguageList.Add((wxString)LanguageItem, 1);
+               
+       }
+       
+       cmbLanguage->Append(LanguageList);
+       
 }
 
 void frmContactEditorNickname::InitAddressEditor( wxInitDialogEvent& event )
index e8ea37a..e14699c 100644 (file)
@@ -28,6 +28,8 @@ Subclass of frmContactEditorNicknameADT, which is generated by wxFormBuilder.
 #include <string>
 #include "../AppXestiaAddrBk.h"
 #include "../enums.h"
+#include "../common/textprocessing.h"
+#include "../common/languages.h"
 
 //// end generated include
 
index b2b6983..ab0a64d 100644 (file)
@@ -17,8 +17,6 @@
 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
 
 #include "frmContactEditorNotes.h"
-#include "../common/textprocessing.h"
-#include <wx/tokenzr.h>
 
 frmContactEditorNotes::frmContactEditorNotes( wxWindow* parent )
 :
@@ -29,6 +27,21 @@ frmContactEditorNotesADT( parent )
        
        EditorMode = FALSE;
        sliPriority->Disable();
+       
+       // Setup the language combo box.
+       
+       std::vector<std::string> LanguageCodeList = GetLanguageCodeList();
+       
+       wxArrayString LanguageList;
+       
+       for (auto LanguageItem : LanguageCodeList){
+               
+               LanguageList.Add((wxString)LanguageItem, 1);
+               
+       }
+       
+       cmbLanguage->Append(LanguageList);
+       
 }
 
 void frmContactEditorNotes::EnablePriority( wxCommandEvent& event )
@@ -233,6 +246,8 @@ void frmContactEditorNotes::SetEditorMode(bool EditMode, SectionType SectType)
                
                striter = NotesListLangPtr->find(NotesListIndex);
                
+               strValue.clear();
+               
                if (striter->first == NotesListIndex &&
                        striter != NotesListLangPtr->end()){
                
index bdded43..ad7267e 100644 (file)
@@ -25,8 +25,12 @@ Subclass of frmContactEditorNotesADT, which is generated by wxFormBuilder.
 */
 
 #include <map>
+#include <wx/tokenzr.h>
+
 #include "../AppXestiaAddrBk.h"
 #include "../enums.h"
+#include "../common/textprocessing.h"
+#include "../common/languages.h"
 
 //// end generated include
 
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy