Advertisement
SharkyEXE

Untitled

Aug 12th, 2018
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. from Plugins.Plugin import PluginDescriptor
  2. from Screens.Screen import Screen
  3. from enigma import eTimer
  4.  
  5. SKIN = """
  6. <screen position="40,40" size="72,72" zPosition="-6">
  7. <ePixmap position="0,0" size="72,72" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/BlockButton_v2/block.png" />
  8.  
  9. </screen>"""
  10.  
  11. class BlockButton2(Screen):
  12. def __init__(self, session):
  13. Screen.__init__(self, session)
  14. self.skin = SKIN
  15. self.hide_time = eTimer()
  16. self.hide_time.callback.append(self.setHide)
  17. self.hide_time.startLongTimer(2) # pause in seconds
  18.  
  19. def setHide(self):
  20. self.hide_time.stop()
  21. self.close()
  22.  
  23. def main(session, **kwargs):
  24. session.open(BlockButton2)
  25.  
  26. def Plugins(**kwargs):
  27. return [PluginDescriptor(name=_("BlockButton2"), description=_("Do Not Show the 'BlockButton2' on the screen"), where=PluginDescriptor.WHERE_PLUGINMENU, icon = "plugin.png", fnc=main)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement