Merge remote-tracking branch 'origin/master' into master
[enigma2-plugins.git] / toolkit / src / NotifiablePluginBrowser.py
1 from Screens import PluginBrowser as PBBase
2 from Screens.InfoBarGenerics import InfoBarNotifications
3
4 OriginalPluginBrowser = PBBase.PluginBrowser
5 if not issubclass(OriginalPluginBrowser, InfoBarNotifications):
6         class PluginBrowser(OriginalPluginBrowser, InfoBarNotifications):
7                 def __init__(self, *args, **kwargs):
8                         OriginalPluginBrowser.__init__(self, *args, **kwargs)
9                         #if self.skinName in ("NotifiablePluginBrowser", "OriginalPluginBrowser"):
10                         #       self.skinName = "PluginBrowser"
11                         InfoBarNotifications.__init__(self)
12         NotifiablePluginBrowser = PluginBrowser
13 else:
14         NotifiablePluginBrowser = OriginalPluginBrowser
15
16 def install():
17         PBBase.PluginBrowser = NotifiablePluginBrowser
18
19 def uninstall():
20         PBBase.PluginBrowser = OriginalPluginBrowser
21
22 __all__ = ['OriginalPluginBrowser', 'NotifiablePluginBrowser', 'install', 'uninstall']