X-Git-Url: http://Server1/repobrowser/?p=xestiacalendar%2F.git;a=blobdiff_plain;f=source%2Fforms%2Fcalendareditor%2FfrmCalendarEditor.cpp;h=c88572198c4a8b69427d524b1cd818676fe141cd;hp=f39a5d6ed96b1c9829be013cbafaf36b68be5f5b;hb=a191ad71a0d6823b9710067c7cccf8905290dc9c;hpb=703ade69af31d2e1eeb3a9d39f96a85fccfc0f76 diff --git a/source/forms/calendareditor/frmCalendarEditor.cpp b/source/forms/calendareditor/frmCalendarEditor.cpp index f39a5d6..c885721 100644 --- a/source/forms/calendareditor/frmCalendarEditor.cpp +++ b/source/forms/calendareditor/frmCalendarEditor.cpp @@ -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 + #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