diff -p -r -u -N -X /tmp/diff.exclude.20617 -x release.20831.0708a -x release.20831.0708b release.20831.0708a/mythtv/programs/mythfrontend/playbackbox.cpp release.20831.0708b/mythtv/programs/mythfrontend/playbackbox.cpp
|
|
PlaybackBox::PlaybackBox(BoxType ltype, |
265 | 265 | progCache(NULL), playingSomething(false), |
266 | 266 | // Selection state variables |
267 | 267 | haveGroupInfoSet(false), inTitle(false), |
| 268 | repeatTitles(true), |
268 | 269 | leftRight(false), playbackVideoContainer(false), |
269 | 270 | // Free disk space tracking |
270 | 271 | freeSpaceNeedsUpdate(true), freeSpaceTimer(new QTimer(this)), |
… |
… |
PlaybackBox::PlaybackBox(BoxType ltype, |
300 | 301 | groupnameAsAllProg = gContext->GetNumSetting("DispRecGroupAsAllProg", 0); |
301 | 302 | arrowAccel = gContext->GetNumSetting("UseArrowAccels", 1); |
302 | 303 | inTitle = gContext->GetNumSetting("PlaybackBoxStartInTitle", 0); |
| 304 | repeatTitles = gContext->GetNumSetting("PlaybackTitlesRepeat", 1); |
303 | 305 | if (!player) |
304 | 306 | previewVideoEnabled =gContext->GetNumSetting("PlaybackPreview"); |
305 | 307 | previewPixmapEnabled=gContext->GetNumSetting("GeneratePreviewPixmaps"); |
… |
… |
void PlaybackBox::updateShowTitles(QPain |
1457 | 1459 | ltype->ResetList(); |
1458 | 1460 | ltype->SetActive(inTitle); |
1459 | 1461 | |
1460 | | int h = titleIndex - ltype->GetItems() + |
1461 | | ltype->GetItems() * titleList.count(); |
1462 | | h = h % titleList.count(); |
| 1462 | int h = titleIndex - ltype->GetItems(); |
| 1463 | if (repeatTitles) |
| 1464 | { |
| 1465 | h += ltype->GetItems() * titleList.count(); |
| 1466 | h = h % titleList.count(); |
| 1467 | }; |
1463 | 1468 | |
1464 | 1469 | for (int cnt = 0; cnt < ltype->GetItems(); cnt++) |
1465 | 1470 | { |
1466 | | if (titleList[h] == "") |
| 1471 | if (h < 0) |
| 1472 | tstring = ""; |
| 1473 | else if (titleList[h] == "") |
1467 | 1474 | tstring = groupDisplayName; |
1468 | 1475 | else |
1469 | 1476 | tstring = titleList[h]; |
… |
… |
void PlaybackBox::updateShowTitles(QPain |
1474 | 1481 | lcdItems.append(new LCDMenuItem(0, NOTCHECKABLE, tstring)); |
1475 | 1482 | |
1476 | 1483 | h++; |
1477 | | h = h % titleList.count(); |
| 1484 | if (repeatTitles) |
| 1485 | h = h % titleList.count(); |
1478 | 1486 | } |
1479 | 1487 | } |
1480 | 1488 | else if (ltype) |
… |
… |
void PlaybackBox::updateShowTitles(QPain |
1515 | 1523 | ltype->SetActive(inTitle); |
1516 | 1524 | |
1517 | 1525 | int h = titleIndex + 1; |
1518 | | h = h % titleList.count(); |
| 1526 | if (repeatTitles) |
| 1527 | h = h % titleList.count(); |
1519 | 1528 | |
1520 | 1529 | for (int cnt = 0; cnt < ltype->GetItems(); cnt++) |
1521 | 1530 | { |
1522 | | if (titleList[h] == "") |
| 1531 | if (h >= titleList.count()) |
| 1532 | tstring = ""; |
| 1533 | else if (titleList[h] == "") |
1523 | 1534 | tstring = groupDisplayName; |
1524 | 1535 | else |
1525 | 1536 | tstring = titleList[h]; |
… |
… |
void PlaybackBox::updateShowTitles(QPain |
1530 | 1541 | lcdItems.append(new LCDMenuItem(0, NOTCHECKABLE, tstring)); |
1531 | 1542 | |
1532 | 1543 | h++; |
1533 | | h = h % titleList.count(); |
| 1544 | if (repeatTitles) |
| 1545 | h = h % titleList.count(); |
1534 | 1546 | } |
1535 | 1547 | } |
1536 | 1548 | else if (ltype) |
… |
… |
void PlaybackBox::cursorDown(bool page, |
1719 | 1731 | if (inTitle == true || newview) |
1720 | 1732 | { |
1721 | 1733 | titleIndex += (page ? 5 : 1); |
1722 | | titleIndex = titleIndex % (int)titleList.count(); |
| 1734 | if (repeatTitles) |
| 1735 | titleIndex = titleIndex % (int)titleList.count(); |
| 1736 | else |
| 1737 | titleIndex = min(titleIndex, (int)titleList.count()-1); |
| 1738 | |
1723 | 1739 | |
1724 | 1740 | progIndex = 0; |
1725 | 1741 | |
… |
… |
void PlaybackBox::cursorUp(bool page, bo |
1752 | 1768 | if (inTitle == true || newview) |
1753 | 1769 | { |
1754 | 1770 | titleIndex -= (page ? 5 : 1); |
1755 | | titleIndex += 5 * titleList.count(); |
1756 | | titleIndex = titleIndex % titleList.count(); |
| 1771 | if (repeatTitles) |
| 1772 | { |
| 1773 | titleIndex += 5 * titleList.count(); |
| 1774 | titleIndex = titleIndex % titleList.count(); |
| 1775 | } |
| 1776 | else |
| 1777 | titleIndex = max(titleIndex, 0); |
1757 | 1778 | |
1758 | 1779 | progIndex = 0; |
1759 | 1780 | |
… |
… |
void PlaybackBox::keyPressEvent(QKeyEven |
4376 | 4397 | QString action = actions[i]; |
4377 | 4398 | handled = true; |
4378 | 4399 | |
| 4400 | //custom key handling; |
| 4401 | if (action == "TOGGLERECORD") action = "DELETE"; |
| 4402 | |
4379 | 4403 | if (action == "ESCAPE") |
4380 | 4404 | exitWin(); |
4381 | 4405 | else if (action == "1" || action == "HELP") |
diff -p -r -u -N -X /tmp/diff.exclude.20617 -x release.20831.0708a -x release.20831.0708b release.20831.0708a/mythtv/programs/mythfrontend/playbackbox.h release.20831.0708b/mythtv/programs/mythfrontend/playbackbox.h
|
|
class PlaybackBox : public MythDialog |
458 | 458 | // Selection state variables |
459 | 459 | bool haveGroupInfoSet; |
460 | 460 | bool inTitle; |
| 461 | bool repeatTitles; |
461 | 462 | /// If change is left or right, don't restart video |
462 | 463 | bool leftRight; |
463 | 464 | |