summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/mainwindow.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-08-28 10:42:53 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-08-28 10:46:39 -0300
commitad85a375eb74609c8a1d7a7a3a0a11b7489a2483 (patch)
tree3f9685307c301c13717df8a9ee4da97f250d7484 /src/leap/bitmask/gui/mainwindow.py
parent1726f2818061bf2ae35ef4c9ffe8da44411ea80e (diff)
Remove /tmp/bitmask.lock on quit. Closes #5866.
Add a platform independent release_lock helper, so all the SO dependent code goes inside the locks file. Also, do some code cleanup.
Diffstat (limited to 'src/leap/bitmask/gui/mainwindow.py')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 6c168a19..653ebc35 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -48,6 +48,7 @@ from leap.bitmask.gui.wizard import Wizard
from leap.bitmask.gui.providers import Providers
from leap.bitmask.platform_init import IS_WIN, IS_MAC, IS_LINUX
+from leap.bitmask.platform_init import locks
from leap.bitmask.platform_init.initializers import init_platform
from leap.bitmask.platform_init.initializers import init_signals
@@ -63,10 +64,6 @@ from leap.bitmask.util import autostart, make_address
from leap.bitmask.util.keyring_helpers import has_keyring
from leap.bitmask.logs.leap_log_handler import LeapLogHandler
-if IS_WIN:
- from leap.bitmask.platform_init.locks import WindowsLock
- from leap.bitmask.platform_init.locks import raise_window_ack
-
from leap.common.events import register
from leap.common.events import events_pb2 as proto
@@ -1865,7 +1862,7 @@ class MainWindow(QtGui.QMainWindow):
Callback for the raise window event
"""
if IS_WIN:
- raise_window_ack()
+ locks.raise_window_ack()
self.raise_window.emit()
@QtCore.Slot()
@@ -2022,7 +2019,6 @@ class MainWindow(QtGui.QMainWindow):
# Remove lockfiles on a clean shutdown.
logger.debug('Cleaning pidfiles')
- if IS_WIN:
- WindowsLock.release_all_locks()
+ locks.release_lock()
self.close()