comparison frontends/src/quick_frontend/quick_app.py @ 2135:4e67d6ffea66

quick app: check type in notify
author Goffi <goffi@goffi.org>
date Sun, 05 Feb 2017 14:55:21 +0100
parents aa94f33fd2ad
children be96beb7ca14
comparison
equal deleted inserted replaced
2134:f45250052846 2135:4e67d6ffea66
634 @param subject(unicode, None): subject of the notification 634 @param subject(unicode, None): subject of the notification
635 @param callback(callable, None): method to call when notification is selected 635 @param callback(callable, None): method to call when notification is selected
636 @param cb_args(list, None): list of args for callback 636 @param cb_args(list, None): list of args for callback
637 @param widget(object, None): widget where the notification happened 637 @param widget(object, None): widget where the notification happened
638 """ 638 """
639 assert type_ in C.NOTIFY_ALL
639 notif_dict = self.profiles[profile].notifications 640 notif_dict = self.profiles[profile].notifications
640 key = '' if entity is None else entity.bare 641 key = '' if entity is None else entity.bare
641 type_notifs = notif_dict.setdefault(key, {}).setdefault(type_, []) 642 type_notifs = notif_dict.setdefault(key, {}).setdefault(type_, [])
642 notif_data = { 643 notif_data = {
643 'id': self._notif_id, 644 'id': self._notif_id,