Develop and Download Open Source Software

Browse CVS Repository

Diff of /malonnote/mnNotePanelController.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.9 by maloninc, Fri Jan 20 12:49:54 2006 UTC revision 1.12 by maloninc, Fri Oct 20 11:58:52 2006 UTC
# Line 25  END_EVENT_TABLE() Line 25  END_EVENT_TABLE()
25  mnNotePanelController::mnNotePanelController(mnNotePanel* inPanel, wxString* inWikiDir)  mnNotePanelController::mnNotePanelController(mnNotePanel* inPanel, wxString* inWikiDir)
26  {  {
27          wiki = new mnModel(inWikiDir->mb_str());          wiki = new mnModel(inWikiDir->mb_str());
28            wiki->readAll(inWikiDir, true);
29    
30          panel = inPanel;          panel = inPanel;
31  }  }
32    
# Line 343  void mnNotePanelController::openDoc(wxSt Line 345  void mnNotePanelController::openDoc(wxSt
345          wxString cmd;          wxString cmd;
346    
347  #ifdef __WXMSW__  #ifdef __WXMSW__
348          wxString tempFile = wxFileName::CreateTempFileName(wxT("malonnote-temp"));  #include <windows.h>
349          FILE* fp;          ShellExecute(NULL, wxT("OPEN"), doc.c_str(), NULL, NULL, SW_SHOWNORMAL);
350            return;
 wxLogMessage(wxT("temp:[%s]"), tempFile.c_str());  
 return;  
         fp = fopen(tempFile.mb_str(), "w");  
         fprintf(fp, "Set obj = CreateObject(\"Shell.Application\")\n");  
         fprintf(fp, "obj.Open \"%s\"", doc.mb_str());  
         fclose(fp);  
         ///cmd.sprintf(wxT("cscript \"%s\""), tempFile.c_str());  
351  #endif  #endif
352    
353  #ifdef __WXMAC__  #ifdef __WXMAC__
# Line 367  return; Line 362  return;
362          cmd.sprintf(wxT("gnome-open \'%s\'"), doc.c_str());          cmd.sprintf(wxT("gnome-open \'%s\'"), doc.c_str());
363  #endif  #endif
364    
365          wxExecute(cmd, wxEXEC_ASYNC);          wxExecute(cmd);
366  }  }
367    
368  void mnNotePanelController::openDir(wxString& dir)  void mnNotePanelController::openDir(wxString& dir)

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.12

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26