Refactor cRecMenuTimerConflicts

This commit is contained in:
kamel5 2019-11-09 11:43:44 +01:00
parent 56cab4a666
commit 73e331f97f
6 changed files with 45 additions and 60 deletions

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2021-12-15 15:05+0100\n"
"POT-Creation-Date: 2022-04-29 13:18+0200\n"
"PO-Revision-Date: 2013-09-21 17:49+0200\n"
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
"Language-Team: \n"
@ -180,14 +180,14 @@ msgstr "Sí"
msgid "No"
msgstr "No"
msgid "One"
msgstr "Un"
msgid "Timer Conflicts"
msgstr "Conflicte al temporitzador"
msgid "detected"
msgstr "detectat"
msgid "Timer Conflicts"
msgstr "Conflicte al temporitzador"
msgid "Ignore Conflicts"
msgstr "Ignora conflictes"
msgid "Show conflict"
msgstr "Mostra conflicte"
@ -195,9 +195,6 @@ msgstr "Mostra conflicte"
msgid "timers involved"
msgstr "temporitzadors involucrats"
msgid "Ignore Conflicts"
msgstr "Ignora conflictes"
msgid "Ignore Conflict"
msgstr "Ignora conflicte"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2021-12-15 15:05+0100\n"
"POT-Creation-Date: 2022-04-29 13:18+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: Horst\n"
"Language-Team: \n"
@ -177,14 +177,14 @@ msgstr "Ja"
msgid "No"
msgstr "Nein"
msgid "One"
msgstr "Ein"
msgid "Timer Conflicts"
msgstr "Timerkonflikte"
msgid "detected"
msgstr "gefunden"
msgid "Timer Conflicts"
msgstr "Timerkonflikte"
msgid "Ignore Conflicts"
msgstr "Konflikte ignorieren"
msgid "Show conflict"
msgstr "Konflikt zeigen"
@ -192,9 +192,6 @@ msgstr "Konflikt zeigen"
msgid "timers involved"
msgstr "Timer beteiligt"
msgid "Ignore Conflicts"
msgstr "Konflikte ignorieren"
msgid "Ignore Conflict"
msgstr "Konflikt ignorieren"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2021-12-15 15:05+0100\n"
"POT-Creation-Date: 2022-04-29 13:18+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: fiveten_59\n"
"Language-Team: \n"
@ -177,14 +177,14 @@ msgstr "Si"
msgid "No"
msgstr "No"
msgid "One"
msgstr "Uno"
msgid "Timer Conflicts"
msgstr "Conflitti del Timer"
msgid "detected"
msgstr "rilevato"
msgid "Timer Conflicts"
msgstr "Conflitti del Timer"
msgid "Ignore Conflicts"
msgstr "Ignora conflitti"
msgid "Show conflict"
msgstr "Mostra conflitto"
@ -192,9 +192,6 @@ msgstr "Mostra conflitto"
msgid "timers involved"
msgstr "Timers impegnati"
msgid "Ignore Conflicts"
msgstr "Ignora conflitti"
msgid "Ignore Conflict"
msgstr "Ignora conflitto"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 1.0.0\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2021-12-15 15:05+0100\n"
"POT-Creation-Date: 2022-04-29 13:18+0200\n"
"PO-Revision-Date: 2013-09-25 17:49+0400\n"
"Last-Translator: AmiD, ilya\n"
"Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n"
@ -177,14 +177,14 @@ msgstr "Да"
msgid "No"
msgstr "Нет"
msgid "One"
msgstr "Один"
msgid "Timer Conflicts"
msgstr "Таймер-конфликты"
msgid "detected"
msgstr "обнаружен"
msgid "Timer Conflicts"
msgstr "Таймер-конфликты"
msgid "Ignore Conflicts"
msgstr "Игнорировать конфликты"
msgid "Show conflict"
msgstr "Показать конфликты"
@ -192,9 +192,6 @@ msgstr "Показать конфликты"
msgid "timers involved"
msgstr "Таймер"
msgid "Ignore Conflicts"
msgstr "Игнорировать конфликты"
msgid "Ignore Conflict"
msgstr "Игнорировать конфликт"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 1.1.0\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2021-12-15 15:05+0100\n"
"POT-Creation-Date: 2022-04-29 13:18+0200\n"
"PO-Revision-Date: 2013-09-15 00:12+0100\n"
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
"Language-Team: \n"
@ -177,14 +177,14 @@ msgstr "
msgid "No"
msgstr "Nie"
msgid "One"
msgstr "Jeden"
msgid "Timer Conflicts"
msgstr "Konflikty plánov"
msgid "detected"
msgstr "nájdených"
msgid "Timer Conflicts"
msgstr "Konflikty plánov"
msgid "Ignore Conflicts"
msgstr "Ignorova» konflikty"
msgid "Show conflict"
msgstr "Zobrazi» konflikt"
@ -192,9 +192,6 @@ msgstr "Zobrazi
msgid "timers involved"
msgstr "plány komplikované"
msgid "Ignore Conflicts"
msgstr "Ignorova» konflikty"
msgid "Ignore Conflict"
msgstr "Ignorova» konflikt"

