A no GUI version of wxWidgets?
Vadim Zeitlin
vadim at wxwidgets.org
Sun Feb 10 12:23:31 PST 2008
On Sun, 10 Feb 2008 14:18:06 -0600 Tom Horsley <tomhorsley at comcast.net> wrote:
TH> On Sun, 10 Feb 2008 13:41:17 +0100, Vadim Zeitlin wrote:
TH>
TH> > If you want an application to run both in GUI mode and without GUI you
TH> > need to simply avoid initializing the GUI part at run-time.
TH>
TH> Good theory, but it doesn't seem to work in truecrypt. Any attempt
TH> to run the app with no DISPLAY set dies immediately with gtk
TH> complaining you don't have a DISPLAY.
Which means that the GUI initialization function has been called.
TH> There is code in truecrypt which certainly attempts to not initialize
TH> the GUI.
Then there is a bug in it. In particular, if it creates a (normal) wxApp
unconditionally, the GUI initialization will be done implicitly. To write
such "dual mode" application you need to provide your own main() and create
either wxApp or wxAppConsole dynamically depending on which one you need.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list