mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
* Moviebrowser: Show rec icon when recording in progress.
This commit is contained in:
@@ -380,6 +380,7 @@ CMovieBrowser::~CMovieBrowser()
|
||||
m_playListLines.lineArray[i].clear();
|
||||
m_FilterLines.lineArray[i].clear();
|
||||
}
|
||||
m_browserListLines.Icon.clear();
|
||||
}
|
||||
|
||||
void CMovieBrowser::fileInfoStale(void)
|
||||
@@ -408,6 +409,7 @@ void CMovieBrowser::fileInfoStale(void)
|
||||
m_playListLines.lineArray[i].clear();
|
||||
m_FilterLines.lineArray[i].clear();
|
||||
}
|
||||
m_browserListLines.Icon.clear();
|
||||
};
|
||||
|
||||
void CMovieBrowser::init(void)
|
||||
@@ -937,6 +939,7 @@ int CMovieBrowser::exec(const char* path)
|
||||
m_recordListLines.lineArray[i].clear();
|
||||
m_playListLines.lineArray[i].clear();
|
||||
}
|
||||
m_browserListLines.Icon.clear();
|
||||
|
||||
m_selectedDir = path;
|
||||
|
||||
@@ -1508,6 +1511,7 @@ void CMovieBrowser::refreshBrowserList(void) //P1
|
||||
m_browserListLines.lineArray[row].clear();
|
||||
m_browserListLines.rowWidth[row] = m_settings.browserRowWidth[row];
|
||||
m_browserListLines.lineHeader[row]= g_Locale->getText(m_localizedItemName[m_settings.browserRowItem[row]]);
|
||||
m_browserListLines.Icon.clear();
|
||||
}
|
||||
m_vHandleBrowserList.clear();
|
||||
|
||||
@@ -1545,8 +1549,13 @@ void CMovieBrowser::refreshBrowserList(void) //P1
|
||||
if(m_settings.browserRowItem[row] == MB_INFO_TITLE)
|
||||
getMovieInfoItem(*m_vHandleBrowserList[handle], MB_INFO_FILENAME, &string_item);
|
||||
}
|
||||
|
||||
m_browserListLines.lineArray[row].push_back(string_item);
|
||||
}
|
||||
if (CRecordManager::getInstance()->getRecordInstance(m_vHandleBrowserList[handle]->file.Name) != NULL)
|
||||
m_browserListLines.Icon.push_back(NEUTRINO_ICON_REC);
|
||||
else
|
||||
m_browserListLines.Icon.push_back("");
|
||||
}
|
||||
m_pcBrowser->setLines(&m_browserListLines);
|
||||
|
||||
|
@@ -389,6 +389,20 @@ void CListFrame::refreshScroll(void)
|
||||
}
|
||||
}
|
||||
|
||||
int CListFrame::paintListIcon(int x, int y, int line)
|
||||
{
|
||||
int xDiff = 0;
|
||||
if (m_pLines->Icon[line] != "") {
|
||||
int icol_w, icol_h;
|
||||
frameBuffer->getIconSize(m_pLines->Icon[line].c_str(), &icol_w, &icol_h);
|
||||
if ((icol_w > 0) && (icol_h > 0)) {
|
||||
frameBuffer->paintIcon(m_pLines->Icon[line], x+m_cFrame.iX, y+m_cFrame.iY-m_nFontListHeight, m_nFontListHeight);
|
||||
xDiff = icol_w + TEXT_BORDER_WIDTH;
|
||||
}
|
||||
}
|
||||
return xDiff;
|
||||
}
|
||||
|
||||
void CListFrame::refreshList(void)
|
||||
{
|
||||
//TRACE("[CListFrame]->refreshList: %d\r\n",m_nCurrentLine);
|
||||
@@ -417,6 +431,9 @@ void CListFrame::refreshList(void)
|
||||
int width;
|
||||
int x = m_cFrameListRel.iX + TEXT_BORDER_WIDTH;
|
||||
y += m_nFontListHeight;
|
||||
|
||||
int xDiff = paintListIcon(x, y, line);
|
||||
|
||||
int net_width = m_cFrameListRel.iWidth - ROW_BORDER_WIDTH * (m_pLines->rows - 1);
|
||||
for(int row = 0; row < m_pLines->rows; row++)
|
||||
{
|
||||
@@ -426,8 +443,10 @@ void CListFrame::refreshList(void)
|
||||
width = m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - TEXT_BORDER_WIDTH;
|
||||
//TRACE(" normalize width to %d , x:%d \r\n",width,x);
|
||||
}
|
||||
m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY,
|
||||
width, m_pLines->lineArray[row][line].c_str(),
|
||||
if (row > 0)
|
||||
xDiff = 0;
|
||||
m_pcFontList->RenderString(x+m_cFrame.iX+xDiff, y+m_cFrame.iY,
|
||||
width-xDiff, m_pLines->lineArray[row][line].c_str(),
|
||||
color, 0, true); // UTF-8
|
||||
x += width + ROW_BORDER_WIDTH;
|
||||
}
|
||||
@@ -462,13 +481,18 @@ void CListFrame::refreshLine(int line)
|
||||
int width;
|
||||
int x = m_cFrameListRel.iX + TEXT_BORDER_WIDTH;
|
||||
y += m_nFontListHeight;
|
||||
|
||||
int xDiff = paintListIcon(x, y, line);
|
||||
|
||||
int net_width = m_cFrameListRel.iWidth - ROW_BORDER_WIDTH * (m_pLines->rows - 1);
|
||||
for(int row = 0; row < m_pLines->rows; row++)
|
||||
{
|
||||
width = std::min(m_pLines->rowWidth[row] * net_width / 100,
|
||||
m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - TEXT_BORDER_WIDTH);
|
||||
m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY,
|
||||
width, m_pLines->lineArray[row][line].c_str(),
|
||||
if (row > 0)
|
||||
xDiff = 0;
|
||||
m_pcFontList->RenderString(x+m_cFrame.iX+xDiff, y+m_cFrame.iY,
|
||||
width-xDiff, m_pLines->lineArray[row][line].c_str(),
|
||||
color, 0, true); // UTF-8
|
||||
x += width + ROW_BORDER_WIDTH;
|
||||
}
|
||||
|
@@ -63,6 +63,7 @@ typedef struct
|
||||
std::string lineHeader[LF_MAX_ROWS];
|
||||
std::vector<std::string> lineArray[LF_MAX_ROWS];
|
||||
int rowWidth[LF_MAX_ROWS];
|
||||
std::vector<std::string> Icon;
|
||||
}LF_LINES;
|
||||
|
||||
class CListFrame
|
||||
@@ -78,6 +79,7 @@ class CListFrame
|
||||
void refreshHeaderList(void);
|
||||
void reSizeMainFrameWidth(int maxTextWidth);
|
||||
void reSizeMainFrameHeight(int maxTextHeight);
|
||||
int paintListIcon(int x, int y, int line);
|
||||
|
||||
/* Variables */
|
||||
LF_LINES* m_pLines;
|
||||
|
Reference in New Issue
Block a user