コード例 #1
0
	def delLang(self):
		curlang = config.osd.language.value
		lang = curlang
		languageList = language.getLanguageListSelection()
		for t in languageList:
			if curlang == t[0]:
				lang = t[1]
				break
		self.session.openWithCallback(self.delLangCB, MessageBox, _("Do you want to delete all other languages?") + _(" Except %s") %(lang), default = False)
コード例 #2
0
ファイル: PluginBrowser.py プロジェクト: henrylicious/e2
	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'
コード例 #3
0
 def delLang(self):
     #		print "[LanguageSelection] deleting language"
     curlang = config.osd.language.value
     lang = curlang
     languageList = language.getLanguageListSelection()
     #		print "[LanguageSelection] deleting language  lang = %s, languagelist = %s", %(lang, languageList)
     for t in languageList:
         if curlang == t[0]:
             lang = t[1]
             break
     self.session.openWithCallback(
         self.delLangCB,
         MessageBox,
         _("Select 'Yes' to delete all languages except English and current language:\n\nSelect 'No' to delete only the chosen language:\n\n"
           ) + _("%s") % (lang),
         default=True)
コード例 #4
0
	def delLangCB(self, answer):
		if answer:
			language.delLanguage()
			language.activateLanguage(self.oldActiveLanguage)
			self.updateList()
			self.selectActiveLanguage()
		else:
			curlang = config.osd.language.value
			lang = curlang
			languageList = language.getLanguageListSelection()
	#		print "[LanguageSelection] deleting language  lang = %s, languagelist = %s", %(lang, languageList)
			for t in languageList:
				if curlang == t[0]:
					lang = t[1]
					break
			self.session.openWithCallback(self.deletelanguagesCB, MessageBox, _("Do you really want to delete selected language:\n\n") + _("%s") %(lang), default = False)
コード例 #5
0
ファイル: PluginBrowser.py プロジェクト: wedebe/enigma2
    def __init__(self, session, type=0, needupdate=True):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Download 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..."))
        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,
        })
        self.opkg = '/usr/bin/opkg'
        self.opkg_install = self.opkg + ' install --force-overwrite'
        self.opkg_remove = self.opkg + ' remove --autoremove --force-depends'
コード例 #6
0
ファイル: PluginBrowser.py プロジェクト: ostende/EGAMI-2
 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...'))
     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 --force-overwrite'
         self.ipkg_remove = self.ipkg + ' remove --autoremove --force-depends'
     else:
         self.ipkg = 'ipkg'
         self.ipkg_install = 'ipkg install --force-overwrite -force-defaults'
         self.ipkg_remove = self.ipkg + ' remove --autoremove --force-depends'
コード例 #7
0
ファイル: LanguageSelection.py プロジェクト: ostende/new-e2
	def deletelanguagesCB(self, anwser):
		if anwser:
			language.delLanguage()
		self.close()

	def cancel(self):
		language.activateLanguage(self.oldActiveLanguage)
		config.osd.language.setValue(self.oldActiveLanguage)
		config.osd.language.save()
		self.close()

	def delLang(self):
		curlang = config.osd.language.value
		lang = curlang
		languageList = language.getLanguageListSelection()
		for t in languageList:
			if curlang == t[0]:
				lang = t[1]
				break
		self.session.openWithCallback(self.delLangCB, MessageBox, _("Do you want to delete all other languages?") + _(" Except %s") %(lang), default = False)

	def delLangCB(self, anwser):
		if anwser:
			language.delLanguage()
			language.activateLanguage(self.oldActiveLanguage)
			self.updateList()
			self.selectActiveLanguage()

	def run(self, justlocal = False):
		print "updating language..."
コード例 #8
0
ファイル: PluginBrowser.py プロジェクト: linuxbox10/e2-vix
    def __init__(self,
                 session,
                 type=0,
                 needupdate=True,
                 menu_path="",
                 skin_name=None):
        Screen.__init__(self, session)
        self.menu_path = menu_path
        self.type = type
        self.needupdate = needupdate
        self.skinName = ["PluginDownloadBrowser"]
        if isinstance(skin_name, str):
            self.skinName.insert(0, skin_name)

        self["menu_path_compressed"] = StaticText("")
        if self.type == self.DOWNLOAD:
            config.misc.pluginbrowser.po.value = True
            screentitle = _("Install plugins")
            if config.usage.show_menupath.value == 'large':
                self.menu_path += screentitle
                title = self.menu_path
                self["menu_path_compressed"].setText("")
            elif config.usage.show_menupath.value == 'small':
                title = screentitle
                self["menu_path_compressed"].setText(
                    self.menu_path + " >" if not self.menu_path.endswith(' / ')
                    else self.menu_path[:-3] + " >" or "")
            else:
                title = screentitle
                self["menu_path_compressed"].setText("")
        elif self.type == self.REMOVE:
            config.misc.pluginbrowser.po.value = False
            screentitle = _("Remove plugins")
            if config.usage.show_menupath.value == 'large':
                self.menu_path += screentitle
                title = self.menu_path
                self["menu_path_compressed"].setText("")
            elif config.usage.show_menupath.value == 'small':
                title = screentitle
                self["menu_path_compressed"].setText(
                    self.menu_path + " >" if not self.menu_path.endswith(' / ')
                    else self.menu_path[:-3] + " >" or "")
            else:
                title = screentitle
                self["menu_path_compressed"].setText("")
        self.setTitle(title)
        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.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..."))
        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'