示例#1
0
    def slotNewAccount(self):
        types = self.connector.proxy.getAccountTypes()
        self.accountEdit = AccountEdit.newAccount(types)

        #TODO make more easy n1, n2, n3
        def save(data):
            if data["password"]:
                self.accountEdit.close()
                n1 = data["acctype"]
                n2 = data["login"]
                n3 = data["password"]
                self.connector.updateAccount(n1, n2, n3, None)

        self.accountEdit.connect(self.accountEdit, SIGNAL("done"), save)
        self.accountEdit.show()
示例#2
0
 def slotNewAccount(self):
     types = self.connector.proxy.getAccountTypes()
     self.accountEdit = AccountEdit.newAccount(types)
     
     #TODO make more easy n1, n2, n3 
     def save(data):
         if data["password"]:
             self.accountEdit.close()
             n1 = data["acctype"]
             n2 = data["login"]
             n3 = data["password"]
             self.connector.updateAccount(n1, n2, n3, None)
         
     self.accountEdit.connect(self.accountEdit, SIGNAL("done"), save)
     self.accountEdit.show()
示例#3
0
    def slotEditAccount(self):
        types = self.connector.getAccountTypes()

        data = self.tabs["accounts"]["view"].selectedIndexes()
        if len(data) < 1:
            return

        data = data[0].internalPointer()

        self.accountEdit = AccountEdit.editAccount(types, data)

        #TODO make more easy n1, n2, n3
        #TODO reload accounts tab after insert of edit account
        #TODO if account does not exist give error
        def save(data):
            self.accountEdit.close()
            n1 = data["acctype"]
            n2 = data["login"]
            if data["password"]:
                n3 = data["password"]
            self.connector.updateAccount(n1, n2, n3, None)

        self.accountEdit.connect(self.accountEdit, SIGNAL("done"), save)
        self.accountEdit.show()
示例#4
0
    def slotEditAccount(self):
        types = self.connector.getAccountTypes()
        
        data = self.tabs["accounts"]["view"].selectedIndexes()
        if len(data) < 1:
            return
            
        data = data[0].internalPointer()
        
        self.accountEdit = AccountEdit.editAccount(types, data)

        #TODO make more easy n1, n2, n3
        #TODO reload accounts tab after insert of edit account
        #TODO if account does not exist give error
        def save(data):
            self.accountEdit.close()
            n1 = data["acctype"]
            n2 = data["login"]
            if data["password"]:
                n3 = data["password"]
            self.connector.updateAccount(n1, n2, n3, None)
            
        self.accountEdit.connect(self.accountEdit, SIGNAL("done"), save)
        self.accountEdit.show()