Allow the developer to choose if SetUseBestVisual is called
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -765,10 +765,14 @@ class wxApp(wxPyApp):
|
|||||||
error = 'wxApp.error'
|
error = 'wxApp.error'
|
||||||
outputWindowClass = wxPyOnDemandOutputWindow
|
outputWindowClass = wxPyOnDemandOutputWindow
|
||||||
|
|
||||||
def __init__(self, redirect=_defRedirect, filename=None):
|
def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=true):
|
||||||
wxPyApp.__init__(self)
|
wxPyApp.__init__(self)
|
||||||
self.stdioWin = None
|
self.stdioWin = None
|
||||||
self.saveStdio = (sys.stdout, sys.stderr)
|
self.saveStdio = (sys.stdout, sys.stderr)
|
||||||
|
|
||||||
|
# This has to be done before OnInit
|
||||||
|
self.SetUseBestVisual(useBestVisual)
|
||||||
|
|
||||||
if redirect:
|
if redirect:
|
||||||
self.RedirectStdio(filename)
|
self.RedirectStdio(filename)
|
||||||
# this initializes wxWindows and then calls our OnInit
|
# this initializes wxWindows and then calls our OnInit
|
||||||
|
@@ -92,7 +92,6 @@ BOOL WINAPI DllMain(
|
|||||||
|
|
||||||
|
|
||||||
wxPyApp::wxPyApp() {
|
wxPyApp::wxPyApp() {
|
||||||
SetUseBestVisual(TRUE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPyApp::~wxPyApp() {
|
wxPyApp::~wxPyApp() {
|
||||||
|
Reference in New Issue
Block a user