Python gi.repository.Notify.uninit() Examples

The following are 5 code examples of gi.repository.Notify.uninit(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module gi.repository.Notify , or try the search function .
Example #1
Source File: vpn_indicator.py    From vpngate-with-proxy with GNU General Public License v2.0 5 votes vote down vote up
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') 
Example #2
Source File: notification.py    From gtg with GNU General Public License v3.0 5 votes vote down vote up
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() 
Example #3
Source File: Notification.py    From battery-monitor with GNU General Public License v3.0 5 votes vote down vote up
def __del__(self):
        self.notifier.close()
        Notify.uninit() 
Example #4
Source File: plugin.py    From SafeEyes with GNU General Public License v3.0 5 votes vote down vote up
def on_exit():
    """
    Uninitialize the registered notificaion.
    """
    logging.debug('Stop Notification plugin')
    Notify.uninit() 
Example #5
Source File: __init__.py    From ncTelegram with GNU General Public License v3.0 5 votes vote down vote up
def exit(self):
        if self.conf['general']['notification']:
            Notify.uninit()
        sys.stdout.write("\x1b]2;\x07")
        self.stop_Telegram()
        raise urwid.ExitMainLoop