PyBitmessage-2021-04-27/src/plugins/notification_notify2.py
2019-09-27 16:04:29 +05:30

23 lines
565 B
Python

# -*- coding: utf-8 -*-
"""
src/plugins/notification_notify2.py
===================================
"""
import gi
gi.require_version('Notify', '0.7')
from gi.repository import Notify
Notify.init('pybitmessage')
def connect_plugin(title, subtitle, category, label, icon):
"""Plugin for notify2"""
if not icon:
icon = 'mail-message-new' if category == 2 else 'pybitmessage'
connect_plugin.notification.update(title, subtitle, icon)
connect_plugin.notification.show()
connect_plugin.notification = Notify.Notification.new("Init", "Init")