Ejemplo n.º 1
0
    def __init__(self, session, args=None):
        Screen.__init__(self, session)

        self.container = eConsoleAppContainer()
        self.container.appClosed.append(self.runFinished)
        self.container.dataAvail.append(self.dataAvail)
        self.onLayoutFinish.append(self.startRun)
        self.onShown.append(self.setWindowTitle)

        self.list = []
        self["list"] = PluginList(self.list)
        self.pluginlist = []
        self.expanded = []
        self.addoninstalled = []
        self.found = 0
        self.msgstate = 1

        self["text"] = Label(
            _("Downloading Addon Information. Bitte Warten..."))

        self.run = 0

        self.remainingdata = ""

        self["actions"] = ActionMap(["WizardActions"], {
            "ok": self.go,
            "back": self.close,
        })
Ejemplo n.º 2
0
	def __init__(self, session):
		Screen.__init__(self, session)
		
		self["red"] = Label()
		self["green"] = Label()
		
		self.list = []
		self["list"] = PluginList(self.list)
		
		self["actions"] = ActionMap(["WizardActions"],
		{
			"ok": self.save,
			"back": self.close,
		})
		self["PluginDownloadActions"] = ActionMap(["ColorActions"],
		{
			"red": self.delete,
			"green": self.download
		})
		self["SoftwareActions"] = ActionMap(["ColorActions"],
		{
			"red": self.openExtensionmanager
		})
		self["PluginDownloadActions"].setEnabled(False)
		self["SoftwareActions"].setEnabled(False)
		self.onFirstExecBegin.append(self.checkWarnings)
		self.onShown.append(self.updateList)
		self.onLayoutFinish.append(self.saveListsize)
Ejemplo n.º 3
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.plug_path = "/usr/lib/enigma2/python/Plugins/Extensions/FactoryTest"
		print "path:",self.plug_path
		
		self.list = []
		self["list"] = PluginList(self.list)
		self.creatTestList() #creat testlist item
		self.testinfo = None
		self.lastSelect = None
		self["infotitle"] =	StaticText("Test Info:")
		self["testinfo"] = StaticText("Select list press OK start test")
		
		self.testInstance = FactoryTest(self.testlist,session)
		
		#map actions
		self["actions"] = ActionMap(["SetupActions", "ColorActions"], 
			{
				"cancel": self.close,
				"ok": self.goTest,
				"green": self.close
			})
			
		self.onShown.append(self.updateList)
		self.onChangedEntry = []
		self["list"].onSelectionChanged.append(self.selectionChanged)
Ejemplo n.º 4
0
	def __init__(self, session):
		Screen.__init__(self, session)

		self.firsttime = True

		self["key_red"] = self["red"] = Label(_("Remove plugins"))
		self["key_green"] = self["green"] = Label(_("Download plugins"))
		
		self.list = []
		self["list"] = PluginList(self.list)
		
		self["actions"] = ActionMap(["WizardActions"],
		{
			"ok": self.save,
			"back": self.close,
		})
		self["PluginDownloadActions"] = ActionMap(["ColorActions"],
		{
			"red": self.delete,
			"green": self.download
		})

		self.onFirstExecBegin.append(self.checkWarnings)
		self.onShown.append(self.updateList)
		self.onChangedEntry = []
		self["list"].onSelectionChanged.append(self.selectionChanged)
		self.onLayoutFinish.append(self.saveListsize)
Ejemplo n.º 5
0
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Plugin Browser"))

        self.firsttime = True

        self["red"] = Label(_("Remove plugins"))
        self["green"] = Label(_("Download plugins"))
        self["blue"] = Label(_("Hold plugins"))

        self.list = []
        self["list"] = PluginList(self.list)
        if config.usage.sort_pluginlist.value:
            self["list"].list.sort()

        self["actions"] = ActionMap(["SetupActions", "WizardActions"], {
            "ok": self.save,
            "back": self.close,
            "menu": self.menu,
        })
        self["PluginDownloadActions"] = ActionMap(["ColorActions"], {
            "red": self.delete,
            "green": self.download,
            "blue": self.toogle
        })

        self.onFirstExecBegin.append(self.checkWarnings)
        self.onShown.append(self.updateList)
        self.onChangedEntry = []
        self["list"].onSelectionChanged.append(self.selectionChanged)
        self.onLayoutFinish.append(self.saveListsize)
        if config.pluginfilter.userfeed.value != "http://":
            if not os.path.exists("/etc/opkg/user-feed.conf"):
                CreateFeedConfig()
