Exemplo n.º 1
0
class Login(ZDialog):
    def __init__(self, master=None):
        ZDialog.__init__(self, master, "Login to Del.icio.us")
    
    def body(self, master):
        master.grid_rowconfigure(0, weight=0, minsize=10, pad=0)
        master.grid_rowconfigure(2, weight=0, minsize=10, pad=0)
        master.grid_rowconfigure(4, weight=0, minsize=10, pad=0)
        self.username = ZEntry(master, label="Username : "******"Password : "******"Error","Username not specified")
            return 0;
        elif not self.password.value():
            tkMessageBox.showwarning("Error","Password not specified")
            return 0;
        else:
            return 1;
    
    def apply(self):
        config.username = self.username.value()
        config.password = self.password.value()
        log.debug(" login...username : %s, password : %s", config.username, config.password)
Exemplo n.º 2
0
 def body(self, master):
     master.grid_rowconfigure(0, weight=0, minsize=10, pad=0)
     master.grid_rowconfigure(2, weight=0, minsize=10, pad=0)
     master.grid_rowconfigure(4, weight=0, minsize=10, pad=0)
     self.username = ZEntry(master, label="Username : "******"Password : ", value=config.password)
     self.password.grid(row=3, column=1)
     return self.username