def __init__(self, master=None): super().__init__(master) self.elements = [ {"name": "key", "label": "Clave de cifrado", "component": tk.Entry(self)}, {"name": "iv", "label": "Valor inicial", "component": tk.Entry(self)}, {"name": "input-file", "label": "Archivo de entrada", "component": FilePicker(self)}, {"name": "output-file", "label": "Archivo de salida", "component": FilePicker(self, save=True)}, {"name": "output-bits", "label": "Bits de salida", "component": tk.Entry(self)}, ] self._create_interface()
def addAudio(self, button): #self.activity.showFileLoadBlocker(True) fp = FilePicker() dOb = fp.show() if (dOb != None): if (dOb.file_path != None): self.emit('add-media', dOb)
def __run_file_chooser(self, browser, request): picker = FilePicker(self) chosen = picker.run() picker.destroy() if chosen: request.select_files([chosen]) elif hasattr(request, 'cancel'): # WebKit2 only request.cancel() return True
def addOpenedAudio(self, button): fp = FilePicker() dOb = fp.show() if (dOb != None): if (dOb.file_path != None): self.emit('add-opened', dOb)