X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b37c7e1dcdad16c20d9800d2abaf53cc6b653a64..ad8b399079b5914e9a846cc1d1f002088ef0e51b:/wxPython/demo/wxMimeTypesManager.py diff --git a/wxPython/demo/wxMimeTypesManager.py b/wxPython/demo/wxMimeTypesManager.py index 9400a5c2d5..4a830181b6 100644 --- a/wxPython/demo/wxMimeTypesManager.py +++ b/wxPython/demo/wxMimeTypesManager.py @@ -1,5 +1,5 @@ -import pprint, string +import pprint, string, os from wxPython.wx import * from mimetypes_wdr import * @@ -19,7 +19,7 @@ class MimeTypesTestPanel(wxPanel): EVT_LISTBOX(self, ID_LISTBOX, self.OnListbox) EVT_BUTTON(self, ID_LOOKUP_BTN, self.OnLookup) - self.GetInputText().SetValue("html") + self.GetInputText().SetValue("wav") self.OnLookup() mimetypes = wxTheMimeTypesManager.EnumAllFileTypes() @@ -76,14 +76,16 @@ class MimeTypesTestPanel(wxPanel): self.GetDescriptionTxt().SetValue(str(ft.GetDescription())) ext = ft.GetExtensions()[0] + if ext[0] == ".": ext = ext[1:] + filename = "SPAM" + "." + ext mime = ft.GetMimeType() or "" - cmd = ft.GetOpenCommand("SPAM" + ext, mime) + cmd = ft.GetOpenCommand(filename, mime) self.GetOpenCmdTxt().SetValue(str(cmd)) - cmd = ft.GetPrintCommand("SPAM" + ext, mime) + cmd = ft.GetPrintCommand(filename, mime) self.GetPrintCmdTxt().SetValue(str(cmd)) - all = ft.GetAllCommands("SPAM" + ext, mime) + all = ft.GetAllCommands(filename, mime) if all is None: self.GetAllCmdsTxt().SetValue("") else: