Exemplo n.º 1
0
void ProgLister::ShowOldRecordedMenu(void)
{
    ProgramInfo *pi = GetCurrent();

    if (!pi)
        return;

    QString message = pi->toString(ProgramInfo::kTitleSubtitle, " - ");

    if (!pi->GetDescription().isEmpty())
        message += "\n\n" + pi->GetDescription();

    message += "\n\n\n" + tr("NOTE: removing items from this list will not "
                             "delete any recordings.");

    QString title = tr("Previously Recorded");
    MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
    MythDialogBox *menuPopup = new MythDialogBox(
        title, message, mainStack, "deletepopup", true);

    if (menuPopup->Create())
    {
        menuPopup->SetReturnEvent(this, "deletemenu");
        if (pi->IsDuplicate())
            menuPopup->AddButton(tr("Allow this episode to re-record"));
        else
            menuPopup->AddButton(tr("Never record this episode"));
        menuPopup->AddButton(tr("Remove this episode from the list"));
        menuPopup->AddButton(tr("Remove all episodes for this title"));
        menuPopup->AddButton(tr("Cancel"));

        mainStack->AddScreen(menuPopup);
    }
    else
    {
        delete menuPopup;
    }
}