changeset a9235c029fd5 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=a9235c029fd5 description: don't keep in mem notifications when we handle them Fixes #6891
diffstat:
src/notify.py | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 2a983ea40af2 -r a9235c029fd5 src/notify.py --- a/src/notify.py Sun Sep 18 16:11:27 2011 +0200 +++ b/src/notify.py Tue Sep 20 16:53:29 2011 +0200 @@ -192,11 +192,14 @@ self.interface.connect_to_signal('NotificationClosed', self.on_closed)
def on_action_invoked(self, id_, reason): - self.received.append((id_, time.time(), reason)) if id_ in self.pending: notification = self.pending[id_] notification.on_action_invoked(id_, reason) del self.pending[id_] + return + # got an action on popup that isn't handled yet? Maybe user clicked too + # fast. Remember it. + self.received.append((id_, time.time(), reason)) if len(self.received) > 20: curt = time.time() for rec in self.received: @@ -410,9 +413,8 @@ self.notify_another_way(e)
def attach_by_id(self, id_): - self.id = id_ notification_response_manager.attach_to_interface() - notification_response_manager.add_pending(self.id, self) + notification_response_manager.add_pending(id_, self)
def notify_another_way(self, e): gajim.log.debug('Error when trying to use notification daemon: %s' % \