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...
1 parent ae0dcaf commit 7349a860a4416017ec9d6e2c2cd0641ec2b3d4e4 @gigem gigem committed Feb 1, 2013
View
19 mythtv/programs/mythfrontend/main.cpp
@@ -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"),
View
32 mythtv/programs/mythfrontend/playbackbox.cpp
@@ -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)
View
11 mythtv/programs/mythfrontend/playbackbox.h
@@ -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
View
8 mythtv/themes/DVR/tvmenu.xml
@@ -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>
View
5 mythtv/themes/MythCenter-wide/base.xml
@@ -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>
View
5 mythtv/themes/MythCenter-wide/menu-ui.xml
@@ -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>
View
328 mythtv/themes/MythCenter-wide/recordings-ui.xml
@@ -328,334 +328,6 @@
<align>allcenter</align>
</textarea>
- </window>
-
- <window name="deleterecordings">
-
- <textarea name="pagetitle" from="basetextarea">
- <area>20,4,570,40</area>
- <font>baselarge</font>
- <value>Delete Recordings</value>
- </textarea>
-
- <imagetype name="listbackground">
- <filename>reclist_background.png</filename>
- <position>0,60</position>
- </imagetype>
-
- <buttonlist name="recgroups">
- <arrange>stack</arrange>
- <area>364,36,820,54</area>
- <align>hcenter</align>
- <scrollstyle>center</scrollstyle>
- <wrapstyle>items</wrapstyle>
- <layout>horizontal</layout>
- <buttonarea>0,0,100%,100%</buttonarea>
- <statetype name="buttonitem">
- <state name="selectedinactive">
- <area>0,0,300,56</area>
- <shape name="recSelectedGroupShape">
- <area>0,0,0,0</area>
- </shape>
- <textarea name="buttontext">
- <area>10,2,-10,-5</area>
- <minsize>10%,50%</minsize>
- <align>allcenter</align>
- <font>basemedium</font>
- <alpha>200</alpha>
- </textarea>
- </state>
- <state name="inactive" from="selectedinactive">
- <shape name="recGroupShape">
- <area>0,0,0,0</area>
- </shape>
- <textarea name="buttontext">
- <area>0,0,0,0</area>
- <alpha>0</alpha>
- </textarea>
- </state>
- </statetype>
- <statetype name="upscrollarrow">
- <area>0,0,0,0</area>
- </statetype>
- <statetype name="downscrollarrow">
- <area>0,0,0,0</area>
- </statetype>
- </buttonlist>
-
- <buttonlist name="groups">
- <area>46,100,300,300</area>
- <buttonarea>0,0,250,250</buttonarea>
- <spacing>4</spacing>
- <scrollstyle>center</scrollstyle>
- <wrapstyle>items</wrapstyle>
- <searchposition>-1,390</searchposition>
- <statetype name="buttonitem">
- <state name="active">
- <textarea name="name">
- <area>10,0,300,30</area>
- <font>basesmall_normal</font>
- <cutdown>yes</cutdown>
- <align>left,vcenter</align>
- </textarea>
- </state>
- <state name="selectedinactive" from="active" />
- <state name="selectedactive" from="active">
- <textarea name="name">
- <font>basesmall_normal_selected</font>
- </textarea>
- </state>
- </statetype>
- </buttonlist>
-
- <buttonlist name="recordings" from="basebuttonlist2">
- <area>364,44,880,350</area>
- <buttonarea>0,36,880,270</buttonarea>
- <wrapstyle>captive</wrapstyle>
- <spacing>0</spacing>
- <searchposition>-1,390</searchposition>
- <statetype name="buttonitem">
- <state name="active">
- <area>0,0,100%,30</area>
- <statetype name="status">
- <position>0,2</position>
- <state name="disabled">
- <imagetype name="statusimage">
- <filename>schedule_disabled.png</filename>
- </imagetype>
- </state>
- <state name="error">
- <imagetype name="statusimage">
- <filename>schedule_conflict.png</filename>
- </imagetype>
- </state>
- <state name="warning">
- <imagetype name="statusimage">
- <filename>schedule_other.png</filename>
- </imagetype>
- </state>
-<!-- <state name="normal">
- <imagetype name="statusimage">
- <filename>schedule_record.png</filename>
- </imagetype>
- </state> -->
- <state name="running">
- <imagetype name="statusimage">
- <filename>schedule_recording.png</filename>
- </imagetype>
- </state>
- <state name="marked"></state>
- </statetype>
- <textarea name="titlesubtitle" from="buttontext">
- <area>32,2,656,28</area>
- <align>vcenter</align>
- </textarea>
- <textarea name="shortstartdate" from="titlesubtitle">
- <area>634,2,120,28</area>
- <align>right,vcenter</align>
- </textarea>
- <textarea name="filesize_str" from="shortstartdate">
- <area>760,2,114,28</area>
- <align>right,vcenter</align>
- </textarea>
- <statetype name="watched">
- <state name="yes">
- <imagetype name="yes">
- <position>4,2</position>
- <filename>small_watched.png</filename>
- </imagetype>
- </state>
- <state name="no" />
- </statetype>
- <statetype name="playlist">
- <state name="yes">
- <imagetype name="playlistyes">
- <position>6,0</position>
- <filename>playlist_yes.png</filename>
- </imagetype>
- </state>
- <state name="no" />
- </statetype>
- </state>
- <state name="selectedinactive" from="active">
- <shape name="selectbar">
- <area>26,0,854,30</area>
- </shape>
- </state>
- <state name="selectedactive" from="active">
- <shape name="selectbar">
- <area>26,0,854,30</area>
- </shape>
- <textarea name="titlesubtitle" from="buttontext">
- <area>32,2,656,28</area>
- <font>basesmall_normal_selected</font>
- <font state="disabled">basesmall_disabled_selected</font>
- <font state="error">basesmall_error_selected</font>
- <font state="warning">basesmall_warning_selected</font>
- <font state="normal">basesmall_normal_selected</font>
- <font state="running">basesmall_running_selected</font>
- <align>vcenter</align>
- </textarea>
- <textarea name="shortstartdate" from="titlesubtitle">
- <area>634,2,120,28</area>
- <align>right,vcenter</align>
- </textarea>
- <textarea name="filesize_str" from="shortstartdate">
- <area>760,2,114,28</area>
- <align>right,vcenter</align>
- </textarea>
- </state>
- </statetype>
- <statetype name="upscrollarrow">
- <position>850,0</position>
- </statetype>
- <statetype name="downscrollarrow">
- <position>850,328</position>
- </statetype>
- </buttonlist>
-
- <imagetype name="autoexpire">
- <filename>autoexpire.png</filename>
- <position>988,670</position>
- </imagetype>
-
- <imagetype name="commflagged">
- <filename>commflagged.png</filename>
- <position>1024,670</position>
- </imagetype>
-
- <imagetype name="bookmark">
- <filename>bookmark.png</filename>
- <position>1060,670</position>
- </imagetype>
-
- <imagetype name="cutlist">
- <filename>cutlist.png</filename>
- <position>1094,670</position>
- </imagetype>
-
- <statetype name="audioprops">
- <position>1128,670</position>
- <showempty>yes</showempty>
- <state name="stereo">
- <imagetype name="stereo">
- <filename>stereo.png</filename>
- </imagetype>
- </state>
- <state name="surround">
- <imagetype name="surround">
- <filename>surround.png</filename>
- </imagetype>
- </state>
- <state name="dolby">
- <imagetype name="dolby">
- <filename>dd.png</filename>
- </imagetype>
- </state>
- <state name="mono">
- <imagetype name="mono">
- <filename>mono.png</filename>
- </imagetype>
- </state>
- </statetype>
-
- <statetype name="subtitletypes">
- <position>1162,670</position>
- <showempty>yes</showempty>
- <state name="cc">
- <imagetype name="cc">
- <filename>cc.png</filename>
- </imagetype>
- </state>
- <state name="subtitles">
- <imagetype name="subtitles">
- <filename>subs.png</filename>
- </imagetype>
- </state>
- <state name="onscreensub">
- <imagetype name="onscreensub">
- <filename>subs_onscreen.png</filename>
- </imagetype>
- </state>
- </statetype>
-
- <statetype name="videoprops">
- <position>1196,670</position>
- <showempty>yes</showempty>
- <state name="hd1080">
- <imagetype name="hd1080">
- <filename>hd1080.png</filename>
- </imagetype>
- </state>
- <state name="hd720">
- <imagetype name="hd720">
- <filename>hd720.png</filename>
- </imagetype>
- </state>
- <state name="hdtv">
- <imagetype name="hdtv">
- <filename>hd.png</filename>
- </imagetype>
- </state>
- <state name="widescreen">
- <imagetype name="widescreen">
- <filename>wide.png</filename>
- </imagetype>
- </state>
- </statetype>
-
-<!-- <imagetype name="watched">
- <filename>watched.png</filename>
- <position>716,500</position>
- </imagetype>-->
-
- <imagetype name="processing">
- <filename>processing.png</filename>
- <position>1230,670</position>
- </imagetype>
-
- <textarea name="title" from="basetextarea">
- <area>24,400,700,40</area>
- <font>baselarge</font>
- <cutdown>yes</cutdown>
- <align>vcenter</align>
- </textarea>
-
- <textarea name="channel" from="basetextarea">
- <area>24,444,256,30</area>
- </textarea>
-
- <textarea name="timedate" from="basetextarea">
- <area>194,444,480,30</area>
- </textarea>
-
- <textarea name="filesize_str" from="basetextarea">
- <area>710,430,190,40</area>
- <font>deleterecordings_filesize_font</font>
- <align>right</align>
- </textarea>
-
- <textarea name="description" from="basetextarea">
- <area>24,480,890,200</area>
- <multiline>yes</multiline>
- <cutdown>yes</cutdown>
- <template>%"|SUBTITLE|" %%(|STARS|) %%DESCRIPTION%</template>
- </textarea>
-
- <imagetype name="preview">
- <area>920,410,320,240</area>
- <preserveaspect>true</preserveaspect>
- </imagetype>
-
- <textarea name="norecordings">
- <area>20,74,760,300</area>
- <font>basemedium</font>
- <value>
- </value>
- <multiline>yes</multiline>
- <align>allcenter</align>
- </textarea>
-
<progressbar name="usedbar">
<area>14,664,536,38</area>
<layout>horizontal</layout>
View
5 mythtv/themes/MythCenter/menu-ui.xml
@@ -416,11 +416,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>
View
10 mythtv/themes/Terra/menu-ui.xml
@@ -398,11 +398,6 @@
<filename>watermarks/watchrec.png</filename>
</imagetype>
</state>
- <state name="TV_DELETE" from="default">
- <imagetype name="icon">
- <filename>watermarks/delete.png</filename>
- </imagetype>
- </state>
<state name="TV_PREVIOUS" from="default">
<imagetype name="icon">
<filename>watermarks/previously_recorded.png</filename>
@@ -797,11 +792,6 @@
<filename>watermarks/watchrec.png</filename>
</imagetype>
</state>
- <state name="TV_DELETE" from="default">
- <imagetype name="icon">
- <filename>watermarks/delete.png</filename>
- </imagetype>
- </state>
<state name="TV_PREVIOUS" from="default">
<imagetype name="icon">
<filename>watermarks/previously_recorded.png</filename>
View
3 mythtv/themes/button_types.txt
@@ -63,8 +63,7 @@ manage_recordings.xml
1. TV_SCHEDULE_RECORDINGS
2. TV_RECORDING_RULES
3. TV_UPCOMING_RECORDINGS
- 4. TV_DELETE
- 5. TV_PREVIOUS
+ 4. TV_PREVIOUS
media_settings.xml
View
8 mythtv/themes/classic/tvmenu.xml
@@ -22,14 +22,6 @@
<action>TV_WATCH_RECORDING</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>
View
8 mythtv/themes/defaultmenu/manage_recordings.xml
@@ -23,14 +23,6 @@
</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>
-
- <button>
<type>TV_PREVIOUS</type>
<text>Previously Recorded</text>
<description>See what you have recorded</description>
View
8 mythtv/themes/defaultmenu/tvmenu.xml
@@ -22,14 +22,6 @@
<action>TV_WATCH_RECORDING</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>
View
8 mythtv/themes/mediacentermenu/manage_recordings.xml
@@ -24,14 +24,6 @@
</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>
-
- <button>
<type>TV_PREVIOUS</type>
<text>Previously Recorded</text>
<description>See what you have recorded before</description>

0 comments on commit 7349a86

Please sign in to comment.