Browse CVS Repository
Diff of /malonnote/mnNotePanelController.cpp
Parent Directory
| Revision Log
| Revision Graph
| Patch
| 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__ |
| 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 |
|
|
| |