unlock screen crash fixed
This commit is contained in:
parent
ba390eda91
commit
f897c7ce8d
2 changed files with 10 additions and 4 deletions
|
@ -238,17 +238,22 @@ class Toxygen:
|
|||
exit = m.addAction(QtGui.QApplication.translate('tray', 'Exit', None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
||||
def show_window():
|
||||
s = Settings.get_instance()
|
||||
|
||||
def show():
|
||||
if not self.ms.isActiveWindow():
|
||||
self.ms.setWindowState(self.ms.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)
|
||||
self.ms.activateWindow()
|
||||
self.ms.show()
|
||||
if not Settings.get_instance().locked:
|
||||
if not s.locked:
|
||||
show()
|
||||
else:
|
||||
def correct_pass():
|
||||
show()
|
||||
Settings.get_instance().locked = False
|
||||
s.locked = False
|
||||
s.unlockScreen = False
|
||||
if not s.unlockScreen:
|
||||
s.unlockScreen = True
|
||||
self.p = UnlockAppScreen(toxes.ToxES.get_instance(), correct_pass)
|
||||
self.p.show()
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ class Settings(dict, Singleton):
|
|||
smileys.SmileyLoader(self)
|
||||
self.locked = False
|
||||
self.closing = False
|
||||
self.unlockScreen = False
|
||||
p = pyaudio.PyAudio()
|
||||
input_devices = output_devices = 0
|
||||
for i in range(p.get_device_count()):
|
||||
|
|
Loading…
Reference in a new issue