]> git.vomp.tv Git - vompclient.git/commitdiff
Channel number on vlivebanner
authorChris Tallon <chris@vomp.tv>
Sat, 3 Dec 2005 17:08:19 +0000 (17:08 +0000)
committerChris Tallon <chris@vomp.tv>
Sat, 3 Dec 2005 17:08:19 +0000 (17:08 +0000)
command.cc
vlivebanner.cc

index abf770bd4e9ca31f88e2ea26e7fe0f4452b687ac..60c9f8ced8f2601925bf42a4dc88a4deaba447dd 100644 (file)
@@ -131,13 +131,11 @@ void Command::run()
   {
     // unlock and wait
     pthread_mutex_unlock(&masterLock);
-    logger->log("Command", Log::DEBUG, "un-LOCKED MASTER MUTEX");
 
     button = remote->getButtonPress(2);  // FIXME why is this set to 2 and not 0? so it can quit
     // something happened, lock and process
 
     pthread_mutex_lock(&masterLock);
-    logger->log("Command", Log::DEBUG, "LOCKED MASTER MUTEX");
 
     if ((button == Remote::NA_NONE) || (button == Remote::NA_UNKNOWN)) continue;
 
@@ -156,11 +154,9 @@ void Command::postMessage(Message* m)
   // locking the mutex ensures that the master thread is waiting on getButtonPress
 
   pthread_mutex_lock(&masterLock);
-    logger->log("Command", Log::DEBUG, "LOCKED MASTER MUTEX");
   MessageQueue::postMessage(m);
   kill(mainPid, SIGURG);
   pthread_mutex_unlock(&masterLock);
-    logger->log("Command", Log::DEBUG, "un-LOCKED MASTER MUTEX");
 }
 
 bool Command::postMessageIfNotBusy(Message* m)
@@ -171,11 +167,9 @@ bool Command::postMessageIfNotBusy(Message* m)
 
   if (pthread_mutex_trylock(&masterLock) != EBUSY)
   {
-      logger->log("Command", Log::DEBUG, "LOCKED MASTER MUTEX");
     MessageQueue::postMessage(m);
     kill(mainPid, SIGURG);
     pthread_mutex_unlock(&masterLock);
-      logger->log("Command", Log::DEBUG, "un-LOCKED MASTER MUTEX");
     return true;
   }
   else
@@ -217,13 +211,6 @@ void Command::processMessage(Message* m)
     }
     case Message::TIMER:
     {
-      // FIXME lock main mutex
-      // FIXME Reply - if messages are being processed then main loop is on processMessageQueue()
-      // -- this means the mutex is locked
-
-      // FIXME investigate whether timer can have fired, but waits on this mutex,
-      // a view is deleted, then the timer runs on a non-object
-
       // FIXME - go to one message queue only - then instead of having
       // objects deriving from messagequeues, make them derive from
       // messagereceiver - then one messagequeue can deliver any message to anywhere
@@ -231,11 +218,6 @@ void Command::processMessage(Message* m)
 
       // deliver timer
 
-      logger->log("Command", Log::DEBUG, "m = %p", m);
-      logger->log("Command", Log::DEBUG, "m->message = %i", m->message);
-      logger->log("Command", Log::DEBUG, "m->from = %p", m->from);
-      logger->log("Command", Log::DEBUG, "m->to = %p", m->to);
-      logger->log("Command", Log::DEBUG, "m->parameter = %p", m->parameter);
       ((TimerReceiver*)m->to)->timercall(m->parameter);
       handleCommand(Remote::NA_NONE); // in case any timer has posted messages to viewman,
                                       // run viewman message queue here. FIXME improve this!
index 539b2ada2473f5c8984ff61e9340449191eb6985..4af19cde8e6fce24dc3ecdec6365710bcb2413dc 100644 (file)
@@ -76,7 +76,10 @@ void VLiveBanner::setChannel(Channel* tChannel)
   currentChannel = tChannel;
   // get the data
 
-  setTitleText(currentChannel->name);
+  char ttitleText[100];
+  snprintf(ttitleText, 99, "%03lu - %s", currentChannel->number, currentChannel->name);
+
+  setTitleText(ttitleText);
   eventList = VDR::getInstance()->getChannelSchedule(currentChannel->number);
 
   if (!eventList)