Ejemplo n.º 6
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.setTitle(_("Plugin browser"))
     ProtectedScreen.__init__(self)
     self.firsttime = True
     self['key_red'] = self['red'] = Label(_('Download plugins'))
     self.list = []
     self['list'] = PluginList(self.list)
     self['actions'] = ActionMap(['WizardActions', 'MenuActions'], {'ok': self.save,
      'back': self.close,
      'menu': self.exit})
     self['PluginDownloadActions'] = ActionMap(['ColorActions'], {'red': self.download})
     self['DirectionActions'] = ActionMap(['DirectionActions'], {'moveUp': self.moveUp,
      'moveDown': self.moveDown})
     self['NumberActions'] = NumberActionMap(['NumberActions'], {'1': self.keyNumberGlobal,
      '2': self.keyNumberGlobal,
      '3': self.keyNumberGlobal,
      '4': self.keyNumberGlobal,
      '5': self.keyNumberGlobal,
      '6': self.keyNumberGlobal,
      '7': self.keyNumberGlobal,
      '8': self.keyNumberGlobal,
      '9': self.keyNumberGlobal,
      '0': self.keyNumberGlobal})
     self.onFirstExecBegin.append(self.checkWarnings)
     self.onShown.append(self.updateList)
     self.onChangedEntry = []
     self['list'].onSelectionChanged.append(self.selectionChanged)
     self.onLayoutFinish.append(self.saveListsize)
Ejemplo n.º 7
0
    def __init__(self, session):
        Screen.__init__(self, session)
        if config.ParentalControl.configured.value:
            ProtectedScreen.__init__(self)

        self["red"] = Label()
        self["green"] = Label()

        self.list = []
        self["list"] = PluginList(self.list)

        self["actions"] = ActionMap(["WizardActions"], {
            "ok": self.save,
            "back": self.close,
        })
        self["PluginDownloadActions"] = ActionMap(["ColorActions"], {
            "red": self.delete,
            "green": self.download
        })
        self["SoftwareActions"] = ActionMap(["ColorActions"],
                                            {"red": self.openExtensionmanager})
        self["PluginDownloadActions"].setEnabled(False)
        self["SoftwareActions"].setEnabled(False)
        self.onFirstExecBegin.append(self.checkWarnings)
        self.onShown.append(self.updateList)

        self.setTitle(_("Plugin Browser"))

        self.onChangedEntry = []
        self["list"].onSelectionChanged.append(self.selectionChanged)
Ejemplo n.º 8
0
 def __init__(self, session, type = 0, needupdate = True):
     Screen.__init__(self, session)
     self.type = type
     self.needupdate = needupdate
     self.container = eConsoleAppContainer()
     self.container.appClosed.append(self.runFinished)
     self.container.dataAvail.append(self.dataAvail)
     self.onLayoutFinish.append(self.startRun)
     self.setTitle(self.type == self.DOWNLOAD and _("Downloadable new plugins") or _("Remove plugins"))
     self.list = []
     self['list'] = PluginList(self.list)
     self.pluginlist = []
     self.expanded = []
     self.installedplugins = []
     self.plugins_changed = False
     self.reload_settings = False
     self.check_settings = False
     self.install_settings_name = ''
     self.remove_settings_name = ''
     self["text"] = Label(self.type == self.DOWNLOAD and _("Downloading plugin information. Please wait...") or _("Getting plugin information. Please wait..."))
     self.run = 0
     self.remainingdata = ''
     self['actions'] = ActionMap(['WizardActions'], {'ok': self.go,
      'back': self.requestClose})
     if os.path.isfile('/usr/bin/opkg'):
         self.ipkg = '/usr/bin/opkg'
         self.ipkg_install = self.ipkg + ' install'
         self.ipkg_remove = self.ipkg + ' remove --autoremove'
     else:
         self.ipkg = 'ipkg'
         self.ipkg_install = 'ipkg install -force-defaults'
         self.ipkg_remove = self.ipkg + ' remove'
Ejemplo n.º 9
0
	def __init__(self, session, type):
		Screen.__init__(self, session)
		
		self.type = type
		
		self.container = eConsoleAppContainer()
		self.container.appClosed.append(self.runFinished)
		self.container.dataAvail.append(self.dataAvail)
		self.onLayoutFinish.append(self.startRun)
		self.onShown.append(self.setWindowTitle)
		
		self.list = []
		self["list"] = PluginList(self.list)
		self.pluginlist = []
		self.expanded = []
		self.installedplugins = []
		
		if self.type == self.DOWNLOAD:
			self["text"] = Label(_("Downloading plugin information. Please wait..."))
		elif self.type == self.REMOVE:
			self["text"] = Label(_("Getting plugin information. Please wait..."))
		
		self.run = 0

		self.remainingdata = ""

		self["actions"] = ActionMap(["WizardActions"], 
		{
			"ok": self.go,
			"back": self.close,
		})
Ejemplo n.º 10
0
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Plugin Browser"))

        self.firsttime = True

        self["red"] = Label(_("Remove plugins"))
        self["green"] = Label(_("Download plugins"))

        self.list = []
        self["list"] = PluginList(self.list)
        if config.usage.sort_pluginlist.getValue():
            self["list"].list.sort()

        self["actions"] = ActionMap(["SetupActions", "WizardActions"], {
            "ok": self.save,
            "back": self.close,
            "menu": self.menu,
        })
        self["PluginDownloadActions"] = ActionMap(["ColorActions"], {
            "red": self.delete,
            "green": self.download
        })

        self.onFirstExecBegin.append(self.checkWarnings)
        self.onShown.append(self.updateList)
        self.onChangedEntry = []
        self["list"].onSelectionChanged.append(self.selectionChanged)
        self.onLayoutFinish.append(self.saveListsize)
