]>
Commit | Line | Data |
---|---|---|
eacb6b56 VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: src/unix/apptraits.cpp | |
3 | // Purpose: implementation of wxGUIAppTraits for Unix systems | |
4 | // Author: Vadim Zeitlin | |
5 | // Created: 2008-03-22 | |
6 | // RCS-ID: $Id$ | |
7 | // Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwindows.org> | |
8 | // Licence: wxWindows licence | |
9 | /////////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | // ============================================================================ | |
12 | // declarations | |
13 | // ============================================================================ | |
14 | ||
15 | // ---------------------------------------------------------------------------- | |
16 | // headers | |
17 | // ---------------------------------------------------------------------------- | |
18 | ||
19 | // for compilers that support precompilation, includes "wx.h". | |
20 | #include "wx/wxprec.h" | |
21 | ||
22 | #ifdef __BORLANDC__ | |
23 | #pragma hdrstop | |
24 | #endif | |
25 | ||
bddd0767 PC |
26 | #include "wx/apptrait.h" |
27 | ||
eacb6b56 | 28 | #ifndef WX_PRECOMP |
bddd0767 | 29 | #include "wx/utils.h" |
eacb6b56 VZ |
30 | #endif // WX_PRECOMP |
31 | ||
eacb6b56 | 32 | #include "wx/unix/execute.h" |
821d856a | 33 | #include "wx/evtloop.h" |
eacb6b56 VZ |
34 | |
35 | // ============================================================================ | |
36 | // implementation | |
37 | // ============================================================================ | |
38 | ||
39 | int wxGUIAppTraits::WaitForChild(wxExecuteData& execData) | |
40 | { | |
eacb6b56 VZ |
41 | // prepare to wait for the child termination: show to the user that we're |
42 | // busy and refuse all input unless explicitly told otherwise | |
43 | wxBusyCursor bc; | |
821d856a | 44 | wxWindowDisabler wd(!(execData.flags & wxEXEC_NODISABLE)); |
eacb6b56 | 45 | |
821d856a VZ |
46 | // Allocate an event loop that will be used to wait for the process |
47 | // to terminate, will handle stdout, stderr, and any other events and pass | |
48 | // it to the common (to console and GUI) code which will run it. | |
49 | wxGUIEventLoop loop; | |
50 | return RunLoopUntilChildExit(execData, loop); | |
eacb6b56 VZ |
51 | } |
52 |