neutrino: make blinkenlights runtime configurable

Get rid of "--disable-blinkenlights" configure switch. Colored
progress bars can be disabled with "neutrino -noblink" now.
Unfortunately CProgressBar had to be touched again to avoid
ambiguities in the constructor, but should be done for now.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@133 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: 691811695a
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2010-01-03 (Sun, 03 Jan 2010)
This commit is contained in:
Stefan Seyfried
2010-01-03 12:06:13 +00:00
parent 286d8e9a05
commit a35d9f9087
11 changed files with 63 additions and 74 deletions

View File

@@ -33,23 +33,8 @@
#define GREEN 0x00FF00
#define YELLOW 0xFFFF00
CProgressBar::CProgressBar(const bool bl, const int r, const int g, const int b, const bool inv)
{
frameBuffer = CFrameBuffer::getInstance();
font_pbar = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL;
// frame width around active bar
frame_widht = 2;
blink = bl;
invert = inv;
red = r;
green = g;
yellow = b;
width = height = -1;
}
CProgressBar::CProgressBar(const int w, const int h,
const bool bl, const int r, const int g, const int b, const bool inv)
CProgressBar::CProgressBar(const bool bl, const int w, const int h,
const int r, const int g, const int b, const bool inv)
{
frameBuffer = CFrameBuffer::getInstance();
font_pbar = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL;
@@ -132,7 +117,7 @@ void CProgressBar::realpaint(const int pos_x, const int pos_y,
const int c_rad = 0;
/* if the bar is too small, do not draw the borders around it */
if (height / 2 <= frame_widht || blink)
if (height / 2 <= frame_widht || blink || backgroundbar_col == 0)
frame_widht = 0;
// get icon size
int icon_w = 0, icon_h = 0;

View File

@@ -27,11 +27,6 @@
#include <driver/fontrenderer.h>
#include <system/settings.h>
#ifdef NO_BLINKENLIGHTS
#define PB_COLORED false
#else
#define PB_COLORED true
#endif
#include <string>
class CProgressBar
@@ -57,15 +52,20 @@ class CProgressBar
public:
CProgressBar(const bool blinkenlights = PB_COLORED,
/* parameters:
blinkenligts: true if you want colored progressbars. needed, no default.
w, h: width / height of bar. Can later be set with paintProgressbar.
paintProgressBar2 can oly be used if w and h are set.
r, g, b: percentage of the bar where red/green/yellow is used.
only used if blinkenlights == true.
inv: false => red on the left side, true: red on right side. */
CProgressBar(const bool blinkenlights,
const int w = -1,
const int h = -1,
const int r = 40,
const int g = 100,
const int b =70, const bool inv = false);
CProgressBar(const int w, const int h,
const bool blinkenlights = PB_COLORED,
const int r = 40,
const int g = 100,
const int b =70, const bool inv = false);
const int b =70,
const bool inv = false);
~CProgressBar();
/// void paintProgressBar(...)
@@ -93,8 +93,6 @@ class CProgressBar
iconfile > optional, name of iconfile
paintZero > optional, if set to true and value = 0, then paints a diagonal line instead of active bar as symbolic for a zero value
*/
void paintProgressBar ( const int pos_x,
const int pos_y,
const int pb_width,