mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-29 23:20:03 +03:00
Copy and close on double-click.
This commit is contained in:
parent
04cdcce4b7
commit
301908457e
2
vendor/yubicommon
vendored
2
vendor/yubicommon
vendored
@ -1 +1 @@
|
||||
Subproject commit 0691075aa90e2eb3093b2e4028bfbfdb720d87e0
|
||||
Subproject commit 700bdd86e71fdbbb00d68ef57fb246095d9189e1
|
@ -27,6 +27,7 @@
|
||||
from PySide import QtGui, QtCore
|
||||
from .. import messages as m
|
||||
from ..controller import CredentialType
|
||||
from yubioath.yubicommon.qt.utils import connect_once
|
||||
from time import time
|
||||
|
||||
|
||||
@ -158,7 +159,14 @@ class Code(QtGui.QWidget):
|
||||
|
||||
def mouseDoubleClickEvent(self, event):
|
||||
if event.button() is QtCore.Qt.LeftButton:
|
||||
print "TODO: calc, copy and close?", self.cred.code.code
|
||||
if not self.cred.code.code and self.cred.cred_type in \
|
||||
[CredentialType.HOTP, CredentialType.TOUCH]:
|
||||
connect_once(self.cred.changed, self._copy)
|
||||
self.cred.calculate()
|
||||
self.window().close()
|
||||
else:
|
||||
self._copy() # TODO: Type code out with keyboard?
|
||||
self.window().close()
|
||||
event.accept()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user