Ejemplo n.º 11
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("Plugin browser"))
		ProtectedScreen.__init__(self)

		self.firsttime = True

		self["key_red"] = self["red"] = Label(_("Remove plugins"))
		self["key_green"] = self["green"] = Label(_("Download plugins"))
		self.list = []
		self["list"] = PluginList(self.list)
		self["list"].list.sort()

		self["actions"] = ActionMap(["SetupActions","WizardActions"],
		{
			"ok": self.save,
			"back": self.close,
			"menu": self.menu,
		})
		self["PluginDownloadActions"] = ActionMap(["ColorActions"],
		{
			"red": self.delete,
			"green": self.download
		})
		self["DirectionActions"] = ActionMap(["DirectionActions"],
		{
			"moveUp": self.moveUp,
			"moveDown": self.moveDown
		})
		self["NumberActions"] = NumberActionMap(["NumberActions"],
		{
			"1": self.keyNumberGlobal,
			"2": self.keyNumberGlobal,
			"3": self.keyNumberGlobal,
			"4": self.keyNumberGlobal,
			"5": self.keyNumberGlobal,
			"6": self.keyNumberGlobal,
			"7": self.keyNumberGlobal,
			"8": self.keyNumberGlobal,
			"9": self.keyNumberGlobal,
			"0": self.keyNumberGlobal
		})
		self["HelpActions"] = ActionMap(["HelpActions"],
		{
			"displayHelp": self.showHelp,
		})
		self.help = False

		self.number = 0
		self.nextNumberTimer = eTimer()
		self.nextNumberTimer.callback.append(self.okbuttonClick)

		self.onFirstExecBegin.append(self.checkWarnings)
		self.onShown.append(self.updateList)
		self.onChangedEntry = []
		self["list"].onSelectionChanged.append(self.selectionChanged)
		self.onLayoutFinish.append(self.saveListsize)
		if config.pluginfilter.userfeed.getValue() != "http://":
				if not os.path.exists("/etc/opkg/user-feed.conf"):
					CreateFeedConfig()
Ejemplo n.º 12
0
    def __init__(self, session):
        Screen.__init__(self, session)
        if config.ParentalControl.configured.value:
            ProtectedScreen.__init__(self)
        Screen.setTitle(self, _("Plugin Browser"))
        ProtectedScreen.__init__(self)

        self.firsttime = True

        self.sort_mode = False
        self.selected_plugin = None

        self["key_red"] = self["red"] = Label(_("Remove plugins"))
        self["key_green"] = self["green"] = Label(_("Download plugins"))
        self["key_yellow"] = self["yellow"] = Label("")
        self["key_blue"] = self["blue"] = Label("")

        self.list = []
        self["list"] = PluginList(self.list)

        self["actions"] = ActionMap(["SetupActions", "WizardActions"], {
            "ok": self.keyOk,
            "back": self.keyCancel,
            "menu": self.menu,
        })
        self["PluginDownloadActions"] = ActionMap(["ColorActions"], {
            "red": self.delete,
            "green": self.download,
            "blue": self.keyBlue,
        })
        self["SoftwareActions"] = ActionMap(
            ["ColorActions"], {
                "red": self.keyRed,
                "green": self.keyGreen,
                "yellow": self.keyYellow,
                "blue": self.keyBlue,
            })
        self["MoveActions"] = ActionMap(
            ["WizardActions"], {
                "left": self.keyLeft,
                "right": self.keyRight,
                "up": self.keyUp,
                "down": self.keyDown,
            }, -1)

        self["NumberAction"] = NumberActionMap(["NumberActions"], {
            "0": self.resetSortOrder,
        }, -1)

        self["PluginDownloadActions"].setEnabled(True)
        self["SoftwareActions"].setEnabled(False)
        self.onFirstExecBegin.append(self.checkWarnings)
        self.onShown.append(self.updateList)
        self.onChangedEntry = []
        self["list"].onSelectionChanged.append(self.selectionChanged)
        self.onLayoutFinish.append(self.saveListsize)
        if config.pluginfilter.userfeed.value != "http://":
            if not os.path.exists("/etc/opkg/user-feed.conf"):
                CreateFeedConfig()
