+// 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;
}
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");
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