Merge remote-tracking branch 'check/cst-next'

needs build- and functional fixes

Conflicts:
	configure.ac
	data/icons/shutdown.jpg
	data/icons/start.jpg
	data/locale/deutsch.locale
	data/locale/english.locale
	lib/libmd5sum/md5.c
	src/driver/scanepg.cpp
	src/driver/streamts.cpp
	src/driver/vfd.cpp
	src/driver/vfd.h
	src/driver/volume.cpp
	src/eitd/dmx.cpp
	src/eitd/xmlutil.cpp
	src/gui/Makefile.am
	src/gui/audiomute.cpp
	src/gui/channellist.cpp
	src/gui/dboxinfo.cpp
	src/gui/epgview.cpp
	src/gui/eventlist.cpp
	src/gui/filebrowser.cpp
	src/gui/hdd_menu.cpp
	src/gui/infoviewer.cpp
	src/gui/infoviewer_bb.cpp
	src/gui/infoviewer_bb.h
	src/gui/keybind_setup.cpp
	src/gui/luainstance.cpp
	src/gui/luainstance.h
	src/gui/miscsettings_menu.cpp
	src/gui/moviebrowser.cpp
	src/gui/movieplayer.cpp
	src/gui/osd_progressbar_setup.cpp
	src/gui/osd_progressbar_setup.h
	src/gui/osd_setup.cpp
	src/gui/osdlang_setup.cpp
	src/gui/personalize.cpp
	src/gui/plugins.cpp
	src/gui/plugins.h
	src/gui/scan.cpp
	src/gui/scan_setup.cpp
	src/gui/update_settings.cpp
	src/gui/user_menue.cpp
	src/gui/user_menue_setup.cpp
	src/gui/videosettings.cpp
	src/gui/widget/buttons.cpp
	src/gui/widget/menue.cpp
	src/gui/widget/menue.h
	src/gui/widget/progresswindow.cpp
	src/neutrino.cpp
	src/neutrino_menue.cpp
	src/nhttpd/yhttpd.cpp
	src/system/helpers.cpp
	src/system/locals.h
	src/system/locals_intern.h
	src/system/setting_helpers.cpp
	src/zapit/lib/zapitclient.cpp
	src/zapit/src/fastscan.cpp
	src/zapit/src/frontend.cpp
	src/zapit/src/getservices.cpp
	src/zapit/src/scan.cpp
	src/zapit/src/scannit.cpp
	src/zapit/src/scanpmt.cpp
	src/zapit/src/transponder.cpp
	src/zapit/src/zapit.cpp
This commit is contained in:
Stefan Seyfried
2014-12-25 18:03:08 +01:00
423 changed files with 23934 additions and 12351 deletions

View File

