本文整理汇总了Python中gi.repository.Notify.uninit方法的典型用法代码示例。如果您正苦于以下问题:Python Notify.uninit方法的具体用法?Python Notify.uninit怎么用?Python Notify.uninit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gi.repository.Notify
的用法示例。
在下文中一共展示了Notify.uninit方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: quit
# 需要导入模块: from gi.repository import Notify [as 别名]
# 或者: from gi.repository.Notify import uninit [as 别名]
def quit(self, source=None):
# send dead signal to tcp server
print('quit now 4')
self.send('dead')
print('quit now 3')
notify.uninit()
print('quit now 2')
Gtk.main_quit()
print('quit now 1')
示例2: _notify_via_notify
# 需要导入模块: from gi.repository import Notify [as 别名]
# 或者: from gi.repository.Notify import uninit [as 别名]
def _notify_via_notify(title, message):
Notify.init(APP_NAME)
nt = Notify.Notification.new(title, message)
nt.set_timeout(TIMEOUT)
try:
nt.show()
except:
# Keep quiet here when notification service is not avialable currently
# sometime. For example, if user is using LXDE, no notifyd by default.
pass
Notify.uninit()
示例3: __del__
# 需要导入模块: from gi.repository import Notify [as 别名]
# 或者: from gi.repository.Notify import uninit [as 别名]
def __del__(self):
self.notifier.close()
Notify.uninit()
示例4: on_exit
# 需要导入模块: from gi.repository import Notify [as 别名]
# 或者: from gi.repository.Notify import uninit [as 别名]
def on_exit():
"""
Uninitialize the registered notificaion.
"""
logging.debug('Stop Notification plugin')
Notify.uninit()
示例5: exit
# 需要导入模块: from gi.repository import Notify [as 别名]
# 或者: from gi.repository.Notify import uninit [as 别名]
def exit(self):
if self.conf['general']['notification']:
Notify.uninit()
sys.stdout.write("\x1b]2;\x07")
self.stop_Telegram()
raise urwid.ExitMainLoop