From 03c876d54db1d0e92c9ffeec760ff716b77c58e1 Mon Sep 17 00:00:00 2001 From: davila <> Date: Wed, 26 May 2010 07:16:22 +0000 Subject: [PATCH] *** empty log message *** --- .../bbtkwxGUIEditorGraphicBBS.cxx | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index f6ff8bc..376db52 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -397,7 +397,9 @@ namespace bbtk wxString fileName = saveFileDialog->GetPath(); ofstream file; - file.open(fileName.c_str()); + +//EED file.open(fileName.c_str()); + file.open( (const char*) (fileName.mb_str()) ); std::string content=""; @@ -422,7 +424,8 @@ namespace bbtk if (nameDialog->ShowModal() == wxID_OK) { wxString fileName = nameDialog->GetValue(); - cbName=fileName; +//EED cbName=fileName; + cbName=(const char*) (fileName.mb_str()); } if(!cbName.empty()) @@ -433,7 +436,8 @@ namespace bbtk wxString fileName = saveFileDialog->GetPath(); ofstream file; - file.open(fileName.c_str()); +//EED file.open(fileName.c_str()); + file.open( (const char*) (fileName.mb_str()) ); std::string content=""; @@ -454,13 +458,14 @@ namespace bbtk void wxGUIEditorGraphicBBS::OnSaveActualDiagram(wxCommandEvent& event) { - wxFileDialog * saveFileDialog = new wxFileDialog(this,wxT("Save actual diagram"),wxEmptyString,"NewDiagram","*.bbd",wxSAVE|wxOVERWRITE_PROMPT); + wxFileDialog * saveFileDialog = new wxFileDialog(this,wxT("Save actual diagram"),wxEmptyString,wxT("NewDiagram"),wxT("*.bbd"),wxSAVE|wxOVERWRITE_PROMPT); if (saveFileDialog->ShowModal() == wxID_OK) { wxString fileName = saveFileDialog->GetPath(); ofstream file; - file.open(fileName.c_str()); +//EED file.open(fileName.c_str()); + file.open( (const char*) (fileName.mb_str()) ); std::string content=""; @@ -468,7 +473,10 @@ namespace bbtk content += "# ----------------------------------\n"; content += "# - BBTKGEditor v 1.0 BBD BlackBox Diagram file\n"; content += "# - "; - content += fileName; + +//EED content += fileName; + content += (const char*) (fileName.mb_str()); + content += "\n"; content += "# ----------------------------------\n"; content += "\n"; @@ -530,13 +538,17 @@ namespace bbtk void wxGUIEditorGraphicBBS::OnOpenDiagram(wxCommandEvent& event) { - wxFileDialog * openFileDialog = new wxFileDialog(this,wxT("Open diagram"),wxEmptyString,"","*.bbd",wxOPEN|wxFILE_MUST_EXIST); + wxFileDialog * openFileDialog = new wxFileDialog(this,wxT("Open diagram"),wxEmptyString,wxT(""),wxT("*.bbd"),wxOPEN|wxFILE_MUST_EXIST); if (openFileDialog->ShowModal() == wxID_OK) { wxString fileName = openFileDialog->GetPath(); ifstream inputStream; - inputStream.open(fileName.c_str()); + +//EED inputStream.open(fileName.c_str()); + inputStream.open( (const char*) (fileName.mb_str()) ); + + _tabsMgr->addNewTab(); _tabsMgr->loadDiagram(inputStream); -- 2.45.1