mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
fix build / progressbar setup after pu/cc merge
* CProgressBar::PB_MONO is no longer available * PB color setup is split over two configuration variables Fix this while still keeping seamless update compatibility.
This commit is contained in:
@@ -392,7 +392,7 @@ const CMenuOptionChooser::keyval OPTIONS_COLORED_EVENTS_OPTIONS[OPTIONS_COLORED_
|
||||
#define PROGRESSBAR_COLOR_OPTION_COUNT 5
|
||||
const CMenuOptionChooser::keyval PROGRESSBAR_COLOR_OPTIONS[PROGRESSBAR_COLOR_OPTION_COUNT] =
|
||||
{
|
||||
{ CProgressBar::PB_MONO, LOCALE_PROGRESSBAR_COLOR_MONO },
|
||||
{ -1, LOCALE_PROGRESSBAR_COLOR_MONO },
|
||||
{ CProgressBar::PB_MATRIX, LOCALE_PROGRESSBAR_COLOR_MATRIX },
|
||||
{ CProgressBar::PB_LINES_V, LOCALE_PROGRESSBAR_COLOR_VERTICAL },
|
||||
{ CProgressBar::PB_LINES_H, LOCALE_PROGRESSBAR_COLOR_HORIZONTAL },
|
||||
@@ -522,12 +522,19 @@ int COsdSetup::showOsdSetup()
|
||||
osd_menu->addItem(mc);
|
||||
|
||||
// color progress bar
|
||||
mc = new CMenuOptionChooser(LOCALE_PROGRESSBAR_COLOR, &g_settings.progressbar_color, PROGRESSBAR_COLOR_OPTIONS, PROGRESSBAR_COLOR_OPTION_COUNT, true);
|
||||
int pb_color = g_settings.progressbar_color ? g_settings.progressbar_design : -1;
|
||||
mc = new CMenuOptionChooser(LOCALE_PROGRESSBAR_COLOR, &pb_color, PROGRESSBAR_COLOR_OPTIONS, PROGRESSBAR_COLOR_OPTION_COUNT, true);
|
||||
mc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_COLOR);
|
||||
osd_menu->addItem(mc);
|
||||
|
||||
int res = osd_menu->exec(NULL, "");
|
||||
|
||||
if (pb_color == -1)
|
||||
g_settings.progressbar_color = 0;
|
||||
else {
|
||||
g_settings.progressbar_color = 1;
|
||||
g_settings.progressbar_design = pb_color;
|
||||
}
|
||||
delete osd_menu;
|
||||
return res;
|
||||
}
|
||||
|
@@ -419,6 +419,15 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.progressbar_color = 1;
|
||||
else /* the config file already contains an int or nothing at all */
|
||||
g_settings.progressbar_color = configfile.getInt32("progressbar_color", 1);
|
||||
g_settings.progressbar_design = configfile.getInt32("progressbar_design", -1);
|
||||
if (g_settings.progressbar_design == -1) {
|
||||
/* new setting -> not present before. migrate old progressbar_color value */
|
||||
if (g_settings.progressbar_color == 0)
|
||||
g_settings.progressbar_design = 0;
|
||||
else /* the values changed... :-( */
|
||||
g_settings.progressbar_design = g_settings.progressbar_color - 1;
|
||||
g_settings.progressbar_color = !!g_settings.progressbar_color;
|
||||
}
|
||||
g_settings.infobar_show = configfile.getInt32("infobar_show", 1);
|
||||
g_settings.infobar_show_channellogo = configfile.getInt32("infobar_show_channellogo" , 3 );
|
||||
g_settings.infobar_progressbar = configfile.getInt32("infobar_progressbar" , 0 );
|
||||
@@ -885,6 +894,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setBool("infobar_show_channeldesc" , g_settings.infobar_show_channeldesc );
|
||||
configfile.setInt32("infobar_subchan_disp_pos" , g_settings.infobar_subchan_disp_pos );
|
||||
configfile.setInt32("progressbar_color", g_settings.progressbar_color);
|
||||
configfile.setInt32("progressbar_design", g_settings.progressbar_design);
|
||||
configfile.setInt32("infobar_show", g_settings.infobar_show);
|
||||
configfile.setInt32("infobar_show_channellogo" , g_settings.infobar_show_channellogo );
|
||||
configfile.setInt32("infobar_progressbar" , g_settings.infobar_progressbar );
|
||||
|
@@ -75,6 +75,7 @@ struct SNeutrinoSettings
|
||||
int infobar_show_channellogo;
|
||||
int infobar_progressbar;
|
||||
int progressbar_color;
|
||||
int progressbar_design;
|
||||
int casystem_display;
|
||||
int scrambled_message;
|
||||
int volume_pos;
|
||||
|
Reference in New Issue
Block a user