Title: [commits] (jeffrey) [15965] [APP] Use get_image instead of get_raw_image, make
Revision
15965
Author
jeffrey
Date
2007-11-29 10:39:31 -0800 (Thu, 29 Nov 2007)

Log Message

[APP] Use get_image instead of get_raw_image, make
calendar Demo accessible via ocap-debug.

Modified Paths

Diff

Modified: branches/rearchitecture/Chandler-Platform/ocap/wxui/button.py (15964 => 15965)

--- branches/rearchitecture/Chandler-Platform/ocap/wxui/button.py	2007-11-29 17:33:40 UTC (rev 15964)
+++ branches/rearchitecture/Chandler-Platform/ocap/wxui/button.py	2007-11-29 18:39:31 UTC (rev 15965)
@@ -1,6 +1,6 @@
 import wx
 from wx.lib import buttons
-from image import get_raw_image
+from image import get_image
 
 # temporary hack because Mac/Linux force BitmapButtons to
 # have some specific borders
@@ -30,9 +30,9 @@
         @type name: unicode
         """
 
-        bitmap = wx.BitmapFromImage(get_raw_image(name + ".png"))
+        bitmap = get_image(name + ".png")
         super(BitmapButton, self).__init__(parent, -1, bitmap, style=wx.NO_BORDER)
-        pressedBitmap = wx.BitmapFromImage(get_raw_image(name + "MouseDown.png"))
+        pressedBitmap = get_image(name + "MouseDown.png")
         self.SetBitmapSelected(pressedBitmap)
         self.SetBackgroundColour("white")
         self.UpdateSize()

Modified: branches/rearchitecture/Chandler-Platform/ocap/wxui/calendar.py (15964 => 15965)

--- branches/rearchitecture/Chandler-Platform/ocap/wxui/calendar.py	2007-11-29 17:33:40 UTC (rev 15964)
+++ branches/rearchitecture/Chandler-Platform/ocap/wxui/calendar.py	2007-11-29 18:39:31 UTC (rev 15965)
@@ -785,8 +785,9 @@
         self.ResizeHeader()
         event.Skip()
 
-def Demo():
-    wxApp = wx.PySimpleApp()
+def Demo(app=None):
+    if app is None:
+        wxApp = wx.PySimpleApp()
     frame = wx.Frame(None, title="Calendar Mockup", size=wx.Size(600, 450))
     frame.CenterOnParent()
     
@@ -839,7 +840,8 @@
                        duration=timedelta(5))
 
     frame.Show()
-    wxApp.MainLoop()
+    if app is None:
+        wxApp.MainLoop()
 
 if __name__ == '__main__':
     Demo()




_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits

Reply via email to