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.10 by maloninc, Tue Jan 24 09:31:13 2006 UTC revision 1.11 by maloninc, Fri Jan 27 02:32:20 2006 UTC
# Line 343  void mnNotePanelController::openDoc(wxSt Line 343  void mnNotePanelController::openDoc(wxSt
343          wxString cmd;          wxString cmd;
344    
345  #ifdef __WXMSW__  #ifdef __WXMSW__
346          wxString tempFile = wxFileName::CreateTempFileName(wxT("malonnote-temp"));  #include <windows.h>
347          FILE* fp;          ShellExecute(NULL, wxT("OPEN"), doc.c_str(), NULL, NULL, SW_SHOWNORMAL);
348            return;
         tempFile = tempFile + wxT(".vbs");  
         fp = fopen((const char*)tempFile.mb_str(), "w");  
         if(fp == NULL) {  
                 wxLogMessage(wxT("Cant't create temp file"));  
                 return;  
         }  
         fprintf(fp, "Set obj = CreateObject(\"Shell.Application\")\n");  
         fprintf(fp, "obj.Open \"%s\"", (const char*)doc.mb_str());  
         fclose(fp);  
         cmd.sprintf(wxT("cscript \"%s\""), tempFile.c_str());  
349  #endif  #endif
350    
351  #ifdef __WXMAC__  #ifdef __WXMAC__
# Line 370  void mnNotePanelController::openDoc(wxSt Line 360  void mnNotePanelController::openDoc(wxSt
360          cmd.sprintf(wxT("gnome-open \'%s\'"), doc.c_str());          cmd.sprintf(wxT("gnome-open \'%s\'"), doc.c_str());
361  #endif  #endif
362    
363          wxExecute(cmd, wxEXEC_ASYNC);          wxExecute(cmd);
364  }  }
365    
366  void mnNotePanelController::openDir(wxString& dir)  void mnNotePanelController::openDir(wxString& dir)

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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