Ejemplo n.º 13
0
	def __init__(self, session):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Plugin Browser"))
		ProtectedScreen.__init__(self)

		self.firsttime = True

		self["key_red"] = self["red"] = Label(_("Remove plugins"))
		self["key_green"] = self["green"] = Label(_("Download plugins"))
		self["key_blue"] = self["blue"] = Label(_("Hold plugins"))

		self.list = []
		self["list"] = PluginList(self.list)
		if config.usage.sort_pluginlist.getValue():
			self["list"].list.sort()

		self["actions"] = ActionMap(["SetupActions","WizardActions","EPGSelectActions"],
		{
			"ok": self.save,
			"back": self.close,
			"menu": self.menu,
		})
		self["PluginDownloadActions"] = ActionMap(["ColorActions"],
		{
			"red": self.delete,
			"green": self.download,
			"blue": self.toogle
		})
		self["DirectionActions"] = ActionMap(["DirectionActions"],
		{
			"moveUp": self.moveUp,
			"moveDown": self.moveDown
		})
		self["NumberActions"] = NumberActionMap(["NumberActions"],
		{
			"1": self.keyNumberGlobal,
			"2": self.keyNumberGlobal,
			"3": self.keyNumberGlobal,
			"4": self.keyNumberGlobal,
			"5": self.keyNumberGlobal,
			"6": self.keyNumberGlobal,
			"7": self.keyNumberGlobal,
			"8": self.keyNumberGlobal,
			"9": self.keyNumberGlobal,
			"0": self.keyNumberGlobal
		})

		self.onFirstExecBegin.append(self.checkWarnings)
		self.onShown.append(self.updateList)
		self.onChangedEntry = []
		self["list"].onSelectionChanged.append(self.selectionChanged)
		self.onLayoutFinish.append(self.saveListsize)
		if config.pluginfilter.userfeed.getValue() != "http://":
				if not os.path.exists("/etc/opkg/user-feed.conf"):
					CreateFeedConfig()
Ejemplo n.º 14
0
    def __init__(self, session, type=0, needupdate=True):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Downloadable plugins"))

        self.type = type
        self.needupdate = needupdate
        self.createPluginFilter()
        self.LanguageList = language.getLanguageListSelection()

        self.container = eConsoleAppContainer()
        self.container.appClosed.append(self.runFinished)
        self.container.dataAvail.append(self.dataAvail)
        self.onLayoutFinish.append(self.startRun)
        self.onShown.append(self.setWindowTitle)

        self.list = []
        self["list"] = PluginList(self.list)
        self.pluginlist = []
        self.expanded = []
        self.installedplugins = []
        self.plugins_changed = False
        self.reload_settings = False
        self.check_settings = False
        self.check_bootlogo = False
        self.install_settings_name = ''
        self.remove_settings_name = ''
        self.onChangedEntry = []
        self["list"].onSelectionChanged.append(self.selectionChanged)

        if self.type == self.DOWNLOAD:
            self["text"] = Label(
                _("Downloading plugin information. Please wait..."))
        if self.type == self.REMOVE:
            self["text"] = Label(
                _("Getting plugin information. Please wait..."))
        elif self.type == self.TOOGLE:
            self["text"] = Label(
                _("Getting plugin information. Please wait..."))

        self.run = 0
        self.remainingdata = ""
        self["actions"] = ActionMap(["WizardActions"], {
            "ok": self.go,
            "back": self.requestClose,
        })
        if os.path.isfile('/usr/bin/opkg'):
            self.ipkg = '/usr/bin/opkg'
            self.ipkg_install = self.ipkg + ' install --force-overwrite'
            self.ipkg_remove = self.ipkg + ' remove --autoremove --force-depends'
            self.ipkg_toogle = self.ipkg + ' flag hold'
        else:
            self.ipkg = 'ipkg'
            self.ipkg_install = 'ipkg install --force-overwrite -force-defaults'
            self.ipkg_remove = self.ipkg + ' remove'
            self.ipkg_toogle = self.ipkg + ' flag hold'
Ejemplo n.º 15
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("Plugin browser"))
        ProtectedScreen.__init__(self)

        self.firsttime = True

        self.list = []
        self["list"] = PluginList(self.list)

        self["actions"] = ActionMap(["WizardActions", "MenuActions"], {
            "ok": self.save,
            "back": self.close,
            "menu": self.exit,
        })

        if fileExists(
                resolveFilename(SCOPE_PLUGINS,
                                "Extensions/J00zekOPKGmgr/GOSopkg.pyo")):
            self["key_red"] = self["red"] = Label(_("Manage extensions"))
            self["key_green"] = self["green"] = Label("")
            self["PluginDownloadActions"] = ActionMap(
                ["ColorActions"], {"red": self.openGOSopkg})
        else:
            self["key_red"] = self["red"] = Label(_("Remove plugins"))
            self["key_green"] = self["green"] = Label(_("Download plugins"))
            self["PluginDownloadActions"] = ActionMap(["ColorActions"], {
                "red": self.delete,
                "green": self.download
            })

        self["DirectionActions"] = ActionMap(["DirectionActions"], {
            "moveUp2": self.moveUp,
            "moveDown0": self.moveDown
        })
        self["NumberActions"] = NumberActionMap(
            ["NumberActions"], {
                "1": self.keyNumberGlobal,
                "2": self.keyNumberGlobal,
                "3": self.keyNumberGlobal,
                "4": self.keyNumberGlobal,
                "5": self.keyNumberGlobal,
                "6": self.keyNumberGlobal,
                "7": self.keyNumberGlobal,
                "8": self.keyNumberGlobal,
                "9": self.keyNumberGlobal,
                "0": self.keyNumberGlobal
            })

        self.onFirstExecBegin.append(self.checkWarnings)
        self.onShown.append(self.updateList)
        self.onChangedEntry = []
        self["list"].onSelectionChanged.append(self.selectionChanged)
        self.onLayoutFinish.append(self.saveListsize)
