summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonatan <mythtv@comhem.se>2011-05-27 06:15:07 (GMT)
committer Gavin Hurlbut <ghurlbut@mythtv.org>2011-05-27 07:07:39 (GMT)
commit4426dd65762dbc286b74e1fe5d85945d0b745ccf (patch)
treed4eb3a3d689317f5f0649b537c6c9d903cd19fe9
parent7909253bb15d4fa8f64c20c58732f9cc395cc10c (diff)
Load the disk free bar in the PBB on each UPDATE_FREE_SPACE
On startup, the playbackbox's disk free display states 0% until the first recording is made, or the first file is deleted. This patch makes it also update any time an UPDATE_FREE_SPACE event is received from the backend. Refs #9771 Signed-off-by: Gavin Hurlbut <ghurlbut@mythtv.org>
-rw-r--r--mythtv/programs/mythfrontend/playbackbox.cpp4
-rw-r--r--mythtv/programs/mythfrontend/playbackboxhelper.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/mythtv/programs/mythfrontend/playbackbox.cpp b/mythtv/programs/mythfrontend/playbackbox.cpp
index f0d748a..f9bda0b 100644
--- a/mythtv/programs/mythfrontend/playbackbox.cpp
+++ b/mythtv/programs/mythfrontend/playbackbox.cpp
@@ -3866,6 +3866,10 @@ void PlaybackBox::customEvent(QEvent *event)
UpdateUILists();
m_helper.ForceFreeSpaceUpdate();
}
+ else if (message == "UPDATE_USAGE_UI")
+ {
+ UpdateUsageUI();
+ }
else if (message == "RECONNECT_SUCCESS")
{
m_programInfoCache.ScheduleLoad();
diff --git a/mythtv/programs/mythfrontend/playbackboxhelper.cpp b/mythtv/programs/mythfrontend/playbackboxhelper.cpp
index 8ba0ab8..200f816 100644
--- a/mythtv/programs/mythfrontend/playbackboxhelper.cpp
+++ b/mythtv/programs/mythfrontend/playbackboxhelper.cpp
@@ -534,6 +534,8 @@ void PlaybackBoxHelper::UpdateFreeSpace(void)
m_freeSpaceUsedMB = (uint64_t) (fsInfos[i].usedSpaceKB >> 10);
}
}
+ MythEvent *e = new MythEvent("UPDATE_USAGE_UI");
+ QCoreApplication::postEvent(m_listener, e);
}
uint64_t PlaybackBoxHelper::GetFreeSpaceTotalMB(void) const