From 301bab11f8453a6899153b7be338a352803b22cb Mon Sep 17 00:00:00 2001 From: Ronny Strutz Date: Sun, 28 Aug 2005 23:13:58 +0000 Subject: [PATCH] added setup screens --- acinclude.m4 | 180 ++++++++++++++----------- config.h.in | 21 ++- configure.ac | 7 +- keymap.xml | 102 -------------- lib/gdi/Makefile.am | 2 +- lib/gdi/gfbdc.cpp | 6 +- lib/gdi/sdl.cpp | 2 +- lib/gui/elistboxcontent.cpp | 5 +- lib/python/Components/Clock.py | 3 +- lib/python/Components/InputDevice.py | 4 +- lib/python/Components/Makefile.am | 3 +- lib/python/Components/__init__.py | 3 +- lib/python/Components/config.py | 39 ++++-- lib/python/Screens/ChannelSelection.py | 8 +- lib/python/Screens/InfoBar.py | 4 +- lib/python/Screens/Makefile.am | 2 +- lib/python/Screens/Menu.py | 62 ++++----- lib/python/Screens/Setup.py | 72 +++++++++- lib/python/Screens/TimerEdit.py | 2 +- main/Makefile.am | 4 +- main/enigma.cpp | 3 + mytest.py | 3 + skin.py | 31 +++-- 23 files changed, 299 insertions(+), 269 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 074e1a03..b92d02fa 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2,6 +2,8 @@ AC_DEFUN(TUXBOX_APPS,[ AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE +INSTALL="$INSTALL -p" + AC_GNU_SOURCE AC_SYS_LARGEFILE @@ -10,7 +12,7 @@ AC_ARG_WITH(target, [TARGET="$withval"],[TARGET="native"]) AC_ARG_WITH(targetprefix, - [ --with-targetprefix=PATH prefix relative to target root [[PREFIX[for native], /[for cdk]]]], + [ --with-targetprefix=PATH prefix relative to target root (only applicable in cdk mode)], [targetprefix="$withval"],[targetprefix="NONE"]) AC_ARG_WITH(debug, @@ -22,7 +24,11 @@ if test "$DEBUG" = "yes"; then AC_DEFINE(DEBUG,1,[Enable debug messages]) fi +AC_MSG_CHECKING(target) + if test "$TARGET" = "native"; then + AC_MSG_RESULT(native) + if test "$CFLAGS" = "" -a "$CXXFLAGS" = ""; then CFLAGS="-Wall -O2 -pipe $DEBUG_CFLAGS" CXXFLAGS="-Wall -O2 -pipe $DEBUG_CFLAGS" @@ -30,13 +36,10 @@ if test "$TARGET" = "native"; then if test "$prefix" = "NONE"; then prefix=/usr/local fi - if test "$targetprefix" = "NONE"; then - targetprefix="\${prefix}" - _targetprefix="${prefix}" - else - _targetprefix="$targetprefix" - fi + targetprefix=$prefix elif test "$TARGET" = "cdk"; then + AC_MSG_RESULT(cdk) + if test "$CC" = "" -a "$CXX" = ""; then CC=powerpc-tuxbox-linux-gnu-gcc CXX=powerpc-tuxbox-linux-gnu-g++ fi @@ -45,99 +48,127 @@ elif test "$TARGET" = "cdk"; then CXXFLAGS="-Wall -Os -mcpu=823 -pipe $DEBUG_CFLAGS" fi if test "$prefix" = "NONE"; then - prefix=/dbox2/cdkroot + AC_MSG_ERROR(invalid prefix, you need to specify one in cdk mode) fi if test "$targetprefix" = "NONE"; then targetprefix="" - _targetprefix="" - else - _targetprefix="$targetprefix" fi if test "$host_alias" = ""; then cross_compiling=yes host_alias=powerpc-tuxbox-linux-gnu fi else + AC_MSG_RESULT(none) AC_MSG_ERROR([invalid target $TARGET, choose on from native,cdk]); fi AC_CANONICAL_BUILD AC_CANONICAL_HOST -targetdatadir="\${targetprefix}/share" -_targetdatadir="${_targetprefix}/share" -targetsysconfdir="\${targetprefix}/etc" -_targetsysconfdir="${_targetprefix}/etc" -targetlocalstatedir="\${targetprefix}/var" -_targetlocalstatedir="${_targetprefix}/var" -targetlibdir="\${targetprefix}/lib" -_targetlibdir="${_targetprefix}/lib" -AC_SUBST(targetprefix) -AC_SUBST(targetdatadir) -AC_SUBST(targetsysconfdir) -AC_SUBST(targetlocalstatedir) - check_path () { return $(perl -e "if(\"$1\"=~m#^/usr/(local/)?bin#){print \"0\"}else{print \"1\";}") } ]) +AC_DEFUN(TUXBOX_APPS_DIRECTORY_ONE,[ +AC_ARG_WITH($1,[ $6$7 [[PREFIX$4$5]]],[ + _$2=$withval + if test "$TARGET" = "cdk"; then + $2=`eval echo "${targetprefix}$withval"` + else + $2=$withval + fi +],[ + $2="\${$3}$5" + if test "$TARGET" = "cdk"; then + _$2=`eval echo "${target$3}$5"` + else + _$2=`eval echo "${$3}$5"` + fi +]) + +dnl automake <= 1.6 don't support this +dnl AC_SUBST($2) +AC_DEFINE_UNQUOTED($2,"$_$2",$7) +]) + AC_DEFUN(TUXBOX_APPS_DIRECTORY,[ AC_REQUIRE([TUXBOX_APPS]) -CONFIGDIR="\${localstatedir}/tuxbox/config" -_CONFIGDIR="${_targetlocalstatedir}/tuxbox/config" -AC_SUBST(CONFIGDIR) -AC_DEFINE_UNQUOTED(CONFIGDIR,"$_CONFIGDIR",[where to find the config files]) +if test "$TARGET" = "cdk"; then + datadir="\${prefix}/share" + tuxboxdatadir="\${prefix}/share/tuxbox" + zoneinfodir="\${datadir}/zoneinfo" + sysconfdir="\${prefix}/etc" + localstatedir="\${prefix}/var" + localedir="\${prefix}/var" + libdir="\${prefix}/lib" + targetdatadir="\${targetprefix}/share" + targetsysconfdir="\${targetprefix}/etc" + targetlocalstatedir="\${targetprefix}/var" + targetlibdir="\${targetprefix}/lib" +fi -DATADIR="\${datadir}/tuxbox" -_DATADIR="${_targetdatadir}/tuxbox" -AC_SUBST(DATADIR) -AC_DEFINE_UNQUOTED(DATADIR,"$_DATADIR",[where to find data like icons]) +TUXBOX_APPS_DIRECTORY_ONE(configdir,CONFIGDIR,sysconfdir,/etc,, + [--with-configdir=PATH ],[where to find the config files]) -FONTDIR="\${datadir}/fonts" -_FONTDIR="${_targetdatadir}/fonts" -AC_SUBST(FONTDIR) -AC_DEFINE_UNQUOTED(FONTDIR,"$_FONTDIR",[where to find the fonts]) +TUXBOX_APPS_DIRECTORY_ONE(datadir,DATADIR,datadir,/share,, + [--with-datadir=PATH ],[where to find data]) -GAMESDIR="\${localstatedir}/tuxbox/games" -_GAMESDIR="${_targetlocalstatedir}/tuxbox/games" -AC_SUBST(GAMESDIR) -AC_DEFINE_UNQUOTED(GAMESDIR,"$_GAMESDIR",[where games data is stored]) +TUXBOX_APPS_DIRECTORY_ONE(localedir,LOCALEDIR,datadir,/share,/locale, + [--with-localedir=PATH ],[where to find locales]) -LIBDIR="\${libdir}/tuxbox" -_LIBDIR="${_targetlibdir}/tuxbox" -AC_SUBST(LIBDIR) -AC_SUBST(_LIBDIR) -AC_DEFINE_UNQUOTED(LIBDIR,"$_LIBDIR",[where to find the internal libs]) +TUXBOX_APPS_DIRECTORY_ONE(fontdir,FONTDIR,datadir,/share,/fonts, + [--with-fontdir=PATH ],[where to find the fonts]) -PLUGINDIR="\${libdir}/tuxbox/plugins" -_PLUGINDIR="${_targetlibdir}/tuxbox/plugins" -AC_SUBST(PLUGINDIR) -AC_DEFINE_UNQUOTED(PLUGINDIR,"$_PLUGINDIR",[where to find the plugins]) +TUXBOX_APPS_DIRECTORY_ONE(gamesdir,GAMESDIR,localstatedir,/var,/tuxbox/games, + [--with-gamesdir=PATH ],[where games data is stored]) + +TUXBOX_APPS_DIRECTORY_ONE(libdir,LIBDIR,libdir,/lib,/tuxbox, + [--with-libdir=PATH ],[where to find the internal libs]) -UCODEDIR="\${localstatedir}/tuxbox/ucodes" -_UCODEDIR="${_targetlocalstatedir}/tuxbox/ucodes" -AC_SUBST(UCODEDIR) -AC_DEFINE_UNQUOTED(UCODEDIR,"$_UCODEDIR",[where to find the ucodes (firmware)]) +TUXBOX_APPS_DIRECTORY_ONE(plugindir,PLUGINDIR,libdir,/lib,/tuxbox/plugins, + [--with-plugindir=PATH ],[where to find the plugins]) + +TUXBOX_APPS_DIRECTORY_ONE(tuxboxdatadir,TUXBOXDATADIR,datadir,/share,/tuxbox, + [--with-tuxboxdatadir=PATH],[where to find tuxbox data]) + +TUXBOX_APPS_DIRECTORY_ONE(zoneinfodir,ZONEINFODIR,datadir,/share,/zoneinfo, + [--with-zoneinfodir=PATH ],[where to find zoneinfo db]) ]) +dnl automake <= 1.6 needs this specifications +AC_SUBST(CONFIGDIR) +AC_SUBST(DATADIR) +AC_SUBST(ZONEINFODIR) +AC_SUBST(FONTDIR) +AC_SUBST(GAMESDIR) +AC_SUBST(LIBDIR) +AC_SUBST(LOCALEDIR) +AC_SUBST(PLUGINDIR) +AC_SUBST(TUXBOXDATADIR) +dnl end workaround + AC_DEFUN(TUXBOX_APPS_ENDIAN,[ AC_CHECK_HEADERS(endian.h) AC_C_BIGENDIAN ]) AC_DEFUN(TUXBOX_APPS_DRIVER,[ -AC_ARG_WITH(driver, - [ --with-driver=PATH path for driver sources[[NONE]]], - [DRIVER="$withval"],[DRIVER=""]) - -if test -z "$DRIVER"; then - AC_MSG_ERROR([can't find driver sources]) -fi -CPPFLAGS="$CPPFLAGS -I$DRIVER/include" -AC_SUBST(DRIVER) +#AC_ARG_WITH(driver, +# [ --with-driver=PATH path for driver sources [[NONE]]], +# [DRIVER="$withval"],[DRIVER=""]) +# +#if test -d "$DRIVER/include"; then +# AC_DEFINE(HAVE_DBOX2_DRIVER,1,[Define to 1 if you have the dbox2 driver sources]) +#else +# AC_MSG_ERROR([can't find driver sources]) +#fi + +#AC_SUBST(DRIVER) + +#CPPFLAGS="$CPPFLAGS -I$DRIVER/include" ]) AC_DEFUN([TUXBOX_APPS_DVB],[ @@ -177,7 +208,6 @@ else fi ]) - AC_DEFUN(_TUXBOX_APPS_LIB_CONFIG,[ AC_PATH_PROG($1_CONFIG,$2,no) if test "$$1_CONFIG" != "no"; then @@ -212,16 +242,7 @@ fi ]) AC_DEFUN(_TUXBOX_APPS_LIB_PKGCONFIG,[ -AC_REQUIRE([TUXBOX_APPS_PKGCONFIG]) -AC_MSG_CHECKING(for package $2) -if PKG_CONFIG_PATH="${prefix}/lib/pkgconfig" $PKG_CONFIG --exists "$2" ; then - AC_MSG_RESULT(yes) - $1_CFLAGS=$(PKG_CONFIG_PATH="${prefix}/lib/pkgconfig" $PKG_CONFIG --cflags "$2") - $1_LIBS=$(PKG_CONFIG_PATH="${prefix}/lib/pkgconfig" $PKG_CONFIG --libs "$2") -else - AC_MSG_RESULT(no) -fi - +PKG_CHECK_MODULES($1,$2) AC_SUBST($1_CFLAGS) AC_SUBST($1_LIBS) ]) @@ -348,8 +369,7 @@ AC_SUBST(DUMMYPOFILES) AC_SUBST(CATALOGS) ]) - - +dnl backward compatiblity AC_DEFUN([AC_GNU_SOURCE], [AH_VERBATIM([_GNU_SOURCE], [/* Enable GNU extensions on systems that have them. */ @@ -361,3 +381,13 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_DEFINE([_GNU_SOURCE]) ]) +AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +]) + diff --git a/config.h.in b/config.h.in index 3224a09a..35648361 100644 --- a/config.h.in +++ b/config.h.in @@ -3,7 +3,7 @@ /* where to find the config files */ #undef CONFIGDIR -/* where to find data like icons */ +/* where to find data */ #undef DATADIR /* Enable debug messages */ @@ -19,6 +19,12 @@ /* where games data is stored */ #undef GAMESDIR +/* Define to 1 if you have the dvb includes */ +#undef HAVE_DVB + +/* Define to the version of the dvb api */ +#undef HAVE_DVB_API_VERSION + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -55,6 +61,9 @@ /* where to find the internal libs */ #undef LIBDIR +/* where to find locales */ +#undef LOCALEDIR + /* Name of package */ #undef PACKAGE @@ -79,12 +88,18 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* where to find the ucodes (firmware) */ -#undef UCODEDIR +/* where to find tuxbox data */ +#undef TUXBOXDATADIR /* Version number of package */ #undef VERSION +/* With SDL */ +#undef WITH_SDL + +/* where to find zoneinfo db */ +#undef ZONEINFODIR + /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS diff --git a/configure.ac b/configure.ac index ebdd8974..0a8a7dc7 100644 --- a/configure.ac +++ b/configure.ac @@ -10,7 +10,7 @@ AC_PROG_RANLIB AC_ARG_WITH(pythonincdir, [ --with-pythonincdir=NAME dir [[...]]], - [PYTHON_INCDIR="$withval"],[PYTHON_INCDIR="/usr/include/python2.3"]) + [PYTHON_INCDIR="$withval"],[PYTHON_INCDIR="/usr/include/python2.4"]) AC_SUBST(PYTHON_INCDIR) AC_ARG_WITH(libsdl, @@ -30,14 +30,13 @@ TUXBOX_APPS_LIB_PKGCONFIG(MAD,mad) TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng) TUXBOX_APPS_LIB_PKGCONFIG(SIGC,sigc++-1.2) #TUXBOX_APPS_LIB_PKGCONFIG(XMLTREE,tuxbox-xmltree) - if test "$withsdl" = "yes" ; then TUXBOX_APPS_LIB_CONFIG(SDL,sdl-config) AC_DEFINE_UNQUOTED([WITH_SDL],[$withsdl],[With SDL]) fi # fixme: decent python stuff -CPPFLAGS="$CPPFLAGS $MD5SUM_CFLAGS $FREETYPE_CFLAGS $FRIBIDI_CFLAGS $ID3TAG_CFLAGS $MAD_CFLAGS $PLUGINS_CFLAGS $PNG_CFLAGS $SIGC_CFLAGS $XMLTREE_CFLAGS $SDL_CFLAGS -I$PYTHON_INCDIR -DHAVE_CPP_FILT -DMEMLEAK_CHECK" +CPPFLAGS="$CPPFLAGS $MD5SUM_CFLAGS $FREETYPE_CFLAGS $FRIBIDI_CFLAGS $ID3TAG_CFLAGS $MAD_CFLAGS $PLUGINS_CFLAGS $PNG_CFLAGS $SIGC_CFLAGS $XMLTREE_CFLAGS -I$PYTHON_INCDIR -DHAVE_CPP_FILT -DMEMLEAK_CHECK" CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions -Wall" LDFLAGS="$LDFLAGS -rdynamic" @@ -50,8 +49,8 @@ lib/actions/Makefile lib/base/Makefile lib/driver/Makefile lib/dvb/Makefile -lib/dvb_si/Makefile lib/dvb_ci/Makefile +lib/dvb_si/Makefile lib/gdi/Makefile lib/gui/Makefile lib/nav/Makefile diff --git a/keymap.xml b/keymap.xml index ec26ccaf..e69de29b 100644 --- a/keymap.xml +++ b/keymap.xml @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/gdi/Makefile.am b/lib/gdi/Makefile.am index abb75b79..c3fc6556 100644 --- a/lib/gdi/Makefile.am +++ b/lib/gdi/Makefile.am @@ -5,4 +5,4 @@ noinst_LIBRARIES = libenigma_gdi.a libenigma_gdi_a_SOURCES = \ region.cpp grc.cpp epng.cpp erect.cpp fb.cpp font.cpp font_arabic.cpp gfbdc.cpp \ - glcddc.cpp gpixmap.cpp lcd.cpp sdl.cpp gfont.cpp + glcddc.cpp gpixmap.cpp lcd.cpp gfont.cpp diff --git a/lib/gdi/gfbdc.cpp b/lib/gdi/gfbdc.cpp index 7130b0c7..8dc0a7d2 100644 --- a/lib/gdi/gfbdc.cpp +++ b/lib/gdi/gfbdc.cpp @@ -14,7 +14,7 @@ gFBDC::gFBDC() if (!fb->Available()) eFatal("no framebuffer available"); - fb->SetMode(720, 576, 8); + fb->SetMode(720, 576, 32); for (int y=0; y<576; y++) // make whole screen transparent memset(fb->lfb+y*fb->Stride(), 0x00, fb->Stride()); @@ -22,8 +22,8 @@ gFBDC::gFBDC() surface.type = 0; surface.x = 720; surface.y = 576; - surface.bpp = 8; - surface.bypp = 1; + surface.bpp = 32; + surface.bypp = 4; surface.stride = fb->Stride(); surface.data = fb->lfb; surface.clut.colors=256; diff --git a/lib/gdi/sdl.cpp b/lib/gdi/sdl.cpp index 10513ae5..655fa933 100644 --- a/lib/gdi/sdl.cpp +++ b/lib/gdi/sdl.cpp @@ -1,5 +1,5 @@ #ifdef WITH_SDL - +#error #include #include diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index d9e186a3..1c27f766 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -452,8 +452,11 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style, int width = item_right.width() * value / 100; int height = item_right.height(); + /* draw slider */ - painter.fill(eRect(offset.x() + m_seperation, offset.y(), width, height)); + //painter.fill(eRect(offset.x() + m_seperation, offset.y(), width, height)); + //hack - make it customizable + painter.fill(eRect(offset.x() + m_seperation, offset.y() + 5, width, height-10)); /* pvalue is borrowed */ } diff --git a/lib/python/Components/Clock.py b/lib/python/Components/Clock.py index 3beed551..eba5ea27 100644 --- a/lib/python/Components/Clock.py +++ b/lib/python/Components/Clock.py @@ -21,7 +21,8 @@ class Clock(HTMLComponent, GUIComponent, VariableText): # "funktionalitaet" def doClock(self): t = time.localtime() - self.setText("%2d:%02d:%02d" % (t[3], t[4], t[5])) + #HACK use timezone settings + self.setText("%2d:%02d:%02d" % (t[3] + 2, t[4], t[5])) # realisierung als GUI def createWidget(self, parent): diff --git a/lib/python/Components/InputDevice.py b/lib/python/Components/InputDevice.py index 599dff34..eb88e650 100644 --- a/lib/python/Components/InputDevice.py +++ b/lib/python/Components/InputDevice.py @@ -17,8 +17,8 @@ class inputDevices: def InitInputDevices(): config.inputDevices = ConfigSubsection(); - config.inputDevices.repeat = configElement("config.inputDevices.repeat", ConfigSlider, 3); - config.inputDevices.delay = configElement("config.inputDevices.delay", ConfigSlider, 3); + config.inputDevices.repeat = configElement("config.inputDevices.repeat", ConfigSlider, 5, ""); + config.inputDevices.delay = configElement("config.inputDevices.delay", ConfigSlider, 4, ""); #this instance anywhere else needed? iDevices = inputDevices(); diff --git a/lib/python/Components/Makefile.am b/lib/python/Components/Makefile.am index 969077aa..88118ebf 100644 --- a/lib/python/Components/Makefile.am +++ b/lib/python/Components/Makefile.am @@ -6,6 +6,5 @@ install_DATA = \ Clock.py HTMLSkin.py ServiceList.py VariableText.py \ ConfigList.py Header.py ServiceName.py VariableValue.py \ EventInfo.py Label.py ServiceScan.py VolumeBar.py \ - GUIComponent.py MenuList.py TextInput.py __init__.py MovieList.py \ + GUIComponent.py MenuList.py TextInput.py __init__.py MovieList.py \ InputDevice.py ServicePosition.py - diff --git a/lib/python/Components/__init__.py b/lib/python/Components/__init__.py index 8453ced5..fb9eeaa4 100644 --- a/lib/python/Components/__init__.py +++ b/lib/python/Components/__init__.py @@ -3,5 +3,6 @@ __all__ = ["ActionMap", "Button", "Clock", "ConfigList", "EventInfo", "GUIComponent", "GUISkin", "HTMLComponent", "HTMLSkin", "Header", "Label", "MenuList", "PerServiceDisplay", "ProgressBar", "ServiceList", "ServiceName", "ServiceScan", "VariableText", "VariableValue", "VolumeBar", - "components", "config", "TimerList", "TimeInput", "MovieList", "ServicePosition" ] + "components", "config", "TimerList", "TimeInput", "MovieList", + "InputDevice", "ServicePosition" ] diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 10296437..15119617 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -1,15 +1,31 @@ # temp stuff :) class configBoolean: - def __init__(self, reg): - self.reg = reg - self.val = 0 + def __init__(self, parent): + self.parent = parent + self.val = parent.value + self.vals = parent.vals + + def handleKey(self, key): + if key == 1: + self.val = self.val - 1 + if key == 2: + self.val = self.val + 1 + + if self.val < 0: + self.val = 0 + +# if self.val > 1: +# self.val = 1 - def toggle(self): - self.val += 1 - self.val %= 3 + def __call__(self): #needed by configlist - def __str__(self): - return ("NO", "YES", "MAYBE")[self.val] + print len(self.vals) + print self.val + + if(self.val > (len(self.vals) - 1)): + self.val = len(self.vals) - 1 + + return ("text",self.vals[self.val]) class configValue: def __init__(self, obj): @@ -48,7 +64,6 @@ class ConfigSlider: if self.val > 10: self.val = 10 - def __call__(self): #needed by configlist return ("slider", self.val * 10) @@ -57,10 +72,12 @@ class ConfigSubsection: pass class configElement: - def __init__(self, configPath, control, defaultValue): + def __init__(self, configPath, control, defaultValue, vals): self.configPath = configPath - self.value = 0 #read from registry else use default +# self.value = 0 #read from registry else use default + self.value = defaultValue #read from registry else use default self.controlType = control + self.vals = vals self.notifierList = [ ] def addNotifier(self, notifier): self.notifierList.append(notifier); diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index 3155c44d..e421c5c9 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -55,10 +55,10 @@ class ChannelSelection(Screen): ## FIXME self.__marked = [ ] - self["key_red"] = Button("red") - self["key_green"] = Button("green") - self["key_yellow"] = Button("yellow") - self["key_blue"] = Button("blue") + self["key_red"] = Button("All") + self["key_green"] = Button("ARD") + self["key_yellow"] = Button("ZDF") + self["key_blue"] = Button("Custom") self["list"] = ServiceList() self["list"].setRoot(eServiceReference("""1:0:1:0:0:0:0:0:0:0:(type == 1)""")) diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index 0ead7221..44484a51 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -106,8 +106,8 @@ class InfoBar(Screen): quitMainloop() def instantRecord(self): - self.session.open(MessageBox, "this would be an instant recording! do you really know what you're doing?!") - return + #self.session.open(MessageBox, "this would be an instant recording! do you really know what you're doing?!") + #return if self.recording != None: print "remove entry" diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am index 9250018e..e645997d 100644 --- a/lib/python/Screens/Makefile.am +++ b/lib/python/Screens/Makefile.am @@ -3,4 +3,4 @@ installdir = $(LIBDIR)/enigma2/python/Screens install_DATA = \ ChannelSelection.py ClockDisplay.py ConfigMenu.py InfoBar.py Menu.py \ MessageBox.py ScartLoopThrough.py Screen.py ServiceScan.py TimerEdit.py \ - MovieSelection.py Setup.py __init__.py + MovieSelection.py SetupRCU.py Setup.py __init__.py diff --git a/lib/python/Screens/Menu.py b/lib/python/Screens/Menu.py index fd2f2761..11b265e3 100644 --- a/lib/python/Screens/Menu.py +++ b/lib/python/Screens/Menu.py @@ -12,6 +12,8 @@ from Components.Label import Label from Components.ProgressBar import ProgressBar from ConfigMenu import * +from About import * + from TimerEdit import * from enigma import quitMainloop @@ -27,56 +29,50 @@ def doGlobal(screen): screen["clock"] = Clock() +# self.setModeTV() +# self.setModeRadio() +# self.setModeFile() +# self.openDialog(ScartLoopThrough) +# + mdom = xml.dom.minidom.parseString( """ - + quitMainloop() - self.openDialog(ServiceScan) - - self.openSetup("rc") - self.openSetup("blasel") - - self.setModeTV() - self.setModeRadio() - self.setModeFile() - self.openDialog(ScartLoopThrough) self.openDialog(TimerEditList) - + - - - - + self.openSetup("satconfig") + + + self.openDialog(ServiceScan) - - - - - + self.openSetup("timezone") + self.openSetup("avsetup") + self.openSetup("rfmod") - - self.openDialog(configOSD) - - + self.openSetup("rc") + self.openSetup("keyboard") + self.openSetup("osd") + self.openSetup("lcd") - - + self.openSetup("parental") + self.openSetup("expert") - - + + self.openDialog(About) - - - - self.goSetup() + quitMainloop() + quitMainloop() + quitMainloop() """) @@ -142,7 +138,7 @@ class Menu(Screen): self.session.open(dialog) def openSetup(self, dialog): - self.session.open(setup, dialog) + self.session.open(Setup, dialog) def addMenu(self, destList, node): MenuTitle = getValbyAttr(node, "text") diff --git a/lib/python/Screens/Setup.py b/lib/python/Screens/Setup.py index de27ff5e..a694ab16 100644 --- a/lib/python/Screens/Setup.py +++ b/lib/python/Screens/Setup.py @@ -4,6 +4,7 @@ from Components.config import config #global config instance from Components.config import configEntry from Components.config import configBoolean from Components.ConfigList import ConfigList +from Components.Label import Label import xml.dom.minidom from xml.dom import EMPTY_NAMESPACE @@ -13,10 +14,66 @@ from Tools import XMLTools setupdom = xml.dom.minidom.parseString( """ - - config.inputDevices.repeat - config.inputDevices.delay - + + + config.inputDevices.repeat + config.inputDevices.delay + config.rc.map + + + config.timezone.val + + + config.av.colorformat + config.av.aspectratio + config.av.tvsystem + config.av.wss + config.av.defaultac3 + config.av.vcrswitch + + + config.rfmod.enable + config.rfmod.test + config.rfmod.sound + config.rfmod.soundcarrier + config.rfmod.channel + config.rfmod.finetune + + + config.keyboard.keymap + + + config.osd.alpha + config.osd.bright + config.osd.contrast + config.osd.language + + + config.lcd.bright + config.lcd.standby + config.lcd.invert + + + config.parental.lock + config.parental.setuplock + + + config.expert.splitsize + config.expert.satpos + config.expert.fastzap + config.expert.skipconfirm + config.expert.hideerrors + config.expert.autoinfo + + + config.sat.diseqcA + config.sat.posA + config.sat.satA + config.sat.diseqcB + config.sat.posB + config.sat.satB + + """) def getValbyAttr(x, attr): @@ -66,7 +123,9 @@ class Setup(Screen): print "request setup for " + setup - entries = setupdom.childNodes + xmldata = setupdom.childNodes[0] + + entries = xmldata.childNodes list = [] @@ -83,6 +142,9 @@ class Setup(Screen): self["config"] = ConfigList(list) + self["ok"] = Label("OK") + self["cancel"] = Label("Cancel") + self["actions"] = ActionMap(["SetupActions"], { "cancel": self.close, diff --git a/lib/python/Screens/TimerEdit.py b/lib/python/Screens/TimerEdit.py index f8c9f207..173b1ba2 100644 --- a/lib/python/Screens/TimerEdit.py +++ b/lib/python/Screens/TimerEdit.py @@ -64,7 +64,7 @@ class TimerEditList(Screen): self["actions"] = ActionMap(["OkCancelActions"], { - "ok": self.openEdit, +# "ok": self.openEdit, "cancel": self.close }) diff --git a/main/Makefile.am b/main/Makefile.am index d96e25aa..5a7d1ef7 100644 --- a/main/Makefile.am +++ b/main/Makefile.am @@ -14,6 +14,7 @@ enigma2_LDADD_WHOLE = \ $(top_builddir)/lib/driver/libenigma_driver.a \ $(top_builddir)/lib/dvb/libenigma_dvb.a \ $(top_builddir)/lib/dvb_si/libenigma_dvb_si.a \ + $(top_builddir)/lib/dvb_ci/libenigma_dvb_ci.a \ $(top_builddir)/lib/gdi/libenigma_gdi.a \ $(top_builddir)/lib/gui/libenigma_gui.a \ $(top_builddir)/lib/python/libenigma_python.a \ @@ -27,8 +28,7 @@ enigma2_LDADD = \ @MAD_LIBS@ \ @PNG_LIBS@ \ @SIGC_LIBS@ \ - @SDL_LIBS@ \ - -ldl -lpthread -lcrypt -lresolv -lpython2.3 + -ldl -lpthread -lcrypt -lresolv -lpython2.4 enigma2$(EXEEXT): $(enigma2_OBJECTS) $(enigma2_DEPENDENCIES) $(enigma2_LDADD_WHOLE) # @rm -f enigma2$(EXEEXT) diff --git a/main/enigma.cpp b/main/enigma.cpp index 3d84db7d..3a728b8d 100644 --- a/main/enigma.cpp +++ b/main/enigma.cpp @@ -1,4 +1,6 @@ +#undef WITH_SDL #ifdef WITH_SDL +#error #define SDLDC #endif #include @@ -13,6 +15,7 @@ #include #include #ifdef WITH_SDL +#error #include #endif #include diff --git a/mytest.py b/mytest.py index d04990d6..e944e3b3 100644 --- a/mytest.py +++ b/mytest.py @@ -172,6 +172,9 @@ skin.loadSkin(getDesktop()) import Components.InputDevice Components.InputDevice.InitInputDevices() +import Components.SetupDevices +Components.SetupDevices.InitSetupDevices() + # first, setup a screen try: runScreenTest() diff --git a/skin.py b/skin.py index 7d24441d..c8705d9c 100644 --- a/skin.py +++ b/skin.py @@ -47,22 +47,25 @@ dom = xml.dom.minidom.parseString( """ """ - + - - - - - - + + + + - - + + + + + + + @@ -74,7 +77,7 @@ dom = xml.dom.minidom.parseString( - + @@ -88,7 +91,7 @@ dom = xml.dom.minidom.parseString( - + @@ -107,9 +110,9 @@ dom = xml.dom.minidom.parseString( - - - + + + -- 2.30.2