Merge branch 'check/next-cc'

Only compile-tested.
This commit is contained in:
Stefan Seyfried
2013-11-13 14:04:15 +01:00
56 changed files with 1278 additions and 203 deletions

View File

@@ -67,6 +67,7 @@
#include <gui/widget/stringinput_ext.h>
#include "gui/pictureviewer.h"
extern CPictureViewer * g_PicViewer;
#include <system/settings.h>
#include <system/helpers.h>
@@ -2170,6 +2171,25 @@ void CAudioPlayerGui::updateMetaData(bool screen_saver)
m_curr_audiofile.MetaData.album = meta.sc_station;
updateLcd = true;
}
std::string cover = m_curr_audiofile.Filename.substr(0, m_curr_audiofile.Filename.rfind('/')) + "/folder.jpg";
if (!meta.cover.empty())
cover = "/tmp/cover.jpg";
if ((access(cover.c_str(), F_OK) == 0) && !screen_saver)
{
g_PicViewer->DisplayImage(cover, m_x + 2, m_y + 2, m_title_height - 14, m_title_height - 14, m_frameBuffer->TM_NONE);
if(g_settings.rounded_corners)
{
//repaint frame to cover up the corners of the cover; FIXME
if (!m_show_playlist)
m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, m_title_height - 10 - m_fheight, 2, COL_MENUCONTENT_PLUS_6, RADIUS_MID);
else
m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, m_title_height - 10, 2, COL_MENUCONTENT_PLUS_6, RADIUS_MID);
}
}
}
//if (CAudioPlayer::getInstance()->getScBuffered() != 0)
if (CAudioPlayer::getInstance()->hasMetaDataChanged() != 0)
@@ -2184,8 +2204,7 @@ void CAudioPlayerGui::updateMetaData(bool screen_saver)
if (updateMeta || updateScreen)
{
m_frameBuffer->paintBoxRel(m_x + 10, m_y + 4 + 2*m_fheight, m_width - 20,
m_sheight, COL_MENUCONTENTSELECTED_PLUS_0);
m_frameBuffer->paintBoxRel(m_x + 10 + m_title_height, m_y + 4 + 2*m_fheight, m_width - 20 - m_title_height, m_sheight, COL_MENUCONTENTSELECTED_PLUS_0);
int xstart = ((m_width - 20 - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(m_metainfo))/2)+10;
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]
->RenderString(m_x + xstart, m_y + 4 + 2*m_fheight + m_sheight,