added check
This commit is contained in:
parent
704344fae2
commit
1d33d298c3
@ -199,6 +199,7 @@ class Toxygen:
|
||||
class Menu(QtGui.QMenu):
|
||||
|
||||
def newStatus(self, status):
|
||||
if not Settings.get_instance().locked:
|
||||
profile.Profile.get_instance().set_status(status)
|
||||
self.aboutToShow()
|
||||
self.hide()
|
||||
@ -256,6 +257,7 @@ class Toxygen:
|
||||
show_window()
|
||||
|
||||
def close_app():
|
||||
if not Settings.get_instance().locked:
|
||||
settings.closing = True
|
||||
self.ms.close()
|
||||
|
||||
|
@ -6,10 +6,12 @@ from toxencryptsave_enums_and_consts import *
|
||||
class ToxEncryptSave:
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.libtoxencryptsave = libtox.LibToxEncryptSave()
|
||||
|
||||
def is_data_encrypted(self, data):
|
||||
"""
|
||||
Checks if given data is encrypted
|
||||
"""
|
||||
func = self.libtoxencryptsave.tox_is_data_encrypted
|
||||
func.restype = c_bool
|
||||
result = func(c_char_p(bytes(data)))
|
||||
|
Loading…
Reference in New Issue
Block a user