mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Add "Timer On/Off" to recmenu
This commit is contained in:
parent
bf3a8a430b
commit
69356e9c43
@ -3,7 +3,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
"POT-Creation-Date: 2020-08-04 14:15+0200\n"
|
||||||
"PO-Revision-Date: 2013-09-21 17:49+0200\n"
|
"PO-Revision-Date: 2013-09-21 17:49+0200\n"
|
||||||
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
|
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -105,12 +105,15 @@ msgstr ""
|
|||||||
msgid "Instant Record"
|
msgid "Instant Record"
|
||||||
msgstr "Enregistra a l'instant"
|
msgstr "Enregistra a l'instant"
|
||||||
|
|
||||||
msgid "Delete Timer"
|
msgid "Timer On/Off"
|
||||||
msgstr "Esborra temporitzador"
|
msgstr "Temporitzador On/Off"
|
||||||
|
|
||||||
msgid "Edit Timer"
|
msgid "Edit Timer"
|
||||||
msgstr "Edita temporitzador"
|
msgstr "Edita temporitzador"
|
||||||
|
|
||||||
|
msgid "Delete Timer"
|
||||||
|
msgstr "Esborra temporitzador"
|
||||||
|
|
||||||
msgid "Timer Timeline"
|
msgid "Timer Timeline"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
"POT-Creation-Date: 2020-08-04 14:15+0200\n"
|
||||||
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||||
"Last-Translator: Horst\n"
|
"Last-Translator: Horst\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -102,12 +102,15 @@ msgstr "erledigte Aufnahmen"
|
|||||||
msgid "Instant Record"
|
msgid "Instant Record"
|
||||||
msgstr "Aufnahme"
|
msgstr "Aufnahme"
|
||||||
|
|
||||||
msgid "Delete Timer"
|
msgid "Timer On/Off"
|
||||||
msgstr "Timer löschen"
|
msgstr "Timer Ein/Aus"
|
||||||
|
|
||||||
msgid "Edit Timer"
|
msgid "Edit Timer"
|
||||||
msgstr "Timer bearbeiten"
|
msgstr "Timer bearbeiten"
|
||||||
|
|
||||||
|
msgid "Delete Timer"
|
||||||
|
msgstr "Timer löschen"
|
||||||
|
|
||||||
msgid "Timer Timeline"
|
msgid "Timer Timeline"
|
||||||
msgstr "Timer Tagesübersicht"
|
msgstr "Timer Tagesübersicht"
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
"POT-Creation-Date: 2020-08-04 14:15+0200\n"
|
||||||
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||||
"Last-Translator: fiveten_59\n"
|
"Last-Translator: fiveten_59\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -102,12 +102,15 @@ msgstr "registrazione eseguita"
|
|||||||
msgid "Instant Record"
|
msgid "Instant Record"
|
||||||
msgstr "Registrazione immediata"
|
msgstr "Registrazione immediata"
|
||||||
|
|
||||||
msgid "Delete Timer"
|
msgid "Timer On/Off"
|
||||||
msgstr "Cancella il Timer"
|
msgstr "Timer On/Off"
|
||||||
|
|
||||||
msgid "Edit Timer"
|
msgid "Edit Timer"
|
||||||
msgstr "Edita il Timer"
|
msgstr "Edita il Timer"
|
||||||
|
|
||||||
|
msgid "Delete Timer"
|
||||||
|
msgstr "Cancella il Timer"
|
||||||
|
|
||||||
msgid "Timer Timeline"
|
msgid "Timer Timeline"
|
||||||
msgstr "Scadenza del Timer"
|
msgstr "Scadenza del Timer"
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-tvguide 1.0.0\n"
|
"Project-Id-Version: vdr-tvguide 1.0.0\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
"POT-Creation-Date: 2020-08-04 14:15+0200\n"
|
||||||
"PO-Revision-Date: 2013-09-25 17:49+0400\n"
|
"PO-Revision-Date: 2013-09-25 17:49+0400\n"
|
||||||
"Last-Translator: AmiD, ilya\n"
|
"Last-Translator: AmiD, ilya\n"
|
||||||
"Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n"
|
"Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n"
|
||||||
@ -102,12 +102,15 @@ msgstr ""
|
|||||||
msgid "Instant Record"
|
msgid "Instant Record"
|
||||||
msgstr "Записать"
|
msgstr "Записать"
|
||||||
|
|
||||||
msgid "Delete Timer"
|
msgid "Timer On/Off"
|
||||||
msgstr "Удалить таймер"
|
msgstr "таймер Вкл/Выкл"
|
||||||
|
|
||||||
msgid "Edit Timer"
|
msgid "Edit Timer"
|
||||||
msgstr "Редактировать таймер"
|
msgstr "Редактировать таймер"
|
||||||
|
|
||||||
|
msgid "Delete Timer"
|
||||||
|
msgstr "Удалить таймер"
|
||||||
|
|
||||||
msgid "Timer Timeline"
|
msgid "Timer Timeline"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-tvguide 1.1.0\n"
|
"Project-Id-Version: vdr-tvguide 1.1.0\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
"POT-Creation-Date: 2020-08-04 14:15+0200\n"
|
||||||
"PO-Revision-Date: 2013-09-15 00:12+0100\n"
|
"PO-Revision-Date: 2013-09-15 00:12+0100\n"
|
||||||
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
|
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -102,12 +102,15 @@ msgstr ""
|
|||||||
msgid "Instant Record"
|
msgid "Instant Record"
|
||||||
msgstr "Okam¾ite nahra»"
|
msgstr "Okam¾ite nahra»"
|
||||||
|
|
||||||
msgid "Delete Timer"
|
msgid "Timer On/Off"
|
||||||
msgstr "Vymaza» plán nahrávania"
|
msgstr "Zap./Vyp. plán nahrávania"
|
||||||
|
|
||||||
msgid "Edit Timer"
|
msgid "Edit Timer"
|
||||||
msgstr "Upravi» plán nahrávania"
|
msgstr "Upravi» plán nahrávania"
|
||||||
|
|
||||||
|
msgid "Delete Timer"
|
||||||
|
msgstr "Vymaza» plán nahrávania"
|
||||||
|
|
||||||
msgid "Timer Timeline"
|
msgid "Timer Timeline"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
47
recmanager.c
47
recmanager.c
@ -267,6 +267,21 @@ void cRecManager::DeleteRemoteTimer(const cEvent *event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cRecManager::OnOffTimer(const cEvent *event) {
|
||||||
|
const cTimer *t;
|
||||||
|
#if VDRVERSNUM >= 20301
|
||||||
|
{
|
||||||
|
LOCK_TIMERS_READ;
|
||||||
|
t = Timers->GetMatch(event);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
t = Timers.GetMatch(event);
|
||||||
|
#endif
|
||||||
|
if (!t)
|
||||||
|
return;
|
||||||
|
SaveTimer(t);
|
||||||
|
}
|
||||||
|
|
||||||
void cRecManager::SaveTimer(const cTimer *t, cTimer *newTimerSettings) {
|
void cRecManager::SaveTimer(const cTimer *t, cTimer *newTimerSettings) {
|
||||||
if (!t)
|
if (!t)
|
||||||
return;
|
return;
|
||||||
@ -288,20 +303,26 @@ void cRecManager::SaveTimer(const cTimer *t, cTimer *newTimerSettings) {
|
|||||||
if (!timer) {
|
if (!timer) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool active = newTimerSettings->HasFlags(tfActive);
|
|
||||||
int prio = newTimerSettings->Priority();
|
|
||||||
int lifetime = newTimerSettings->Lifetime();
|
|
||||||
time_t day = newTimerSettings->Day();
|
|
||||||
int start = newTimerSettings->Start();
|
|
||||||
int stop = newTimerSettings->Stop();
|
|
||||||
std::string fileName = newTimerSettings->File();
|
|
||||||
|
|
||||||
timer->SetDay(day);
|
bool active = true;
|
||||||
timer->SetStart(start);
|
if (newTimerSettings) {
|
||||||
timer->SetStop(stop);
|
int prio = newTimerSettings->Priority();
|
||||||
timer->SetPriority(prio);
|
int lifetime = newTimerSettings->Lifetime();
|
||||||
timer->SetLifetime(lifetime);
|
time_t day = newTimerSettings->Day();
|
||||||
timer->SetFile(fileName.c_str());
|
int start = newTimerSettings->Start();
|
||||||
|
int stop = newTimerSettings->Stop();
|
||||||
|
std::string fileName = newTimerSettings->File();
|
||||||
|
|
||||||
|
timer->SetDay(day);
|
||||||
|
timer->SetStart(start);
|
||||||
|
timer->SetStop(stop);
|
||||||
|
timer->SetPriority(prio);
|
||||||
|
timer->SetLifetime(lifetime);
|
||||||
|
timer->SetFile(fileName.c_str());
|
||||||
|
|
||||||
|
active = newTimerSettings->HasFlags(tfActive);
|
||||||
|
} else
|
||||||
|
active = !timer->HasFlags(tfActive);
|
||||||
|
|
||||||
if (active)
|
if (active)
|
||||||
timer->SetFlags(tfActive);
|
timer->SetFlags(tfActive);
|
||||||
|
@ -33,11 +33,12 @@ public:
|
|||||||
cTimer *createLocalTimer(const cEvent *event, std::string path);
|
cTimer *createLocalTimer(const cEvent *event, std::string path);
|
||||||
cTimer *createRemoteTimer(const cEvent *event, std::string path);
|
cTimer *createRemoteTimer(const cEvent *event, std::string path);
|
||||||
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
|
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
|
||||||
|
void OnOffTimer(const cEvent *event);
|
||||||
void DeleteTimer(const cTimer *timer);
|
void DeleteTimer(const cTimer *timer);
|
||||||
void DeleteTimer(const cEvent *event);
|
void DeleteTimer(const cEvent *event);
|
||||||
void DeleteLocalTimer(const cEvent *event);
|
void DeleteLocalTimer(const cEvent *event);
|
||||||
void DeleteRemoteTimer(const cEvent *event);
|
void DeleteRemoteTimer(const cEvent *event);
|
||||||
void SaveTimer(const cTimer *timer, cTimer *newTimerSettings);
|
void SaveTimer(const cTimer *timer, cTimer *newTimerSettings = NULL);
|
||||||
bool IsRecorded(const cEvent *event);
|
bool IsRecorded(const cEvent *event);
|
||||||
cTVGuideTimerConflicts *CheckTimerConflict(void);
|
cTVGuideTimerConflicts *CheckTimerConflict(void);
|
||||||
void CreateSeriesTimer(cTimer *seriesTimer);
|
void CreateSeriesTimer(cTimer *seriesTimer);
|
||||||
|
@ -25,6 +25,7 @@ enum eRecMenuState {
|
|||||||
rmsSearchRerunsTimerConflictMenu,
|
rmsSearchRerunsTimerConflictMenu,
|
||||||
rmsSaveTimerConflictMenu,
|
rmsSaveTimerConflictMenu,
|
||||||
rmsTimerConflictShowInfo,
|
rmsTimerConflictShowInfo,
|
||||||
|
rmsOnOffTimer,
|
||||||
rmsDeleteTimer,
|
rmsDeleteTimer,
|
||||||
rmsDeleteTimerConfirmation,
|
rmsDeleteTimerConfirmation,
|
||||||
rmsEditTimer,
|
rmsEditTimer,
|
||||||
|
@ -11,8 +11,9 @@ cRecMenuMain::cRecMenuMain(bool epgSearchAvailable, bool timerActive, bool switc
|
|||||||
action = rmsInstantRecordFolder;
|
action = rmsInstantRecordFolder;
|
||||||
AddMenuItem(new cRecMenuItemButton(tr("Instant Record"), action, true, false, false, true));
|
AddMenuItem(new cRecMenuItemButton(tr("Instant Record"), action, true, false, false, true));
|
||||||
} else {
|
} else {
|
||||||
AddMenuItem(new cRecMenuItemButton(tr("Delete Timer"), rmsDeleteTimer, true, false, false, true));
|
AddMenuItem(new cRecMenuItemButton(tr("Timer On/Off"), rmsOnOffTimer, true, false, false, true));
|
||||||
AddMenuItem(new cRecMenuItemButton(tr("Edit Timer"), rmsEditTimer, false, false, false, true));
|
AddMenuItem(new cRecMenuItemButton(tr("Edit Timer"), rmsEditTimer, false, false, false, true));
|
||||||
|
AddMenuItem(new cRecMenuItemButton(tr("Delete Timer"), rmsDeleteTimer, false, false, false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
AddMenuItem(new cRecMenuItemButton(tr("Timer Timeline"), rmsTimeline, false, false, false, true));
|
AddMenuItem(new cRecMenuItemButton(tr("Timer Timeline"), rmsTimeline, false, false, false, true));
|
||||||
|
@ -177,6 +177,14 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
|
|||||||
activeMenu = new cRecMenuAskFolder(event, rmsInstantRecord);
|
activeMenu = new cRecMenuAskFolder(event, rmsInstantRecord);
|
||||||
activeMenu->Display();
|
activeMenu->Display();
|
||||||
break;
|
break;
|
||||||
|
case rmsOnOffTimer: {
|
||||||
|
//caller: main menu
|
||||||
|
//De/Activate timer for active event
|
||||||
|
recManager->OnOffTimer(event);
|
||||||
|
delete activeMenu;
|
||||||
|
activeMenu = new cRecMenuConfirmTimer(event, true);
|
||||||
|
activeMenu->Display();
|
||||||
|
break; }
|
||||||
case rmsDeleteTimer: {
|
case rmsDeleteTimer: {
|
||||||
//caller: main menu
|
//caller: main menu
|
||||||
//delete timer for active event
|
//delete timer for active event
|
||||||
|
Loading…
Reference in New Issue
Block a user