From b7fad32d14b976e03faac746a5598bc8393c78cf Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 19 Jun 2007 15:46:53 +0000 Subject: [PATCH] svn path=/trunk/boinc/; revision=12960 --- checkin_notes | 8 ++++++++ clientgui/ViewWork.cpp | 19 ++++++------------- lib/util.C | 4 ++-- lib/util.h | 4 ++-- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/checkin_notes b/checkin_notes index 865dd4a457..4f9d14d532 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6363,3 +6363,11 @@ Rom 19 June 2007 / configure.ac version.h + +David 19 June 2007 + - manager: v6 graphics fixes. doesn't work yet + + clientgui/ + ViewWork.cpp + lib/ + util.C,h diff --git a/clientgui/ViewWork.cpp b/clientgui/ViewWork.cpp index b565a82bb0..9398e4dafb 100644 --- a/clientgui/ViewWork.cpp +++ b/clientgui/ViewWork.cpp @@ -300,29 +300,22 @@ void CViewWork::OnWorkShowGraphicsNew( wxCommandEvent& WXUNUSED(event) ) { if (wxYES == iAnswer) { RESULT* result = pDoc->result(m_pListPane->GetFirstSelected()); if (!result->graphics_exec_path.empty()) { - wxString strCurrentDirectory = wxGetCwd(); - wxString strSlotDirectory = result->slot_path.c_str(); - char buf[512]; + char* argv[2]; + argv[0] = "graphics"; + argv[1] = 0; #ifdef __WXMSW__ HANDLE id; #else int id; #endif - - wxSetWorkingDirectory(strSlotDirectory); - - boinc_resolve_filename("v6graphics", buf, sizeof(buf)); - run_program( (char*)result->slot_path.c_str(), - buf, + result->graphics_exec_path.c_str(), + 1, + argv, 0, - NULL, - 5, id ); - - wxSetWorkingDirectory(strCurrentDirectory); } } diff --git a/lib/util.C b/lib/util.C index f82d79e1c9..d52703170a 100755 --- a/lib/util.C +++ b/lib/util.C @@ -411,7 +411,7 @@ int lookup_group(char* name, gid_t& gid) { // #ifdef _WIN32 int run_program( - char* dir, char* file, int argc, char** argv, double nsecs, HANDLE& id + const char* dir, const char* file, int argc, char** argv, double nsecs, HANDLE& id ) { int retval; PROCESS_INFORMATION process_info; @@ -455,7 +455,7 @@ int run_program( } #else int run_program( - char* dir, char* file, int argc, char** argv, double nsecs, int& id + const char* dir, const char* file, int argc, char** argv, double nsecs, int& id ) { int retval; int pid = fork(); diff --git a/lib/util.h b/lib/util.h index 3a4e4658f7..170d0a925a 100755 --- a/lib/util.h +++ b/lib/util.h @@ -88,13 +88,13 @@ extern pthread_mutex_t getrusage_mutex; #ifdef _WIN32 extern int run_program( - char* path, char* cdir, int argc, char** argv, double, HANDLE& + const char* path, const char* cdir, int argc, char** argv, double, HANDLE& ); extern void kill_program(HANDLE); extern int get_exit_status(HANDLE); #else extern int run_program( - char* path, char* cdir, int argc, char** argv, double, int& + const char* path, const char* cdir, int argc, char** argv, double, int& ); extern void kill_program(int); extern int get_exit_status(int);