]> git.vomp.tv Git - vompclient.git/commitdiff
Add static icons in menu
authorMarten Richter <marten.richter@freenet.de>
Sun, 12 Oct 2014 13:37:55 +0000 (15:37 +0200)
committerMarten Richter <marten.richter@freenet.de>
Sun, 12 Oct 2014 13:37:55 +0000 (15:37 +0200)
16 files changed:
CREDITS
GNUmakefile
command.cc
osdopenvg.cc
other/licence.txt
staticartwork.h
tbboxx.cc
tbboxx.h
vchannellist.cc
vepglistadvanced.cc
vopts.cc
vtimeredit.cc
vtimerlist.cc
vwelcome.cc
vwelcome.h
wselectlist.cc

diff --git a/CREDITS b/CREDITS
index 788547e37b5eddb773431cc8bc5cf513272fa3ae..9de0c9974e2ef8cf199f4e945c2fa32e9f70cb68 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -62,6 +62,8 @@ Thanks to the following people for their work with the MVP:
 Jon Gettler, BtB and the other MVPMC developers
 Dominic Morris for the vdr-mediamvp VDR plugin
 
+Thanks to Louis Braun for his skinnoopacity plugin, where
+a lot of the artwork for the new skin of vomp is borrowed from.
 
 This list is most likely incomplete. Apologies to anyone
 I have forgotten, and for forgetting to update this list.
index 26c9621629bee1cb2af85a75de0b60d18b8eda34..8e1bc46a1ebd5b14aedb542198e9bc1f6cc20292 100644 (file)
@@ -46,6 +46,19 @@ include objects.mk
 OBJECTSWIN = threadwin.o remotewin.o ledwin.o mtdwin.o videowin.o audiowin.o osdwin.o surfacewin.o
 OBJECTS = $(OBJECTS1) 
 
+PICTURES = -Wl,--format=binary 
+PICTURES += -Wl,other/vdrhires.png 
+PICTURES += -Wl,other/wallpaper720p.jpg 
+PICTURES += -Wl,other/properties.png 
+PICTURES += -Wl,other/radio.png 
+PICTURES += -Wl,other/timers.png 
+PICTURES += -Wl,other/tv.png 
+PICTURES += -Wl,other/recordings.png
+PICTURES += -Wl,other/restart.png  
+PICTURES += -Wl,--format=default 
+
+
+
 
 ifeq ($(vomp_platform),mvp)
 $(info MVP flags)
@@ -65,7 +78,7 @@ endif
 
 ifeq ($(vomp_platform),raspberry)
 $(info Raspberry pi flags)
-LDFLAGS = -Wall -Wl,--format=binary -Wl,other/vdrhires.jpg -Wl,other/wallpaper720p.jpg -Wl,--format=default 
+LDFLAGS = -Wall $(PICTURES)
 LIBS = -L/opt/vc/lib -lpthread -lrt -lEGL -lOpenVG -lopenmaxil -lbcm_host   -lavformat -lavcodec -lavutil -lavresample
 
 OBJECTS += main.o threadp.o  osdvector.o surfacevector.o osdopenvg.o ledraspberry.o mtdraspberry.o videoomx.o audioomx.o imageomx.o wjpegsimple.o remotelinux.o  
@@ -79,7 +92,7 @@ endif
 
 ifeq ($(vomp_platform),crossraspberry)
 $(info Raspberry pi flags cross compiler)
-LDFLAGS = -Wall -Wl,--format=binary -Wl,other/vdrhires.jpg -Wl,other/wallpaper720p.jpg -Wl,--format=default -Wl,--verbose -Xlinker --rpath-link=rpi-root/usr/lib/arm-linux-gnueabihf -Xlinker --rpath-link=rpi-root/lib/arm-linux-gnueabihf -Xlinker --rpath-link=rpi-root/opt/vc/lib
+LDFLAGS = -Wall $(PICTURES) -Wl,--verbose -Xlinker --rpath-link=rpi-root/usr/lib/arm-linux-gnueabihf -Xlinker --rpath-link=rpi-root/lib/arm-linux-gnueabihf -Xlinker --rpath-link=rpi-root/opt/vc/lib
 LIBS = -Lrpi-root/opt/vc/lib -Lrpi-root/lib -Lrpi-root/usr/lib -Lrpi-root/lib/arm-linux-gnueabihf -Lrpi-root/usr/lib/arm-linux-gnueabihf -Lrpi-root/usr/local/lib -lpthread -lrt -lEGL -lOpenVG -lopenmaxil -lbcm_host -lavformat -lavcodec -lavutil -lavresample -ldl -lfontconfig
 
 OBJECTS += main.o threadp.o osdvector.o surfacevector.o osdopenvg.o ledraspberry.o mtdraspberry.o videoomx.o audioomx.o imageomx.o wjpegsimple.o remotelinux.o