Ejemplo n.º 16
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("Plugin browser"))
		ProtectedScreen.__init__(self)

		self.firsttime = True

		self["key_red"] = self["red"] = Label(_("Download plugins"))
		self.list = []
		self["list"] = PluginList(self.list)

		self["actions"] = ActionMap(["WizardActions","MenuActions"],
		{
			"ok": self.save,
			"back": self.close,
			"menu": self.exit,
		})
		self["PluginDownloadActions"] = ActionMap(["ColorActions"],
		{
			"red": self.download
		})
		self["DirectionActions"] = ActionMap(["DirectionActions"],
		{
			"moveUp": self.moveUp,
			"moveDown": self.moveDown
		})
		self["NumberActions"] = NumberActionMap(["NumberActions"],
		{
			"1": self.keyNumberGlobal,
			"2": self.keyNumberGlobal,
			"3": self.keyNumberGlobal,
			"4": self.keyNumberGlobal,
			"5": self.keyNumberGlobal,
			"6": self.keyNumberGlobal,
			"7": self.keyNumberGlobal,
			"8": self.keyNumberGlobal,
			"9": self.keyNumberGlobal,
			"0": self.keyNumberGlobal
		})
		self["HelpActions"] = ActionMap(["HelpActions"],
		{
			"displayHelp": self.showHelp,
		})
		self.help = False

		self.number = 0
		self.nextNumberTimer = eTimer()
		self.nextNumberTimer.callback.append(self.okbuttonClick)

		self.onFirstExecBegin.append(self.checkWarnings)
		self.onShown.append(self.updateList)
		self.onChangedEntry = []
		self["list"].onSelectionChanged.append(self.selectionChanged)
		self.onLayoutFinish.append(self.saveListsize)
Ejemplo n.º 17
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.setTitle(_("Add/remove plugin"))
     plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
     self.session = session
     self.list = []
     self["list"] = PluginList(self.list)
     self.updateList()
     self["actions"] = ActionMap(["WizardActions"], {
         "ok": self.save,
         "back": self.close
     }, -1)
     self.onExecBegin.append(self.checkWarnings)
Ejemplo n.º 18
0
    def __init__(self, session):
        Screen.__init__(self, session)
        ProtectedScreen.__init__(self)

        self.firsttime = True
        self.sort_mode = False
        self.selected_plugin = None

        self["key_red"] = self["red"] = Label(_("Remove plugins"))
        self["key_green"] = self["green"] = Label(_("Download plugins"))
        self["key_yellow"] = self["yellow"] = Label("")
        self["key_blue"] = self["blue"] = Label("")

        self.list = []
        self["list"] = PluginList(self.list)

        self["actions"] = ActionMap(["SetupActions", "WizardActions"], {
            "ok": self.keyOk,
            "back": self.keyCancel,
            "menu": self.menu,
        })
        self["PluginDownloadActions"] = ActionMap(["ColorActions"], {
            "red": self.delete,
            "green": self.download,
            "blue": self.keyBlue,
        })
        self["SoftwareActions"] = ActionMap(
            ["ColorActions"], {
                "red": self.keyRed,
                "green": self.keyGreen,
                "yellow": self.keyYellow,
                "blue": self.keyBlue,
            })
        self["MoveActions"] = ActionMap(
            ["WizardActions"], {
                "left": self.keyLeft,
                "right": self.keyRight,
                "up": self.keyUp,
                "down": self.keyDown,
            }, -1)
        self["NumberAction"] = NumberActionMap(["NumberActions"], {
            "0": self.resetSortOrder,
        }, -1)

        self["PluginDownloadActions"].setEnabled(True)
        self["SoftwareActions"].setEnabled(False)
        self.onFirstExecBegin.append(self.checkWarnings)
        self.onShown.append(self.updateList)
        self.onChangedEntry = []
        self["list"].onSelectionChanged.append(self.selectionChanged)
        self.onLayoutFinish.append(self.saveListsize)