@@ -1,28 +1,26 @@
/*
$Id: progresswindow.cpp,v 1.16 2007/02/25 21:32:58 guenther Exp $
Based up Neutrino-GUI - Tuxbox-Project
Copyright (C) 2001 by Steffen Hehn 'McClean'
Neutrino-GUI - DBoxII-Project
Copyright (C) 2001 Steffen Hehn 'McClean'
Homepage: http://dbox.cyberphoria.org/
Implementation of CComponent Window class.
Copyright (C) 2014 Thilo Graf 'dbt'
Copyright (C) 2009-2013 Stefan Seyfried
License: GPL
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
@@ -34,41 +32,68 @@
#include <global.h>
#include <neutrino.h>
#include <driver/fontrenderer.h>
#include <driver/rcinput.h>
#include <driver/screen_max.h>
#include <driver/display.h>
#include <gui/color.h>
CProgressWindow::CProgressWindow()
CProgressWindow::CProgressWindow(CComponentsForm *parent)
: CComponentsWindow(0, 0, 700, 200, string(), NEUTRINO_ICON_INFO, NULL, parent)
{
frameBuffer = CFrameBuffer::getInstance();
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getWidth();
width = w_max (50*fw, 0);
height = h_max(hheight+5*mheight, 20);
Init();
}
global_progress = local_progress = 101;
statusText = "";
globalstatusX = 0;
globalstatusY = 0;
localstatusY = 0;
statusTextY = 0;
void CProgressWindow::Init()
{
global_progress = local_progress = 100;
x = frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth() - width ) >> 1 );
y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight() - height) >>1 );
showFooter(false);
shadow = true;
caption = NONEXISTANT_LOCALE;
int x_item = 10;
int y_item = 10;
setWidthP(75);
int w_item = width-2*x_item;
int h_item = 14;
int h_pbar = 20;
w_bar_frame = 0;
//create status text object
status_txt = new CComponentsLabel();
int h_txt = max(g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(), h_item);
status_txt->setDimensionsAll(x_item, y_item, w_item, h_txt);
status_txt->setColorBody(col_body);
addWindowItem(status_txt);
y_item += h_txt;
//create local_bar object
local_bar = new CProgressBar();
local_bar->setDimensionsAll(x_item, y_item, w_item, h_pbar);
local_bar->setColorBody(col_body);
local_bar->setActiveColor(COL_MENUCONTENT_PLUS_7);
local_bar->setFrameThickness(w_bar_frame);
local_bar->setColorFrame(COL_MENUCONTENT_PLUS_7);
addWindowItem(local_bar);
y_item += 2*h_pbar;
//create global_bar object
global_bar = new CProgressBar();
global_bar->setDimensionsAll(x_item, y_item, w_item, h_pbar);
global_bar->setColorBody(col_body);
global_bar->setActiveColor(COL_MENUCONTENT_PLUS_7);
global_bar->setFrameThickness(w_bar_frame);
global_bar->setColorFrame(COL_MENUCONTENT_PLUS_7);
addWindowItem(global_bar);
y_item += 2*h_pbar;
height = y_item + ccw_head->getHeight() + 10;
setCenterPos();
}
void CProgressWindow::setTitle(const neutrino_locale_t title)
{
caption = title;
setWindowCaption(title);
#ifdef VFD_UPDATE
CVFD::getInstance()->showProgressBar2(-1,NULL,-1,g_Locale->getText(caption)); // set global text in VFD
CVFD::getInstance()->showProgressBar2(-1,NULL,-1,g_Locale->getText(ccw_caption)); // set global text in VFD
#endif // VFD_UPDATE
}
@@ -79,20 +104,8 @@ void CProgressWindow::showGlobalStatus(const unsigned int prog)
return;
global_progress = prog;
int pos = x + 10;
if(global_progress != 0)
{
if (global_progress > 100)
global_progress = 100;
pos += (width - 20) * global_progress / 100;
//vordergrund
frameBuffer->paintBox(x+10, globalstatusY,pos, globalstatusY+10, COL_MENUCONTENT_PLUS_7);
}
//hintergrund
frameBuffer->paintBox(pos, globalstatusY, x+width-10, globalstatusY+10, COL_MENUCONTENT_PLUS_2);
global_bar->setValues(prog, 100);
global_bar->paint(false);
#ifdef VFD_UPDATE
CVFD::getInstance()->showProgressBar2(-1,NULL,global_progress);
@@ -105,33 +118,24 @@ void CProgressWindow::showLocalStatus(const unsigned int prog)
return;
local_progress = prog;
int pos = x + 10;
if (local_progress != 0)
{
if (local_progress > 100)
local_progress = 100;
pos += (width - 20) * local_progress / 100;
//vordergrund
frameBuffer->paintBox(x+10, localstatusY,pos, localstatusY+10, COL_MENUCONTENT_PLUS_7);
}
//hintergrund
frameBuffer->paintBox(pos, localstatusY, x+width-10, localstatusY+10, COL_MENUCONTENT_PLUS_2);
local_bar->setValues(prog, 100);
local_bar->paint(false);
#ifdef VFD_UPDATE
CVFD::getInstance()->showProgressBar2(local_progress);
#else
CVFD::getInstance()->showPercentOver(local_progress);
CVFD::getInstance()->showPercentOver((uint8_t)local_progress);
#endif // VFD_UPDATE
}
void CProgressWindow::showStatusMessageUTF(const std::string & text)
{
statusText = text;
frameBuffer->paintBox(x, statusTextY-mheight, x+width, statusTextY, COL_MENUCONTENT_PLUS_0);
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10, statusTextY, width-20, text, COL_MENUCONTENT_TEXT, 0, true); // UTF-8
string txt = text;
int w_txt = status_txt->getWidth();
int h_txt = status_txt->getHeight();
status_txt->setText(txt, CTextBox::CENTER, *CNeutrinoFonts::getInstance()->getDynFont(w_txt, h_txt, txt, CNeutrinoFonts::FONT_STYLE_BOLD), COL_MENUCONTENT_TEXT);
status_txt->paint(false);
#ifdef VFD_UPDATE
CVFD::getInstance()->showProgressBar2(-1,text.c_str()); // set local text in VFD
@@ -144,35 +148,9 @@ unsigned int CProgressWindow::getGlobalStatus(void)
return global_progress;
}
void CProgressWindow::hide()
void CProgressWindow::hide(bool no_restore)
{
frameBuffer->paintBackgroundBoxRel(x,y, width,height);
}
void CProgressWindow::paint()
{
int ypos=y;
frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
if (caption != NONEXISTANT_LOCALE)
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10, ypos+ hheight, width - 10, g_Locale->getText(caption), COL_MENUHEAD_TEXT, 0, true); // UTF-8
frameBuffer->paintBoxRel(x, ypos+ hheight, width, height- hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
ypos+= hheight + (mheight >>1);
statusTextY = ypos+mheight;
showStatusMessageUTF(statusText);
ypos+= mheight;
localstatusY = ypos+ mheight-20;
showLocalStatus(0);
ypos+= mheight+10;
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, ypos+ mheight, width- 10, g_Locale->getText(LOCALE_FLASHUPDATE_GLOBALPROGRESS), COL_MENUCONTENT_TEXT, 0, true); // UTF-8
ypos+= mheight;
globalstatusY = ypos+ mheight-20;
//ypos+= mheight >>1;
showGlobalStatus(global_progress);
CComponentsWindow::hide(no_restore);
}
int CProgressWindow::exec(CMenuTarget* parent, const std::string & /*actionKey*/)