/*
- Copyright 2004-2005 Chris Tallon
+ Copyright 2004-2019 Chris Tallon
This file is part of VOMP.
const static ULONG MOUSE_SCROLL = 35;
const static ULONG NEW_PICTURE = 36;
const static ULONG NEW_PICTURE_STATIC = 37;
+ const static ULONG REDRAW = 38;
const static ULONG HACK_MVP_RETURN_FROM_QUARTER = 999;
};
return true;
}
-char* RecInfo::buildSummaryWithDetails()
+char* RecInfo::buildSummaryWithDetails(bool forceRefresh)
{
- if (!summaryWithDetails)
+ if (!summaryWithDetails || forceRefresh)
{
+ if (forceRefresh && summaryWithDetails) delete[] summaryWithDetails;
+
Log* logger = Log::getInstance();
int swdLength = strlen(summary) +
void setNumComponents(ULONG);
void addComponent(ULONG componentNum, UCHAR tstream, UCHAR ttype, char* tlanguage, char* tdescription);
// addComponent accepts a pointer to a buffer that RecInfo will free, not the caller
- char* buildSummaryWithDetails();
+ char* buildSummaryWithDetails(bool forceRefresh = false);
void print();
+ epgSummaryTextBox = new WTextbox();
- WTextbox * summary=new WTextbox();
- summary->setParaMode(true);
+ epgSummaryTextBox->setParaMode(true);
if (rec->recInfo)
- summary->setText(rec->recInfo->buildSummaryWithDetails());
+ epgSummaryTextBox->setText(rec->recInfo->buildSummaryWithDetails());
else
- summary->setText(tr("Summary unavailable"));
+ epgSummaryTextBox->setText(tr("Summary unavailable"));
OsdVector *osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
- tabbar.addTab(tr("EPG"), summary);
+ tabbar.addTab(tr("EPG"), epgSummaryTextBox);
if (rec->movieInfo) {
WMovieView *movieview = new WMovieView(rec->movieInfo);
movieview->setParaMode(true);
if (selected == MARKASNEW)
{
- rec->resetResume();
+ int ret = rec->resetResume();
+
+ VInfo* vi = new VInfo();
+ vi->setSize(400, 150);
+ vi->createBuffer();
+ vi->setExitable();
+ vi->setBorderOn(1);
+ vi->setTitleBarOn(0);
+
+ if (Video::getInstance()->getFormat() == Video::PAL)
+ vi->setPosition(170, 200);
+ else
+ vi->setPosition(160, 150);
+
+ if (ret == 1) vi->setOneLiner(tr("Success"));
+ else if (ret == 2) vi->setOneLiner(tr("No resume point exists"));
+ else if (ret == 4) vi->setOneLiner(tr("Failure deleting resume point"));
+ else if (ret == 5) vi->setOneLiner(tr("Not supported with VDR < 2.4.0"));
+ vi->draw();
+
+ Message* m = new Message();
+ m->message = Message::ADD_VIEW;
+ m->to = BoxStack::getInstance();
+ m->parameter.num = (ULONG)vi;
+ Command::getInstance()->postMessageNoLock(m);
+
+ if (ret == 1)
+ {
+ // Change Resume at text in summary
+ rec->recInfo->resumePoint = 0;
+ epgSummaryTextBox->setText(rec->recInfo->buildSummaryWithDetails(true));
+ draw();
+ BoxStack::getInstance()->update(this);
+
+ // Update vrecordingslist to remove the * for new
+ rec->setNew(true);
+ Message* m2 = new Message();
+ m2->from = this;
+ m2->to = vRecList;
+ m2->message = Message::REDRAW;
+ Command::getInstance()->postMessageNoLock(m2);
+ }
+
return 2;
}