[FCC] Show extension menu on InfoBar only.
authorhschang <chang@dev3>
Thu, 7 Sep 2017 02:54:43 +0000 (11:54 +0900)
committerhschang <chang@dev3>
Thu, 7 Sep 2017 02:54:48 +0000 (11:54 +0900)
lib/python/Plugins/SystemPlugins/FastChannelChange/plugin.py

index 9efa8c8..6ca2797 100644 (file)
@@ -567,8 +567,14 @@ def FCCSupportInit(reason, **kwargs):
                global FccInstance
                FccInstance = FCCSupport(kwargs["session"])
 
+def showFCCExtentionMenu():
+       currentScreenName = None
+       if FccInstance:
+               currentScreenName = FccInstance.session.current_dialog.__class__.__name__
+       return (currentScreenName == "InfoBar")
+
 def addExtentions(infobarExtensions):
-       infobarExtensions.addExtension((getExtensionName, ToggleUpdate, lambda: True), None)
+       infobarExtensions.addExtension((getExtensionName, ToggleUpdate, showFCCExtentionMenu), None)
 
 def main(session, **kwargs):
        session.open(FCCSetup)