def __init__(self): super().__init__() self.wait_visibility() # self.attributes('-fullscreen', True) self.state('zoomed') self.title('Dublicate finder') self.menubar = tkinter.Menu(self) # self.menubar.add_command(label = 'Index', command = self._clickedFrame(self._index)) self.menubar.add_command(label='Select', command=self._clickedFrame(self._index)) self.menubar.add_command(label='SauceNAO', command=self._clickedFrame(self._sauceNao)) self.menubar.add_command(label='Trash', command=self._clickedFrame(self._trash)) self.menubar.add_command(label='Settings', command=self._showSettings) # self.menubar.add_command(label = 'Quit', command = self.destroy) self.config(menu=self.menubar) sframe = Scrollable.Frame(self) sframe.pack(expand=True, fill=tkinter.BOTH) self._settingFrame = Setting.Frame(sframe, confirmcommand=self._checkSettings, cancelcommand=self._hideSettings) self._frame = tkinter.Frame(sframe) self._settingsShown = False self._onFrameDelete = None if Setting.Data.autostart: self._start() else: self._showSettings() self.mainloop()
if not self._after and key in Trash.Data._dict and key not in SauceNao.Data: self._autoselect(self._deleteButton, Setting.Data.autoselect) frame.pack(fill=tkinter.BOTH) else: if self._duplicates: self._duplicates = None self._items = { key: [] for key, value in SauceNao.Data if len(value) > 1 } if self.command: self.command() if __name__ == '__main__': import widgets.Scrollable as Scrollable root = tkinter.Tk() root.state('zoomed') root.wait_visibility() frame = Scrollable.Frame(root) frame.pack(expand=True, fill=tkinter.BOTH) Frame(frame, command=lambda: root.after_idle(root.destroy)).pack( expand=True, fill=tkinter.BOTH) root.mainloop()