Helpviewer/Passwords/PasswordManager.py

changeset 96
9624a110667d
parent 45
9a18f4dbb493
child 110
c9a969db1469
equal deleted inserted replaced
95:261bc03812fd 96:9624a110667d
377 """use the password management dialog of the Settings menu.""" 377 """use the password management dialog of the Settings menu."""
378 )) 378 ))
379 neverButton = mb.addButton( 379 neverButton = mb.addButton(
380 self.trUtf8("Never for this site"), QMessageBox.DestructiveRole) 380 self.trUtf8("Never for this site"), QMessageBox.DestructiveRole)
381 noButton = mb.addButton(self.trUtf8("Not now"), QMessageBox.RejectRole) 381 noButton = mb.addButton(self.trUtf8("Not now"), QMessageBox.RejectRole)
382 yesButton = mb.addButton(QMessageBox.Yes) 382 mb.addButton(QMessageBox.Yes)
383 mb.exec_() 383 mb.exec_()
384 if mb.clickedButton() == neverButton: 384 if mb.clickedButton() == neverButton:
385 self.__never.append(url.toString()) 385 self.__never.append(url.toString())
386 return 386 return
387 elif mb.clickedButton() == noButton: 387 elif mb.clickedButton() == noButton:
390 # extract user name and password 390 # extract user name and password
391 user = "" 391 user = ""
392 password = "" 392 password = ""
393 for index in range(len(form.elements)): 393 for index in range(len(form.elements)):
394 element = form.elements[index] 394 element = form.elements[index]
395 name = element[0].lower()
396 type_ = form.elementTypes[element[0]] 395 type_ = form.elementTypes[element[0]]
397 if user == "" and \ 396 if user == "" and \
398 type_ == "text": 397 type_ == "text":
399 user = element[1] 398 user = element[1]
400 elif password == "" and \ 399 elif password == "" and \

eric ide

mercurial