aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-05-10 23:02:07 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-05-10 23:02:07 +0000
commit9f8ba87f60249139f18f10ab4ba84b187a97da33 (patch)
treeee1344808a05665f5a107e51209ac83ef6ed6d93 /lib/python
parentba76535204cfe4300ceb090fbaa3a06c26fb8599 (diff)
downloadenigma2-9f8ba87f60249139f18f10ab4ba84b187a97da33.tar.gz
enigma2-9f8ba87f60249139f18f10ab4ba84b187a97da33.zip
add kwargs support for notifications
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/InfoBarGenerics.py4
-rw-r--r--lib/python/Tools/Notifications.py9
2 files changed, 6 insertions, 7 deletions
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index d1520071..2bae4296 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -1365,9 +1365,9 @@ class InfoBarNotifications:
print "open",n
cb = n[0]
if cb is not None:
- self.session.openWithCallback(cb, *n[1:])
+ self.session.openWithCallback(cb, n[1], *n[2], **n[3])
else:
- self.session.open(*n[1:])
+ self.session.open(n[1], *n[2], **n[3])
class InfoBarServiceNotifications:
def __init__(self):
diff --git a/lib/python/Tools/Notifications.py b/lib/python/Tools/Notifications.py
index b547639b..3cb107cc 100644
--- a/lib/python/Tools/Notifications.py
+++ b/lib/python/Tools/Notifications.py
@@ -3,11 +3,10 @@ notifications = [ ]
notificationAdded = [ ]
-def AddNotification(screen, *args):
- AddNotificationWithCallback(None, screen, *args)
+def AddNotification(screen, *args, **kwargs):
+ AddNotificationWithCallback(None, screen, *args, **kwargs)
-def AddNotificationWithCallback(fnc, screen, *args):
- notifications.append((fnc, screen) + args)
+def AddNotificationWithCallback(fnc, screen, *args, **kwargs):
+ notifications.append((fnc, screen, args, kwargs))
for x in notificationAdded:
x()
-