Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/notify.py')
-rw-r--r--src/notify.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/notify.py b/src/notify.py
index 01fa1148d..0d5a4bfb8 100644
--- a/src/notify.py
+++ b/src/notify.py
@@ -400,12 +400,12 @@ class NotificationResponseManager:
self.interface.connect_to_signal('ActionInvoked', self.on_action_invoked)
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]
+ 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_]
if len(self.received) > 20:
curt = time.time()
for rec in self.received:
@@ -413,21 +413,21 @@ class NotificationResponseManager:
if diff > 10:
self.received.remove(rec)
- def on_closed(self, id, reason=None):
- if id in self.pending:
- del self.pending[id]
+ def on_closed(self, id_, reason=None):
+ if id_ in self.pending:
+ del self.pending[id_]
- def add_pending(self, id, object):
+ def add_pending(self, id_, object_):
# Check to make sure that we handle an event immediately if we're adding
# an id that's already been triggered
for rec in self.received:
- if rec[0] == id:
- object.on_action_invoked(id, rec[2])
+ if rec[0] == id_:
+ object_.on_action_invoked(id_, rec[2])
self.received.remove(rec)
return
- if id not in self.pending:
+ if id_ not in self.pending:
# Add it
- self.pending[id] = object
+ self.pending[id_] = object_
else:
# We've triggered an event that has a duplicate ID!
gajim.log.debug('Duplicate ID of notification. Can\'t handle this.')
@@ -553,8 +553,8 @@ class DesktopNotification:
reply_handler=self.attach_by_id,
error_handler=self.notify_another_way)
- def attach_by_id(self, id):
- self.id = id
+ def attach_by_id(self, id_):
+ self.id = id_
notification_response_manager.attach_to_interface()
notification_response_manager.add_pending(self.id, self)
@@ -562,10 +562,10 @@ class DesktopNotification:
gajim.log.debug(str(e))
gajim.log.debug('Need to implement a new way of falling back')
- def on_action_invoked(self, id, reason):
+ def on_action_invoked(self, id_, reason):
if self.notif is None:
return
- self.notif.CloseNotification(dbus.UInt32(id))
+ self.notif.CloseNotification(dbus.UInt32(id_))
self.notif = None
gajim.interface.handle_event(self.account, self.jid, self.msg_type)