def newFileNode(self, defaultDir): return FileExplorer.FileSysNode(os.path.basename(defaultDir), defaultDir, None, EditorHelper.imgFolder, None, None)
def createChildNode(self, shpth, pth): return FileExplorer.FileSysNode(shpth, pth, self.clipboard, EditorHelper.imgPathFolder, self, self.bookmarks)
self.refreshCurrent() self.selectItemNamed(newText) self.EnsureVisible(self.selected) # return FileDlgFolderList if __name__ == '__main__': # simple testing harness app = wx.PySimpleApp() import PaletteMapping from Explorers import FTPExplorer, ZipExplorer conf = Utils.createAndReadConfig('Explorer') transports = ExplorerNodes.ContainerNode('Transport', EditorHelper.imgFolder) ExplorerNodes.all_transports = transports transports.entries.append(FileExplorer.FileSysCatNode(None, conf, None, None)) if conf.has_option('explorer', 'ftp'): transports.entries.append(FTPExplorer.FTPCatNode(None, conf, None, None)) wxBoaFileDialog.modImages = wx.ImageList(16, 16) dlg = wxBoaFileDialog(None, defaultDir='.', wildcard='BoaFiles') try: if dlg.ShowModal() == wx.ID_OK: wx.MessageBox(dlg.GetPath()) finally: dlg.Destroy() #Preferences.cleanup() # redefine wxFileDialog wxFileDialog = wxBoaFileDialog
# return FileDlgFolderList if __name__ == '__main__': # simple testing harness app = wx.PySimpleApp() import PaletteMapping from Explorers import FTPExplorer, ZipExplorer conf = Utils.createAndReadConfig('Explorer') transports = ExplorerNodes.ContainerNode('Transport', EditorHelper.imgFolder) ExplorerNodes.all_transports = transports transports.entries.append( FileExplorer.FileSysCatNode(None, conf, None, None)) if conf.has_option('explorer', 'ftp'): transports.entries.append( FTPExplorer.FTPCatNode(None, conf, None, None)) wxBoaFileDialog.modImages = wx.ImageList(16, 16) dlg = wxBoaFileDialog(None, defaultDir='.', wildcard='BoaFiles') try: if dlg.ShowModal() == wx.ID_OK: wx.MessageBox(dlg.GetPath()) finally: dlg.Destroy() #Preferences.cleanup() # redefine wxFileDialog