def check_instance(self):
'''
Check whether another instance of the setup tool is running already
'''
if (dbus.SessionBus().request_name("org.ibus.typingbooster")
!= dbus.bus.REQUEST_NAME_REPLY_PRIMARY_OWNER):
self.__run_message_dialog(
_("Another instance of this app is already running."),
Gtk.MessageType.ERROR)
sys.exit(1)
else:
return False
评论列表
文章目录