fixed the time display when the scheduler is not running (+ typos)

This commit is contained in:
fgerlits 2006-04-14 17:11:18 +00:00
parent 97a0144a66
commit 40fa38627c
2 changed files with 12 additions and 8 deletions

View File

@ -145,23 +145,23 @@ const std::string windowPositionsKey = "windowPositions";
const std::string editedPlaylistTokenKey = "editedPlaylistToken";
/*------------------------------------------------------------------------------
* Static constant for the key of the scheduler not available key
* Static constant for the key of the scheduler not available error message
*----------------------------------------------------------------------------*/
const std::string schedulerNotReachableKey = "schedulerNotReachableMsg";
/*------------------------------------------------------------------------------
* Static constant for the key of the storage not available key
* Static constant for the key of the storage not available error message
*----------------------------------------------------------------------------*/
const std::string storageNotReachableKey = "storageNotReachableMsg";
/*------------------------------------------------------------------------------
* Static constant for the key of the authentication not available key
* Static constant for the key of the authentication not available error msg
*----------------------------------------------------------------------------*/
const std::string authenticationNotReachableKey =
"authenticationNotReachableMsg";
/*------------------------------------------------------------------------------
* Static constant for the key of the locale not available key
* Static constant for the key of the locale not available error message
*----------------------------------------------------------------------------*/
const std::string localeNotAvailableKey = "localeNotAvailableMsg";

View File

@ -359,10 +359,14 @@ MasterPanelWindow :: onUpdateTime(int dummy) throw ()
{
Ptr<const ptime>::Ref now;
try {
now = gLiveSupport->getScheduler()->getSchedulerTime();
} catch (XmlRpcException &e) {
// TODO: handle error
if (gLiveSupport->isSchedulerAvailable()) {
try {
now = gLiveSupport->getScheduler()->getSchedulerTime();
} catch (XmlRpcException &e) {
// TODO: handle error
}
} else {
now = TimeConversion::now();
}
if (now.get()) {