Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
utf8: Implemented further UTF8 support
[xestiacalendar/.git] / source / forms / calendareditor / frmCalendarEditor.cpp
index f39a5d6..c885721 100644 (file)
@@ -1,3 +1,21 @@
+// frmCalendarEditor.cpp - frmCalendarEditor form functions.
+//
+// (c) 2016-2017 Xestia Software Development.
+//
+// This file is part of Xestia Calendar.
+//
+// Xestia Calendar is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Calendar is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with Xestia Calendar. If not, see <http://www.gnu.org/licenses/>
+
 #include "frmCalendarEditor.h"
 
 using namespace std;
@@ -100,9 +118,9 @@ void frmCalendarEditor::ProcessCalendar( wxCommandEvent &event ){
        }
 
        calendarInfo->editMode = editMode;
-       calendarInfo->accountName = cmbAccount->GetStringSelection();
-       calendarInfo->calendarName = txtName->GetValue().ToStdString();
-       calendarInfo->calendarDescription = txtDescription->GetValue().ToStdString();
+       calendarInfo->accountName = std::string(cmbAccount->GetStringSelection().ToUTF8());
+       calendarInfo->calendarName = std::string(txtName->GetValue().ToUTF8());
+       calendarInfo->calendarDescription = std::string(txtDescription->GetValue().ToUTF8());
        
        calendarInfo->calendarColour = (clpColour->GetColour().GetAsString(wxC2S_HTML_SYNTAX).ToStdString() + "FF");
        
@@ -117,10 +135,10 @@ void frmCalendarEditor::ProcessCalendar( wxCommandEvent &event ){
 
 void frmCalendarEditor::SetData(int calendarID, std::string accountName, std::string calendarName, std::string calendarDescription, Colour calendarColour){
        
-       txtName->SetValue(wxString(calendarName.c_str()));
-       txtDescription->SetValue(wxString(calendarDescription.c_str()));        
+       txtName->SetValue(wxString(calendarName.c_str(), wxConvUTF8));
+       txtDescription->SetValue(wxString(calendarDescription.c_str(), wxConvUTF8));
        clpColour->SetColour(wxColour(calendarColour.red, calendarColour.green, calendarColour.blue));
-       cmbAccount->SetStringSelection(wxString(accountName));
+       cmbAccount->SetStringSelection(wxString(accountName.c_str(), wxConvUTF8));
        this->calendarID = calendarID;
        
 }
\ No newline at end of file
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