1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Centralized remote timer error messages

This commit is contained in:
Klaus Schmidinger 2015-09-11 08:38:11 +02:00
parent f1bef11f45
commit 2491984da3

8
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.c 4.8 2015/09/11 08:28:51 kls Exp $ * $Id: menu.c 4.9 2015/09/11 08:38:11 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -1064,7 +1064,7 @@ eOSState cMenuEditTimer::SetFolder(void)
static bool RemoteTimerError(const cTimer *Timer) static bool RemoteTimerError(const cTimer *Timer)
{ {
Skins.Message(mtError, cString::sprintf(tr("Error while accessing remote timer %d@%s!"), Timer->Id(), Timer->Remote())); Skins.Message(mtError, cString::sprintf("%s %d@%s!", tr("Error while accessing remote timer"), Timer->Id(), Timer->Remote()));
return false; // convenience return code return false; // convenience return code
} }
@ -1334,7 +1334,7 @@ eOSState cMenuTimers::OnOff(void)
if (Timer->Remote()) { if (Timer->Remote()) {
cStringList Response; cStringList Response;
if (!ExecSVDRPCommand(Timer->Remote(), cString::sprintf("MODT %d %s", Timer->Id(), *Timer->ToText(true)), &Response) || SVDRPCode(Response[0]) != 250) if (!ExecSVDRPCommand(Timer->Remote(), cString::sprintf("MODT %d %s", Timer->Id(), *Timer->ToText(true)), &Response) || SVDRPCode(Response[0]) != 250)
Skins.Message(mtError, cString::sprintf(tr("Error while accessing timer %d@%s!"), Timer->Id(), Timer->Remote())); RemoteTimerError(Timer);
} }
LOCK_SCHEDULES_READ; LOCK_SCHEDULES_READ;
Timer->SetEventFromSchedule(Schedules); Timer->SetEventFromSchedule(Schedules);
@ -1384,7 +1384,7 @@ eOSState cMenuTimers::Delete(void)
if (Timer->Remote()) { if (Timer->Remote()) {
cStringList Response; cStringList Response;
if (!ExecSVDRPCommand(Timer->Remote(), cString::sprintf("DELT %d", Timer->Id()), &Response) || SVDRPCode(Response[0]) != 250) if (!ExecSVDRPCommand(Timer->Remote(), cString::sprintf("DELT %d", Timer->Id()), &Response) || SVDRPCode(Response[0]) != 250)
Skins.Message(mtError, cString::sprintf(tr("Error while accessing timer %d@%s!"), Timer->Id(), Timer->Remote())); RemoteTimerError(Timer);
} }
Timers->Del(Timer); Timers->Del(Timer);
cOsdMenu::Del(Current()); cOsdMenu::Del(Current());