Ejemplo n.º 19
0
 def __init__(self, session):
     Screen.__init__(self, session)
     if config.ParentalControl.configured.value:
         ProtectedScreen.__init__(self)
     Screen.setTitle(self, _('Plugin Browser'))
     ProtectedScreen.__init__(self)
     self.firsttime = True
     self.sort_mode = False
     self.selected_plugin = None
     self['key_red'] = self['red'] = Label(_('Remove plugins'))
     self['key_green'] = self['green'] = Label(_('Download plugins'))
     self['key_yellow'] = self['yellow'] = Label('')
     self['key_blue'] = self['blue'] = Label('Hold plugins')
     self.list = []
     self['list'] = PluginList(self.list)
     self['actions'] = ActionMap(['SetupActions', 'WizardActions'], {
         'ok': self.keyOk,
         'back': self.keyCancel,
         'menu': self.menu
     })
     self['PluginDownloadActions'] = ActionMap(['ColorActions'], {
         'red': self.delete,
         'green': self.download,
         'blue': self.keyBlue
     })
     self['SoftwareActions'] = ActionMap(
         ['ColorActions'], {
             'red': self.keyRed,
             'green': self.keyGreen,
             'yellow': self.keyYellow,
             'blue': self.keyBlue
         })
     self['MoveActions'] = ActionMap(
         ['WizardActions'], {
             'left': self.keyLeft,
             'right': self.keyRight,
             'up': self.keyUp,
             'down': self.keyDown
         }, -1)
     self['NumberAction'] = NumberActionMap(['NumberActions'],
                                            {'0': self.resetSortOrder}, -1)
     self['PluginDownloadActions'].setEnabled(True)
     self['SoftwareActions'].setEnabled(False)
     self.onFirstExecBegin.append(self.checkWarnings)
     self.onShown.append(self.updateList)
     self.onChangedEntry = []
     self['list'].onSelectionChanged.append(self.selectionChanged)
     self.onLayoutFinish.append(self.saveListsize)
     if config.pluginfilter.userfeed.value != 'http://':
         if not os.path.exists('/etc/opkg/user-feed.conf'):
             CreateFeedConfig()
Ejemplo n.º 20
0
	def __init__(self, session, type = 0, needupdate = True):
		Screen.__init__(self, session)
		
# [iq
		self.Console = SwapConsole()
		self.mtdSwapOn()
# iq]
		self.type = type
		self.needupdate = needupdate
		
		self.container = eConsoleAppContainer()
		self.container.appClosed.append(self.runFinished)
		self.container.dataAvail.append(self.dataAvail)
		self.onLayoutFinish.append(self.startRun)
		self.onShown.append(self.setWindowTitle)
		
		self.list = []
		self["list"] = PluginList(self.list)
		self.pluginlist = []
		self.expanded = []
		self.installedplugins = []
		self.plugins_changed = False
		self.reload_settings = False
		self.check_settings = False
		self.install_settings_name = ''
		self.remove_settings_name = ''
		
		if self.type == self.DOWNLOAD:
			self["text"] = Label(_("Downloading plugin information. Please wait..."))
		elif self.type == self.REMOVE:
			self["text"] = Label(_("Getting plugin information. Please wait..."))
		
		self.run = 0
		self.remainingdata = ""
		self["actions"] = ActionMap(["WizardActions"], 
		{
			"ok": self.go,
			"back": self.requestClose,
		})
		if os.path.isfile('/usr/bin/opkg'):
			self.ipkg = '/usr/bin/opkg'
			self.ipkg_install = self.ipkg + ' install'
			self.ipkg_remove =  self.ipkg + ' remove --autoremove' 
		else:
			self.ipkg = 'ipkg'
			self.ipkg_install = 'ipkg install -force-defaults'
			self.ipkg_remove =  self.ipkg + ' remove' 
# [iq
#		self.onLayoutFinish.append(self.mtdSwapOn)
		self.onClose.append(self.mtdSwapOff)
Ejemplo n.º 21
0
	def __init__(self, session):
		Screen.__init__(self, session)
		ProtectedScreen.__init__(self)

		self.firsttime = True

		self["key_red"] = self["red"] = Label(_("Remove plugins"))
		self["key_green"] = self["green"] = Label(_("Download plugins"))

		self.list = []
		self["list"] = PluginList(self.list)

		self["actions"] = ActionMap(["WizardActions","MenuActions"],
		{
			"ok": self.save,
			"back": self.close,
			"menu": self.exit,
		})
		self["PluginDownloadActions"] = ActionMap(["ColorActions"],
		{
			"red": self.delete,
			"green": self.download
		})
		self["DirectionActions"] = ActionMap(["DirectionActions"],
		{
			"moveUp": self.moveUp,
			"moveDown": self.moveDown
		})
		self["NumberActions"] = NumberActionMap(["NumberActions"],
		{
			"1": self.keyNumberGlobal,
			"2": self.keyNumberGlobal,
			"3": self.keyNumberGlobal,
			"4": self.keyNumberGlobal,
			"5": self.keyNumberGlobal,
			"6": self.keyNumberGlobal,
			"7": self.keyNumberGlobal,
			"8": self.keyNumberGlobal,
			"9": self.keyNumberGlobal,
			"0": self.keyNumberGlobal
		})

		self.onFirstExecBegin.append(self.checkWarnings)
		self.onShown.append(self.updateList)
		self.onChangedEntry = []
		self["list"].onSelectionChanged.append(self.selectionChanged)
		self.onLayoutFinish.append(self.saveListsize)
