Ticket #4553: statusbox_undelete_v1_r15662.diff
File statusbox_undelete_v1_r15662.diff, 3.5 KB (added by , 16 years ago) |
---|
-
mythtv/programs/mythfrontend/statusbox.cpp
662 662 QStringList msgs; 663 663 664 664 msgs << QObject::tr("Delete Now"); 665 msgs << QObject::tr("Disable AutoExpire"); 665 if ((rec)->recgroup == "LiveTV") 666 msgs << QObject::tr("Move to Default group"); 667 else if ((rec)->recgroup == "Deleted") 668 msgs << QObject::tr("Undelete"); 669 else 670 msgs << QObject::tr("Disable AutoExpire"); 666 671 msgs << QObject::tr("No Change"); 667 672 668 673 DialogCode retval = MythPopupBox::ShowButtonPopup( 669 674 my_parent, 670 675 QString("AutoExpirePopup"), … … 677 682 } 678 683 else if (kDialogCodeButton1 == retval) 679 684 { 680 rec->SetAutoExpire(0);681 685 if ((rec)->recgroup == "LiveTV") 686 { 687 rec->SetAutoExpire(0); 682 688 rec->ApplyRecordRecGroupChange("Default"); 689 } 690 else if ((rec)->recgroup == "Deleted") 691 RemoteUndeleteRecording(rec); 692 else 693 rec->SetAutoExpire(0); 683 694 } 684 695 685 696 // Update list, prevent selected item going off bottom … … 1601 1612 long long totalSize(0); 1602 1613 long long liveTVSize(0); 1603 1614 int liveTVCount(0); 1615 long long deletedGroupSize(0); 1616 int deletedGroupCount(0); 1604 1617 1605 1618 contentLines.clear(); 1606 1619 contentDetail.clear(); … … 1617 1630 for (it = expList.begin(); it != expList.end(); it++) 1618 1631 { 1619 1632 pginfo = *it; 1620 1633 1621 1634 totalSize += pginfo->filesize; 1622 1635 if (pginfo->recgroup == "LiveTV") 1623 1636 { 1624 1637 liveTVSize += pginfo->filesize; 1625 1638 liveTVCount++; 1626 1639 } 1640 else if (pginfo->recgroup == "Deleted") 1641 { 1642 deletedGroupSize += pginfo->filesize; 1643 deletedGroupCount++; 1644 } 1627 1645 } 1628 1646 1629 1647 staticInfo = tr("%1 recordings consuming %2 are allowed to expire") … … 1635 1653 else 1636 1654 staticInfo += "\n"; 1637 1655 1656 if (deletedGroupCount) 1657 staticInfo += tr("%1 of these are Deleted and consume %2") 1658 .arg(deletedGroupCount).arg(sm_str(deletedGroupSize / 1024)) + "\n"; 1659 else 1660 staticInfo += "\n"; 1661 1638 1662 for (it = expList.begin(); it != expList.end(); it++) 1639 1663 { 1640 1664 pginfo = *it; … … 1642 1666 1643 1667 if (pginfo->recgroup == "LiveTV") 1644 1668 contentLine += "(" + tr("LiveTV") + ") "; 1669 else if (pginfo->recgroup == "Deleted") 1670 contentLine += "(" + tr("Deleted") + ") "; 1671 else 1672 contentLine += "(" + pginfo->recgroup + ") "; 1645 1673 1646 1674 contentLine += pginfo->title + 1647 1675 " (" + sm_str(pginfo->filesize / 1024) + ")"; … … 1654 1682 1655 1683 if (pginfo->recgroup == "LiveTV") 1656 1684 detailInfo += " (" + tr("LiveTV") + ")"; 1685 else if (pginfo->recgroup == "Deleted") 1686 detailInfo += " (" + tr("Deleted") + ")"; 1687 else 1688 detailInfo += " (" + pginfo->recgroup + ")"; 1657 1689 1658 1690 detailInfo += "\n" + pginfo->title; 1659 1691