Permalink
Browse files

Remove the Delete Recordings screen.

This screen was nearly functionally identical to the Watch Recordings
screen.  The primary differences between the two were the default
sorting order and whether the default SELECT action deleted or played
the currently selected recording.  The one, small, hard-coded feature
of Delete Recording to display the total disk space used by a group
has been added to Watch Recordings.  The remaining difference is the
displayed information and that is controlled by the theme.  Of the
included themes, only MythCenter-wide had specail support for Delete
Recordings.  For it, the total disk usage bar-graph has been added to
Watch Recordings.
  • Loading branch information...
gigem committed Feb 1, 2013
1 parent ae0dcaf commit 7349a860a4416017ec9d6e2c2cd0641ec2b3d4e4
@@ -505,7 +505,7 @@ static void startPlaybackWithGroup(QString recGroup = "")
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
PlaybackBox *pbb = new PlaybackBox(
- mainStack, "playbackbox", PlaybackBox::kPlayBox);
+ mainStack, "playbackbox");
if (pbb->Create())
{
@@ -523,19 +523,6 @@ static void startPlayback(void)
startPlaybackWithGroup();
}
-static void startDelete(void)
-{
- MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
-
- PlaybackBox *pbb = new PlaybackBox(
- mainStack, "deletebox", PlaybackBox::kDeleteBox);
-
- if (pbb->Create())
- mainStack->AddScreen(pbb);
- else
- delete pbb;
-}
-
static void startPrevious(void)
{
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
@@ -808,8 +795,6 @@ static void TVMenuCallback(void *data, QString &selection)
}
else if (sel == "tv_schedule")
startGuide();
- else if (sel == "tv_delete")
- startDelete();
else if (sel == "tv_manualschedule")
startManualSchedule();
else if (sel == "tv_custom_record")
@@ -1306,8 +1291,6 @@ static void InitJumpPoints(void)
"Priorities"), "", "", startChannelRecPriorities);
REG_JUMPLOC(QT_TRANSLATE_NOOP("MythControls", "TV Recording Playback"),
"", "", startPlayback, "JUMPREC");
- REG_JUMP(QT_TRANSLATE_NOOP("MythControls", "TV Recording Deletion"),
- "", "", startDelete);
REG_JUMP(QT_TRANSLATE_NOOP("MythControls", "Live TV"),
"", "", startTVNormal);
REG_JUMP(QT_TRANSLATE_NOOP("MythControls", "Live TV In Guide"),
@@ -364,7 +364,7 @@ void * PlaybackBox::RunPlaybackBox(void * player, bool showTV)
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
PlaybackBox *pbb = new PlaybackBox(
- mainStack,"playbackbox", PlaybackBox::kPlayBox, (TV *)player, showTV);
+ mainStack,"playbackbox", (TV *)player, showTV);
if (pbb->Create())
mainStack->AddScreen(pbb);
@@ -374,15 +374,14 @@ void * PlaybackBox::RunPlaybackBox(void * player, bool showTV)
return NULL;
}
-PlaybackBox::PlaybackBox(MythScreenStack *parent, QString name, BoxType ltype,
+PlaybackBox::PlaybackBox(MythScreenStack *parent, QString name,
TV *player, bool showTV)
: ScheduleCommon(parent, name),
m_prefixes(QObject::tr("^(The |A |An )")),
m_titleChaff(" \\(.*\\)$"),
// Artwork Variables
m_artHostOverride(),
// Settings
- m_type(ltype),
m_watchListAutoExpire(false),
m_watchListMaxAge(60), m_watchListBlackOut(2),
m_listOrder(1),
@@ -502,13 +501,8 @@ PlaybackBox::~PlaybackBox(void)
bool PlaybackBox::Create()
{
- if (m_type == kDeleteBox &&
- LoadWindowFromXML("recordings-ui.xml", "deleterecordings", this))
- LOG(VB_GENERAL, LOG_DEBUG,
- "Found a customized delete recording screen");
- else
- if (!LoadWindowFromXML("recordings-ui.xml", "watchrecordings", this))
- return false;
+ if (!LoadWindowFromXML("recordings-ui.xml", "watchrecordings", this))
+ return false;
m_recgroupList = dynamic_cast<MythUIButtonList *> (GetChild("recgroups"));
m_groupList = dynamic_cast<MythUIButtonList *> (GetChild("groups"));
@@ -671,7 +665,7 @@ void PlaybackBox::updateGroupInfo(const QString &groupname,
QString desc = tr("There is/are %n recording(s) in this display group",
"", countInGroup);
- if (m_type == kDeleteBox && countInGroup > 1)
+ if (countInGroup > 1)
{
ProgramList group = m_progLists[groupname];
float groupSize = 0.0;
@@ -1624,7 +1618,7 @@ bool PlaybackBox::UpdateUILists(void)
}
vector<ProgramInfo*> list;
- bool newest_first = (0==m_allOrder) || (kDeleteBox==m_type);
+ bool newest_first = (0==m_allOrder);
m_programInfoCache.GetOrdered(list, newest_first);
vector<ProgramInfo*>::const_iterator it = list.begin();
for ( ; it != list.end(); ++it)
@@ -1786,7 +1780,7 @@ bool PlaybackBox::UpdateUILists(void)
if (!Iprog.key().isEmpty())
{
std::stable_sort((*Iprog).begin(), (*Iprog).end(),
- (m_listOrder == 0 || m_type == kDeleteBox) ?
+ (m_listOrder == 0) ?
comp_originalAirDate_rev_less_than :
comp_originalAirDate_less_than);
}
@@ -1800,7 +1794,7 @@ bool PlaybackBox::UpdateUILists(void)
if (!Iprog.key().isEmpty())
{
std::stable_sort((*Iprog).begin(), (*Iprog).end(),
- (m_listOrder == 0 || m_type == kDeleteBox) ?
+ (m_listOrder == 0) ?
comp_programid_rev_less_than :
comp_programid_less_than);
}
@@ -1814,7 +1808,7 @@ bool PlaybackBox::UpdateUILists(void)
if (!it.key().isEmpty())
{
std::stable_sort((*it).begin(), (*it).end(),
- (!m_listOrder || m_type == kDeleteBox) ?
+ (!m_listOrder) ?
comp_recordDate_rev_less_than :
comp_recordDate_less_than);
}
@@ -1828,7 +1822,7 @@ bool PlaybackBox::UpdateUILists(void)
if (!it.key().isEmpty())
{
std::stable_sort((*it).begin(), (*it).end(),
- (!m_listOrder || m_type == kDeleteBox) ?
+ (!m_listOrder) ?
comp_season_rev_less_than :
comp_season_less_than);
}
@@ -2317,11 +2311,7 @@ void PlaybackBox::selected(MythUIButtonListItem *item)
if (!item)
return;
- switch (m_type)
- {
- case kPlayBox: PlayFromBookmark(item); break;
- case kDeleteBox: deleteSelected(item); break;
- }
+ PlayFromBookmark(item);
}
void PlaybackBox::popupClosed(QString which, int result)
@@ -60,12 +60,6 @@ class PlaybackBox : public ScheduleCommon
friend class PlaybackBoxListItem;
public:
- typedef enum
- {
- kPlayBox,
- kDeleteBox,
- } BoxType;
-
// ViewType values cannot change; they are stored in the database.
typedef enum {
TitlesOnly = 0,
@@ -120,7 +114,7 @@ class PlaybackBox : public ScheduleCommon
kDone
} killStateType;
- PlaybackBox(MythScreenStack *parent, QString name, BoxType ltype,
+ PlaybackBox(MythScreenStack *parent, QString name,
TV *player = NULL, bool showTV = false);
~PlaybackBox(void);
@@ -354,9 +348,6 @@ class PlaybackBox : public ScheduleCommon
InfoMap m_currentMap;
// Settings ///////////////////////////////////////////////////////////////
- /// If "Play" this is a recording playback selection UI,
- /// if "Delete this is a recording deletion selection UI.
- BoxType m_type;
/// titleView controls showing titles in group list
bool m_titleView;
/// useCategories controls showing categories in group list
@@ -8,14 +8,6 @@
<action>TV_WATCH_LIVE</action>
</button>
- <button>
- <type>TV_DELETE</type>
- <text>Delete Recordings</text>
- <description>Remove television recordings</description>
- <action>TV_DELETE</action>
- <dependswindow xmlfile="recordings-ui.xml">deleterecordings</dependswindow>
- </button>
-
<!-- EXECTV sample. %s args in order are video, audio, and vbi devices
<button>
<type>TV_PLAYBACK</type>
@@ -131,11 +131,6 @@
</fontdef>
<!-- Fonts for specific screens -->
- <fontdef name="deleterecordings_filesize_font" from="basemedium">
- <pixelsize>40</pixelsize>
- <color>#bbbb33</color>
- <weight>bold</weight>
- </fontdef>
<fontdef name="baseguide" from="basesmall">
<pixelsize>20</pixelsize>
<weight>normal</weight>
@@ -423,11 +423,6 @@
<filename>watermark/play.png</filename>
</imagetype>
</state>
- <state name="TV_DELETE" from="DEFAULT">
- <imagetype name="watermark">
- <filename>watermark/error.png</filename>
- </imagetype>
- </state>
<state name="TV_PREVIOUS" from="DEFAULT">
<imagetype name="watermark">
<filename>watermark/big_arrow_down.png</filename>
Oops, something went wrong.

0 comments on commit 7349a86

Please sign in to comment.