]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWxGUIScriptingInterface.cxx
BUG MACOS
[bbtk.git] / kernel / src / bbtkWxGUIScriptingInterface.cxx
index 49bc3460c4b27219bd8b51e26ae56fb3ecea7d24..f06b07eced988fe2dac3cc031f485b96e31f7fcb 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/01/27 14:22:57 $
-  Version:   $Revision: 1.33 $
+  Date:      $Date: 2009/03/30 15:22:51 $
+  Version:   $Revision: 1.36 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -93,7 +93,7 @@ namespace bbtk
     
     mInterpreter = bbtk::Interpreter::New();
     mInterpreter->SetUser(this);
-    mInterpreter->SetCommandLine(true);
+       mInterpreter->SetCommandLine(true);
     mInterpreter->SetThrow(true);
     //    mInterpreter->AddBreakObserver
     //boost::bind( &WxGUIScriptingInterface::InterpreterUserOnBreak, this ));
@@ -230,6 +230,7 @@ namespace bbtk
                  .Bottom()
                  .MinSize(wxSize(100,100))
                  );
+         
     m_mgr.AddPane(mWxGUICommand,
                  wxAuiPaneInfo().Name(wxT("command_content"))
                  .Caption(wxT("Command"))
@@ -518,14 +519,27 @@ namespace bbtk
   //================================================================
   void WxGUIScriptingInterface::OnMenuShowImageGraph(wxCommandEvent& WXUNUSED(event))
   {
-    std::string default_temp_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
 
+      std::string doc_path = bbtk::ConfigurationFile::GetInstance().Get_doc_path();
+      doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
+      doc_path += "bbdoc";
+      doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
+         
+         std::string pack_name("User");
+         std::string pack_path = doc_path + pack_name;
+         
+         
 #if defined(WIN32)
     std::string strappli="start ";
 #else
-    std::string strappli="gnome-open ";
+  #if defined(MACOSX)
+      std::string strappli="open ";
+  #else
+      std::string strappli="gnome-open ";        
+  #endif
 #endif
-    std::string strcommand = strappli +default_temp_dir+"/temp_dir/workspace_workspacePrototype.png";
+         
+         std::string strcommand = strappli +pack_path+"/workspace_workspacePrototype.png";
     // std::cout << "system: " << strcommand << std::endl;
     system ( strcommand.c_str() );
 
@@ -557,7 +571,8 @@ namespace bbtk
 #endif
        command += " " + pack + " -q";
     bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
-    
+
+printf("EED WxGUIScriptingInterface::DoRegeneratePackageDoc %s",  command.c_str());      
 
     if ( ! system ( command.c_str() ) )
       {