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:10:22 (GMT)
commitd0648f64f1c04effcbc5b8c2e873c7ea353cbf0d (patch)
tree1798d90f183cf3d07a9f9ef1cbba70a17b013cb2
parent347cd2477ad82a7aa75ebe7c686db77465f415dc (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> (cherry picked from commit 4426dd65762dbc286b74e1fe5d85945d0b745ccf)
-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 3b6a381..877bd12 100644
--- a/mythtv/programs/mythfrontend/playbackbox.cpp
+++ b/mythtv/programs/mythfrontend/playbackbox.cpp
@@ -3855,6 +3855,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 aae73b9..3a4ede1 100644
--- a/mythtv/programs/mythfrontend/playbackboxhelper.cpp
+++ b/mythtv/programs/mythfrontend/playbackboxhelper.cpp
@@ -536,6 +536,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