View File

@ -196,33 +196,33 @@ cRecMenuAskDeleteTimer::cRecMenuAskDeleteTimer(const cEvent *event) { // OK
}
// --- cRecMenuTimerConflicts ---------------------------------------------------------
cRecMenuTimerConflicts::cRecMenuTimerConflicts(cTVGuideTimerConflicts *conflicts) {
cRecMenuTimerConflicts::cRecMenuTimerConflicts(cTVGuideTimerConflicts *conflicts) { // OK
SetWidthPercent(50);
int numConflicts = (conflicts) ? conflicts->NumConflicts() : 0;
cString text;
if (numConflicts == 1) {
text = cString::sprintf("%s %s %s", tr("One"), tr("Timer Conflict"), tr("detected"));
} else {
text = cString::sprintf("%d %s %s", conflicts->NumConflicts(), tr("Timer Conflicts"), tr("detected"));
}
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*text, true);
for (int i=0; i<numConflicts; i++) {
const cString line1 = cString::sprintf("%d %s %s",
numConflicts,
(numConflicts == 1) ? tr("Timer Conflict") : tr("Timer Conflicts"),
tr("detected"));
AddHeader(new cRecMenuItemInfo(*line1, 1, "", "", "", width - 2 * border, true));
AddFooter(new cRecMenuItemButton(tr("Ignore Conflicts"), rmsClose, false));
for (int i = 0; i < numConflicts; i++) {
cTVGuideTimerConflict *conflict = conflicts->GetConflict(i);
if (!conflict)
continue;
cString dateTime = DayDateTime(conflict->time);
const cString dateTime = DayDateTime(conflict->time);
int numTimers = conflict->timerIDs.size();
cString textConflict = cString::sprintf("%s: %s (%d %s)", tr("Show conflict"), *dateTime, numTimers, tr("timers involved"));
bool isActive = (i==0)?true:false;
AddMenuItem(new cRecMenuItemButton(*textConflict, rmsTimerConflict, isActive));
AddMenuItem(new cRecMenuItemButton(cString::sprintf("%s: %s (%d %s)",
tr("Show conflict"),
*dateTime,
numTimers,
tr("timers involved")),
rmsTimerConflict, (i == 0) ? true : false));
}
SetWidthPixel(CalculateOptimalWidth() + 4*border);
infoItem->CalculateHeight(width - 2 * border);
SetHeader(infoItem);
AddMenuItem(new cRecMenuItemButton(tr("Ignore Conflicts"), rmsClose, false));
SetWidthPixel(CalculateOptimalWidth() + 4 * border);
CalculateHeight();
CreatePixmap();