2019-01-19 23:20:51 -06:00
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
import wx
import widgetUtils
def two_factor_auth ( ) :
2019-05-05 01:01:31 -05:00
code = None
2019-01-19 23:20:51 -06:00
dlg = wx . TextEntryDialog ( None , _ ( " Please provide the authentication code you have received from VK. " ) , _ ( " Two factor authentication code " ) )
response = dlg . ShowModal ( )
if response == widgetUtils . OK :
code = dlg . GetValue ( )
dlg . Destroy ( )
2019-05-05 01:01:31 -05:00
return ( code , True )
2019-02-12 17:49:33 -06:00
def bad_password ( ) :
return wx . MessageDialog ( None , _ ( " Your password or email address are incorrect. Please fix the mistakes and try it again. " ) , _ ( " Wrong data " ) , wx . ICON_ERROR ) . ShowModal ( )