From 9015ce354743d7a3a73400c8b91cd85a6ceaeb96 Mon Sep 17 00:00:00 2001 From: acid-burn Date: Fri, 13 Feb 2009 08:13:40 +0100 Subject: remove IPKGInstaller and ConfigurationBackup start working on Softwaremanager --- .../Plugins/Extensions/IpkgInstaller/.cvsignore | 4 -- .../Plugins/Extensions/IpkgInstaller/Makefile.am | 5 -- .../Plugins/Extensions/IpkgInstaller/__init__.py | 0 .../Plugins/Extensions/IpkgInstaller/plugin.py | 67 ---------------------- lib/python/Plugins/Extensions/Makefile.am | 2 +- 5 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 lib/python/Plugins/Extensions/IpkgInstaller/.cvsignore delete mode 100644 lib/python/Plugins/Extensions/IpkgInstaller/Makefile.am delete mode 100644 lib/python/Plugins/Extensions/IpkgInstaller/__init__.py delete mode 100644 lib/python/Plugins/Extensions/IpkgInstaller/plugin.py mode change 100644 => 100755 lib/python/Plugins/Extensions/Makefile.am (limited to 'lib/python/Plugins/Extensions') diff --git a/lib/python/Plugins/Extensions/IpkgInstaller/.cvsignore b/lib/python/Plugins/Extensions/IpkgInstaller/.cvsignore deleted file mode 100644 index 138b9cc2..00000000 --- a/lib/python/Plugins/Extensions/IpkgInstaller/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -*.pyc -*.pyo -Makefile -Makefile.in diff --git a/lib/python/Plugins/Extensions/IpkgInstaller/Makefile.am b/lib/python/Plugins/Extensions/IpkgInstaller/Makefile.am deleted file mode 100644 index ece0698f..00000000 --- a/lib/python/Plugins/Extensions/IpkgInstaller/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -installdir = $(LIBDIR)/enigma2/python/Plugins/Extensions/IpkgInstaller - -install_PYTHON = \ - __init__.py \ - plugin.py diff --git a/lib/python/Plugins/Extensions/IpkgInstaller/__init__.py b/lib/python/Plugins/Extensions/IpkgInstaller/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/python/Plugins/Extensions/IpkgInstaller/plugin.py b/lib/python/Plugins/Extensions/IpkgInstaller/plugin.py deleted file mode 100644 index 4893dc47..00000000 --- a/lib/python/Plugins/Extensions/IpkgInstaller/plugin.py +++ /dev/null @@ -1,67 +0,0 @@ -from Components.ActionMap import ActionMap -from Components.Ipkg import IpkgComponent -from Components.Label import Label -from Components.SelectionList import SelectionList -from Plugins.Plugin import PluginDescriptor -from Screens.Ipkg import Ipkg -from Screens.Screen import Screen - -class IpkgInstaller(Screen): - skin = """ - - - - - - - - """ - - def __init__(self, session, list): - self.skin = IpkgInstaller.skin - Screen.__init__(self, session) - - self.list = SelectionList() - self["list"] = self.list - for listindex in range(len(list)): - self.list.addSelection(list[listindex], list[listindex], listindex, True) - - self["red"] = Label() - self["green"] = Label() - self["yellow"] = Label() - self["blue"] = Label() - - self["actions"] = ActionMap(["OkCancelActions", "ColorActions"], - { - "ok": self.list.toggleSelection, - "cancel": self.close, - "green": self.install - }, -1) - - def install(self): - list = self.list.getSelectionsList() - cmdList = [] - for item in list: - cmdList.append((IpkgComponent.CMD_INSTALL, { "package": item[1] })) - print cmdList - self.session.open(Ipkg, cmdList = cmdList) - -def filescan_open(list, session, **kwargs): - filelist = [x.path for x in list] - session.open(IpkgInstaller, filelist) # list - -def filescan(**kwargs): - from Components.Scanner import Scanner, ScanPath - return \ - Scanner(mimetypes = ["application/x-debian-package"], - paths_to_scan = - [ - ScanPath(path = "ipk", with_subdirs = True), - ScanPath(path = "", with_subdirs = False), - ], - name = "Ipkg", - description = "Install software updates...", - openfnc = filescan_open, ) - -def Plugins(**kwargs): - return [ PluginDescriptor(name="Ipkg", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan) ] diff --git a/lib/python/Plugins/Extensions/Makefile.am b/lib/python/Plugins/Extensions/Makefile.am old mode 100644 new mode 100755 index 9f3737aa..edbd2084 --- a/lib/python/Plugins/Extensions/Makefile.am +++ b/lib/python/Plugins/Extensions/Makefile.am @@ -1 +1 @@ -SUBDIRS = TuxboxPlugins FileManager CutListEditor PicturePlayer MediaScanner MediaPlayer IpkgInstaller GraphMultiEPG SocketMMI DVDPlayer DVDBurn +SUBDIRS = TuxboxPlugins FileManager CutListEditor PicturePlayer MediaScanner MediaPlayer GraphMultiEPG SocketMMI DVDPlayer DVDBurn -- cgit v1.2.3 From 60881a22938560d1b583797ddf74b62d24926517 Mon Sep 17 00:00:00 2001 From: acid-burn Date: Fri, 13 Feb 2009 08:17:55 +0100 Subject: do not show inaccessible devices in deviceselection --- lib/python/Plugins/Extensions/MediaScanner/plugin.py | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 lib/python/Plugins/Extensions/MediaScanner/plugin.py (limited to 'lib/python/Plugins/Extensions') diff --git a/lib/python/Plugins/Extensions/MediaScanner/plugin.py b/lib/python/Plugins/Extensions/MediaScanner/plugin.py old mode 100644 new mode 100755 index 88b917ee..2c31197d --- a/lib/python/Plugins/Extensions/MediaScanner/plugin.py +++ b/lib/python/Plugins/Extensions/MediaScanner/plugin.py @@ -42,6 +42,9 @@ def scan(session): parts = [ (r.description, r.mountpoint, session) for r in harddiskmanager.getMountedPartitions(onlyhotplug = False)] if len(parts): + for x in parts: + if not access(x[1], F_OK|R_OK): + parts.remove(x) session.openWithCallback(mountpoint_choosen, ChoiceBox, title = _("Please Select Medium to be Scanned"), list = parts) def main(session, **kwargs): -- cgit v1.2.3 From 8530482b1d58468eade8ae2cfd618c694bef75d2 Mon Sep 17 00:00:00 2001 From: acid-burn Date: Fri, 13 Feb 2009 10:51:23 +0100 Subject: really only show accessible devices --- lib/python/Plugins/Extensions/MediaScanner/plugin.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/python/Plugins/Extensions') diff --git a/lib/python/Plugins/Extensions/MediaScanner/plugin.py b/lib/python/Plugins/Extensions/MediaScanner/plugin.py index 2c31197d..b43662ef 100755 --- a/lib/python/Plugins/Extensions/MediaScanner/plugin.py +++ b/lib/python/Plugins/Extensions/MediaScanner/plugin.py @@ -45,6 +45,9 @@ def scan(session): for x in parts: if not access(x[1], F_OK|R_OK): parts.remove(x) + for x in parts: # first run sometimes skips an entry + if not access(x[1], F_OK|R_OK): + parts.remove(x) session.openWithCallback(mountpoint_choosen, ChoiceBox, title = _("Please Select Medium to be Scanned"), list = parts) def main(session, **kwargs): -- cgit v1.2.3 From 954ca139746278ae94ba5a5b0aaccbf5a2dcd13b Mon Sep 17 00:00:00 2001 From: acid-burn Date: Fri, 13 Feb 2009 10:55:43 +0100 Subject: Revert "really only show accessible devices" This reverts commit 8530482b1d58468eade8ae2cfd618c694bef75d2. --- lib/python/Plugins/Extensions/MediaScanner/plugin.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'lib/python/Plugins/Extensions') diff --git a/lib/python/Plugins/Extensions/MediaScanner/plugin.py b/lib/python/Plugins/Extensions/MediaScanner/plugin.py index b43662ef..2c31197d 100755 --- a/lib/python/Plugins/Extensions/MediaScanner/plugin.py +++ b/lib/python/Plugins/Extensions/MediaScanner/plugin.py @@ -45,9 +45,6 @@ def scan(session): for x in parts: if not access(x[1], F_OK|R_OK): parts.remove(x) - for x in parts: # first run sometimes skips an entry - if not access(x[1], F_OK|R_OK): - parts.remove(x) session.openWithCallback(mountpoint_choosen, ChoiceBox, title = _("Please Select Medium to be Scanned"), list = parts) def main(session, **kwargs): -- cgit v1.2.3 From dc88bc9542802a1180b53142be5f777d75c6c22e Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 13 Feb 2009 23:38:52 +0100 Subject: add default for ConfigColor.. ConfigSequence needs this now --- lib/python/Plugins/Extensions/DVDBurn/DVDProject.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/python/Plugins/Extensions') diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py index 7ea32dfe..660234f2 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py +++ b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py @@ -2,8 +2,8 @@ from Tools.Directories import fileExists from Components.config import config, ConfigSubsection, ConfigInteger, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence, ConfigSubList class ConfigColor(ConfigSequence): - def __init__(self): - ConfigSequence.__init__(self, seperator = "#", limits = [(0,255),(0,255),(0,255)]) + def __init__(self, default = [128,128,128]): + ConfigSequence.__init__(self, seperator = "#", limits = [(0,255),(0,255),(0,255)], default = default) class ConfigFilename(ConfigText): def __init__(self): -- cgit v1.2.3 From 50e234c05779c9da64c2d825086988706210bbb1 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 16 Feb 2009 16:38:26 +0100 Subject: the current libdreamdvd no more touch policy and aspect.. so its not needed to save and restore this settings --- lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 8 -------- 1 file changed, 8 deletions(-) (limited to 'lib/python/Plugins/Extensions') diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index 421a2b4e..8e2a9f3a 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -369,9 +369,6 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP self.onFirstExecBegin.append(self.showFileBrowser) self.service = None self.in_menu = False - self.old_aspect = open("/proc/stb/video/aspect", "r").read() - self.old_policy = open("/proc/stb/video/policy", "r").read() - self.old_wss = open("/proc/stb/denc/0/wss", "r").read() def keyNumberGlobal(self, number): print "You pressed number " + str(number) @@ -635,11 +632,6 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP pass def __onClose(self): - for i in (("/proc/stb/video/aspect", self.old_aspect), ("/proc/stb/video/policy", self.old_policy), ("/proc/stb/denc/0/wss", self.old_wss)): - try: - open(i[0], "w").write(i[1]) - except IOError: - print "restore", i[0], "failed" self.restore_infobar_seek_config() self.session.nav.playService(self.oldService) -- cgit v1.2.3