add kwargs support for notifications
authorFelix Domke <tmbinc@elitedvb.net>
Wed, 10 May 2006 23:02:07 +0000 (23:02 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Wed, 10 May 2006 23:02:07 +0000 (23:02 +0000)
lib/python/Screens/InfoBarGenerics.py
lib/python/Tools/Notifications.py

index d15200710697fb7f7232aee22c2e1ddd3105215d..2bae4296161dddc43f557636d9ad815957e32303 100644 (file)
@@ -1365,9 +1365,9 @@ class InfoBarNotifications:
                        print "open",n
                        cb = n[0]
                        if cb is not None:
                        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:
                        else:
-                               self.session.open(*n[1:])
+                               self.session.open(n[1], *n[2], **n[3])
 
 class InfoBarServiceNotifications:
        def __init__(self):
 
 class InfoBarServiceNotifications:
        def __init__(self):
index b547639beb20f7910ff3ea0a0bfc96b71a3a3b64..3cb107cc4dc58575bac5cab5d1bc8bb4ed6339d1 100644 (file)
@@ -3,11 +3,10 @@ notifications = [ ]
 
 notificationAdded = [ ]
 
 
 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()
        for x in notificationAdded:
                x()
-