Ejemplo n.º 22
0
    def __init__(self, session):
        Screen.__init__(self, session)

        self["red"] = Label(_("Remove Plugins"))
        self["green"] = Label(_("Download Plugins"))

        self.list = []
        self["list"] = PluginList(self.list)
        self.updateList()

        self["actions"] = ActionMap(
            ["WizardActions", "ColorActions"], {
                "ok": self.save,
                "back": self.close,
                "red": self.delete,
                "green": self.download
            })
        self.onExecBegin.append(self.checkWarnings)
Ejemplo n.º 23
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("Plugin browser"))
        ProtectedScreen.__init__(self)

        self.firsttime = True

        self['key_red'] = self['red'] = Label(
            _('Download'))  # for Manager Extension
        self.list = []
        self["list"] = PluginList(self.list)

        self["actions"] = ActionMap(["WizardActions", "MenuActions"], {
            "ok": self.save,
            "back": self.close,
            "menu": self.exit,
        })
        self['Download'] = ActionMap(['ColorActions'], {'red': self.download})
        self['SoftwareActions'].setEnabled(True)
        #self['SoftwareActions'] = ActionMap(['ColorActions'], {'red': self.openExtensionmanager}) # for Manager Extension
        #self['SoftwareActions'].setEnabled(True) # for Manager Extension
        self["DirectionActions"] = ActionMap(["DirectionActions"], {
            "moveUp": self.moveUp,
            "moveDown": self.moveDown
        })
        self["NumberActions"] = NumberActionMap(
            ["NumberActions"], {
                "1": self.keyNumberGlobal,
                "2": self.keyNumberGlobal,
                "3": self.keyNumberGlobal,
                "4": self.keyNumberGlobal,
                "5": self.keyNumberGlobal,
                "6": self.keyNumberGlobal,
                "7": self.keyNumberGlobal,
                "8": self.keyNumberGlobal,
                "9": self.keyNumberGlobal,
                "0": self.keyNumberGlobal
            })

        self.onFirstExecBegin.append(self.checkWarnings)
        self.onShown.append(self.updateList)
        self.onChangedEntry = []
        self["list"].onSelectionChanged.append(self.selectionChanged)
        self.onLayoutFinish.append(self.saveListsize)
Ejemplo n.º 24
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_('Plugin browser'))
        ProtectedScreen.__init__(self)
        self.firsttime = True
        self['key_red'] = self['red'] = Label(
            _('Download'))  # for Manager Extension
        self.list = []
        self['list'] = PluginList(self.list)
        self['actions'] = ActionMap(['WizardActions', 'MenuActions'], {
            'ok': self.save,
            'back': self.close,
            'menu': self.exit
        })
        self['Download'] = ActionMap(['ColorActions'], {'red': self.download})
        #self['SoftwareActions'] = ActionMap(['ColorActions'], {'red': self.openExtensionmanager}) # for Manager Extension
        #self['SoftwareActions'].setEnabled(True) # for Manager Extension
        self['DirectionActions'] = ActionMap(['DirectionActions'], {
            'moveUp': self.moveUp,
            'moveDown': self.moveDown
        })
        self['NumberActions'] = NumberActionMap(
            ['NumberActions'], {
                '1': self.keyNumberGlobal,
                '2': self.keyNumberGlobal,
                '3': self.keyNumberGlobal,
                '4': self.keyNumberGlobal,
                '5': self.keyNumberGlobal,
                '6': self.keyNumberGlobal,
                '7': self.keyNumberGlobal,
                '8': self.keyNumberGlobal,
                '9': self.keyNumberGlobal,
                '0': self.keyNumberGlobal
            })

        self.number = 0
        self.nextNumberTimer = eTimer()
        self.nextNumberTimer.callback.append(self.okbuttonClick)

        self.onFirstExecBegin.append(self.checkWarnings)
        self.onShown.append(self.updateList)
        self.onChangedEntry = []
        self['list'].onSelectionChanged.append(self.selectionChanged)
        self.onLayoutFinish.append(self.saveListsize)
Ejemplo n.º 25
0
    def __init__(self, session):
        Screen.__init__(self, session)

        #self.firsttime = True

        self["red"] = Label("")
        self["green"] = Label(_("Software Manager"))

        self.list = []
        self["list"] = PluginList(self.list)

        self["actions"] = ActionMap(["WizardActions"], {
            "ok": self.save,
            "back": self.close,
        })
        self["PluginDownloadActions"] = ActionMap(
            ["ColorActions"], {"green": self.softwaremanager})

        self.onFirstExecBegin.append(self.checkWarnings)
        self.onShown.append(self.updateList)
        self.onChangedEntry = []
        self["list"].onSelectionChanged.append(self.selectionChanged)
        self.onLayoutFinish.append(self.saveListsize)
