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.8 by maloninc, Tue Jan 3 23:20:39 2006 UTC revision 1.11 by maloninc, Fri Jan 27 02:32:20 2006 UTC
# Line 311  void mnNotePanelController::handleOpenDo Line 311  void mnNotePanelController::handleOpenDo
311          wxExecute(cmd);          wxExecute(cmd);
312    
313          /* open docs directory */          /* open docs directory */
314          openDoc(docDir);          openDir(docDir);
315  }  }
316    
317  void mnNotePanelController::openUrl(wxString& url)  void mnNotePanelController::openUrl(wxString& url)
# Line 323  void mnNotePanelController::openUrl(wxSt Line 323  void mnNotePanelController::openUrl(wxSt
323  #endif  #endif
324    
325  #ifdef __WXMAC__  #ifdef __WXMAC__
326          cmd.sprintf(wxT("open %s"), url.c_str());          cmd.sprintf(wxT("open \'%s\'"), url.c_str());
327  #endif  #endif
328    
329  #ifdef __WXCOCOA__  #ifdef __WXCOCOA__
330          cmd.sprintf(wxT("open %s"), url.c_str());          cmd.sprintf(wxT("open \'%s\'"), url.c_str());
331  #endif  #endif
332    
333  #ifdef __WXGTK__  #ifdef __WXGTK__
334          cmd.sprintf(wxT("gnome-open %s"), url.c_str());          cmd.sprintf(wxT("gnome-open \'%s\'"), url.c_str());
335  #endif  #endif
336    
337          //wxExecute(argv);          //wxExecute(argv);
# Line 343  void mnNotePanelController::openDoc(wxSt Line 343  void mnNotePanelController::openDoc(wxSt
343          wxString cmd;          wxString cmd;
344    
345  #ifdef __WXMSW__  #ifdef __WXMSW__
346          cmd.sprintf(wxT("cmd /c \"start %s\""), doc.c_str());  #include <windows.h>
347            ShellExecute(NULL, wxT("OPEN"), doc.c_str(), NULL, NULL, SW_SHOWNORMAL);
348            return;
349  #endif  #endif
350    
351  #ifdef __WXMAC__  #ifdef __WXMAC__
352          cmd.sprintf(wxT("open %s"), doc.c_str());          cmd.sprintf(wxT("open \'%s\'"), doc.c_str());
353  #endif  #endif
354    
355  #ifdef __WXCOCOA__  #ifdef __WXCOCOA__
356          cmd.sprintf(wxT("open %s"), doc.c_str());          cmd.sprintf(wxT("open \'%s\'"), doc.c_str());
357  #endif  #endif
358    
359  #ifdef __WXGTK__  #ifdef __WXGTK__
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);          wxExecute(cmd);
364  }  }
365    
366    void mnNotePanelController::openDir(wxString& dir)
367    {
368            wxString cmd;
369    
370    #ifdef __WXMSW__
371            cmd.sprintf(wxT("explorer \"%s\""), dir.c_str());
372    #endif
373    
374    #ifdef __WXMAC__
375            cmd.sprintf(wxT("open \'%s\'"), dir.c_str());
376    #endif
377    
378    #ifdef __WXCOCOA__
379            cmd.sprintf(wxT("open \'%s\'"), dir.c_str());
380    #endif
381    
382    #ifdef __WXGTK__
383            cmd.sprintf(wxT("gnome-open \'%s\'"), dir.c_str());
384    #endif
385    
386            wxExecute(cmd);
387    }
388    
389    

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

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