Quit Safe Eyes during the break Fix #269
This commit is contained in:
parent
b927113c76
commit
e3697f4c0e
|
@ -22,6 +22,7 @@ SafeEyes connects all the individual components and provide the complete applica
|
|||
|
||||
import atexit
|
||||
import logging
|
||||
import os
|
||||
from threading import Timer
|
||||
|
||||
import dbus
|
||||
|
@ -141,6 +142,8 @@ class SafeEyes(object):
|
|||
self.plugins_manager.exit()
|
||||
self.rpc_server.stop()
|
||||
Gtk.main_quit()
|
||||
# Exit all threads
|
||||
os._exit(0)
|
||||
|
||||
def handle_suspend_callback(self, sleeping):
|
||||
"""
|
||||
|
|
|
@ -81,7 +81,7 @@ def start_thread(target_function, **args):
|
|||
"""
|
||||
Execute the function in a separate thread.
|
||||
"""
|
||||
thread = threading.Thread(target=target_function, name="WorkThread", kwargs=args)
|
||||
thread = threading.Thread(target=target_function, name="WorkThread", daemon=False, kwargs=args)
|
||||
thread.start()
|
||||
|
||||
|
||||
|
|
|
@ -216,13 +216,13 @@ class TrayIcon(object):
|
|||
Handle Quit menu action.
|
||||
This action terminates the application.
|
||||
"""
|
||||
self.quit()
|
||||
with self.lock:
|
||||
self.active = True
|
||||
# Notify all schedulers
|
||||
self.idle_condition.acquire()
|
||||
self.idle_condition.notify_all()
|
||||
self.idle_condition.release()
|
||||
self.quit()
|
||||
|
||||
def show_settings(self, *args):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue