]> git.vomp.tv Git - vompclient.git/commitdiff
Last channel highlighted in channel list view
authorChris Tallon <chris@vomp.tv>
Tue, 20 Dec 2005 16:19:03 +0000 (16:19 +0000)
committerChris Tallon <chris@vomp.tv>
Tue, 20 Dec 2005 16:19:03 +0000 (16:19 +0000)
vchannellist.cc
vchannellist.h
vvideolive.cc
vvideolive.h

index e4f8d8d3462e9a8b314352d31ed1dafbc7b5548a..554cf729ff2ed89fd3179eff45ce62eeffb915ce 100644 (file)
@@ -88,6 +88,14 @@ void VChannelList::setList(ChannelList* tlist)
   }
 }
 
+void VChannelList::highlightChannel(Channel* chan)
+{
+  sl.hintSetCurrent(chan->index);
+  sl.draw();
+  doShowingBar();
+  ViewMan::getInstance()->updateView(this);
+}
+
 void VChannelList::draw()
 {
   View::draw();
@@ -200,7 +208,7 @@ int VChannelList::handleCommand(int command)
 
    //   if (chan->type == VDR::RADIO) return 2;
 
-      VVideoLive* v = new VVideoLive(chanList, chan->type);
+      VVideoLive* v = new VVideoLive(chanList, chan->type, this);
 
       v->draw();
       ViewMan::getInstance()->add(v);
index 6f737aa18016f5494c31df18fa92f37dd1104233..4feeb11dc94638e6271c637c8c707348b64fcc55 100644 (file)
@@ -45,6 +45,7 @@ class VChannelList : public View
     ~VChannelList();
 
     void setList(ChannelList* chanList);
+    void highlightChannel(Channel* channel);
 
     int handleCommand(int command);
     void draw();
index e7dabd69533013b86401d197fe00e1737ff412df..7fb9685def654ca3c80379e7f5bc7400b1ba30d5 100644 (file)
@@ -22,7 +22,7 @@
 
 VVideoLive* VVideoLive::instance = NULL;
 
-VVideoLive::VVideoLive(ChannelList* tchanList, ULONG tstreamType)
+VVideoLive::VVideoLive(ChannelList* tchanList, ULONG tstreamType, VChannelList* tvchannelList)
 {
   instance = this;
   vdr = VDR::getInstance();
@@ -30,6 +30,8 @@ VVideoLive::VVideoLive(ChannelList* tchanList, ULONG tstreamType)
   video = Video::getInstance();
 
   chanList = tchanList;
+  vchannelList = tvchannelList;
+
   currentChannel = 0;
   previousChannel = 0;
   unavailable = 0;
@@ -83,6 +85,8 @@ int VVideoLive::handleCommand(int command)
     {
       if (unavailable) showUnavailable(0);
       else stop();
+
+      vchannelList->highlightChannel((*chanList)[currentChannel]);
       return 4;
     }
     // Take up and down from new remote and do live banner
index 3757324c84344e6fa4f7179a8c65aadd32230bd3..8d2d1c5299279fd53487d6a3db4ded89a3a8dd29 100644 (file)
 #include "wtextbox.h"
 
 class VEpg;
-
+class VChannelList;
 class VLiveBanner;
 
 class VVideoLive : public View
 {
   public:
-    VVideoLive(ChannelList* chanList, ULONG streamType);
+    VVideoLive(ChannelList* chanList, ULONG streamType, VChannelList* vchannelList);
     ~VVideoLive();
     static VVideoLive* getInstance();
     void draw();
@@ -77,6 +77,7 @@ class VVideoLive : public View
     Video* video;
     Player* player;
     ChannelList* chanList;
+    VChannelList* vchannelList;
     UINT currentChannel;       // index in list
     UINT previousChannel;      // index in list
     int unavailable;