index 4c41ce13558317cfd8203fd22ed245f8a3aa4a28..a8db30e065a5521c357f837073ba1fc9030813d4 100644 (file)
@@ -55,6 +55,7 @@
 #include "boxstack.h"
 #include "log.h"
 #include "vsleeptimer.h"
+#include "wjpeg.h"
 
 
 Command* Command::instance = NULL;
@@ -465,7 +466,7 @@ void Command::processMessage(Message* m)
       }
       case Message::NEW_PICTURE:
       {
-         Log::getInstance()->log("Command", Log::DEBUG, "TVMedia NEW_PICTURE");
+         //Log::getInstance()->log("Command", Log::DEBUG, "TVMedia NEW_PICTURE");
          OsdVector *osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
          if (osdv) {
                  osdv->informPicture(m->tag,m->parameter);
@@ -474,9 +475,10 @@ void Command::processMessage(Message* m)
       } break;
       case Message::NEW_PICTURE_STATIC:
       {
+         //Log::getInstance()->log("Command", Log::DEBUG, "TVMedia NEW_PICTURE %x %x",m->tag,m->parameter);
          OsdVector *osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
          if (osdv) {
-                 osdv->informPicture(((long long)m->tag)<<32LL,m->parameter);
+                 osdv->informPicture(((unsigned long long)m->tag)<<32LL,m->parameter);
          }
 
       } break;
index 9dc944323e93e581231187be2be9a4f089075a99..16c41a650ced34365c6c35bda2605e427b198f4b 100644 (file)
@@ -940,14 +940,19 @@ void OsdOpenVG::executeDrawCommand(SVGCommand & command)
                        float tx=command.x;
                        float ty=command.y;
                        if (command.corner == TopLeftLimited) {
-                               if (imagewidth>imageheight && scalex!=0.f) {
-                                       scaley=0.f;
-                                       ty+=(command.h-imageheight * scalex/aspect_correction)*0.5f;
-                               }
-                               if (imagewidth<imageheight && scaley!=0.f) {
-                                       scalex=0.f;
-                                       tx+=(command.w-imagewidth * scaley*aspect_correction)*0.5f;
+                               if (scalex !=0.f && scaley !=0.f) {
+                                       float imageaspect=imagewidth/imageheight;
+                                       float boxaspect=command.w/command.h/aspect_correction;
+                                       if (imageaspect > boxaspect) {
+                                               scaley=0.f;
+                                               ty+=(command.h-imageheight * scalex/aspect_correction)*0.5f;
+                                       } else {
+                                               scalex=0.f;
+                                               tx+=(command.w-imagewidth * scaley*aspect_correction)*0.5f;
+                                       }
+
                                }
+
                        }
                        if (scalex==0.f && scaley==0.f) {
                                scalex=aspect_correction;
@@ -1202,7 +1207,6 @@ unsigned int OsdOpenVG::handleTask(OpenVGCommand& command)
                        m->message=Message::NEW_PICTURE_STATIC;
                        m->tag = info->lindex>> 32LL;
                }
-               m->tag = info->lindex;
                Command::getInstance()->postMessageFromOuterSpace(m); // inform command about new picture
 
                delete info;
@@ -1226,7 +1230,6 @@ unsigned int OsdOpenVG::handleTask(OpenVGCommand& command)
                eglDestroyImageKHR(egl_display,info->reference);
                bool static_image=true;
                if (info->lindex & 0xffffffff) static_image=false;
-
                Message* m = new  Message();
                m->from=this;
                m->to=Command::getInstance();
@@ -1255,12 +1258,12 @@ unsigned int OsdOpenVG::handleTask(OpenVGCommand& command)
                        vgSetColor(handle,command.param1);
                        VGuint rgba;
                        rgba = vgGetColor((VGPaint)handle);
-                       Log::getInstance()->log("OSD", Log::DEBUG, "Draw Paint %d %x %x",handle,command.param1,rgba);
+                       //Log::getInstance()->log("OSD", Log::DEBUG, "Draw Paint %d %x %x",handle,command.param1,rgba);
                } break;
                case DrawStyle::GradientLinear: {
                        vgSetParameteri(handle, VG_PAINT_TYPE, VG_PAINT_TYPE_LINEAR_GRADIENT);
                        VGfloat params[]={style->x1,style->y1,style->x2,style->y2,style->r};
-                       Log::getInstance()->log("OSD", Log::DEBUG, "Draw Gradient %d %g %g %g %g",handle,params[0],params[1],params[2],params[3]);
+                       //Log::getInstance()->log("OSD", Log::DEBUG, "Draw Gradient %d %g %g %g %g",handle,params[0],params[1],params[2],params[3]);
                        vgSetParameterfv(handle,VG_PAINT_LINEAR_GRADIENT,4,params);
 
 
@@ -1431,6 +1434,7 @@ bool OsdOpenVG::getStaticImageData(unsigned int static_id, UCHAR **userdata, ULO
 void  OsdOpenVG::createPicture(struct PictureInfo& pict_inf)
 {
        struct OpenVGCommand comm;
+       Log::getInstance()->log("OsdOpenVG", Log::DEBUG, "TVMedia Create Picture %d",pict_inf.type);
        if (pict_inf.type == PictureInfo::RGBAMemBlock) {
                comm.task = OVGcreateImageMemory;
                comm.data =  new PictureInfo(pict_inf);
index 7c3b49e59f5bb72546ff9c8fb4a2a5dc2718180b..6a741dbf6f4972c6ab0e41768665b2545c78a6e5 100644 (file)
@@ -1,3 +1,9 @@
+All png's are extracted from the skinnoopacity plugin by Louis Braun, which is 
+also subject to GPL v2 like vomp.
+
+Other artwork:
+
+vdrhires.png and
 vdr.jpg is lifted from VDR's home page which states:
 "Free project statement This is a FREE and completely non-commercial project.
 Any information posted on these pages is freely available to anybody. All
@@ -9,7 +15,8 @@ Licensed under Creative Commons Licence.
 
 ------------------------------------------------------------------
 
-wallpaper.jpg is actually blue-bend.jpg from the KDE wallpapers.
+wallpaper.jpg and the high resolution version is actually blue-bend.jpg 
+from the KDE wallpapers.
 It was taken from the debian package kdebase-data - the copyright
 file is below.
 
index 7b03e5f2dcd1d306b6c5dd41de3c6726d781167a..0f212e496f16b363c3e12f6aa12c172e9868c626 100644 (file)
 #define STATIC_ARTWORK_H
 
 #define EXTERNAL_PICTS \
-       EXTERNALPICTURE(vdrlogo, vdrhires, jpg) \
-       EXTERNALPICTURE(wallpaper, wallpaper720p, jpg)
+       EXTERNALPICTURE(vdrlogo, vdrhires, png) \
+       EXTERNALPICTURE(wallpaper, wallpaper720p, jpg) \
+       EXTERNALPICTURE(properties, properties, png) \
+       EXTERNALPICTURE(radio, radio, png) \
+       EXTERNALPICTURE(recordings, recordings, png) \
+       EXTERNALPICTURE(restart, restart, png) \
+       EXTERNALPICTURE(timers, timers, png) \
+       EXTERNALPICTURE(tv, tv, png)
+
 
 #define EXTERNALPICTURE(name, fname, fileextension)  sa_ ## name,
 
 
 typedef enum tStaticArtwork
 {
+       sa_None,
        EXTERNAL_PICTS
        sa_MAX
 } StaticArtwork;
index 1a39b9717b7467a863f67a3464e062d86742100e..58ce630ce7533e63de2dff3d55a21706bc73c2fa 100644 (file)
--- a/tbboxx.cc
+++ b/tbboxx.cc
@@ -28,11 +28,13 @@ TBBoxx::TBBoxx()
   borderOn = 0;
   titleText = NULL;
   titleBarTextWidth = 0;
+  icon = NULL;
 }
 
 TBBoxx::~TBBoxx()
 {
   if (titleText) delete[] titleText;
+  if (icon) delete icon;
 }
 
 void TBBoxx::setTitleText(const char* takeText, int width)
@@ -58,10 +60,17 @@ void TBBoxx::draw()
   if (titleBarOn)
   {
     rectangle(0, 0, area.w, 30, titleBarColour);
+    int xpos = 5;
+#ifdef GRADIENT_DRAWING
+    if (icon) {
+       drawTVMedia(*icon, xpos,0,30,30,TopLeftLimited);
+       xpos+=5+30;
+    }
+#endif
     if (titleText)
     {
-      if (titleBarTextWidth) drawText(titleText, 5, 5, titleBarTextWidth, DrawStyle::LIGHTTEXT);
-      else drawText(titleText, 5, 5, DrawStyle::LIGHTTEXT);
+      if (titleBarTextWidth) drawText(titleText, xpos, 5, titleBarTextWidth+5-xpos, DrawStyle::LIGHTTEXT);
+      else drawText(titleText, xpos, 5, DrawStyle::LIGHTTEXT);
     }
   }
 
@@ -73,6 +82,12 @@ void TBBoxx::setTitleBarColour(const DrawStyle& Tcolour)
   titleBarColour = Tcolour;
 }
 
+void TBBoxx::setTitleBarIcon(TVMediaInfo * ticon)
+{
+       if (icon) delete icon;
+       icon = ticon;
+}
+
 void TBBoxx::setTitleBarOn(UCHAR on)
 {
   titleBarOn = on;
index 182366eeca52345bf7c567bf0081fd81dd376b23..73edb1df872dba4a775bf0096714ea1c951abda8 100644 (file)
--- a/tbboxx.h
+++ b/tbboxx.h
@@ -42,6 +42,7 @@ class TBBoxx : public Boxx
     void setTitleText(const char* title, int width=0);
 
     void setTitleBarColour(const DrawStyle& colour);
+    void setTitleBarIcon(TVMediaInfo * icon);
     char* getTitleText() { return titleText; };
 
   private:
@@ -52,6 +53,7 @@ class TBBoxx : public Boxx
   protected:
     DrawStyle titleBarColour;
     UCHAR titleBarOn;
+    TVMediaInfo *icon;
 };
 
 #endif
index 9233a9eb8809ce67f54042c7b93e9585ef230651..18b0e786814d5e48ce6956c74862688612ac2fad 100644 (file)
@@ -30,6 +30,7 @@
 #include "message.h"
 #include "boxstack.h"
 #include "vchannelselect.h"
+#include "staticartwork.h"
 
 VChannelList::VChannelList(ULONG type)
 {
@@ -50,10 +51,16 @@ VChannelList::VChannelList(ULONG type)
   if (type == VDR::VIDEO)
   {
     setTitleText(tr("Channels"));
+    TVMediaInfo *info= new TVMediaInfo();
+    info->setStaticArtwork(sa_tv);
+    setTitleBarIcon(info);
   }
   else if (type == VDR::RADIO)
   {
     setTitleText(tr("Radio Stations"));
+    TVMediaInfo *info= new TVMediaInfo();
+    info->setStaticArtwork(sa_radio);
+    setTitleBarIcon(info);
   }
   setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
 
index c87884daba7a79f82b3d4d8484269d0dc71192c1..981f780bb4df364fd27bd44d7cf338345a8eba2e 100644 (file)
@@ -37,6 +37,7 @@
 #include "vepgsummary.h"
 #include "vepgsettimer.h"
 #include "vepg.h"
+#include "staticartwork.h"
 
 #include <sstream>
 
@@ -57,6 +58,9 @@ VEpgListAdvanced::VEpgListAdvanced(VVideoLiveTV *tvideolive, ChannelList* tchanL
 
        setTitleBarOn(1);
        setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
+       TVMediaInfo *info= new TVMediaInfo();
+       info->setChannelLogo(channelNumber);
+       setTitleBarIcon(info);
 
        sl.setPosition(10, 30 + 5);
        sl.setSize(area.w*42/100 - 20, area.h - 30 - 15 - 30);
@@ -210,6 +214,9 @@ void VEpgListAdvanced::doNext()
        mode=Next;
        updateEpgDataNowNext(true);
        setButtonText();
+       TVMediaInfo *info= new TVMediaInfo();
+       info->setStaticArtwork(sa_tv);
+       setTitleBarIcon(info);
        draw(true);
        boxstack->update(this);
 }
@@ -223,6 +230,9 @@ void VEpgListAdvanced::doNow()
        mode=Now;
        updateEpgDataNowNext(true);
        setButtonText();
+       TVMediaInfo *info= new TVMediaInfo();
+       info->setStaticArtwork(sa_tv);
+       setTitleBarIcon(info);
        draw(true);
        boxstack->update(this);
 }
@@ -236,6 +246,9 @@ void VEpgListAdvanced::doProgramm()
        channelNumber = chan->number;
        updateEpgDataChannel();
        setButtonText();
+       TVMediaInfo *info= new TVMediaInfo();
+       info->setChannelLogo(channelNumber);
+       setTitleBarIcon(info);
        draw(true);
        boxstack->update(this);
 }
@@ -586,8 +599,8 @@ void VEpgListAdvanced::draw(bool doIndexPop)
        TBBoxx::draw();
 
 
-       TVMediaInfo info;
-       info.setChannelLogo(channelNumber);
+
+
 
 
 
@@ -597,12 +610,9 @@ void VEpgListAdvanced::draw(bool doIndexPop)
        time(&now);
        btime = localtime(&now);
        strftime(freeSpace, 299, "%d/%m/%y", btime);
-       if (mode == OneChannel) {
-               drawTVMedia(info,getWidth(),0.f,0,30.f,TopRight);
-               drawTextRJ(freeSpace, getWidth()-30, 5, DrawStyle::LIGHTTEXT);
-       } else {
-               drawTextRJ(freeSpace, getWidth(), 5, DrawStyle::LIGHTTEXT);
-       }
+
+       drawTextRJ(freeSpace, getWidth(), 5, DrawStyle::LIGHTTEXT);
+
        // Symbols
 
        WSymbol w;
@@ -683,6 +693,11 @@ void VEpgListAdvanced::updateSelection()
 {
        updateEpgData();
        int channel=0;
+       if (mode==OneChannel) {
+               TVMediaInfo *info= new TVMediaInfo();
+               info->setChannelLogo(channelNumber);
+               setTitleBarIcon(info);
+       }
        Event* toShow = getCurrentOptionEvent(channel);
        if (toShow)
        {
index 84d3084496bb32666f4b327308f713a181593fb7..a415e7dad5348e88e9df2b142ef88b5248f9d134 100644 (file)
--- a/vopts.cc
+++ b/vopts.cc
@@ -32,6 +32,7 @@
 #include "option.h"
 #include "vdr.h"
 #include "command.h"
+#include "staticartwork.h"
 
 #ifdef VOMP_PLATTFORM_MVP
 #include "mediaoptions.h"
@@ -44,6 +45,9 @@ VOpts::VOpts()
   setTitleBarOn(1);
   setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
   setTitleText(tr("Options"));
+  TVMediaInfo *info= new TVMediaInfo();
+  info->setStaticArtwork(sa_properties);
+  setTitleBarIcon(info);
 
 
   setSize(520, 360);
index 81ed8f9f04a6d961cc3a21fe865096acd7038b26..1c17cbea0f8ac53e54df85606f8c72cd98bc4259 100644 (file)
@@ -30,6 +30,7 @@
 #include "timers.h"
 #include "vquestion.h"
 #include "command.h"
+#include "staticartwork.h"
 
 VTimerEdit::VTimerEdit(RecTimer* trt)
 {
@@ -57,6 +58,9 @@ VTimerEdit::VTimerEdit(RecTimer* trt)
   setTitleBarOn(1);
   setTitleText(tr("Edit Timer"));
   setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
+  TVMediaInfo *info= new TVMediaInfo();
+  info->setStaticArtwork(sa_timers);
+  setTitleBarIcon(info);
 }
 
 VTimerEdit::~VTimerEdit()
index e781354ca232b0357f38ce8b4d65c728dd67555a..b9f3897acef7568f49d76758a40da3ed90ab5f30 100644 (file)
@@ -33,6 +33,7 @@
 #include "vdr.h"
 #include "vinfo.h"
 #include "log.h"
+#include "staticartwork.h"
 
 VTimerList::VTimerList()
 {
@@ -67,6 +68,9 @@ VTimerList::VTimerList()
   setTitleBarOn(1);
   setTitleText(tr("Timers"));
   setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
+  TVMediaInfo *info= new TVMediaInfo();
+  info->setStaticArtwork(sa_timers);
+  setTitleBarIcon(info);
 
   sl.setPosition(30, 30 + 5);
   sl.setSize(area.w - 40, area.h - 30 - 15 - 30);
@@ -160,7 +164,9 @@ bool VTimerList::load()
 void VTimerList::drawClock()
 {
   // Blank the area first
+#ifndef GRADIENT_DRAWING
   rectangle(area.w - 150, 0, 150, 30, titleBarColour);
+#endif
 
   char timeString[20];
   time_t t;
@@ -241,12 +247,17 @@ void VTimerList::drawIndicators()
 
 void VTimerList::timercall(int clientReference)
 {
+       flipflop = !flipflop;
+#ifndef GRADIENT_DRAWING
   drawClock();
   BoxStack::getInstance()->update(this, &clockRegion);
 
-  flipflop = !flipflop;
   drawIndicators();
   BoxStack::getInstance()->update(this, &indicatorsRegion);
+#else
+  draw();
+  BoxStack::getInstance()->update(this);
+#endif
 }
 
 int VTimerList::handleCommand(int command)
index 9d644f4dfd4fcde750fab0bdd6ead59196f1d962..6168befcbceb029537ea7d35485eb2122fcb6fed 100644 (file)
@@ -36,6 +36,7 @@
 #include "vmedialist.h"
 #include "boxstack.h"
 #include "vopts.h"
+#include "staticartwork.h"
 
 #include "log.h"
 
@@ -48,6 +49,7 @@ VWelcome::VWelcome()
   clockRegion.w = 60;
   clockRegion.h = 30;
 
+#ifndef GRADIENT_DRAWING
   setSize(460, 220);
   createBuffer();
   if (Video::getInstance()->getFormat() == Video::PAL)
@@ -58,37 +60,80 @@ VWelcome::VWelcome()
   {
     setPosition(130, 140);
   }
+#else
+  setSize(460, 240);
+  createBuffer();
+  setPosition(140, 150);
+#endif
 
   setTitleBarOn(1);
   setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
 
+
+#ifndef GRADIENT_DRAWING
+  jpeg.setPosition(240, 60);
+#ifndef _MIPS_ARCH
+  jpeg.init("/vdr.jpg");
+#else
+  jpeg.init("vdr.jpg");
+#endif
+  add(&jpeg);
+#else
+  vdr.setPosition(250, 65);
+  vdr.setSize(180, 160);
+  TVMediaInfo sinfo;
+  sinfo.setStaticArtwork(sa_vdrlogo);
+  vdr.setTVMedia(sinfo, WTVMedia::ZoomHorizontal);
+  add(&vdr);
+
+#endif
+
   sl.setPosition(20, 40);
+#ifdef GRADIENT_DRAWING
+  sl.addColumn(0);
+  sl.addColumn(25);
+  sl.setLinesPerOption(1.5f);
+  sl.setSize(200, 200);
+#else
   sl.setSize(200, 160);
+#endif
   add(&sl);
 
   setTitleText(tr("Welcome"));
-  sl.addOption(tr("1. Live TV"), 1, 1);
-  sl.addOption(tr("2. Radio"), 2, 0);
-  sl.addOption(tr("3. Recordings"), 3, 0);
-  sl.addOption(tr("4. Timers"), 4, 0);
+
+
+  TVMediaInfo *info= new TVMediaInfo();
+  info->setStaticArtwork(sa_tv);
+  sl.addOption(tr("1. Live TV"), 1, 1,info);
+
+  info= new TVMediaInfo();
+  info->setStaticArtwork(sa_radio);
+  sl.addOption(tr("2. Radio"), 2, 0,info);
+
+  info= new TVMediaInfo();
+  info->setStaticArtwork(sa_recordings);
+  sl.addOption(tr("3. Recordings"), 3, 0,info);
+
+  info= new TVMediaInfo();
+  info->setStaticArtwork(sa_timers);
+  sl.addOption(tr("4. Timers"), 4, 0,info);
 #ifdef VOMP_PLATTFORM_MVP
   sl.addOption(tr("5. MediaPlayer"), 5, 0);
 #endif
 
-  sl.addOption(tr("6. Options"), 6, 0);
+  info= new TVMediaInfo();
+  info->setStaticArtwork(sa_properties);
+  sl.addOption(tr("6. Options"), 6, 0,info);
+
+  info= new TVMediaInfo();
+  info->setStaticArtwork(sa_restart);
 #ifndef VOMP_HAS_EXIT
-  sl.addOption(tr("7. Reboot"), 7, 0);
+  sl.addOption(tr("7. Reboot"), 7, 0,info);
 #else
-    sl.addOption(tr("7. Exit"), 7, 0);
+    sl.addOption(tr("7. Exit"), 7, 0,info);
 #endif
 
-  jpeg.setPosition(240, 60);
-#ifndef _MIPS_ARCH  
-  jpeg.init("/vdr.jpg");
-#else
-  jpeg.init("vdr.jpg");
-#endif
-  add(&jpeg);
+
 }
 
 void VWelcome::preDelete()
index 88e1fcb1670e0d5ef01be73e7856ef1445e0ab28..fd70295825fffdf92557aa56819cdfce304364a9 100644 (file)
 #include "tbboxx.h"
 #include "timerreceiver.h"
 #include "wselectlist.h"
+#ifndef GRADIENT_DRAWING
 #include "wjpeg.h"
+#else
+#include "wtvmedia.h"
+#endif
+
 #include "region.h"
 #include "defines.h"
 
@@ -49,7 +54,11 @@ class VWelcome : public TBBoxx, public TimerReceiver
 
   private:
     WSelectList sl;
+#ifndef GRADIENT_DRAWING
     WJpegTYPE jpeg;
+#else
+    WTVMedia vdr;
+#endif
 
     BoxStack* boxstack;
 
index 03610b4bd1dd5ced57d89c940c4020d71ebf32a7..ad56e2df1a458428e15092e179e08bc5d6558b1b 100644 (file)
@@ -160,11 +160,13 @@ void WSelectList::drawOptionLine(char* text, int xpos, int ypos, int width, cons
   float ypos_mod= ypos + (linesPerOption-floor(linesPerOption))*((float)fontHeight)*0.5f;
 
   int imagewidth=0;
+  int xposmod=xpos;
   if (numColumns>1) imagewidth=columns[1]-columns[0];
   if (pict)
   {
          drawTVMedia(*pict, xpos,ypos,imagewidth,fontHeight*linesPerOption,TopLeftLimited);
          taboffset++;
+         xposmod+=xpos;
   }
 
   if (!numColumns && linesPerOption == 1)
@@ -182,7 +184,7 @@ void WSelectList::drawOptionLine(char* text, int xpos, int ypos, int width, cons
     pointer = strtok(buffer, "\t\n");
     while(pointer)
     {
-      drawText(pointer, xpos + columns[currentColumn], ypos_mod + curline * fontHeight, width - columns[currentColumn], colour);
+      drawText(pointer, xposmod + columns[currentColumn], ypos_mod + curline * fontHeight, width - columns[currentColumn], colour);
 
       pointer = strtok(NULL, "\t\n");
       if (pointer) {