]> Creatis software - bbtkGEditor.git/commitdiff
*** empty log message ***
authordavila <>
Wed, 26 May 2010 07:16:22 +0000 (07:16 +0000)
committerdavila <>
Wed, 26 May 2010 07:16:22 +0000 (07:16 +0000)
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx

index f6ff8bc7d5bbff30a2e20bba47e0acca86ab98b2..376db524ed548aef9142b2164c4d26e68206d7b3 100644 (file)
@@ -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);