def browseDirectory(self, sender, dirPathFunc):
fd = gtk.FileChooserDialog(title='Choose directory to share...', action=gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OK,gtk.RESPONSE_OK))
fd.set_default_response(gtk.RESPONSE_OK)
path = dirPathFunc().strip()
if len(path):
fd.set_current_folder(path)
response = fd.run()
if response == gtk.RESPONSE_OK:
self.entryDir.set_text(fd.get_filename())
fd.destroy()
评论列表
文章目录