Beispiel #1
0
 def onCopyPassword(self):
     account = self.pwdFunc.getPwdByID(self.selectedPwdID)
     # decrypt password
     dePwd = util.decrypt(config.getMasterPwd(), account.pwd)
     clipboard = QtGui.QApplication.clipboard()
     clipboard.setText(dePwd)
     myGui.showInfoDialog(myGui.INFO_CLIPBOARD, account.title)
Beispiel #2
0
    def onChange(self):
        pwdService = PwdService()
        masterService = MasterService()

        val = self.ShowModal()
        if val == wx.ID_OK:
            if len(self.oldPwd.GetValue()) < 5 or len(
                    self.oldPwd.GetValue()) > 16:
                myGui.showErrorDialog(myGui.ERR_ROOTPWD_LEN)
                self.oldPwd.SetFocus()
                self.onChange()
            elif len(self.newPwd.GetValue()) < 5 or len(
                    self.newPwd.GetValue()) > 16:
                myGui.showErrorDialog(myGui.ERR_ROOTPWD_LEN)
                self.newPwd.SetFocus()
                self.onChange()
            elif self.newPwd.GetValue() != self.newPwd2.GetValue():
                myGui.showErrorDialog(myGui.ERR_NEWROOT_IDENTICAL)
                self.newPwd.SetValue('')
                self.newPwd2.SetValue('')
                self.newPwd.SetFocus()
                self.onChange()
            elif self.oldPwd.GetValue() != config.getRootPwd():
                myGui.showErrorDialog(myGui.ERR_OLDROOT_WRONG)
                self.oldPwd.SetFocus()
                self.onChange()

        # validation checking done
            else:
                masterService.changeRootPwd(self.newPwd.GetValue())
                myGui.showInfoDialog(myGui.INFO_ROOTPWD)
Beispiel #3
0
 def onChg(self):
     pwdFunc = PwdFunc()
     masterFunc = MasterFunc()
     
     self.oldPwd.setFocus()
     val = self.exec_()
     if val:
         if len(unicode(self.oldPwd.text())) < 5 or len(unicode(self.oldPwd.text())) > 16:
             myGui.showErrorDialog(myGui.ERR_MASTERPWD_LEN)
             self.oldPwd.setFocus()
             self.onChg()
         elif len(unicode(self.newPwd.text())) < 5 or len(unicode(self.newPwd.text())) > 16:
             myGui.showErrorDialog(myGui.ERR_MASTERPWD_LEN)
             self.newPwd.setFocus()
             self.onChg()
         elif unicode(self.newPwd.text()) != unicode(self.newPwd2.text()):
             myGui.showErrorDialog(myGui.ERR_NEWMASTER_IDENTICAL)
             self.newPwd.clear()
             self.newPwd2.clear()
             self.newPwd.setFocus()
             self.onChg()
         elif unicode(self.oldPwd.text()) != config.getMasterPwd():
             myGui.showErrorDialog(myGui.ERR_OLDMASTER_WRONG)
             self.oldPwd.setFocus()
             self.onChg()
         else:
             masterFunc.changeMasterPwd(unicode(self.newPwd.text()))
             myGui.showInfoDialog(myGui.INFO_MASTERPWD)
Beispiel #4
0
 def onChange(self):
     pwdService = PwdService()
     masterService = MasterService()
     
     val = self.ShowModal()
     if val == wx.ID_OK:
         if len(self.oldPwd.GetValue()) < 5 or len(self.oldPwd.GetValue()) > 16:
             myGui.showErrorDialog(myGui.ERR_ROOTPWD_LEN)
             self.oldPwd.SetFocus()
             self.onChange()
         elif len(self.newPwd.GetValue()) < 5 or len(self.newPwd.GetValue()) >16:
             myGui.showErrorDialog(myGui.ERR_ROOTPWD_LEN)
             self.newPwd.SetFocus()
             self.onChange()
         elif self.newPwd.GetValue() != self.newPwd2.GetValue():
             myGui.showErrorDialog(myGui.ERR_NEWROOT_IDENTICAL)
             self.newPwd.SetValue('')
             self.newPwd2.SetValue('')
             self.newPwd.SetFocus()
             self.onChange()
         elif self.oldPwd.GetValue() != config.getRootPwd():
             myGui.showErrorDialog(myGui.ERR_OLDROOT_WRONG)
             self.oldPwd.SetFocus()
             self.onChange()
         
     # validation checking done
         else:
             masterService.changeRootPwd(self.newPwd.GetValue())
             myGui.showInfoDialog(myGui.INFO_ROOTPWD)
