comparison frontends/src/primitivus/notify.py @ 638:6821fc06a324

misc: a few "cosmetic" changes (PEP 8...)
author souliane <souliane@mailoo.org>
date Thu, 05 Sep 2013 20:57:00 +0200
parents 84a6e83157c2
children 1fe00f0c9a91
comparison
equal deleted inserted replaced
637:3b02554d4c8b 638:6821fc06a324
41 db_object = bus.get_object('org.freedesktop.Notifications', '/org/freedesktop/Notifications') 41 db_object = bus.get_object('org.freedesktop.Notifications', '/org/freedesktop/Notifications')
42 self.freedesktop_int = dbus.Interface(db_object, dbus_interface='org.freedesktop.Notifications') 42 self.freedesktop_int = dbus.Interface(db_object, dbus_interface='org.freedesktop.Notifications')
43 except: 43 except:
44 self.freedesktop_int = None 44 self.freedesktop_int = None
45 45
46
47 def getFocus(self): 46 def getFocus(self):
48 if not self.display: 47 if not self.display:
49 return 0 48 return 0
50 return self.display.get_input_focus().focus.id 49 return self.display.get_input_focus().focus.id
51 50
71 body = body_mess 70 body = body_mess
72 actions = dbus.Array(signature='s') 71 actions = dbus.Array(signature='s')
73 hints = dbus.Dictionary(signature='sv') 72 hints = dbus.Dictionary(signature='sv')
74 expire_timeout = -1 73 expire_timeout = -1
75 74
76 self.freedesktop_int.Notify(app_name, replaces_id, app_icon, summary, body, actions, hints, expire_timeout) 75 self.freedesktop_int.Notify(app_name, replaces_id, app_icon,
76 summary, body, actions,
77 hints, expire_timeout)