Ejemplo n.º 1
0
 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)
Ejemplo n.º 3
0
            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
Ejemplo n.º 4
0

#    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