class ResaultGui(object): def __init__(self, master, model, ntfsvol): """ :param model: MftModel object """ self.ntfsvol = ntfsvol self.filled = Tk.IntVar() # Gui Tk.Label(master, text='Delete file/folder browse', width=80).pack() self.tree = TreeView(master, model, height=400) self.tree.pack(expand=Tk.YES, fill=Tk.BOTH, pady=5) fill_btn = Tk.Checkbutton(master, text='Fill data with zero', variable=self.filled, state=Tk.DISABLED) fill_btn.pack(side=Tk.LEFT, anchor=Tk.SW) Tk.Button(master, text='Shred', command=self.shared).pack(side=Tk.RIGHT, anchor=Tk.SE, padx=15, pady=5) def shared(self): """Shared file""" for sel in self.tree.get_selects(): mftno = int(self.tree.hlist.info_data(sel)) if mftno: if self.tree.model.mfts_dict[mftno].isExists == False: self.ntfsvol.shred(mftno, self.filled.get()) self.tree.hlist.delete_entry(sel) else: self.tree.hlist.delete_entry(sel) # like DIRXXXX print 'delete entry', sel