2008-05-29 04:49:03 +02:00
|
|
|
# mock notify module
|
|
|
|
|
2013-04-07 23:41:15 +02:00
|
|
|
from common import gajim
|
|
|
|
from common import ged
|
|
|
|
|
2008-05-29 04:49:03 +02:00
|
|
|
notifications = []
|
|
|
|
|
2013-04-07 23:41:15 +02:00
|
|
|
class Notification:
|
|
|
|
def _nec_notification(self, obj):
|
|
|
|
global notifications
|
|
|
|
notifications.append(obj)
|
|
|
|
|
|
|
|
def clean(self):
|
|
|
|
global notifications
|
|
|
|
notifications = []
|
|
|
|
gajim.ged.remove_event_handler('notification', ged.GUI2,
|
|
|
|
self._nec_notification)
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
gajim.ged.register_event_handler('notification', ged.GUI2,
|
|
|
|
self._nec_notification)
|
|
|
|
|
|
|
|
|
2008-05-29 04:49:03 +02:00
|
|
|
def notify(event, jid, account, parameters, advanced_notif_num = None):
|
2010-02-08 15:08:40 +01:00
|
|
|
notifications.append((event, jid, account, parameters, advanced_notif_num))
|
2008-05-29 04:49:03 +02:00
|
|
|
|
|
|
|
def get_advanced_notification(event, account, contact):
|
2010-02-08 15:08:40 +01:00
|
|
|
return None
|
2008-05-29 04:49:03 +02:00
|
|
|
|
|
|
|
def get_show_in_roster(event, account, contact, session = None):
|
2010-02-08 15:08:40 +01:00
|
|
|
return True
|
2008-05-29 04:49:03 +02:00
|
|
|
|
|
|
|
def get_show_in_systray(event, account, contact, type_ = None):
|
2010-02-08 15:08:40 +01:00
|
|
|
return True
|