]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_extras.py
Commented out the bitmap-greying code until I have time to debug it
[wxWidgets.git] / wxPython / src / _extras.py
index f841b51f643927958e1ec3477c5dd6634d964b62..f1733cee51000b6ec80ea4384f620f4b33b88ea8 100644 (file)
@@ -98,6 +98,9 @@ def EVT_INIT_DIALOG(win, func):
 def EVT_SYS_COLOUR_CHANGED(win, func):
     win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func)
 
 def EVT_SYS_COLOUR_CHANGED(win, func):
     win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func)
 
+def EVT_DISPLAY_CHANGED(win, func):
+    win.Connect(-1, -1, wxEVT_DISPLAY_CHANGED, func)
+
 def EVT_SHOW(win, func):
     win.Connect(-1, -1, wxEVT_SHOW, func)
 
 def EVT_SHOW(win, func):
     win.Connect(-1, -1, wxEVT_SHOW, func)
 
@@ -570,33 +573,33 @@ class wxTimer(wxPyTimer):
             wxPyTimer.__init__(self, None)
             self.SetOwner(evtHandler, id)
 
             wxPyTimer.__init__(self, None)
             self.SetOwner(evtHandler, id)
 
-#----------------------------------------------------------------------
-
-NULL = None  # For backwards compatibility only.  You should really be
-             # using None now.
-
-
 #----------------------------------------------------------------------
 # aliases
 
 wxColor      = wxColour
 wxNamedColor = wxNamedColour
 wxPen        = wxPyPen
 #----------------------------------------------------------------------
 # aliases
 
 wxColor      = wxColour
 wxNamedColor = wxNamedColour
 wxPen        = wxPyPen
+wxScrollbar  = wxScrollBar
+
 
 # backwards compatibility
 wxNoRefBitmap       = wxBitmap
 wxPyDefaultPosition = wxDefaultPosition
 wxPyDefaultSize     = wxDefaultSize
 
 # backwards compatibility
 wxNoRefBitmap       = wxBitmap
 wxPyDefaultPosition = wxDefaultPosition
 wxPyDefaultSize     = wxDefaultSize
-
+NULL                = None
+wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour
+wxSystemSettings_GetSystemFont   = wxSystemSettings_GetFont
+wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
 
 #----------------------------------------------------------------------
 # wxGTK sets the locale when initialized.  Doing this at the Python
 # level should set it up to match what GTK is doing at the C level.
 
 #----------------------------------------------------------------------
 # wxGTK sets the locale when initialized.  Doing this at the Python
 # level should set it up to match what GTK is doing at the C level.
-try:
-    import locale
-    locale.setlocale(locale.LC_ALL, "")
-except:
-    pass
+if wxPlatform == "__WXGTK__":
+    try:
+        import locale
+        locale.setlocale(locale.LC_ALL, "")
+    except:
+        pass
 
 
 
 
 
 
@@ -778,7 +781,15 @@ class __wxPyCleanup:
     def __del__(self):
         self.cleanup()
 
     def __del__(self):
         self.cleanup()
 
-__cleanMeUp = __wxPyCleanup()
+sys.__wxPythonCleanup = __wxPyCleanup()
+
+## # another possible solution, but it gets called too early...
+## if sys.version[0] == '2':
+##     import atexit
+##     atexit.register(wxc.wxApp_CleanUp)
+## else:
+##     sys.exitfunc = wxc.wxApp_CleanUp
+
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------