Ejemplo n.º 26
0
    def __init__(self, session, type=0, needupdate=True):
        Screen.__init__(self, session)

        self.type = type
        self.needupdate = needupdate

        self.container = eConsoleAppContainer()
        self.container.appClosed.append(self.runFinished)
        self.container.dataAvail.append(self.dataAvail)
        self.onLayoutFinish.append(self.startRun)
        self.setTitle(
            self.type == self.DOWNLOAD and _("Downloadable new plugins")
            or _("Remove plugins"))
        self.list = []
        self["list"] = PluginList(self.list)
        self.pluginlist = []
        self.expanded = []
        self.installedplugins = []
        self.plugins_changed = False
        self.reload_settings = False
        self.check_softcams = False
        self.check_settings = False
        self.install_settings_name = ''
        self.remove_settings_name = ''
        self["text"] = Label(
            self.type == self.DOWNLOAD
            and _("Downloading plugin information. Please wait...")
            or _("Getting plugin information. Please wait..."))
        self.run = 0
        self.remainingdata = ""
        self["actions"] = ActionMap(["WizardActions"], {
            "ok": self.go,
            "back": self.requestClose,
        })
        self.opkg = 'opkg'
        self.opkg_install = self.opkg + ' install'
        self.opkg_remove = self.opkg + ' remove --autoremove'
Ejemplo n.º 27
0
 def __init__(self, session):
     Screen.__init__(self, session)
     if config.ParentalControl.configured.value:
         ProtectedScreen.__init__(self)
     Screen.setTitle(self, _('Plugin Browser'))
     ProtectedScreen.__init__(self)
     self.firsttime = True
     self['key_red'] = Label(_('Remove plugins'))
     self['key_green'] = Label(_('Download plugins'))
     self['key_blue'] = self['blue'] = Label(_('Hold plugins'))
     self.list = []
     self['list'] = PluginList(self.list)
     if config.usage.sort_pluginlist.value:
         self['list'].list.sort()
     self['actions'] = ActionMap(['SetupActions', 'WizardActions'], {
         'ok': self.save,
         'back': self.close,
         'menu': self.menu
     })
     self['PluginDownloadActions'] = ActionMap(['ColorActions'], {
         'red': self.delete,
         'green': self.download,
         'blue': self.toogle
     })
     self['DirectionActions'] = ActionMap(['DirectionActions'], {
         'moveUp': self.moveUp,
         'moveDown': self.moveDown
     })
     self.onFirstExecBegin.append(self.checkWarnings)
     self.onShown.append(self.updateList)
     self.onChangedEntry = []
     self['list'].onSelectionChanged.append(self.selectionChanged)
     self.onLayoutFinish.append(self.saveListsize)
     if config.pluginfilter.userfeed.value != 'http://':
         if not os.path.exists('/etc/opkg/user-feed.conf'):
             CreateFeedConfig()
Ejemplo n.º 28
0
	def __init__(self, session):
		Screen.__init__(self, session)

		self.firsttime = True

# [iq
		self.mtdSwap = 0

		self.pathForSwap = None
		if not self.mtdSwap:

#			hddList = harddiskmanager.HDDList()
#			for h in hddList:
#				if "/media/hdd" in h[1].findMount():
#					self.hddForSwap = h[1].findMount()
#					break
#
#				devpath = "/sys/block/" + h[1].device[:3]
#				removable = bool(int(readFile(devpath + "/removable")))
#				if not removable:
#					if not self.hddForSwap:
#					self.hddForSwap = h[1].findMount()

			from Components.Harddisk import isFileSystemSupported
			for partition in harddiskmanager.getMountedPartitions():
				if "/media/hdd" in partition.mountpoint:
					self.pathForSwap = partition.mountpoint
					break

				if partition.device and isFileSystemSupported(partition.filesystem()):
					if not self.pathForSwap:
						self.pathForSwap = partition.mountpoint

		self.Console = SwapConsole()
		self.swapOn()
# iq]

		self["red"] = Label(_("Remove Plugins"))
		self["green"] = Label(_("Download Plugins"))
		
		self.list = []
		self["list"] = PluginList(self.list)
		if config.usage.sort_pluginlist.value:
			self["list"].list.sort() # sort

# NOTE : plugins sort
		
		self["actions"] = ActionMap(["WizardActions"],
		{
			"ok": self.save,
			"back": self.close,
		})
		self["PluginDownloadActions"] = ActionMap(["ColorActions"],
		{
			"red": self.delete,
			"green": self.download
		})

		self.onFirstExecBegin.append(self.checkWarnings)
		self.onShown.append(self.updateList)
		self.onChangedEntry = []
		self["list"].onSelectionChanged.append(self.selectionChanged)
		self.onLayoutFinish.append(self.saveListsize)
# [iq
#		self.onLayoutFinish.append(self.swapOn)
		self.onClose.append(self.swapOff)