]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/exec/exec.cpp
Added samples.inc to DATAFILES in Makefile.in - is that enough?
[wxWidgets.git] / samples / exec / exec.cpp
index 0bc3b509aee8a95e9a3bbd68d9b8c8e980892669..06e51aa59df95d75d3079b3e71e3c7e42680c370 100644 (file)
@@ -310,7 +310,10 @@ void MyFrame::OnSyncExec(wxCommandEvent& WXUNUSED(event))
     if ( !cmd )
         return;
 
+    wxLogStatus(_T("'%s' is running please wait..."), cmd.c_str());
+
     int code = wxExecute(cmd, TRUE /* sync */);
+
     wxLogStatus(_T("Process '%s' terminated with exit code %d."),
                 cmd.c_str(), code);
     m_cmdLast = cmd;
@@ -326,7 +329,8 @@ void MyFrame::OnAsyncExec(wxCommandEvent& WXUNUSED(event))
         return;
 
     wxProcess *process = new MyProcess(this, cmd);
-    if ( !wxExecute(cmd, FALSE /* async */, process) )
+    long pid = wxExecute(cmd, FALSE /* async */, process);
+    if ( !pid )
     {
         wxLogError(_T("Execution of '%s' failed."), cmd.c_str());
 
@@ -334,6 +338,8 @@ void MyFrame::OnAsyncExec(wxCommandEvent& WXUNUSED(event))
     }
     else
     {
+        wxLogStatus(_T("Process %ld (%s) launched."), pid, cmd.c_str());
+
         m_cmdLast = cmd;
     }
 }