本文整理匯總了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