summaryrefslogtreecommitdiff
path: root/displaymenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'displaymenu.c')
-rw-r--r--displaymenu.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/displaymenu.c b/displaymenu.c
index 3d7881b..5ec1116 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -23,6 +23,8 @@ cFlatDisplayMenu::cFlatDisplayMenu(void) {
menuPixmap->Fill(clrTransparent);
scrollbarPixmap->Fill(clrTransparent);
+
+ menuCategory = mcUndefined;
}
cFlatDisplayMenu::~cFlatDisplayMenu() {
@@ -30,6 +32,10 @@ cFlatDisplayMenu::~cFlatDisplayMenu() {
osd->DestroyPixmap(scrollbarPixmap);
}
+void cFlatDisplayMenu::SetMenuCategory(eMenuCategory MenuCategory) {
+ menuCategory = MenuCategory;
+}
+
void cFlatDisplayMenu::DrawScrollbar(int Total, int Offset, int Shown, int Top, int Height, bool CanScrollUp, bool CanScrollDown) {
if (Total > 0 && Total > Shown) {
int scrollHeight = max(int((Height) * double(Shown) / Total + 0.5), 5);
@@ -76,7 +82,17 @@ void cFlatDisplayMenu::Clear(void) {
}
void cFlatDisplayMenu::SetTitle(const char *Title) {
- TopBarSetTitle(Title);
+ if( menuCategory == mcRecording || menuCategory == mcTimer ) {
+ cVideoDiskUsage::HasChanged(VideoDiskUsageState);
+ int DiskUsage = cVideoDiskUsage::UsedPercent();
+ int FreeGB = cVideoDiskUsage::FreeMB() / 1024;
+ cString extra1 = cString::sprintf("%s: %d%%", tr("disk usage"), DiskUsage);
+ cString extra2 = cString::sprintf("%s: %d GB", tr("free space"), FreeGB);
+
+ TopBarSetTitle(Title);
+ TopBarSetTitleExtra(extra1, extra2);
+ } else
+ TopBarSetTitle(Title);
}
void cFlatDisplayMenu::SetButtons(const char *Red, const char *Green, const char *Yellow, const char *Blue) {