Merge remote-tracking branch 'tuxbox/master'

* needs compile fixes
* needs additional tests, of course :-)


Origin commit data
------------------
Commit: 13ab1ebc8a
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2016-10-22 (Sat, 22 Oct 2016)
This commit is contained in:
Stefan Seyfried
2016-10-22 11:37:40 +02:00
346 changed files with 13372 additions and 6088 deletions

View File

@@ -33,7 +33,7 @@
#include <libgen.h>
#include <gui/dboxinfo.h>
#include <gui/components/cc.h>
#include <global.h>
#include <neutrino.h>
@@ -67,7 +67,7 @@ CDBoxInfoWidget::CDBoxInfoWidget()
height = 0;
x = 0;
y = 0;
header = NULL;
fontWidth = fm->getWidth();
sizeWidth = 6 * fm->getMaxDigitWidth()
+ fm->getRenderWidth(std::string(" MiB") + g_Locale->getText(LOCALE_UNIT_DECIMAL)); ;//9999.99 MiB
@@ -76,6 +76,12 @@ CDBoxInfoWidget::CDBoxInfoWidget()
nameWidth = fontWidth * 17;
}
CDBoxInfoWidget::~CDBoxInfoWidget()
{
delete header;
header = NULL;
}
int CDBoxInfoWidget::exec(CMenuTarget* parent, const std::string &)
{
if (parent)
@@ -125,7 +131,7 @@ int CDBoxInfoWidget::exec(CMenuTarget* parent, const std::string &)
res = menu_return::RETURN_EXIT_ALL;
doLoop = false;
}
else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites)) {
else if(CNeutrinoApp::getInstance()->listModeKey(msg)) {
g_RCInput->postMsg (msg, 0);
res = menu_return::RETURN_EXIT_ALL;
doLoop = false;
@@ -159,6 +165,7 @@ int CDBoxInfoWidget::exec(CMenuTarget* parent, const std::string &)
void CDBoxInfoWidget::hide()
{
header->kill();
frameBuffer->paintBackgroundBoxRel(x,y, width,height);
frameBuffer->blit();
}
@@ -317,7 +324,6 @@ void CDBoxInfoWidget::paint()
nameWidth += diff;
}
height = h_max(height, 0);
x = getScreenStartX(width);
y = getScreenStartY(height);
// fprintf(stderr, "CDBoxInfoWidget::CDBoxInfoWidget() x = %d, y = %d, width = %d height = %d\n", x, y, width, height);
@@ -353,9 +359,13 @@ void CDBoxInfoWidget::paint()
title += g_info.hw_caps->boxvendor;
title += " ";
title += g_info.hw_caps->boxname;
width = max(width, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(title, true) + 50);
x = getScreenStartX(width);
CComponentsHeader header(x, ypos, width, hheight, title, NEUTRINO_ICON_SHELL);
header.paint(CC_SAVE_SCREEN_NO);
if (!header)
header = new CComponentsHeader(x, ypos, width, hheight, title, NEUTRINO_ICON_SHELL);
if (!header->isPainted())
header->paint(CC_SAVE_SCREEN_NO);
//paint body
frameBuffer->paintBoxRel(x, ypos+ hheight, width, height- hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);