Beispiel #5
0
 def copyToClipboard(self):
     clipboard = QtGui.QApplication.clipboard()
     if len(str(self.pwd.text()).strip()) > 0:
         txt = self.pwd.text()
         clipboard.setText(txt)
         myGui.showInfoDialog(myGui.INFO_PWD_CLIPBOARD)
     else:
         myGui.showInfoDialog(myGui.ERR_PWD_COPY)
Beispiel #6
0
 def copyToClipboard(self, event):
     if len(self.txtPwd.GetValue().strip()) > 0:
         text_data = wx.TextDataObject(self.txtPwd.GetValue())
         if wx.TheClipboard.Open():
             wx.TheClipboard.SetData(text_data)
             wx.TheClipboard.Close()
         myGui.showInfoDialog(myGui.INFO_PWD_CLIPBOARD)
     else:
         myGui.showErrorDialog(myGui.ERR_PWD_COPY)
Beispiel #7
0
 def onCopyPassword(self, event):
     account = self.pwdService.getPwdById(self.selectedPwdId)
     # decrypted password
     dePwd = util.decrypt(config.getRootPwd(), account.pwd)
     text_data = wx.TextDataObject(dePwd)
     if wx.TheClipboard.Open():
         wx.TheClipboard.SetData(text_data)
         wx.TheClipboard.Close()
     myGui.showInfoDialog(myGui.INFO_CLIPBOARD, account.title)
Beispiel #8
0
 def copyToClipboard(self,event):
     if len(self.txtPwd.GetValue().strip()) > 0:
         text_data = wx.TextDataObject(self.txtPwd.GetValue())
         if wx.TheClipboard.Open():
             wx.TheClipboard.SetData(text_data)
             wx.TheClipboard.Close()
         myGui.showInfoDialog(myGui.INFO_PWD_CLIPBOARD )
     else:
         myGui.showErrorDialog(myGui.ERR_PWD_COPY)
 def onCopyPassword(self,event):
     account = self.pwdService.getPwdById(self.selectedPwdId)
     # decrypted password
     dePwd = util.decrypt(config.getRootPwd(),account.pwd)
     text_data = wx.TextDataObject(dePwd)
     if wx.TheClipboard.Open():
         wx.TheClipboard.SetData(text_data)
         wx.TheClipboard.Close()
     myGui.showInfoDialog(myGui.INFO_CLIPBOARD , account.title)
Beispiel #10
0
    def run(self):

        lv = util.getLatestVersion(config.VERSION_URL)
        config.setLatestVersion(lv)
        if lv > config.VERSION:
            wx.CallAfter(self.mw.updateStatusBar, lv)
        else:
            if self.popup:
                myGui.showInfoDialog("Your password Manager is up to date.")
            wx.CallAfter(self.mw.empty)
Beispiel #11
0
    def onUpdate(self, event):
        lv = config.LATEST_VERSION
        if lv == None:  # the html not get fetched yet
            updatechk = UpdateChecker(self, True)
            updatechk.start()

        elif lv > config.VERSION:
            myGui.showUpdateDialog(lv)
        else:
            myGui.showInfoDialog("Your passwd Manager is up to date.")
Beispiel #12
0
 def run(self):
     
     lv = util.getLatestVersion(config.VERSION_URL)
     config.setLatestVersion(lv)     
     if lv>config.VERSION:
         wx.CallAfter(self.mw.updateStatusBar,lv)
     else :
         if self.popup:
             myGui.showInfoDialog("Your password Manager is up to date.")
         wx.CallAfter(self.mw.empty)
Beispiel #13
0
 def onUpdate(self, event):        
     lv = config.LATEST_VERSION
     if lv == None: # the html not get fetched yet
         updatechk = UpdateChecker(self,True)
         updatechk.start()
         
     elif lv>config.VERSION:
         myGui.showUpdateDialog(lv)
     else:
         myGui.showInfoDialog("Your passwd Manager is up to date.")
Beispiel #14
0
 def onRecover(self, event):
     account = self.pwdService.getPwdById(self.selectedPwdId)
     self.pwdService.recoverFromTrash(account.id)
     self.reLoadWindow()
     myGui.showInfoDialog(myGui.INFO_RECOVERED, account.title)
Beispiel #15
0
 def onRecover(self,event):
     account = self.pwdService.getPwdById(self.selectedPwdId)
     self.pwdService.recoverFromTrash(account.id)
     self.reLoadWindow()
     myGui.showInfoDialog(myGui.INFO_RECOVERED, account.title)
Beispiel #16
0
 def onRecover(self):
     account = self.pwdFunc.getPwdByID(self.selectedPwdID)
     self.pwdFunc.recoverFromTrash(account.id)
     self.reloadWindow()
     myGui.showInfoDialog(myGui.INFO_RECOVERED, account.title)