Ticket #1771: PlayBoxAllOrdering.patch
File PlayBoxAllOrdering.patch, 5.7 KB (added by , 18 years ago) |
---|
-
programs/mythfrontend/playbackbox.cpp
172 172 formatTime = gContext->GetSetting("TimeFormat", "h:mm AP"); 173 173 recGroup = gContext->GetSetting("DisplayRecGroup","All Programs"); 174 174 listOrder = gContext->GetNumSetting("PlayBoxOrdering", 1); 175 allOrder = gContext->GetNumSetting("PlayBoxAllOrdering", 1); 175 176 groupnameAsAllProg = gContext->GetNumSetting("DispRecGroupAsAllProg", 0); 176 177 arrowAccel = gContext->GetNumSetting("UseArrowAccels", 1); 177 178 inTitle = gContext->GetNumSetting("PlaybackBoxStartInTitle", 0); … … 1377 1378 bool LiveTVInAllPrograms = gContext->GetNumSetting("LiveTVInAllPrograms",0); 1378 1379 1379 1380 vector<ProgramInfo *> *infoList; 1380 infoList = RemoteGetRecordedList( listOrder == 0 || type == Delete);1381 infoList = RemoteGetRecordedList(allOrder == 0 || type == Delete); 1381 1382 if (infoList) 1382 1383 { 1383 1384 sortedList[""] = ""; … … 1517 1518 { 1518 1519 p = l->at(i); 1519 1520 1520 if ( listOrder == 0 || type == Delete)1521 if (titleIndex == 0) 1521 1522 { 1522 if ( episodeSort == "OrigAirDate" && titleIndex > 0)1523 if (allOrder == 0 || type == Delete) 1523 1524 { 1524 if (old originalAirDate > p->originalAirDate)1525 if (oldstartts > p->recstartts) 1525 1526 break; 1526 1527 } 1527 else if (episodeSort == "Id" && titleIndex > 0) 1528 { 1529 if (oldprogramid > p->programid) 1530 break; 1528 else { 1529 if (oldstartts < p->recstartts) 1530 break; 1531 1531 } 1532 else1533 {1534 if (oldstartts > p->recstartts)1535 break;1536 }1537 1532 } 1538 1533 else 1539 1534 { 1540 if ( episodeSort == "OrigAirDate" && titleIndex > 0)1535 if (listOrder == 0 || type == Delete) 1541 1536 { 1542 if (oldoriginalAirDate < p->originalAirDate) 1543 break; 1537 if (episodeSort == "OrigAirDate") 1538 { 1539 if (oldoriginalAirDate > p->originalAirDate) 1540 break; 1541 } 1542 else if (episodeSort == "Id") 1543 { 1544 if (oldprogramid > p->programid) 1545 break; 1546 } 1547 else 1548 { 1549 if (oldstartts > p->recstartts) 1550 break; 1551 } 1544 1552 } 1545 else if (episodeSort == "Id" && titleIndex > 0)1546 {1547 if (oldprogramid < p->programid)1548 break;1549 }1550 1553 else 1551 1554 { 1552 if (oldstartts < p->recstartts) 1553 break; 1555 if (episodeSort == "OrigAirDate") 1556 { 1557 if (oldoriginalAirDate < p->originalAirDate) 1558 break; 1559 } 1560 else if (episodeSort == "Id") 1561 { 1562 if (oldprogramid < p->programid) 1563 break; 1564 } 1565 else 1566 { 1567 if (oldstartts < p->recstartts) 1568 break; 1569 } 1554 1570 } 1555 1571 } 1556 1572 -
programs/mythfrontend/globalsettings.cpp
670 670 return gc; 671 671 } 672 672 673 static HostCheckBox *PlayBoxAllOrdering() 674 { 675 HostCheckBox *gc = new HostCheckBox("PlayBoxAllOrdering"); 676 gc->setLabel(QObject::tr("All Programs: List Newest Recording First")); 677 gc->setValue(true); 678 gc->setHelpText(QObject::tr("When enabled, the most recent recording " 679 "will be listed first in the 'All Programs' or 'Default' " 680 "section of the 'Watch Recordings' screen, otherwise " 681 "the oldest recording will be listed first.")); 682 return gc; 683 } 684 673 685 static HostComboBox *PlayBoxEpisodeSort() 674 686 { 675 687 HostComboBox *gc = new HostComboBox("PlayBoxEpisodeSort"); … … 3266 3278 VerticalConfigurationGroup* pbox = new VerticalConfigurationGroup(false); 3267 3279 pbox->setLabel(QObject::tr("View Recordings")); 3268 3280 pbox->addChild(PlayBoxOrdering()); 3281 pbox->addChild(PlayBoxAllOrdering()); 3269 3282 pbox->addChild(PlayBoxEpisodeSort()); 3270 3283 pbox->addChild(GeneratePreviewPixmaps()); 3271 3284 pbox->addChild(PreviewPixmapOffset()); -
programs/mythfrontend/playbackbox.h
294 294 bool arrowAccel; 295 295 /// if true keypress events are ignored 296 296 bool ignoreKeyPressEvents; 297 /// allOrder controls the ordering of the "All Programs" list 298 int allOrder; 297 299 /// listOrder controls the ordering of the recordings in the list 298 300 int listOrder; 299 301 /// Number of items in selector that can be shown on the screen at once