]> 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 0e8da6d20e07f1ba6358c4c538d2a7f6b80a253a..f1733cee51000b6ec80ea4384f620f4b33b88ea8 100644 (file)
@@ -6,7 +6,6 @@
 # Author:       Robin Dunn
 #
 # Created:      6/30/97
-# RCS-ID:       $Id$
 # Copyright:    (c) 1998 by Total Control Software
 # Licence:      wxWindows license
 #----------------------------------------------------------------------------
@@ -75,6 +74,9 @@ def EVT_SET_FOCUS(win, func):
 def EVT_KILL_FOCUS(win, func):
     win.Connect(-1, -1, wxEVT_KILL_FOCUS, func)
 
+def EVT_CHILD_FOCUS(win, func):
+    win.Connect(-1, -1, wxEVT_CHILD_FOCUS, func)
+
 def EVT_ACTIVATE(win, func):
     win.Connect(-1, -1, wxEVT_ACTIVATE, func)
 
@@ -96,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_DISPLAY_CHANGED(win, func):
+    win.Connect(-1, -1, wxEVT_DISPLAY_CHANGED, func)
+
 def EVT_SHOW(win, func):
     win.Connect(-1, -1, wxEVT_SHOW, func)
 
@@ -568,33 +573,33 @@ class wxTimer(wxPyTimer):
             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
+wxScrollbar  = wxScrollBar
+
 
 # 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.
-try:
-    import locale
-    locale.setlocale(locale.LC_ALL, "")
-except:
-    pass
+if wxPlatform == "__WXGTK__":
+    try:
+        import locale
+        locale.setlocale(locale.LC_ALL, "")
+    except:
+        pass
 
 
 
@@ -776,7 +781,15 @@ class __wxPyCleanup:
     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
+
 
 #----------------------------------------------------------------------------
 #----------------------------------------------------------------------------