mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
add show hdd indicator level in moviebrowser
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@816 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 1dc763833b
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-10-04 (Mon, 04 Oct 2010)
Origin message was:
------------------
-add show hdd indicator level in moviebrowser
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@816 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -342,8 +342,8 @@ keybindingmenu.pagedown_head Seitn obiblatln
|
|||||||
keybindingmenu.pageup seitn aufiblatln
|
keybindingmenu.pageup seitn aufiblatln
|
||||||
keybindingmenu.pageup_head Seitn aufiblatln
|
keybindingmenu.pageup_head Seitn aufiblatln
|
||||||
keybindingmenu.quickzap Schneiumschoitung
|
keybindingmenu.quickzap Schneiumschoitung
|
||||||
keybindingmenu.repeatblock Wiederholungsverzögerung
|
keybindingmenu.repeatblock Ofangsverzögerung
|
||||||
keybindingmenu.repeatblockgeneric Ofangsverzögerung
|
keybindingmenu.repeatblockgeneric Wiederholungsverzögerung
|
||||||
keybindingmenu.sort Sortierfoige ändan
|
keybindingmenu.sort Sortierfoige ändan
|
||||||
keybindingmenu.sort_head Sortierfoige ändan
|
keybindingmenu.sort_head Sortierfoige ändan
|
||||||
keybindingmenu.subchanneldown Untersenda zruck
|
keybindingmenu.subchanneldown Untersenda zruck
|
||||||
|
@@ -345,8 +345,8 @@ keybindingmenu.pagedown_head Sidde abe blättere
|
|||||||
keybindingmenu.pageup Sidde uffe blättere
|
keybindingmenu.pageup Sidde uffe blättere
|
||||||
keybindingmenu.pageup_head Sidde uffe blättere
|
keybindingmenu.pageup_head Sidde uffe blättere
|
||||||
keybindingmenu.quickzap Schnällumschaldig
|
keybindingmenu.quickzap Schnällumschaldig
|
||||||
keybindingmenu.repeatblock Wiederholigsverzögerig
|
keybindingmenu.repeatblock Afangsverzögerig
|
||||||
keybindingmenu.repeatblockgeneric Afangsverzögerig
|
keybindingmenu.repeatblockgeneric Wiederholigsverzögerig
|
||||||
keybindingmenu.sort Sortierreihefolg ändere
|
keybindingmenu.sort Sortierreihefolg ändere
|
||||||
keybindingmenu.sort_head Sortierreihefolg ändere
|
keybindingmenu.sort_head Sortierreihefolg ändere
|
||||||
keybindingmenu.subchanneldown Underkanal z'ruck
|
keybindingmenu.subchanneldown Underkanal z'ruck
|
||||||
|
@@ -142,21 +142,13 @@ const CMenuOptionChooser::keyval MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS[MESSAGEBOX_
|
|||||||
{ 99, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_ALWAYS }
|
{ 99, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_ALWAYS }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_WINDOW_WIDTH (g_settings.screen_EndX - g_settings.screen_StartX - 40)
|
|
||||||
#define MAX_WINDOW_HEIGHT (g_settings.screen_EndY - g_settings.screen_StartY - 40)
|
|
||||||
|
|
||||||
#define MIN_WINDOW_WIDTH ((g_settings.screen_EndX - g_settings.screen_StartX)>>1)
|
|
||||||
#define MIN_WINDOW_HEIGHT 200
|
|
||||||
|
|
||||||
#define TITLE_BACKGROUND_COLOR ((CFBWindow::color_t)COL_MENUHEAD_PLUS_0)
|
#define TITLE_BACKGROUND_COLOR ((CFBWindow::color_t)COL_MENUHEAD_PLUS_0)
|
||||||
#define TITLE_FONT_COLOR ((CFBWindow::color_t)COL_MENUHEAD)
|
#define TITLE_FONT_COLOR ((CFBWindow::color_t)COL_MENUHEAD)
|
||||||
|
|
||||||
#define TEXT_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU]
|
|
||||||
#define TITLE_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]
|
#define TITLE_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]
|
||||||
#define FOOT_FONT g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]
|
#define FOOT_FONT g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]
|
||||||
|
|
||||||
#define INTER_FRAME_SPACE 4 // space between e.g. upper and lower window
|
#define INTER_FRAME_SPACE 4 // space between e.g. upper and lower window
|
||||||
#define TEXT_BORDER_WIDTH 8
|
|
||||||
|
|
||||||
const neutrino_locale_t m_localizedItemName[MB_INFO_MAX_NUMBER+1] =
|
const neutrino_locale_t m_localizedItemName[MB_INFO_MAX_NUMBER+1] =
|
||||||
{
|
{
|
||||||
@@ -1080,7 +1072,6 @@ int CMovieBrowser::paint(void)
|
|||||||
|
|
||||||
//CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD));
|
//CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD));
|
||||||
|
|
||||||
//Font* font = TEXT_FONT;
|
|
||||||
Font* font = NULL;
|
Font* font = NULL;
|
||||||
|
|
||||||
m_pcBrowser = new CListFrame(&m_browserListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE,
|
m_pcBrowser = new CListFrame(&m_browserListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE,
|
||||||
@@ -1142,6 +1133,7 @@ void CMovieBrowser::refresh(void)
|
|||||||
|
|
||||||
refreshFoot();
|
refreshFoot();
|
||||||
refreshLCD();
|
refreshLCD();
|
||||||
|
info_hdd_level();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CMovieBrowser::getCurrentDir(void)
|
std::string CMovieBrowser::getCurrentDir(void)
|
||||||
@@ -1221,7 +1213,22 @@ void CMovieBrowser::refreshMovieInfo(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void CMovieBrowser::info_hdd_level()
|
||||||
|
{
|
||||||
|
struct statfs s;
|
||||||
|
long blocks_percent_used =0;
|
||||||
|
if(getSelectedFile() != NULL){
|
||||||
|
if (::statfs(getSelectedFile()->Name.c_str(), &s) == 0) {
|
||||||
|
long blocks_used = s.f_blocks - s.f_bfree;
|
||||||
|
blocks_percent_used = (long)(blocks_used * 100.0 / (blocks_used + s.f_bavail) + 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CProgressBar pb(true, -1, -1, 30, 100, 70, true);
|
||||||
|
const short pbw = 100;
|
||||||
|
const short border = m_cBoxFrameTitleRel.iHeight/4;
|
||||||
|
pb.paintProgressBarDefault(m_cBoxFrame.iX+ m_cBoxFrameFootRel.iWidth - pbw - border, m_cBoxFrame.iY+m_cBoxFrameTitleRel.iY + border, pbw, m_cBoxFrameTitleRel.iHeight/2, blocks_percent_used, 100);
|
||||||
|
|
||||||
|
}
|
||||||
void CMovieBrowser::refreshLCD(void)
|
void CMovieBrowser::refreshLCD(void)
|
||||||
{
|
{
|
||||||
if(m_vMovieInfo.size() <= 0) return;
|
if(m_vMovieInfo.size() <= 0) return;
|
||||||
@@ -1500,13 +1507,13 @@ void CMovieBrowser::refreshTitle(void)
|
|||||||
{
|
{
|
||||||
//Paint Text Background
|
//Paint Text Background
|
||||||
//TRACE("[mb]->refreshTitle : %s\r\n",m_textTitle.c_str());
|
//TRACE("[mb]->refreshTitle : %s\r\n",m_textTitle.c_str());
|
||||||
|
const short text_border_width = 8;
|
||||||
m_pcWindow->paintBoxRel(m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX, m_cBoxFrame.iY+ m_cBoxFrameTitleRel.iY,
|
m_pcWindow->paintBoxRel(m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX, m_cBoxFrame.iY+ m_cBoxFrameTitleRel.iY,
|
||||||
m_cBoxFrameTitleRel.iWidth, m_cBoxFrameTitleRel.iHeight, TITLE_BACKGROUND_COLOR, RADIUS_LARGE, CORNER_TOP);
|
m_cBoxFrameTitleRel.iWidth, m_cBoxFrameTitleRel.iHeight, TITLE_BACKGROUND_COLOR, RADIUS_LARGE, CORNER_TOP);
|
||||||
|
|
||||||
m_pcFontTitle->RenderString(m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX + TEXT_BORDER_WIDTH, m_cBoxFrame.iY+m_cBoxFrameTitleRel.iY + m_cBoxFrameTitleRel.iHeight, m_cBoxFrameTitleRel.iWidth - (TEXT_BORDER_WIDTH << 1), m_textTitle.c_str(), TITLE_FONT_COLOR, 0, true); // UTF-8
|
m_pcFontTitle->RenderString(m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX + text_border_width, m_cBoxFrame.iY+m_cBoxFrameTitleRel.iY + m_cBoxFrameTitleRel.iHeight, m_cBoxFrameTitleRel.iWidth - (text_border_width << 1), m_textTitle.c_str(), TITLE_FONT_COLOR, 0, true); // UTF-8
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ADD_FOOT_HEIGHT 4
|
|
||||||
void CMovieBrowser::refreshFoot(void)
|
void CMovieBrowser::refreshFoot(void)
|
||||||
{
|
{
|
||||||
//TRACE("[mb]->refreshButtonLine \r\n");
|
//TRACE("[mb]->refreshButtonLine \r\n");
|
||||||
@@ -1534,7 +1541,6 @@ void CMovieBrowser::refreshFoot(void)
|
|||||||
if (m_settings.gui != MB_GUI_LAST_PLAY && m_settings.gui != MB_GUI_LAST_RECORD)
|
if (m_settings.gui != MB_GUI_LAST_PLAY && m_settings.gui != MB_GUI_LAST_RECORD)
|
||||||
{
|
{
|
||||||
m_pcWindow->getIconSize(NEUTRINO_ICON_BUTTON_RED, &iw, &ih);
|
m_pcWindow->getIconSize(NEUTRINO_ICON_BUTTON_RED, &iw, &ih);
|
||||||
//m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_RED, m_cBoxFrame.iX+xpos1, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY + 4 + (ADD_FOOT_HEIGHT>>1));
|
|
||||||
m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_RED, m_cBoxFrame.iX+xpos1, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY, m_cBoxFrameFootRel.iHeight+ 6);
|
m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_RED, m_cBoxFrame.iX+xpos1, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY, m_cBoxFrameFootRel.iHeight+ 6);
|
||||||
m_pcFontFoot->RenderString(m_cBoxFrame.iX+xpos1 + 10 + iw, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY + m_cBoxFrameFootRel.iHeight + 4 , width-30, sort_text.c_str(), (CFBWindow::color_t)color, 0, true); // UTF-8
|
m_pcFontFoot->RenderString(m_cBoxFrame.iX+xpos1 + 10 + iw, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY + m_cBoxFrameFootRel.iHeight + 4 , width-30, sort_text.c_str(), (CFBWindow::color_t)color, 0, true); // UTF-8
|
||||||
}
|
}
|
||||||
@@ -1542,7 +1548,6 @@ void CMovieBrowser::refreshFoot(void)
|
|||||||
if (m_settings.gui != MB_GUI_LAST_PLAY && m_settings.gui != MB_GUI_LAST_RECORD)
|
if (m_settings.gui != MB_GUI_LAST_PLAY && m_settings.gui != MB_GUI_LAST_RECORD)
|
||||||
{
|
{
|
||||||
m_pcWindow->getIconSize(NEUTRINO_ICON_BUTTON_RED, &iw, &ih);
|
m_pcWindow->getIconSize(NEUTRINO_ICON_BUTTON_RED, &iw, &ih);
|
||||||
//m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, m_cBoxFrame.iX+xpos1+width, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY + 4 + (ADD_FOOT_HEIGHT>>1));
|
|
||||||
m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, m_cBoxFrame.iX+xpos1+width, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY, m_cBoxFrameFootRel.iHeight+ 6);
|
m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, m_cBoxFrame.iX+xpos1+width, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY, m_cBoxFrameFootRel.iHeight+ 6);
|
||||||
m_pcFontFoot->RenderString(m_cBoxFrame.iX+ xpos1+width + 10 + iw, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY + m_cBoxFrameFootRel.iHeight + 4 , width -30, filter_text.c_str(), (CFBWindow::color_t)color, 0, true); // UTF-8
|
m_pcFontFoot->RenderString(m_cBoxFrame.iX+ xpos1+width + 10 + iw, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY + m_cBoxFrameFootRel.iHeight + 4 , width -30, filter_text.c_str(), (CFBWindow::color_t)color, 0, true); // UTF-8
|
||||||
}
|
}
|
||||||
@@ -1556,12 +1561,10 @@ void CMovieBrowser::refreshFoot(void)
|
|||||||
ok_text = g_Locale->getText(LOCALE_MOVIEBROWSER_FOOT_PLAY);
|
ok_text = g_Locale->getText(LOCALE_MOVIEBROWSER_FOOT_PLAY);
|
||||||
}
|
}
|
||||||
m_pcWindow->getIconSize(NEUTRINO_ICON_BUTTON_OKAY, &iw, &ih);
|
m_pcWindow->getIconSize(NEUTRINO_ICON_BUTTON_OKAY, &iw, &ih);
|
||||||
//m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, m_cBoxFrame.iX+xpos1+width*2, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1));
|
|
||||||
m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, m_cBoxFrame.iX+xpos1+width*2, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY, m_cBoxFrameFootRel.iHeight+ 6);
|
m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, m_cBoxFrame.iX+xpos1+width*2, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY, m_cBoxFrameFootRel.iHeight+ 6);
|
||||||
m_pcFontFoot->RenderString(m_cBoxFrame.iX+xpos1+width*2 + 10 + iw, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY + m_cBoxFrameFootRel.iHeight + 4 , width-30, ok_text.c_str(), (CFBWindow::color_t)color, 0, true); // UTF-8
|
m_pcFontFoot->RenderString(m_cBoxFrame.iX+xpos1+width*2 + 10 + iw, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY + m_cBoxFrameFootRel.iHeight + 4 , width-30, ok_text.c_str(), (CFBWindow::color_t)color, 0, true); // UTF-8
|
||||||
//delte icon
|
//delte icon
|
||||||
m_pcWindow->getIconSize(NEUTRINO_ICON_BUTTON_MUTE_SMALL, &iw, &ih);
|
m_pcWindow->getIconSize(NEUTRINO_ICON_BUTTON_MUTE_SMALL, &iw, &ih);
|
||||||
//m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_MUTE_SMALL, m_cBoxFrame.iX+xpos1+width*3, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1));
|
|
||||||
m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_MUTE_SMALL, m_cBoxFrame.iX+xpos1+width*3, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY, m_cBoxFrameFootRel.iHeight+ 6);
|
m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_MUTE_SMALL, m_cBoxFrame.iX+xpos1+width*3, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY, m_cBoxFrameFootRel.iHeight+ 6);
|
||||||
m_pcFontFoot->RenderString(m_cBoxFrame.iX+xpos1+width*3 + 10 + iw , m_cBoxFrame.iY+m_cBoxFrameFootRel.iY + m_cBoxFrameFootRel.iHeight + 4 , width-30, g_Locale->getText(LOCALE_FILEBROWSER_DELETE), (CFBWindow::color_t)color, 0, true); // UTF-8
|
m_pcFontFoot->RenderString(m_cBoxFrame.iX+xpos1+width*3 + 10 + iw , m_cBoxFrame.iY+m_cBoxFrameFootRel.iY + m_cBoxFrameFootRel.iHeight + 4 , width-30, g_Locale->getText(LOCALE_FILEBROWSER_DELETE), (CFBWindow::color_t)color, 0, true); // UTF-8
|
||||||
|
|
||||||
@@ -2541,8 +2544,10 @@ void CMovieBrowser::updateMovieSelection(void)
|
|||||||
if(m_currentBrowserSelection != old_movie_selection)
|
if(m_currentBrowserSelection != old_movie_selection)
|
||||||
new_selection = true;
|
new_selection = true;
|
||||||
|
|
||||||
if(m_currentBrowserSelection < m_vHandleBrowserList.size())
|
if(m_currentBrowserSelection < m_vHandleBrowserList.size()){
|
||||||
m_movieSelectionHandler = m_vHandleBrowserList[m_currentBrowserSelection];
|
m_movieSelectionHandler = m_vHandleBrowserList[m_currentBrowserSelection];
|
||||||
|
info_hdd_level();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(m_windowFocus == MB_FOCUS_LAST_PLAY)
|
else if(m_windowFocus == MB_FOCUS_LAST_PLAY)
|
||||||
@@ -2562,8 +2567,10 @@ void CMovieBrowser::updateMovieSelection(void)
|
|||||||
if(m_currentPlaySelection != old_movie_selection)
|
if(m_currentPlaySelection != old_movie_selection)
|
||||||
new_selection = true;
|
new_selection = true;
|
||||||
|
|
||||||
if(m_currentPlaySelection < m_vHandlePlayList.size())
|
if(m_currentPlaySelection < m_vHandlePlayList.size()){
|
||||||
m_movieSelectionHandler = m_vHandlePlayList[m_currentPlaySelection];
|
m_movieSelectionHandler = m_vHandlePlayList[m_currentPlaySelection];
|
||||||
|
info_hdd_level();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(m_windowFocus == MB_FOCUS_LAST_RECORD)
|
else if(m_windowFocus == MB_FOCUS_LAST_RECORD)
|
||||||
@@ -2583,8 +2590,10 @@ void CMovieBrowser::updateMovieSelection(void)
|
|||||||
if(m_currentRecordSelection != old_movie_selection)
|
if(m_currentRecordSelection != old_movie_selection)
|
||||||
new_selection = true;
|
new_selection = true;
|
||||||
|
|
||||||
if(m_currentRecordSelection < m_vHandleRecordList.size())
|
if(m_currentRecordSelection < m_vHandleRecordList.size()){
|
||||||
m_movieSelectionHandler = m_vHandleRecordList[m_currentRecordSelection];
|
m_movieSelectionHandler = m_vHandleRecordList[m_currentRecordSelection];
|
||||||
|
info_hdd_level();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -391,6 +391,8 @@ class CMovieBrowser : public CMenuTarget
|
|||||||
void updateFilterSelection(void);
|
void updateFilterSelection(void);
|
||||||
void updateSerienames(void);
|
void updateSerienames(void);
|
||||||
void autoFindSerie(void);
|
void autoFindSerie(void);
|
||||||
|
|
||||||
|
void info_hdd_level();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Class to show Moviebrowser Information, to be used by menu
|
// Class to show Moviebrowser Information, to be used by menu
|
||||||
|
Reference in New Issue
Block a user