mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-15 01:13:36 +02:00
remove graphic progressbar
Origin commit data
------------------
Branch: ni/coolstream
Commit: 675c0dc6f6
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-06 (Tue, 06 Jun 2017)
Origin message was:
------------------
- remove graphic progressbar
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -2095,8 +2095,6 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
|
||||
if (g_settings.theme.progressbar_design_channellist != CProgressBar::PB_OFF)
|
||||
{
|
||||
pb.setValues(0, pb_width);
|
||||
if (g_settings.theme.progressbar_design == CProgressBar::PB_GRAPHIC) //NI graphic
|
||||
pb.setGraphic("progressbar_inactive");
|
||||
pb.paint();
|
||||
}
|
||||
//name
|
||||
|
@@ -39,9 +39,7 @@
|
||||
#define GREEN 0x00FF00
|
||||
#define YELLOW 0xFFFF00
|
||||
|
||||
//NI graphic
|
||||
#include <sstream>
|
||||
#include <unistd.h>
|
||||
//NI starbar
|
||||
#include <gui/pictureviewer.h>
|
||||
extern CPictureViewer * g_PicViewer;
|
||||
|
||||
@@ -86,8 +84,6 @@ CProgressBar::CProgressBar( const int x_pos,
|
||||
pb_value = 0;
|
||||
pb_max_value = 0;
|
||||
|
||||
graphic_file = "progressbar"; //NI graphic
|
||||
|
||||
// init start positions x/y active bar
|
||||
pb_x = x + fr_thickness;
|
||||
pb_y = y + fr_thickness;
|
||||
@@ -479,10 +475,6 @@ void CProgressBar::paintProgress(bool do_save_bg)
|
||||
paintStarBar();
|
||||
is_painted = true;
|
||||
}
|
||||
else if(*pb_design == PB_GRAPHIC) {
|
||||
paintGraphic();
|
||||
is_painted = true;
|
||||
}
|
||||
else {
|
||||
CProgressBarCache *pbc = CProgressBarCache::pbcLookup(pb_height, pb_max_width, pb_active_col, pb_passive_col, *pb_design, pb_invert, *pb_gradient, pb_red, pb_yellow, pb_green);
|
||||
if (pbc)
|
||||
@@ -504,31 +496,6 @@ void CProgressBar::paintProgress(bool do_save_bg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//NI graphic
|
||||
void CProgressBar::paintGraphic()
|
||||
{
|
||||
std::string pb_active_graphic(frameBuffer->getIconPath(graphic_file));
|
||||
std::string pb_passive_graphic(frameBuffer->getIconPath(graphic_file + "_passive"));
|
||||
|
||||
//printf("**** %04d::%04d: pb_last_width: %d, pb_active_width: %d, pb_max_width %d\n", pb_x, pb_y, pb_last_width, pb_active_width, pb_max_width);
|
||||
|
||||
if (pb_last_width == -1 ) {
|
||||
if (pb_active_width <= pb_max_width && pb_passive_width > 0)
|
||||
g_PicViewer->DisplayImage(pb_passive_graphic, pb_start_x_passive, pb_y, pb_passive_width, pb_height); // passive bar
|
||||
}
|
||||
|
||||
if (pb_active_width > pb_last_width) {
|
||||
// we have to paint the passive graphic in all cases to satisfy the CProgresswindow
|
||||
if (pb_passive_width > 0)
|
||||
g_PicViewer->DisplayImage(pb_passive_graphic, pb_start_x_passive, pb_y, pb_passive_width, pb_height); // passive bar
|
||||
if (pb_active_width > 0)
|
||||
g_PicViewer->DisplayImage(pb_active_graphic, pb_x, pb_y, pb_active_width, pb_height); // active bar
|
||||
}
|
||||
else if (pb_active_width <= pb_max_width && pb_passive_width > 0)
|
||||
g_PicViewer->DisplayImage(pb_passive_graphic, pb_start_x_passive, pb_y, pb_passive_width, pb_height); // passive bar
|
||||
}
|
||||
|
||||
//NI starbar
|
||||
void CProgressBar::paintStarBar()
|
||||
{
|
||||
|
@@ -79,8 +79,6 @@ class CProgressBar : public CComponentsItem
|
||||
///to evaluate values, these will be convert to the graph
|
||||
int pb_value, pb_max_value;
|
||||
|
||||
std::string graphic_file; //NI graphic
|
||||
|
||||
int *pb_design, *pb_gradient;
|
||||
int pb_type;
|
||||
|
||||
@@ -88,7 +86,6 @@ class CProgressBar : public CComponentsItem
|
||||
|
||||
///paints graph
|
||||
void paintProgress(bool do_save_bg = CC_SAVE_SCREEN_NO);
|
||||
void paintGraphic(); //NI graphic
|
||||
void paintStarBar(); //NI starbar
|
||||
|
||||
public:
|
||||
@@ -135,9 +132,6 @@ class CProgressBar : public CComponentsItem
|
||||
const int w, const int h,
|
||||
const int val, const int max_val){x=x_pos; y=y_pos; width=w; height=h; pb_value=val; pb_max_value=max_val;}
|
||||
|
||||
//NI graphic
|
||||
void setGraphic(std::string graphic) { graphic_file = graphic; }
|
||||
|
||||
///force update on next paint
|
||||
void reset() { pb_last_width = -1; }
|
||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_NO);
|
||||
@@ -148,8 +142,7 @@ class CProgressBar : public CComponentsItem
|
||||
PB_MATRIX, /* 0 */
|
||||
PB_LINES_V, /* 1 */
|
||||
PB_LINES_H, /* 2 */
|
||||
PB_COLOR, /* 3 */
|
||||
PB_GRAPHIC /* 4 */ //NI graphic
|
||||
PB_COLOR /* 3 */
|
||||
};
|
||||
|
||||
enum pb_type_t {
|
||||
|
@@ -45,9 +45,8 @@
|
||||
#define _LOCALE_PROGRESSBAR_COLOR_HORIZONTAL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_2
|
||||
#define _LOCALE_PROGRESSBAR_COLOR_FULL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_3
|
||||
#define _LOCALE_PROGRESSBAR_COLOR_MONO LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_4
|
||||
#define _LOCALE_PROGRESSBAR_COLOR_GRAPHIC LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_5 //NI
|
||||
|
||||
#define PROGRESSBAR_COLOR_OPTION_COUNT 7 //NI
|
||||
#define PROGRESSBAR_COLOR_OPTION_COUNT 6
|
||||
const CMenuOptionChooser::keyval PROGRESSBAR_COLOR_OPTIONS[PROGRESSBAR_COLOR_OPTION_COUNT] =
|
||||
{
|
||||
{ CProgressBar::PB_OFF, LOCALE_OPTIONS_OFF },
|
||||
@@ -55,8 +54,7 @@ const CMenuOptionChooser::keyval PROGRESSBAR_COLOR_OPTIONS[PROGRESSBAR_COLOR_OPT
|
||||
{ CProgressBar::PB_MATRIX, _LOCALE_PROGRESSBAR_COLOR_MATRIX },
|
||||
{ CProgressBar::PB_LINES_V, _LOCALE_PROGRESSBAR_COLOR_VERTICAL },
|
||||
{ CProgressBar::PB_LINES_H, _LOCALE_PROGRESSBAR_COLOR_HORIZONTAL },
|
||||
{ CProgressBar::PB_COLOR, _LOCALE_PROGRESSBAR_COLOR_FULL },
|
||||
{ CProgressBar::PB_GRAPHIC, _LOCALE_PROGRESSBAR_COLOR_GRAPHIC } //NI
|
||||
{ CProgressBar::PB_COLOR, _LOCALE_PROGRESSBAR_COLOR_FULL }
|
||||
};
|
||||
|
||||
#define PROGRESSBAR_TIMESCALE_INVERT_OPTION_COUNT 2
|
||||
|
@@ -536,9 +536,8 @@ const CMenuOptionChooser::keyval OPTIONS_COL_GRADIENT_DIRECTION_OPTIONS[OPTIONS_
|
||||
#define _LOCALE_PROGRESSBAR_COLOR_HORIZONTAL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_2
|
||||
#define _LOCALE_PROGRESSBAR_COLOR_FULL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_3
|
||||
#define _LOCALE_PROGRESSBAR_COLOR_MONO LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_4
|
||||
#define _LOCALE_PROGRESSBAR_COLOR_GRAPHIC LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_5 //NI
|
||||
|
||||
#define PROGRESSBAR_COLOR_OPTION_COUNT 7 //NI
|
||||
#define PROGRESSBAR_COLOR_OPTION_COUNT 6
|
||||
const CMenuOptionChooser::keyval PROGRESSBAR_COLOR_OPTIONS[PROGRESSBAR_COLOR_OPTION_COUNT] =
|
||||
{
|
||||
{ CProgressBar::PB_OFF, LOCALE_OPTIONS_OFF },
|
||||
@@ -546,8 +545,7 @@ const CMenuOptionChooser::keyval PROGRESSBAR_COLOR_OPTIONS[PROGRESSBAR_COLOR_OPT
|
||||
{ CProgressBar::PB_MATRIX, _LOCALE_PROGRESSBAR_COLOR_MATRIX },
|
||||
{ CProgressBar::PB_LINES_V, _LOCALE_PROGRESSBAR_COLOR_VERTICAL },
|
||||
{ CProgressBar::PB_LINES_H, _LOCALE_PROGRESSBAR_COLOR_HORIZONTAL },
|
||||
{ CProgressBar::PB_COLOR, _LOCALE_PROGRESSBAR_COLOR_FULL },
|
||||
{ CProgressBar::PB_GRAPHIC, _LOCALE_PROGRESSBAR_COLOR_GRAPHIC } //NI
|
||||
{ CProgressBar::PB_COLOR, _LOCALE_PROGRESSBAR_COLOR_FULL }
|
||||
};
|
||||
|
||||
//NI iconsets
|
||||
|
@@ -202,10 +202,6 @@ void CVolumeBar::initVolumeBarScale()
|
||||
vb_pb->setRgb(85, 75, 100);
|
||||
vb_pb->setFrameThickness(0); //NI
|
||||
vb_pb->setProgress(vb_pbx, vb_pby, vb_pbw, vb_pbh, *vb_vol, 100);
|
||||
|
||||
//NI
|
||||
if (g_settings.theme.progressbar_design == CProgressBar::PB_GRAPHIC)
|
||||
vb_pb->setGraphic("volumebar");
|
||||
}
|
||||
|
||||
//set digit text with current volume value
|
||||
|
@@ -1150,6 +1150,14 @@ void CNeutrinoApp::upgradeSetup(const char * fname)
|
||||
if (g_settings.movieplayer_bisection_jump == 1)
|
||||
g_settings.movieplayer_bisection_jump = 5;
|
||||
}
|
||||
//NI
|
||||
if (g_settings.version_pseudo < "20170606000000")
|
||||
{
|
||||
//remove CProgressBar::PB_GRAPHIC
|
||||
|
||||
if (g_settings.theme.progressbar_design == 4 /*CProgressBar::PB_GRAPHIC*/)
|
||||
g_settings.theme.progressbar_design = CProgressBar::PB_MONO;
|
||||
}
|
||||
|
||||
g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO;
|
||||
configfile.setString("version_pseudo", g_settings.version_pseudo);
|
||||
|
@@ -1789,7 +1789,6 @@ typedef enum
|
||||
LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_2,
|
||||
LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_3,
|
||||
LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_4,
|
||||
LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_5,
|
||||
LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_LONG,
|
||||
LOCALE_MISCSETTINGS_PROGRESSBAR_GRADIENT,
|
||||
LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION,
|
||||
|
@@ -1789,7 +1789,6 @@ const char * locale_real_names[] =
|
||||
"miscsettings.progressbar_design_2",
|
||||
"miscsettings.progressbar_design_3",
|
||||
"miscsettings.progressbar_design_4",
|
||||
"miscsettings.progressbar_design_5",
|
||||
"miscsettings.progressbar_design_long",
|
||||
"miscsettings.progressbar_gradient",
|
||||
"miscsettings.progressbar_infobar_position",
|
||||
|
Reference in New Issue
Block a user