def prepare(self): GUI.prepare(self) self.top = tk.Toplevel(self.master) self.password_old = tk.StringVar() self.password_new = tk.StringVar() self.password_new2 = tk.StringVar() label = tk.Label(self.top, text=self.config["gui"]["enter_password_old"]) label.grid(row=1, column=1) entry = tk.Entry(self.top, show='*', textvariable=self.password_old) entry.grid(row=1, column=2) entry.focus() label = tk.Label(self.top, text=self.config["gui"]["enter_password_new"]) label.grid(row=2, column=1) entry = tk.Entry(self.top, show='*', textvariable=self.password_new) entry.grid(row=2, column=2) label = tk.Label(self.top, text=self.config["gui"]["enter_password_new2"]) label.grid(row=3, column=1) entry = tk.Entry(self.top, show='*', textvariable=self.password_new2) entry.grid(row=3, column=2) submit = tk.Button(self.top, text=self.config["gui"]["ok"], command=self.execute) submit.grid(row=4, column=2) self.top.transient(self.master) self.top.grab_set() # self.top.pack( ) self.creator.set(None) return self
def prepare( self ) : GUI.prepare( self ) self.messenger = BalloonTip( self.master , self.config , self , visible = False ) self.messenger.prepare( ) self.control = [ ] if self.visible : control = FileList( self , config = self.config , creator = self ) control2 = AccountList( self , config = self.config , creator = self ) control.prepare( ) control2.prepare( ) self.control.append( control ) self.control.append( control2 ) self.update( ) return self
def prepare( self ) : GUI.prepare( self ) self.password = tk.StringVar( ) label = tk.Label( self , text = self.config[ "gui" ][ "enter_password" ] ) entry = tk.Entry( self , show = '*' , textvariable = self.password ) entry.bind( "<Return>" , self.execute ) entry.bind( "<Escape>" , self.finish ) submit = tk.Button( self , text = self.config[ "gui" ][ "ok" ] , command = self.execute ) label.pack( side = tk.LEFT ) entry.pack( side = tk.LEFT ) submit.pack( side = tk.LEFT ) entry.focus( ) self.transient( self.master ) self.grab_set( ) self.creator.set( None ) return self
def prepare( self ) : GUI.prepare( self ) self.top = tk.Toplevel( self.master ) self.password_old = tk.StringVar( ) self.password_new = tk.StringVar( ) self.password_new2 = tk.StringVar( ) label = tk.Label( self.top , text = self.config[ "gui" ][ "enter_password_old" ] ) label.grid( row = 1 , column = 1 ) entry = tk.Entry( self.top , show = '*' , textvariable = self.password_old ) entry.grid( row = 1 , column = 2 ) entry.focus( ) label = tk.Label( self.top , text = self.config[ "gui" ][ "enter_password_new" ] ) label.grid( row = 2 , column = 1 ) entry = tk.Entry( self.top , show = '*' , textvariable = self.password_new ) entry.grid( row = 2 , column = 2 ) label = tk.Label( self.top , text = self.config[ "gui" ][ "enter_password_new2" ] ) label.grid( row = 3 , column = 1 ) entry = tk.Entry( self.top , show = '*' , textvariable = self.password_new2 ) entry.grid( row = 3 , column = 2 ) submit = tk.Button( self.top , text = self.config[ "gui" ][ "ok" ] , command = self.execute ) submit.grid( row = 4 , column = 2 ) self.top.transient( self.master ) self.top.grab_set( ) # self.top.pack( ) self.creator.set( None ) return self
def prepare(self): GUI.prepare(self) self.messenger = BalloonTip(self.master, self.config, self, visible=False) self.messenger.prepare() self.control = [] if self.visible: control = FileList(self, config=self.config, creator=self) control2 = AccountList(self, config=self.config, creator=self) control.prepare() control2.prepare() self.control.append(control) self.control.append(control2) self.update() return self
def prepare(self): GUI.prepare(self) self.password = tk.StringVar() label = tk.Label(self, text=self.config["gui"]["enter_password"]) entry = tk.Entry(self, show='*', textvariable=self.password) entry.bind("<Return>", self.execute) entry.bind("<Escape>", self.finish) submit = tk.Button(self, text=self.config["gui"]["ok"], command=self.execute) label.pack(side=tk.LEFT) entry.pack(side=tk.LEFT) submit.pack(side=tk.LEFT) entry.focus() self.transient(self.master) self.grab_set() self.creator.set(None) return self
def prepare(self): GUI.prepare(self) self.controller = self.creator.creator.controller self.inputValue = tk.StringVar() self.outputValue = tk.StringVar() fileBox = ttk.Frame(self.master, relief=tk.SUNKEN) fileEntry = ttk.Entry(fileBox, textvariable=self.inputValue) # chpassButton = ttk.Button( fileBox , text = self.config[ "gui" ][ "change_password" ] , command = self.changePassword ) purgeButton = ttk.Button(fileBox, text=self.config["gui"]["del"], command=self.purge) storeButton = ttk.Button(fileBox, text=self.config["gui"]["upload"], command=self.store) fileButton = ttk.Button(fileBox, text=self.config["gui"]["select"], command=self.onChooseFile) # chpassButton.pack( side = ttk.RIGHT ) purgeButton.pack(side=tk.RIGHT) storeButton.pack(side=tk.RIGHT) fileButton.pack(side=tk.RIGHT) fileEntry.pack(side=tk.LEFT, fill=tk.X, expand=tk.YES) fileBox.pack(side=tk.TOP, fill=tk.X) progressBox = ttk.Frame(self.master) self.fileProgressStatus = ttk.Label(progressBox, width=20) self.fileProgressLabel = ttk.Label(progressBox, width=10) self.fileProgressTotal = ttk.Label(progressBox, width=20) self.connectionProgressStatus = ttk.Label(progressBox, width=20) self.connectionProgressLabel = ttk.Label(progressBox, width=10) self.connectionProgressTotal = ttk.Label(progressBox, width=20) self.fileProgress = ttk.Progressbar(progressBox) self.connectionProgress = ttk.Progressbar(progressBox) self.fileProgressStatus.pack(side=tk.LEFT) self.fileProgressLabel.pack(side=tk.LEFT) self.fileProgress.pack(side=tk.LEFT, fill=tk.X, expand=tk.YES) self.fileProgressTotal.pack(side=tk.LEFT) self.connectionProgressStatus.pack(side=tk.LEFT) self.connectionProgressLabel.pack(side=tk.LEFT) self.connectionProgress.pack(side=tk.LEFT, fill=tk.X, expand=tk.YES) self.connectionProgressTotal.pack(side=tk.LEFT) fileBoxStatus = ttk.Frame(self.master) filePath = ttk.Entry(fileBoxStatus, textvariable=self.outputValue) fileUpload = ttk.Button(fileBoxStatus, text=self.config["gui"]["download"], command=self.fetch) filePath.pack(side=tk.LEFT, fill=tk.BOTH, expand=tk.YES) fileUpload.pack(side=tk.RIGHT) heading_keys = list(self.config["gui"]["filelist"]["heading"].keys()) heading_keys.sort() fileBox = ttk.Frame(self.master) self.fileList = ttk.Treeview( fileBox, columns=heading_keys, selectmode=tk.BROWSE, displaycolumns="#all", show="headings", ) self.fileListScrollbar = ttk.Scrollbar(fileBox) for key in heading_keys: item = self.config["gui"]["filelist"]["heading"][key] if "width" in item: self.fileList.column(key, width=item["width"]) self.fileList.heading(key, text=item["label"]) self.fileList.config(yscrollcommand=self.fileListScrollbar.set) self.fileListScrollbar.config(command=self.fileList.yview) self.fileList.pack(side=tk.LEFT, fill=tk.BOTH, expand=tk.YES) self.fileListScrollbar.pack(side=tk.RIGHT, fill=tk.Y) fileBox.pack(side=tk.TOP, fill=tk.BOTH, expand=tk.YES) fileBoxStatus.pack(side=tk.TOP, fill=tk.X) progressBox.pack(side=tk.TOP, fill=tk.X) self.event = dict( onAfter=self.onAfter, onBefore=self.onBefore, onError=self.onError, onProgress=self.onProgress, onConnection=self.onConnection, ) self.update() return self
def prepare( self ) : GUI.prepare( self ) self.controller = self.creator.creator.controller self.inputValue = tk.StringVar( ) self.outputValue = tk.StringVar( ) fileBox = ttk.Frame( self.master , relief = tk.SUNKEN ) fileEntry = ttk.Entry( fileBox , textvariable = self.inputValue ) # chpassButton = ttk.Button( fileBox , text = self.config[ "gui" ][ "change_password" ] , command = self.changePassword ) purgeButton = ttk.Button( fileBox , text = self.config[ "gui" ][ "del" ] , command = self.purge ) storeButton = ttk.Button( fileBox , text = self.config[ "gui" ][ "upload" ] , command = self.store ) fileButton = ttk.Button( fileBox , text = self.config[ "gui" ][ "select" ] , command = self.onChooseFile ) # chpassButton.pack( side = ttk.RIGHT ) purgeButton.pack( side = tk.RIGHT ) storeButton.pack( side = tk.RIGHT ) fileButton.pack( side = tk.RIGHT ) fileEntry.pack( side = tk.LEFT , fill = tk.X , expand = tk.YES ) fileBox.pack( side = tk.TOP , fill = tk.X ) progressBox = ttk.Frame( self.master ) self.fileProgressStatus = ttk.Label( progressBox , width = 20 ) self.fileProgressLabel = ttk.Label( progressBox , width = 10 ) self.fileProgressTotal = ttk.Label( progressBox , width = 20 ) self.connectionProgressStatus = ttk.Label( progressBox , width = 20 ) self.connectionProgressLabel = ttk.Label( progressBox , width = 10 ) self.connectionProgressTotal = ttk.Label( progressBox , width = 20 ) self.fileProgress = ttk.Progressbar( progressBox ) self.connectionProgress = ttk.Progressbar( progressBox ) self.fileProgressStatus.pack( side = tk.LEFT ) self.fileProgressLabel.pack( side = tk.LEFT ) self.fileProgress.pack( side = tk.LEFT , fill = tk.X , expand = tk.YES ) self.fileProgressTotal.pack( side = tk.LEFT ) self.connectionProgressStatus.pack( side = tk.LEFT ) self.connectionProgressLabel.pack( side = tk.LEFT ) self.connectionProgress.pack( side = tk.LEFT , fill = tk.X , expand = tk.YES ) self.connectionProgressTotal.pack( side = tk.LEFT ) fileBoxStatus = ttk.Frame( self.master ) filePath = ttk.Entry( fileBoxStatus , textvariable = self.outputValue ) fileUpload = ttk.Button( fileBoxStatus , text = self.config[ "gui" ][ "download" ] , command = self.fetch ) filePath.pack( side = tk.LEFT , fill = tk.BOTH , expand = tk.YES ) fileUpload.pack( side = tk.RIGHT ) heading_keys = list( self.config[ "gui" ][ "filelist" ][ "heading" ].keys( ) ) heading_keys.sort( ) fileBox = ttk.Frame( self.master ) self.fileList = ttk.Treeview( fileBox , columns = heading_keys , selectmode = tk.BROWSE , displaycolumns = "#all" , show = "headings" , ) self.fileListScrollbar = ttk.Scrollbar( fileBox ) for key in heading_keys : item = self.config[ "gui" ][ "filelist" ][ "heading" ][ key ] if "width" in item : self.fileList.column( key , width = item[ "width" ] ) self.fileList.heading( key , text = item[ "label" ] ) self.fileList.config( yscrollcommand = self.fileListScrollbar.set ) self.fileListScrollbar.config( command = self.fileList.yview ) self.fileList.pack( side = tk.LEFT , fill = tk.BOTH , expand = tk.YES ) self.fileListScrollbar.pack( side = tk.RIGHT , fill = tk.Y ) fileBox.pack( side = tk.TOP , fill = tk.BOTH , expand = tk.YES ) fileBoxStatus.pack( side = tk.TOP , fill = tk.X ) progressBox.pack( side = tk.TOP , fill = tk.X ) self.event = dict( onAfter = self.onAfter , onBefore = self.onBefore , onError = self.onError , onProgress = self.onProgress , onConnection= self.onConnection , ) self.update( ) return self