From c68943c97eeb0107f724ec96aae311e319c750a9 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Mon, 15 Jun 2009 01:38:16 +0200 Subject: allow position="center,center" to center screen client area on screen --- lib/python/Components/GUISkin.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/python/Components') diff --git a/lib/python/Components/GUISkin.py b/lib/python/Components/GUISkin.py index 9eb4a80b..1bd27297 100644 --- a/lib/python/Components/GUISkin.py +++ b/lib/python/Components/GUISkin.py @@ -85,6 +85,9 @@ class GUISkin: if not self.instance: from enigma import eWindow self.instance = eWindow(self.desktop, z) + + # we need to make sure that certain attributes come last + self.skinAttributes.sort(key=lambda a: {"position": 1}.get(a[0], 0)) self.title = title applyAllAttributes(self.instance, self.desktop, self.skinAttributes, self.scale) self.createGUIScreen(self.instance, self.desktop) -- cgit v1.2.3 From 17d12fc3339d68b023ab6f388a3576af2bcb4949 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Mon, 15 Jun 2009 02:05:00 +0200 Subject: use ::getInfoObject for filesize (allows >4G) --- lib/python/Components/Converter/MovieInfo.py | 2 +- lib/service/servicedvb.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'lib/python/Components') diff --git a/lib/python/Components/Converter/MovieInfo.py b/lib/python/Components/Converter/MovieInfo.py index 635cedc4..d5995fe8 100644 --- a/lib/python/Components/Converter/MovieInfo.py +++ b/lib/python/Components/Converter/MovieInfo.py @@ -41,7 +41,7 @@ class MovieInfo(Converter, object): rec_ref_str = info.getInfoString(service, iServiceInformation.sServiceref) return ServiceReference(rec_ref_str).getServiceName() elif self.type == self.MOVIE_REC_FILESIZE: - return "%d MB" % (info.getInfo(service, iServiceInformation.sFileSize) / (1024*1024)) + return "%d MB" % (info.getInfoObject(service, iServiceInformation.sFileSize) / (1024*1024)) return "" text = property(getText) diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index c256213d..70675fd7 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -336,6 +336,7 @@ public: int isPlayable(const eServiceReference &ref, const eServiceReference &ignore) { return 1; } int getInfo(const eServiceReference &ref, int w); std::string getInfoString(const eServiceReference &ref,int w); + PyObject *getInfoObject(const eServiceReference &r, int what); }; DEFINE_REF(eStaticServiceDVBPVRInformation); @@ -427,6 +428,17 @@ std::string eStaticServiceDVBPVRInformation::getInfoString(const eServiceReferen } } +PyObject *eStaticServiceDVBPVRInformation::getInfoObject(const eServiceReference &r, int what) +{ + switch (what) + { + case iServiceInformation::sFileSize: + return PyLong_FromLongLong(m_parser.m_filesize); + default: + Py_RETURN_NONE; + } +} + RESULT eStaticServiceDVBPVRInformation::getEvent(const eServiceReference &ref, ePtr &evt, time_t start_time) { if (!ref.path.empty()) -- cgit v1.2.3