]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxMimeTypesManager.py
Bitmap updates
[wxWidgets.git] / wxPython / demo / wxMimeTypesManager.py
index 9a9c8d8ece7cf2ed5144b15130138ac974437dde..5768ba2592de3cb32bf1a437407aea955ce68760 100644 (file)
@@ -2,6 +2,7 @@
 import pprint, string, os
 from wxPython.wx import *
 from mimetypes_wdr import *
+from Main import opj
 
 #----------------------------------------------------------------------------
 
@@ -75,7 +76,13 @@ class MimeTypesTestPanel(wxPanel):
         self.GetExtensionsTxt().SetValue(str(ft.GetExtensions()))
         self.GetDescriptionTxt().SetValue(str(ft.GetDescription()))
 
-        filename = os.path.join("SPAM", ft.GetExtensions()[0])
+        extList = ft.GetExtensions()
+        if extList:
+            ext = extList[0]
+            if ext[0] == ".": ext = ext[1:]
+        else:
+            ext = ""
+        filename = "SPAM" + "." + ext
         mime = ft.GetMimeType() or ""
         cmd = ft.GetOpenCommand(filename, mime)
         self.GetOpenCmdTxt().SetValue(str(cmd))
@@ -158,9 +165,10 @@ overview = """\
 
 
 import mimetypes_wdr
+import images
 
 def MyBitmapsFunc( index ):
-    return wxImage( "bitmaps/noicon.png", wxBITMAP_TYPE_PNG ).ConvertToBitmap()
+    return images.getNoIconBitmap()
 
 mimetypes_wdr.MyBitmapsFunc = MyBitmapsFunc