Added typemap for wxArrayString

Added wxMimeTypesManager and wxFileType

Other updates...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-10-30 06:58:52 +00:00
parent 5c0282d504
commit ee707cb73a

View File

@@ -1,5 +1,5 @@
import pprint, string import pprint, string, os
from wxPython.wx import * from wxPython.wx import *
from mimetypes_wdr import * from mimetypes_wdr import *
@@ -19,7 +19,7 @@ class MimeTypesTestPanel(wxPanel):
EVT_LISTBOX(self, ID_LISTBOX, self.OnListbox) EVT_LISTBOX(self, ID_LISTBOX, self.OnListbox)
EVT_BUTTON(self, ID_LOOKUP_BTN, self.OnLookup) EVT_BUTTON(self, ID_LOOKUP_BTN, self.OnLookup)
self.GetInputText().SetValue("html") self.GetInputText().SetValue("wav")
self.OnLookup() self.OnLookup()
mimetypes = wxTheMimeTypesManager.EnumAllFileTypes() mimetypes = wxTheMimeTypesManager.EnumAllFileTypes()
@@ -75,15 +75,15 @@ class MimeTypesTestPanel(wxPanel):
self.GetExtensionsTxt().SetValue(str(ft.GetExtensions())) self.GetExtensionsTxt().SetValue(str(ft.GetExtensions()))
self.GetDescriptionTxt().SetValue(str(ft.GetDescription())) self.GetDescriptionTxt().SetValue(str(ft.GetDescription()))
ext = ft.GetExtensions()[0] filename = os.path.join("SPAM", ft.GetExtensions()[0])
mime = ft.GetMimeType() or "" mime = ft.GetMimeType() or ""
cmd = ft.GetOpenCommand("SPAM" + ext, mime) cmd = ft.GetOpenCommand(filename, mime)
self.GetOpenCmdTxt().SetValue(str(cmd)) self.GetOpenCmdTxt().SetValue(str(cmd))
cmd = ft.GetPrintCommand("SPAM" + ext, mime) cmd = ft.GetPrintCommand(filename, mime)
self.GetPrintCmdTxt().SetValue(str(cmd)) self.GetPrintCmdTxt().SetValue(str(cmd))
all = ft.GetAllCommands("SPAM" + ext, mime) all = ft.GetAllCommands(filename, mime)
if all is None: if all is None:
self.GetAllCmdsTxt().SetValue("") self.GetAllCmdsTxt().SetValue("")
else: else: