diff --git a/configure.ac b/configure.ac
index 5d37c1652..ab488b2b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT(NI-Neutrino,3.20.0)
+AC_INIT(NI-Neutrino,3.30.0)
AM_INIT_AUTOMAKE([1.0.1 nostdinc])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale
index f10d65859..ee4ee4282 100644
--- a/data/locale/deutsch.locale
+++ b/data/locale/deutsch.locale
@@ -355,6 +355,8 @@ colormenu.font_ttx Teletext Schriftart
colormenu.hd_preset LCD
colormenu.menucolors Farben
colormenu.osd_preset Monitor Auswahl
+colormenu.progressbar_active Farbe des aktiven Teil
+colormenu.progressbar_passive Hintergrundfarbe
colormenu.sd_preset CRT
colormenu.textcolor Textfarbe
colormenu.themeselect Theme auswählen
@@ -1420,9 +1422,11 @@ menu.hint_power_leds Konfiguriert das Verhalten der LEDs an der Power-Taste
menu.hint_pref_lang Wählen Sie ihre bevorzugte Tonspur und EPG-Sprache,\ndie Einstellung 'none' deaktiviert diese Option
menu.hint_pref_subs Wählen Sie ihre bevorzugte Untertitel-Sprache,\ndie Einstellung 'none' deaktiviert diese Option
menu.hint_progressbar Wählen Sie die Optionen für die Fortschrittsbalken-Anzeige
+menu.hint_progressbar_active Ändern Sie die Farbe für den aktiven Teil der Fortschrittsbalken-Anzeige
menu.hint_progressbar_color Erscheinungsbild der Fortschrittsbalken auswählen
menu.hint_progressbar_gradient Fügt dem Fortschrittsbalken einen vertikalen Helligkeitsverlauf hinzu.
menu.hint_progressbar_infobar_position Wählt die Optionen des Fortschrittsbalkens in der Infobar
+menu.hint_progressbar_passive Ändern Sie die Farbe für den Hintergrund der Fortschrittsbalken-Anzeige
menu.hint_progressbar_preview Mit der OK-Taste können Sie den Stand des Fortschrittsbalkens ändern
menu.hint_progressbar_timescale_green Hier können Sie den grünen Farbanteil bunter Fortschrittsbalken anpassen
menu.hint_progressbar_timescale_invert Wählen Sie den Farbverlauf
diff --git a/data/locale/english.locale b/data/locale/english.locale
index b90154a65..bc3df1419 100644
--- a/data/locale/english.locale
+++ b/data/locale/english.locale
@@ -355,6 +355,8 @@ colormenu.font_ttx Select Teletext font
colormenu.hd_preset LCD
colormenu.menucolors Colors
colormenu.osd_preset TV preset
+colormenu.progressbar_active Aktive part color
+colormenu.progressbat_passive Background
colormenu.sd_preset CRT
colormenu.textcolor Text color
colormenu.themeselect Select theme
@@ -1420,9 +1422,11 @@ menu.hint_power_leds Configure power-button LEDs behavior
menu.hint_pref_lang Select preferred audio and EPG language\nselect 'none' to disable
menu.hint_pref_subs Select preferred subtitle language\nselect 'none' to disable
menu.hint_progressbar Select the options for the progressbar
+menu.hint_progressbar_active Change color of active progress bar part
menu.hint_progressbar_color Change appearance of progress bars
menu.hint_progressbar_gradient Add a vertical brightness gradient to progress bars
menu.hint_progressbar_infobar_position Selects the options of progressbar in the infobar
+menu.hint_progressbar_passive Change color of passive progress bar part
menu.hint_progressbar_preview Use OK to change the current progressbar state
menu.hint_progressbar_timescale_green Choose the green portion of colored progressbars
menu.hint_progressbar_timescale_invert Select your preferred color gradient
diff --git a/data/themes/AdulteratedOrange.theme b/data/themes/AdulteratedOrange.theme
new file mode 100644
index 000000000..dd4ba9f4b
--- /dev/null
+++ b/data/themes/AdulteratedOrange.theme
@@ -0,0 +1,88 @@
+clock_Digit_alpha=0
+clock_Digit_blue=100
+clock_Digit_green=100
+clock_Digit_red=100
+colored_events_alpha=0
+colored_events_blue=0
+colored_events_channellist=1
+colored_events_green=70
+colored_events_infobar=1
+colored_events_red=95
+infobar_Text_alpha=0
+infobar_Text_blue=100
+infobar_Text_green=100
+infobar_Text_red=100
+infobar_alpha=8
+infobar_blue=12
+infobar_casystem_alpha=8
+infobar_casystem_blue=12
+infobar_casystem_green=12
+infobar_casystem_red=12
+infobar_gradient_body=0
+infobar_gradient_body_direction=1
+infobar_gradient_bottom=3
+infobar_gradient_bottom_direction=1
+infobar_gradient_top=4
+infobar_gradient_top_direction=1
+infobar_green=12
+infobar_red=12
+menu_ButtonBar_gradient=3
+menu_ButtonBar_gradient_direction=1
+menu_Content_Selected_Text_alpha=0
+menu_Content_Selected_Text_blue=0
+menu_Content_Selected_Text_green=0
+menu_Content_Selected_Text_red=0
+menu_Content_Selected_alpha=8
+menu_Content_Selected_blue=0
+menu_Content_Selected_green=70
+menu_Content_Selected_red=95
+menu_Content_Text_alpha=0
+menu_Content_Text_blue=100
+menu_Content_Text_green=100
+menu_Content_Text_red=100
+menu_Content_alpha=8
+menu_Content_blue=12
+menu_Content_green=12
+menu_Content_inactive_Text_alpha=0
+menu_Content_inactive_Text_blue=50
+menu_Content_inactive_Text_green=50
+menu_Content_inactive_Text_red=50
+menu_Content_inactive_alpha=8
+menu_Content_inactive_blue=12
+menu_Content_inactive_green=12
+menu_Content_inactive_red=12
+menu_Content_red=12
+menu_Foot_Text_alpha=0
+menu_Foot_Text_blue=60
+menu_Foot_Text_green=60
+menu_Foot_Text_red=60
+menu_Foot_alpha=8
+menu_Foot_blue=18
+menu_Foot_green=18
+menu_Foot_red=18
+menu_Head_Text_alpha=0
+menu_Head_Text_blue=0
+menu_Head_Text_green=70
+menu_Head_Text_red=95
+menu_Head_alpha=8
+menu_Head_blue=0
+menu_Head_gradient=4
+menu_Head_gradient_direction=1
+menu_Head_green=0
+menu_Head_red=0
+menu_Hint_gradient=4
+menu_Hint_gradient_direction=1
+menu_Separator_gradient_enable=0
+progressbar_active_blue=0
+progressbar_active_green=70
+progressbar_active_red=95
+progressbar_design_channellist=-1
+progressbar_design=-1
+progressbar_gradient=1
+progressbar_passive_blue=50
+progressbar_passive_green=50
+progressbar_passive_red=50
+progressbar_timescale_green=100
+progressbar_timescale_invert=0
+progressbar_timescale_red=0
+progressbar_timescale_yellow=70
diff --git a/data/themes/DarkOrange.theme b/data/themes/DarkOrange.theme
index 0f9d50211..cfb1fda56 100644
--- a/data/themes/DarkOrange.theme
+++ b/data/themes/DarkOrange.theme
@@ -65,3 +65,16 @@ menu_Head_red=0
menu_Hint_gradient=4
menu_Hint_gradient_direction=1
menu_Separator_gradient_enable=1
+progressbar_active_blue=7
+progressbar_active_green=43
+progressbar_active_red=99
+progressbar_design_channellist=-1
+progressbar_design=-1
+progressbar_gradient=1
+progressbar_passive_blue=44
+progressbar_passive_green=44
+progressbar_passive_red=44
+progressbar_timescale_green=100
+progressbar_timescale_invert=0
+progressbar_timescale_red=0
+progressbar_timescale_yellow=70
diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am
index aa2eab9cc..2f258a963 100644
--- a/data/themes/Makefile.am
+++ b/data/themes/Makefile.am
@@ -1,6 +1,7 @@
installdir = $(THEMESDIR)
install_DATA = \
+ AdulteratedOrange.theme \
Bluemoon-3.0.theme \
Classic.theme \
Crema.theme \
diff --git a/data/themes/Material_Blue-Grey.theme b/data/themes/Material_Blue-Grey.theme
index ff19717fc..4a46c32c1 100644
--- a/data/themes/Material_Blue-Grey.theme
+++ b/data/themes/Material_Blue-Grey.theme
@@ -69,7 +69,7 @@ clock_Digit_green=75
clock_Digit_blue=77
clock_Digit_alpha=0
-#200
+# 200
colored_events_red=69
colored_events_green=75
colored_events_blue=77
@@ -113,3 +113,21 @@ infobar_Text_red=93
infobar_Text_green=94
infobar_Text_blue=95
infobar_Text_alpha=0
+
+progressbar_design=-1
+progressbar_design_channellist=-1
+progressbar_gradient=1
+progressbar_timescale_red=0
+progressbar_timescale_yellow=70
+progressbar_timescale_green=100
+progressbar_timescale_invert=0
+
+# 200
+progressbar_active_red=69
+progressbar_active_green=75
+progressbar_active_blue=77
+
+# 500
+progressbar_passive_red=38
+progressbar_passive_green=49
+progressbar_passive_blue=55
diff --git a/data/themes/Material_Grey_(Dark).theme b/data/themes/Material_Grey_(Dark).theme
index 4a27a36e5..182127cae 100644
--- a/data/themes/Material_Grey_(Dark).theme
+++ b/data/themes/Material_Grey_(Dark).theme
@@ -113,3 +113,21 @@ infobar_Text_red=98
infobar_Text_green=98
infobar_Text_blue=98
infobar_Text_alpha=0
+
+progressbar_design=-1
+progressbar_design_channellist=-1
+progressbar_gradient=1
+progressbar_timescale_red=0
+progressbar_timescale_yellow=70
+progressbar_timescale_green=100
+progressbar_timescale_invert=0
+
+# 500
+progressbar_active_red=62
+progressbar_active_green=62
+progressbar_active_blue=62
+
+# 900
+progressbar_passive_red=13
+progressbar_passive_green=13
+progressbar_passive_blue=13
diff --git a/data/themes/Material_Grey_(Light).theme b/data/themes/Material_Grey_(Light).theme
index f261dd3df..756695081 100644
--- a/data/themes/Material_Grey_(Light).theme
+++ b/data/themes/Material_Grey_(Light).theme
@@ -114,3 +114,21 @@ infobar_Text_green=96
infobar_Text_blue=96
infobar_Text_alpha=0
+
+progressbar_design=-1
+progressbar_design_channellist=-1
+progressbar_gradient=1
+progressbar_timescale_red=0
+progressbar_timescale_yellow=70
+progressbar_timescale_green=100
+progressbar_timescale_invert=0
+
+# 400
+progressbar_active_red=74
+progressbar_active_green=74
+progressbar_active_blue=74
+
+# 600
+progressbar_passive_red=46
+progressbar_passive_green=46
+progressbar_passive_blue=46
diff --git a/data/themes/Material_Grey_(Medium).theme b/data/themes/Material_Grey_(Medium).theme
index 2d65c5b10..7832697fb 100644
--- a/data/themes/Material_Grey_(Medium).theme
+++ b/data/themes/Material_Grey_(Medium).theme
@@ -113,3 +113,21 @@ infobar_Text_red=98
infobar_Text_green=98
infobar_Text_blue=98
infobar_Text_alpha=0
+
+progressbar_design=-1
+progressbar_design_channellist=-1
+progressbar_gradient=1
+progressbar_timescale_red=0
+progressbar_timescale_yellow=70
+progressbar_timescale_green=100
+progressbar_timescale_invert=0
+
+# 500
+progressbar_active_red=62
+progressbar_active_green=62
+progressbar_active_blue=62
+
+# 800
+progressbar_passive_red=26
+progressbar_passive_green=26
+progressbar_passive_blue=26
diff --git a/data/y-web/Y_Info_Help.yhtm b/data/y-web/Y_Info_Help.yhtm
index 39f457636..d9cecd04d 100644
--- a/data/y-web/Y_Info_Help.yhtm
+++ b/data/y-web/Y_Info_Help.yhtm
@@ -10,7 +10,7 @@
diff --git a/data/y-web/scripts/Y_NI_Tools.sh b/data/y-web/scripts/Y_NI_Tools.sh
index cde554ffb..35296e119 100644
--- a/data/y-web/scripts/Y_NI_Tools.sh
+++ b/data/y-web/scripts/Y_NI_Tools.sh
@@ -139,13 +139,14 @@ case "$action" in
;;
get_update_txt)
version="n/a"
- wget -O /tmp/NI_release.txt "http://neutrino-images.de/neutrino-images/release/release.txt"
- test -e /tmp/NI_release.txt && version=$(cat /tmp/NI_release.txt | grep ".img" | cut -d" " -f2)
- echo "version=${version// /}" > /tmp/NI_update.txt
- rm -f /tmp/NI_release.txt
+ #FIXME align url to box specs
+ wget -O /tmp/release.txt "http://neutrino-images.de/neutrino-images/update.php"
+ test -e /tmp/release.txt && version=$(cat /tmp/release.txt | grep ".img" | cut -d" " -f2)
+ echo "version=${version// /}" > /tmp/update.txt
+ rm -f /tmp/release.txt
;;
rm_update_txt)
- rm -f /tmp/NI_update.txt
+ rm -f /tmp/update.txt
;;
get_flash_info)
MTPT=""
diff --git a/lib/libtuxtxt/tuxtxt_common.h b/lib/libtuxtxt/tuxtxt_common.h
index 26d8754c6..49ccb403b 100644
--- a/lib/libtuxtxt/tuxtxt_common.h
+++ b/lib/libtuxtxt/tuxtxt_common.h
@@ -312,7 +312,7 @@ void tuxtxt_decode_adip() /* additional information table */
#endif
} /* next adip page i */
- while (!tuxtxt_cache.adippg[tuxtxt_cache.maxadippg] && (tuxtxt_cache.maxadippg >= 0)) /* and shrink table */
+ while ((tuxtxt_cache.maxadippg >= 0) && !tuxtxt_cache.adippg[tuxtxt_cache.maxadippg]) /* and shrink table */
tuxtxt_cache.maxadippg--;
}
/******************************************************************************
diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp
index db3800c6d..fc53b32eb 100644
--- a/src/gui/channellist.cpp
+++ b/src/gui/channellist.cpp
@@ -1925,7 +1925,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
int prg_offset = 0;
int title_offset = 0;
int rec_mode;
- if(g_settings.channellist_progressbar_design != CProgressBar::PB_OFF)
+ if(g_settings.theme.progressbar_design_channellist != CProgressBar::PB_OFF)
{
prg_offset = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("00:00");
title_offset = OFFSET_INNER_SMALL;
@@ -2047,11 +2047,11 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
int pb_height = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getDigitHeight();
CProgressBar pb(x + OFFSET_INNER_SMALL + numwidth + title_offset, ypos + (fheight-pb_height)/2, pb_space + 2, pb_height, COL_MENUCONTENT_PLUS_0);
pb.setType(CProgressBar::PB_TIMESCALE);
- pb.setDesign(g_settings.channellist_progressbar_design);
+ pb.setDesign(g_settings.theme.progressbar_design_channellist);
pb.setCornerType(0);
- pb.setStatusColors(COL_MENUCONTENT_PLUS_3, COL_MENUCONTENT_PLUS_1);
+ pb.setStatusColors(COL_PROGRESSBAR_ACTIVE_PLUS_0, COL_PROGRESSBAR_PASSIVE_PLUS_0); //NI
int pb_frame = 0;
- if (g_settings.channellist_progressbar_design == CProgressBar::PB_MONO && !g_settings.progressbar_gradient)
+ if (g_settings.theme.progressbar_design_channellist == CProgressBar::PB_MONO && !g_settings.theme.progressbar_gradient)
{
// add small frame to mono progressbars w/o gradient for a better visibility
pb_frame = 1;
@@ -2073,7 +2073,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
if ((int) ch_desc_len > max_desc_len)
ch_desc_len = max_desc_len;
- if(g_settings.channellist_progressbar_design != CProgressBar::PB_OFF) {
+ if(g_settings.theme.progressbar_design_channellist != CProgressBar::PB_OFF) {
if(displayNext)
{
struct tm *pStartZeit = localtime(&p_event->startTime);
@@ -2108,10 +2108,10 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
}
else
{
- if (g_settings.channellist_progressbar_design != CProgressBar::PB_OFF)
+ if (g_settings.theme.progressbar_design_channellist != CProgressBar::PB_OFF)
{
pb.setValues(0, pb_max);
- if (g_settings.progressbar_design == CProgressBar::PB_GRAPHIC) //NI graphic
+ if (g_settings.theme.progressbar_design == CProgressBar::PB_GRAPHIC) //NI graphic
pb.setGraphic("progressbar_inactive");
pb.paint();
}
diff --git a/src/gui/color.h b/src/gui/color.h
index 52a84005e..31afdd1b1 100644
--- a/src/gui/color.h
+++ b/src/gui/color.h
@@ -37,6 +37,7 @@
#define COL_MAXFREE 254-8*16 - 1
#define COL_NEUTRINO_TEXT 254-8*16 // 32 values?
+#define COL_PROGRESSBAR 254-8*12 //NI
#define COL_MENUFOOT 254-8*11
#define COL_INFOBAR_CASYSTEM 254-8*10
#define COL_COLORED_EVENTS_CHANNELLIST 254-8*9
@@ -75,6 +76,7 @@
#define COL_MENUCONTENTINACTIVE_PLUS_0 (COL_MENUCONTENTINACTIVE + 0)
#define COL_MENUFOOT_PLUS_0 (COL_MENUFOOT + 0)
#define COL_BACKGROUND_PLUS_0 (COL_BACKGROUND + 0)
+#define COL_PROGRESSBAR_PASSIVE_PLUS_0 (COL_PROGRESSBAR + 0)
#else
#define COL_SHADOW_PLUS_0 (CFrameBuffer::getInstance()->realcolor[(COL_SHADOW + 0)])
#define COL_INFOBAR_PLUS_0 (CFrameBuffer::getInstance()->realcolor[(COL_INFOBAR + 0)])
@@ -99,6 +101,7 @@
#define COL_MENUCONTENTINACTIVE_PLUS_0 (CFrameBuffer::getInstance()->realcolor[(COL_MENUCONTENTINACTIVE + 0)])
#define COL_MENUFOOT_PLUS_0 (CFrameBuffer::getInstance()->realcolor[(COL_MENUFOOT + 0)])
#define COL_BACKGROUND_PLUS_0 (CFrameBuffer::getInstance()->realcolor[(COL_BACKGROUND + 0)])
+#define COL_PROGRESSBAR_PASSIVE_PLUS_0 (CFrameBuffer::getInstance()->realcolor[(COL_PROGRESSBAR + 0)])
// text colors
#define COL_COLORED_EVENTS_TEXT (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 0)])
@@ -117,6 +120,7 @@
#define COL_MENUCONTENTSELECTED_TEXT_PLUS_2 (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 13)])
#define COL_MENUCONTENTINACTIVE_TEXT (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 14)])
#define COL_INFOCLOCK_TEXT (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 15)])
+#define COL_PROGRESSBAR_ACTIVE_PLUS_0 (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 16)]) //NI
#endif
// some wrappers to get more readability
@@ -128,10 +132,10 @@
#define COL_SCROLLBAR_PASSIVE COL_MENUCONTENT_PLUS_1
#define COL_SCROLLBAR_PASSIVE_PLUS_0 COL_SCROLLBAR_PASSIVE
-#define COL_PROGRESSBAR_ACTIVE COL_MENUCONTENT_PLUS_7
-#define COL_PROGRESSBAR_ACTIVE_PLUS_0 COL_PROGRESSBAR_ACTIVE
-#define COL_PROGRESSBAR_PASSIVE COL_MENUCONTENT_PLUS_1
-#define COL_PROGRESSBAR_PASSIVE_PLUS_0 COL_PROGRESSBAR_PASSIVE
+//NI #define COL_PROGRESSBAR_ACTIVE COL_MENUCONTENT_PLUS_7
+//NI #define COL_PROGRESSBAR_ACTIVE_PLUS_0 COL_PROGRESSBAR_ACTIVE
+//NI #define COL_PROGRESSBAR_PASSIVE COL_MENUCONTENT_PLUS_1
+//NI #define COL_PROGRESSBAR_PASSIVE_PLUS_0 COL_PROGRESSBAR_PASSIVE
int convertSetupColor2RGB(unsigned char r, unsigned char g, unsigned char b);
int convertSetupAlpha2Alpha(unsigned char alpha);
diff --git a/src/gui/components/cc_frm_scrollbar.cpp b/src/gui/components/cc_frm_scrollbar.cpp
index ad2189689..529d0102a 100644
--- a/src/gui/components/cc_frm_scrollbar.cpp
+++ b/src/gui/components/cc_frm_scrollbar.cpp
@@ -25,7 +25,6 @@
#include
#endif
-#include
#include
#include "cc_frm_scrollbar.h"
#include "system/debug.h"
diff --git a/src/gui/components/cc_frm_scrollbar.h b/src/gui/components/cc_frm_scrollbar.h
index 8057147ec..778349ac1 100644
--- a/src/gui/components/cc_frm_scrollbar.h
+++ b/src/gui/components/cc_frm_scrollbar.h
@@ -24,6 +24,8 @@
#ifndef __CC_FORM_SCROLLBAR_H__
#define __CC_FORM_SCROLLBAR_H__
+#include
+
#include "cc_frm_chain.h"
#include "cc_item_picture.h"
@@ -77,7 +79,7 @@ class CComponentsScrollBar : public CComponentsFrmChain
*/
CComponentsScrollBar( const int &x_pos,
const int &y_pos,
- const int &w = 15,
+ const int &w = SCROLLBAR_WIDTH,
const int &h = 0,
const int& count = 1,
CComponentsForm *parent = NULL,
diff --git a/src/gui/components/cc_item_progressbar.cpp b/src/gui/components/cc_item_progressbar.cpp
index f676372e5..14ec48588 100644
--- a/src/gui/components/cc_item_progressbar.cpp
+++ b/src/gui/components/cc_item_progressbar.cpp
@@ -78,8 +78,8 @@ CProgressBar::CProgressBar( const int x_pos,
pb_active_col = active_col;
pb_passive_col = passive_col;
- pb_design = &g_settings.progressbar_design;
- pb_gradient = &g_settings.progressbar_gradient;
+ pb_design = &g_settings.theme.progressbar_design;
+ pb_gradient = &g_settings.theme.progressbar_gradient;
pb_type = PB_REDLEFT;
pb_last_width = -1;
@@ -449,7 +449,7 @@ void CProgressBar::paintProgress(bool do_save_bg)
return;
}
if (pb_type == PB_TIMESCALE)
- setRgb(g_settings.progressbar_timescale_red, g_settings.progressbar_timescale_green, g_settings.progressbar_timescale_yellow);
+ setRgb(g_settings.theme.progressbar_timescale_red, g_settings.theme.progressbar_timescale_green, g_settings.theme.progressbar_timescale_yellow);
if (!pb_red && !pb_yellow && !pb_green)
pb_green = 1;
@@ -471,7 +471,7 @@ void CProgressBar::paintProgress(bool do_save_bg)
paintInit(do_save_bg);
//progress
- bool pb_invert = (pb_type == PB_REDRIGHT) || ((pb_type == PB_TIMESCALE) && g_settings.progressbar_timescale_invert);
+ bool pb_invert = (pb_type == PB_REDRIGHT) || ((pb_type == PB_TIMESCALE) && g_settings.theme.progressbar_timescale_invert);
if (cc_allow_paint){
if (!is_painted || (pb_active_width != pb_last_width)) {
diff --git a/src/gui/components/cc_item_progressbar.h b/src/gui/components/cc_item_progressbar.h
index 6812c2aa4..02d351c26 100644
--- a/src/gui/components/cc_item_progressbar.h
+++ b/src/gui/components/cc_item_progressbar.h
@@ -161,10 +161,10 @@ class CProgressBar : public CComponentsItem
void setType(pb_type_t type);
- //set design (overides g_settings.progressbar_design)
+ //set design (overides g_settings.theme.progressbar_design)
void setDesign(int &design) { pb_design = &design; }
- //set gradient (overides g_settings.progressbar_gradient)
+ //set gradient (overides g_settings.theme.progressbar_gradient)
void setGradient(int &gradient) { pb_gradient = &gradient; }
};
diff --git a/src/gui/components/cc_item_text.cpp b/src/gui/components/cc_item_text.cpp
index bf52a4f33..f56733584 100644
--- a/src/gui/components/cc_item_text.cpp
+++ b/src/gui/components/cc_item_text.cpp
@@ -92,10 +92,7 @@ void CComponentsText::initVarText( const int x_pos, const int y_pos, const int w
width = width_old = w;
height = height_old = h;
- /* we need a minimal borderwith of 1px because the edge-smoothing
- (or fontrenderer?) otherwise will paint single pixels outside the
- defined area. e.g. 'j' is leaving such residues */
- ct_text_Hborder = 1;
+ ct_text_Hborder = 0;
ct_text_Vborder = 0;
shadow = shadow_mode;
diff --git a/src/gui/components/cc_timer.cpp b/src/gui/components/cc_timer.cpp
index 9c8b1aa7b..566a829e1 100644
--- a/src/gui/components/cc_timer.cpp
+++ b/src/gui/components/cc_timer.cpp
@@ -107,22 +107,22 @@ void CComponentsTimer::initThread()
void CComponentsTimer::stopThread()
{
+ //ensure disconnecting possible slots
+ while (!sl_stop_timer.empty())
+ sl_stop_timer.disconnect();
+
if(tm_thread) {
int thres = pthread_cancel(tm_thread);
if (thres != 0)
- dprintf(DEBUG_NORMAL,"\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_cancel\033[0m\n", __func__, __LINE__);
+ dprintf(DEBUG_NORMAL,"\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_cancel, [%d]\033[0m\n", __func__, __LINE__, thres);
thres = pthread_join(tm_thread, NULL);
if (thres != 0)
- dprintf(DEBUG_NORMAL, "\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_join\033[0m\n", __func__, __LINE__);
+ dprintf(DEBUG_NORMAL, "\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_join, [%d]\033[0m\n", __func__, __LINE__, thres);
- if (thres == 0){
+ if (thres == 0)
tm_thread = 0;
- //ensure disconnect of unused slot
- while (!sl_stop_timer.empty())
- sl_stop_timer.disconnect();
- }
}
}
diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp
index 5f8a1cff0..ba1e7621f 100644
--- a/src/gui/infoviewer.cpp
+++ b/src/gui/infoviewer.cpp
@@ -1741,8 +1741,8 @@ void CInfoViewer::showSNR ()
int sigbox_offset = ChanWidth *10/100;
sigbox = new CSignalBox(BoxStartX + sigbox_offset, y_numbox+ChanHeight/2, ChanWidth - 2*sigbox_offset, ChanHeight/2, NULL, true, NULL, "S", "Q");
sigbox->setTextColor(COL_INFOBAR_TEXT);
- sigbox->setActiveColor(COL_INFOBAR_PLUS_7);
- sigbox->setPassiveColor(COL_INFOBAR_PLUS_3);
+ sigbox->setActiveColor(COL_PROGRESSBAR_ACTIVE_PLUS_0);
+ sigbox->setPassiveColor(COL_PROGRESSBAR_PASSIVE_PLUS_0);
sigbox->setColorBody(numbox->getColorBody());
sigbox->doPaintBg(false);
sigbox->enableTboxSaveScreen(numbox->getColBodyGradientMode());
@@ -1832,8 +1832,8 @@ void CInfoViewer::display_Info(const char *current, const char *next,
pb_p = pb_w;
timescale->setDimensionsAll(pb_startx, pb_starty, pb_w, pb_h);
- timescale->setActiveColor(COL_INFOBAR_PLUS_7);
- timescale->setPassiveColor(g_settings.infobar_progressbar ? COL_INFOBAR_PLUS_1 : COL_INFOBAR_PLUS_0);
+ timescale->setActiveColor(COL_PROGRESSBAR_ACTIVE_PLUS_0);
+ timescale->setPassiveColor(g_settings.infobar_progressbar ? COL_PROGRESSBAR_PASSIVE_PLUS_0 : COL_INFOBAR_PLUS_0);
timescale->enableShadow(!g_settings.infobar_progressbar ? CC_SHADOW_ON : CC_SHADOW_OFF, OFFSET_SHADOW/2);
timescale->setValues(pb_p, pb_w);
diff --git a/src/gui/lua/lua_curl.cpp b/src/gui/lua/lua_curl.cpp
index 389aad1f9..9bcf47ef5 100644
--- a/src/gui/lua/lua_curl.cpp
+++ b/src/gui/lua/lua_curl.cpp
@@ -265,6 +265,8 @@ Example:
curl_easy_setopt(curl_handle, CURLOPT_CONNECTTIMEOUT, (long)connectTimeout);
curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, 0L);
+ /* enable all supported built-in compressions */
+ curl_easy_setopt(curl_handle, CURLOPT_ACCEPT_ENCODING, "");
if (!userAgent.empty())
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, userAgent.c_str());
diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp
index ea7eb8bb3..c570bb2c6 100644
--- a/src/gui/lua/luainstance.cpp
+++ b/src/gui/lua/luainstance.cpp
@@ -175,8 +175,8 @@ static void set_lua_variables(lua_State *L)
{ "FRAME", MAGIC_COLOR | (COL_FRAME) },
{ "SCROLLBAR_ACTIVE", MAGIC_COLOR | (COL_SCROLLBAR_ACTIVE) },
{ "SCROLLBAR_PASSIVE", MAGIC_COLOR | (COL_SCROLLBAR_PASSIVE) },
- { "PROGRESSBAR_ACTIVE", MAGIC_COLOR | (COL_PROGRESSBAR_ACTIVE) },
- { "PROGRESSBAR_PASSIVE", MAGIC_COLOR | (COL_PROGRESSBAR_PASSIVE) },
+ { "PROGRESSBAR_ACTIVE", MAGIC_COLOR | (COL_PROGRESSBAR_ACTIVE_PLUS_0) }, //NI
+ { "PROGRESSBAR_PASSIVE", MAGIC_COLOR | (COL_PROGRESSBAR_PASSIVE_PLUS_0) }, //NI
{ "BACKGROUND", MAGIC_COLOR | (COL_BACKGROUND) },
{ "DARK_RED", MAGIC_COLOR | (COL_DARK_RED0) },
{ "DARK_GREEN", MAGIC_COLOR | (COL_DARK_GREEN0) },
diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp
index 95815dc49..d97d157f4 100644
--- a/src/gui/moviebrowser/mb.cpp
+++ b/src/gui/moviebrowser/mb.cpp
@@ -2824,37 +2824,24 @@ bool CMovieBrowser::onSortMovieInfoHandleList(std::vector& handl
void CMovieBrowser::updateDir(void)
{
- struct stat info;
-
m_dir.clear();
-
#if 0
// check if there is a movie dir and if we should use it
if (g_settings.network_nfs_moviedir[0] != 0)
{
- if (!(stat(g_settings.network_nfs_moviedir.c_str(), &info) == 0 && S_ISDIR(info.st_mode)))
- m_settings.storageDirMovieUsed = false;
-
std::string name = g_settings.network_nfs_moviedir;
addDir(name,&m_settings.storageDirMovieUsed);
}
#endif
-
// check if there is a record dir and if we should use it
if (!g_settings.network_nfs_recordingdir.empty())
{
- if (!(stat(g_settings.network_nfs_recordingdir.c_str(), &info) == 0 && S_ISDIR(info.st_mode)))
- m_settings.storageDirRecUsed = false;
-
addDir(g_settings.network_nfs_recordingdir, &m_settings.storageDirRecUsed);
cHddStat::getInstance()->statOnce();
}
for (int i = 0; i < MB_MAX_DIRS; i++)
{
- if (!(stat(m_settings.storageDir[i].c_str(), &info) == 0 && S_ISDIR(info.st_mode)))
- m_settings.storageDirUsed[i] = false;
-
if (!m_settings.storageDir[i].empty())
addDir(m_settings.storageDir[i],&m_settings.storageDirUsed[i]);
}
diff --git a/src/gui/osd_progressbar_setup.cpp b/src/gui/osd_progressbar_setup.cpp
index a1c2c0dce..4f8140b50 100644
--- a/src/gui/osd_progressbar_setup.cpp
+++ b/src/gui/osd_progressbar_setup.cpp
@@ -86,10 +86,10 @@ int CProgressbarSetup::exec(CMenuTarget* parent, const std::string &actionKey)
printf("[neutrino] init progressbar menu setup...\n");
if (actionKey == "reset") {
- g_settings.progressbar_timescale_red = 0;
- g_settings.progressbar_timescale_green = 100;
- g_settings.progressbar_timescale_yellow = 70;
- g_settings.progressbar_timescale_invert = false;
+ g_settings.theme.progressbar_timescale_red = 0;
+ g_settings.theme.progressbar_timescale_green = 100;
+ g_settings.theme.progressbar_timescale_yellow = 70;
+ g_settings.theme.progressbar_timescale_invert = false;
return menu_return::RETURN_REPAINT;
}
@@ -107,12 +107,12 @@ int CProgressbarSetup::showMenu()
// general progress bar design
CMenuOptionChooser *mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_LONG,
- &g_settings.progressbar_design, PROGRESSBAR_COLOR_OPTIONS + 1, PROGRESSBAR_COLOR_OPTION_COUNT - 1, true, this);
+ &g_settings.theme.progressbar_design, PROGRESSBAR_COLOR_OPTIONS + 1, PROGRESSBAR_COLOR_OPTION_COUNT - 1, true, this);
mc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_COLOR);
m.addItem(mc);
// progress bar gradient
- mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_GRADIENT, &g_settings.progressbar_gradient, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this);
+ mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_GRADIENT, &g_settings.theme.progressbar_gradient, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_GRADIENT);
m.addItem(mc);
@@ -124,25 +124,25 @@ int CProgressbarSetup::showMenu()
CMenuOptionNumberChooser *nc;
- nc = new CMenuOptionNumberChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_RED, &g_settings.progressbar_timescale_red, true, 0, 100, this);
+ nc = new CMenuOptionNumberChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_RED, &g_settings.theme.progressbar_timescale_red, true, 0, 100, this);
nc->setNumericInput(true);
nc->setNumberFormat("%d %%");
nc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_RED);
m.addItem(nc);
- nc = new CMenuOptionNumberChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_YELLOW, &g_settings.progressbar_timescale_yellow, true, 0, 100, this);
+ nc = new CMenuOptionNumberChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_YELLOW, &g_settings.theme.progressbar_timescale_yellow, true, 0, 100, this);
nc->setNumericInput(true);
nc->setNumberFormat("%d %%");
nc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_YELLOW);
m.addItem(nc);
- nc = new CMenuOptionNumberChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_GREEN, &g_settings.progressbar_timescale_green, true, 0, 100, this);
+ nc = new CMenuOptionNumberChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_GREEN, &g_settings.theme.progressbar_timescale_green, true, 0, 100, this);
nc->setNumericInput(true);
nc->setNumberFormat("%d %%");
nc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_GREEN);
m.addItem(nc);
- mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_INVERT, &g_settings.progressbar_timescale_invert, PROGRESSBAR_TIMESCALE_INVERT_OPTIONS, PROGRESSBAR_TIMESCALE_INVERT_OPTION_COUNT, true, this);
+ mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_INVERT, &g_settings.theme.progressbar_timescale_invert, PROGRESSBAR_TIMESCALE_INVERT_OPTIONS, PROGRESSBAR_TIMESCALE_INVERT_OPTION_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_INVERT);
m.addItem(mc);
@@ -158,14 +158,14 @@ int CProgressbarSetup::showMenu()
// extended channel list (progressbars)
m.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MAINMENU_CHANNELS));
- mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_progressbar_design, PROGRESSBAR_COLOR_OPTIONS, PROGRESSBAR_COLOR_OPTION_COUNT, true, this);
+ mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.theme.progressbar_design_channellist, PROGRESSBAR_COLOR_OPTIONS, PROGRESSBAR_COLOR_OPTION_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_EXTENDED);
m.addItem(mc);
mb = new CMenuProgressbar(LOCALE_MISCSETTINGS_PROGRESSBAR_PREVIEW);
mb->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_PREVIEW);
mb->getScale()->setType(CProgressBar::PB_TIMESCALE);
- mb->getScale()->setDesign(g_settings.channellist_progressbar_design);
+ mb->getScale()->setDesign(g_settings.theme.progressbar_design_channellist);
mb->getScale()->doPaintBg(false);
m.addItem(mb);
diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp
index d2e094f49..4364bf234 100644
--- a/src/gui/osd_setup.cpp
+++ b/src/gui/osd_setup.cpp
@@ -789,6 +789,12 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
&t.menu_Foot_alpha, colorSetupNotifier);
CColorChooser* chFootTextcolor = new CColorChooser(LOCALE_COLORMENU_TEXTCOLOR, &t.menu_Foot_Text_red, &t.menu_Foot_Text_green, &t.menu_Foot_Text_blue,
NULL, colorSetupNotifier);
+ //NI
+ CColorChooser* chProgressbar_passive = new CColorChooser(LOCALE_COLORMENU_PROGRESSBAR_PASSIVE, &t.progressbar_passive_red, &t.progressbar_passive_green, &t.progressbar_passive_blue,
+ NULL, colorSetupNotifier);
+ //NI
+ CColorChooser* chProgressbar_active = new CColorChooser(LOCALE_COLORMENU_PROGRESSBAR_ACTIVE, &t.progressbar_active_red, &t.progressbar_active_green, &t.progressbar_active_blue,
+ NULL, colorSetupNotifier);
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUHEAD));
@@ -954,6 +960,19 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
oj = new CMenuOptionChooser(LOCALE_MISCSETTINGS_COLORED_EVENTS_INFOBAR, &t.colored_events_infobar, OPTIONS_COLORED_EVENTS_OPTIONS, OPTIONS_COLORED_EVENTS_OPTION_COUNT, true);
oj->setHint("", LOCALE_MENU_HINT_COLORED_EVENTS);
menu_colors->addItem(oj);
+
+ //NI progressbar
+ menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MISCSETTINGS_PROGRESSBAR));
+
+ //NI - progressbar passive
+ mf = new CMenuDForwarder(LOCALE_COLORMENU_PROGRESSBAR_PASSIVE, true, NULL, chProgressbar_passive );
+ mf->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_PASSIVE);
+ menu_colors->addItem(mf);
+
+ //NI - progressbar aktive
+ mf = new CMenuDForwarder(LOCALE_COLORMENU_PROGRESSBAR_ACTIVE, true, NULL, chProgressbar_active );
+ mf->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_ACTIVE);
+ menu_colors->addItem(mf);
}
/* for font size setup */
@@ -1075,7 +1094,7 @@ void COsdSetup::showOsdTimeoutSetup(CMenuWidget* menu_timeout)
nf += g_Locale->getText(LOCALE_UNIT_SHORT_SECOND);
for (int i = 0; i < SNeutrinoSettings::TIMING_SETTING_COUNT; i++)
{
- CMenuOptionNumberChooser *ch = new CMenuOptionNumberChooser(timing_setting[i].name, &g_settings.timing[i], true, 0, 180);
+ CMenuOptionNumberChooser *ch = new CMenuOptionNumberChooser(timing_setting[i].name, &g_settings.timing[i], true, 0, 240);
ch->setNumberFormat(nf);
ch->setHint("", timing_setting[i].hint);
menu_timeout->addItem(ch);
@@ -1307,7 +1326,7 @@ void COsdSetup::showOsdChanlistSetup(CMenuWidget *menu_chanlist)
menu_chanlist->addItem(mc);
// extended channel list
- mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_progressbar_design, PROGRESSBAR_COLOR_OPTIONS, PROGRESSBAR_COLOR_OPTION_COUNT, true, this);
+ mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.theme.progressbar_design_channellist, PROGRESSBAR_COLOR_OPTIONS, PROGRESSBAR_COLOR_OPTION_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_EXTENDED);
menu_chanlist->addItem(mc);
diff --git a/src/gui/themes.cpp b/src/gui/themes.cpp
index 4c7df9c1c..c209da2d4 100644
--- a/src/gui/themes.cpp
+++ b/src/gui/themes.cpp
@@ -321,6 +321,22 @@ void CThemes::setTheme(CConfigFile &configfile)
configfile.setInt32( "clock_Digit_red", t.clock_Digit_red );
configfile.setInt32( "clock_Digit_green", t.clock_Digit_green );
configfile.setInt32( "clock_Digit_blue", t.clock_Digit_blue );
+
+ configfile.setInt32( "progressbar_design", t.progressbar_design);
+ configfile.setInt32( "progressbar_design_channellist", t.progressbar_design_channellist);
+ configfile.setInt32( "progressbar_gradient", t.progressbar_gradient);
+ configfile.setInt32( "progressbar_timescale_red", t.progressbar_timescale_red);
+ configfile.setInt32( "progressbar_timescale_green", t.progressbar_timescale_green);
+ configfile.setInt32( "progressbar_timescale_yellow", t.progressbar_timescale_yellow);
+ configfile.setInt32( "progressbar_timescale_invert", t.progressbar_timescale_invert);
+
+ //NI
+ configfile.setInt32( "progressbar_active_red", t.progressbar_active_red );
+ configfile.setInt32( "progressbar_active_green", t.progressbar_active_green );
+ configfile.setInt32( "progressbar_active_blue", t.progressbar_active_blue );
+ configfile.setInt32( "progressbar_passive_red", t.progressbar_passive_red );
+ configfile.setInt32( "progressbar_passive_green", t.progressbar_passive_green );
+ configfile.setInt32( "progressbar_passive_blue", t.progressbar_passive_blue );
}
void CThemes::getTheme(CConfigFile &configfile)
@@ -351,9 +367,9 @@ void CThemes::getTheme(CConfigFile &configfile)
t.menu_Content_Selected_green = configfile.getInt32( "menu_Content_Selected_green", 43 );
t.menu_Content_Selected_blue = configfile.getInt32( "menu_Content_Selected_blue", 7 );
t.menu_Content_Selected_Text_alpha = configfile.getInt32( "menu_Content_Selected_Text_alpha", 0 );
- t.menu_Content_Selected_Text_red = configfile.getInt32( "menu_Content_Selected_Text_red", 13 );
- t.menu_Content_Selected_Text_green = configfile.getInt32( "menu_Content_Selected_Text_green", 13 );
- t.menu_Content_Selected_Text_blue = configfile.getInt32( "menu_Content_Selected_Text_blue", 13 );
+ t.menu_Content_Selected_Text_red = configfile.getInt32( "menu_Content_Selected_Text_red", 0 );
+ t.menu_Content_Selected_Text_green = configfile.getInt32( "menu_Content_Selected_Text_green", 0 );
+ t.menu_Content_Selected_Text_blue = configfile.getInt32( "menu_Content_Selected_Text_blue", 0 );
t.menu_Content_inactive_alpha = configfile.getInt32( "menu_Content_inactive_alpha", 10 );
t.menu_Content_inactive_red = configfile.getInt32( "menu_Content_inactive_red", 13 );
t.menu_Content_inactive_green = configfile.getInt32( "menu_Content_inactive_green", 13 );
@@ -412,6 +428,22 @@ void CThemes::getTheme(CConfigFile &configfile)
t.clock_Digit_red = configfile.getInt32( "clock_Digit_red", 62 );
t.clock_Digit_green = configfile.getInt32( "clock_Digit_green", 62 );
t.clock_Digit_blue = configfile.getInt32( "clock_Digit_blue", 62 );
+
+ t.progressbar_design = configfile.getInt32("progressbar_design", CProgressBar::PB_MONO);
+ t.progressbar_design_channellist = configfile.getInt32("progressbar_design_channellist", t.progressbar_design);
+ t.progressbar_gradient = configfile.getInt32("progressbar_gradient", 1);
+ t.progressbar_timescale_red = configfile.getInt32("progressbar_timescale_red", 0);
+ t.progressbar_timescale_green = configfile.getInt32("progressbar_timescale_green", 100);
+ t.progressbar_timescale_yellow = configfile.getInt32("progressbar_timescale_yellow", 70);
+ t.progressbar_timescale_invert = configfile.getInt32("progressbar_timescale_invert", 0);
+
+ //NI
+ t.progressbar_active_red = configfile.getInt32( "progressbar_active_red", 98 );
+ t.progressbar_active_green = configfile.getInt32( "progressbar_active_green", 98 );
+ t.progressbar_active_blue = configfile.getInt32( "progressbar_active_blue", 98 );
+ t.progressbar_passive_red = configfile.getInt32( "progressbar_passive_red", 62 );
+ t.progressbar_passive_green = configfile.getInt32( "progressbar_passive_green", 62 );
+ t.progressbar_passive_blue = configfile.getInt32( "progressbar_passive_blue", 62 );
}
void CThemes::move_userDir()
diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp
index 0c8ee8719..28229c7de 100644
--- a/src/gui/timerlist.cpp
+++ b/src/gui/timerlist.cpp
@@ -281,6 +281,7 @@ CTimerList::CTimerList()
timerNew_message = "";
timerNew_pluginName = "";
httpConnectTimeout = 3;
+ changed = false;
/* most probable default */
saved_dispmode = (int)CVFD::MODE_TVRADIO;
diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp
index 1586946c1..8a1d4523d 100644
--- a/src/gui/volumebar.cpp
+++ b/src/gui/volumebar.cpp
@@ -34,6 +34,7 @@
#include
#include
#include
+#include
using namespace std;
@@ -193,7 +194,7 @@ void CVolumeBar::initVolumeBarScale()
vb_pb->setProgress(vb_pbx, vb_pby, vb_pbw, vb_pbh, *vb_vol, 100);
//NI
- if (g_settings.progressbar_design == CProgressBar::PB_GRAPHIC)
+ if (g_settings.theme.progressbar_design == CProgressBar::PB_GRAPHIC)
vb_pb->setGraphic("volumebar");
//add progressbar to container
@@ -264,9 +265,23 @@ CVolumeHelper::CVolumeHelper()
frameBuffer = CFrameBuffer::getInstance();
+ CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CVolumeHelper::resetFont));
+
Init();
}
+void CVolumeHelper::resetFont()
+{
+ if (vb_font){
+ vb_font = NULL;
+ dprintf(DEBUG_INFO, "\033[33m[CVolumeHelper][%s - %d] reset vb font \033[0m\n", __func__, __LINE__);
+ }
+ if (clock_font){
+ clock_font = NULL;
+ dprintf(DEBUG_INFO, "\033[33m[CVolumeHelper][%s - %d] reset clock font \033[0m\n", __func__, __LINE__);
+ }
+}
+
void CVolumeHelper::Init(Font* font)
{
@@ -289,10 +304,7 @@ void CVolumeHelper::initInfoClock(Font* font)
else
clock_font = font;
}
- else {
- if (font != NULL)
- clock_font = font;
- }
+
digit_offset = (clock_font)->getDigitOffset();
digit_h = (clock_font)->getDigitHeight();
int t1 = (clock_font)->getMaxDigitWidth();
diff --git a/src/gui/volumebar.h b/src/gui/volumebar.h
index 1f09a056b..62ce4d90c 100644
--- a/src/gui/volumebar.h
+++ b/src/gui/volumebar.h
@@ -108,6 +108,7 @@ class CVolumeHelper
Font* clock_font;
CFrameBuffer *frameBuffer;
+ void resetFont();
void Init(Font* font=NULL);
void initVolBarSize();
void initMuteIcon();
diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp
index 2439f57ed..45883cc22 100644
--- a/src/gui/widget/hintbox.cpp
+++ b/src/gui/widget/hintbox.cpp
@@ -65,7 +65,7 @@ CHintBox::CHintBox( const neutrino_locale_t Caption,
const char * const Picon,
const int& header_buttons,
const int& text_mode,
- const int& indent): CComponentsWindow( 1, 1, width,
+ const int& indent): CComponentsWindow( 0, 0, width,
HINTBOX_MIN_HEIGHT,
Caption,
string(Icon == NULL ? "" : Icon),
@@ -82,7 +82,7 @@ CHintBox::CHintBox( const char * const Caption,
const char * const Picon,
const int& header_buttons,
const int& text_mode,
- const int& indent):CComponentsWindow( 1, 1, width,
+ const int& indent):CComponentsWindow( 0, 0, width,
HINTBOX_MIN_HEIGHT,
Caption,
string(Icon == NULL ? "" : Icon),
@@ -99,7 +99,7 @@ CHintBox::CHintBox( const neutrino_locale_t Caption,
const char * const Picon,
const int& header_buttons,
const int& text_mode,
- const int& indent):CComponentsWindow( 1, 1, width,
+ const int& indent):CComponentsWindow( 0, 0, width,
HINTBOX_MIN_HEIGHT,
Caption,
string(Icon == NULL ? "" : Icon),
@@ -116,7 +116,7 @@ CHintBox::CHintBox( const char * const Caption,
const char * const Picon,
const int& header_buttons,
const int& text_mode,
- const int& indent):CComponentsWindow( 1, 1, width,
+ const int& indent):CComponentsWindow( 0, 0, width,
HINTBOX_MIN_HEIGHT,
Caption,
string(Icon == NULL ? "" : Icon),
diff --git a/src/gui/widget/keyboard_input.cpp b/src/gui/widget/keyboard_input.cpp
index a984069e0..9d756188b 100644
--- a/src/gui/widget/keyboard_input.cpp
+++ b/src/gui/widget/keyboard_input.cpp
@@ -181,8 +181,7 @@ const char* CInputString::c_str()
CKeyboardInput::CKeyboardInput(const neutrino_locale_t Name, std::string* Value, int Size, CChangeObserver* Observ, const char * const Icon, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2)
{
- name = Name;
- head = g_Locale->getText(Name);
+ title = g_Locale->getText(Name);
valueString = Value;
inputSize = Size;
@@ -205,8 +204,7 @@ CKeyboardInput::CKeyboardInput(const neutrino_locale_t Name, std::string* Value,
CKeyboardInput::CKeyboardInput(const std::string &Name, std::string *Value, int Size, CChangeObserver* Observ, const char * const Icon, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2)
{
- name = NONEXISTANT_LOCALE;
- head = Name;
+ title = Name;
valueString = Value;
inputSize = Size;
@@ -229,8 +227,7 @@ CKeyboardInput::CKeyboardInput(const std::string &Name, std::string *Value, int
CKeyboardInput::CKeyboardInput(const std::string &Name, std::string *Value, int Size, CChangeObserver* Observ, const char * const Icon, std::string HintText_1, std::string HintText_2)
{
- name = NONEXISTANT_LOCALE;
- head = Name;
+ title = Name;
valueString = Value;
inputSize = Size;
@@ -286,7 +283,7 @@ void CKeyboardInput::init()
}
inputString = new CInputString(inputSize);
- int tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(head);
+ int tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(title);
if (!(iconfile.empty()))
{
int icol_w, icol_h;
@@ -637,7 +634,7 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &)
else if ((msg == CRCInput::RC_home) || (msg == CRCInput::RC_timeout))
{
if ((inputString->getValue() != oldval) &&
- (ShowMsg(name, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) {
+ (ShowMsg(title, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) {
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
continue;
}
@@ -675,7 +672,7 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &)
inputString = NULL;
if ((observ) && (msg == CRCInput::RC_red))
- observ->changeNotify(name, (void *) valueString->c_str());
+ observ->changeNotify(title, (void *) valueString->c_str());
return res;
}
@@ -709,7 +706,7 @@ void CKeyboardInput::paint()
frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + OFFSET_SHADOW, width, height, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round
frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0);
- CComponentsHeader header(x, y, width, hheight, head, iconfile);
+ CComponentsHeader header(x, y, width, hheight, title, iconfile);
header.paint(CC_SAVE_SCREEN_NO);
key_y = y+ hheight+ offset+ input_h+ offset;
diff --git a/src/gui/widget/keyboard_input.h b/src/gui/widget/keyboard_input.h
index 7af5c1c17..23a3b3601 100644
--- a/src/gui/widget/keyboard_input.h
+++ b/src/gui/widget/keyboard_input.h
@@ -92,8 +92,7 @@ class CKeyboardInput : public CMenuTarget
std::string (*keyboard)[KEY_COLUMNS];
CInputString * inputString;
- std::string head;
- neutrino_locale_t name;
+ std::string title;
neutrino_locale_t hint_1, hint_2;
std::string hintText_1, hintText_2;
std::string iconfile;
diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp
index d4600470f..ba4957ecd 100644
--- a/src/gui/widget/menue.cpp
+++ b/src/gui/widget/menue.cpp
@@ -1211,7 +1211,7 @@ void CMenuWidget::calcSize()
//scrollbar width
sb_width=0;
if(total_pages > 1)
- sb_width=15;
+ sb_width=SCROLLBAR_WIDTH;
full_width = /*ConnectLineBox_Width+*/width+sb_width+OFFSET_SHADOW;
full_height = height+RADIUS_LARGE+OFFSET_SHADOW*2 /*+hint_height+OFFSET_INTER*/;
@@ -1265,6 +1265,7 @@ void CMenuWidget::paint()
header->enableShadow(CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT);
header->setOffset(10);
}
+ header->setCaption(getName());
header->setColorAll(COL_FRAME_PLUS_0, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0);
header->setCaptionColor(COL_MENUHEAD_TEXT);
header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0);
@@ -1342,9 +1343,9 @@ void CMenuWidget::paintItems()
if(total_pages>1)
{
int item_height=height-(item_start_y-y);
- paintScrollBar(x+ width, item_start_y, 15, item_height, total_pages, current_page);
-// /* background of menu items, paint every time because different items can have
-// * different height and this might leave artifacts otherwise after changing pages */
+ paintScrollBar(x+ width, item_start_y, sb_width, item_height, total_pages, current_page);
+ /* background of menu items, paint every time because different items can have
+ * different height and this might leave artifacts otherwise after changing pages */
frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0);
}
diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h
index 5da3cc3f5..5cfa58da2 100644
--- a/src/gui/widget/menue.h
+++ b/src/gui/widget/menue.h
@@ -88,6 +88,10 @@ class CChangeObserver
{
return false;
}
+ virtual bool changeNotify(const std::string & /*OptionName*/, void * /*Data*/)
+ {
+ return false;
+ }
virtual bool changeNotify(lua_State * /*L*/, const std::string & /*luaId*/, const std::string & /*luaAction*/, void * /*Data*/)
{
return false;
diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp
index 5f6e375e0..dc5b0b50c 100644
--- a/src/gui/widget/msgbox.cpp
+++ b/src/gui/widget/msgbox.cpp
@@ -81,8 +81,6 @@ CMsgBox::CMsgBox( const char* Text,
void CMsgBox::init(const int& Height, const int& ShowButtons, const msg_result_t& Default_result)
{
- dprintf(DEBUG_NORMAL, "[CMsgBox] [%s - %d] \n", __func__, __LINE__);
-
initTimeOut();
//enable footer and add its height
@@ -528,6 +526,22 @@ int ShowMsg( const std::string & Title,
return (result);
}
+int ShowMsg( const std::string & Title,
+ const neutrino_locale_t Text,
+ const CMsgBox::msg_result_t Default,
+ const uint32_t ShowButtons,
+ const char * const Icon,
+ const int Width,
+ const int Timeout,
+ bool returnDefaultOnTimeout,
+ const int& Text_mode,
+ fb_pixel_t color_frame)
+{
+ int result = ShowMsg2UTF(Title.c_str(), g_Locale->getText(Text), Default, ShowButtons, Icon, Width, Timeout, returnDefaultOnTimeout, Text_mode, color_frame);
+
+ return (result);
+}
+
void DisplayErrorMessage(const char * const ErrorMsg, const neutrino_locale_t& caption, const int& Text_mode)
{
ShowMsg(caption, ErrorMsg, CMsgBox::mbrCancel, CMsgBox::mbBack, NEUTRINO_ICON_ERROR, 500, NO_TIMEOUT, false, Text_mode, COL_RED);
diff --git a/src/gui/widget/msgbox.h b/src/gui/widget/msgbox.h
index 5325bd764..f20083296 100644
--- a/src/gui/widget/msgbox.h
+++ b/src/gui/widget/msgbox.h
@@ -392,6 +392,17 @@ int ShowMsg( const std::string & Title,
const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE,
fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8
+int ShowMsg( const std::string & Title,
+ const neutrino_locale_t Text,
+ const CMsgBox::msg_result_t Default,
+ const uint32_t ShowButtons,
+ const char * const Icon = NULL,
+ const int Width = MSGBOX_MIN_WIDTH,
+ const int Timeout = NO_TIMEOUT,
+ bool returnDefaultOnTimeout = false,
+ const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE,
+ fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8
+
void DisplayErrorMessage(const char * const ErrorMsg, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8
void DisplayErrorMessage(const char * const ErrorMsg, const neutrino_locale_t& caption, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8
void DisplayErrorMessage(const char * const ErrorMsg, const std::string& caption, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8
diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp
index 0349917b2..1a9bdadca 100644
--- a/src/gui/widget/stringinput.cpp
+++ b/src/gui/widget/stringinput.cpp
@@ -47,38 +47,14 @@
CStringInput::CStringInput(const neutrino_locale_t Name, std::string* Value, int Size, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2, const char * const Valid_Chars, CChangeObserver* Observ, const char * const Icon)
{
- name = Name;
- head = g_Locale->getText(Name);
- valueString = Value;
- lower_bound = -1;
- upper_bound = -1;
- size = Size;
-
- hint_1 = Hint_1;
- hint_2 = Hint_2;
- validchars = Valid_Chars;
- iconfile = Icon ? Icon : "";
-
- observ = Observ;
- init();
+ name = Name;
+ init(g_Locale->getText(name), Value, Size, Hint_1, Hint_2, Valid_Chars, Observ, Icon);
}
CStringInput::CStringInput(const std::string &Name, std::string *Value, int Size, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2, const char * const Valid_Chars, CChangeObserver* Observ, const char * const Icon)
{
name = NONEXISTANT_LOCALE;
- head = Name;
- valueString = Value;
- lower_bound = -1;
- upper_bound = -1;
- size = Size;
-
- hint_1 = Hint_1;
- hint_2 = Hint_2;
- validchars = Valid_Chars;
- iconfile = Icon ? Icon : "";
-
- observ = Observ;
- init();
+ init(Name, Value, Size, Hint_1, Hint_2, Valid_Chars, Observ, Icon);
}
CStringInput::~CStringInput()
@@ -99,10 +75,23 @@ const struct button_label CStringInputSMSButtons[CStringInputSMSButtonsCount] =
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_STRINGINPUT_CLEAR }
};
-void CStringInput::init()
+void CStringInput::init(const std::string &Name, std::string *Value, int Size, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2, const char * const Valid_Chars, CChangeObserver* Observ, const char * const Icon)
{
frameBuffer = CFrameBuffer::getInstance();
+ head = Name;
+ valueString = Value;
+ lower_bound = -1;
+ upper_bound = -1;
+ size = Size;
+
+ hint_1 = Hint_1;
+ hint_2 = Hint_2;
+ validchars = Valid_Chars;
+ iconfile = Icon ? Icon : "";
+
+ observ = Observ;
+
#ifdef DEBUG_STRINGINPUT
printf("HEAD: %s (len: %d)\n", head, strlen(head));
#endif
@@ -496,8 +485,9 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
}
else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) )
{
- if ((*valueString != oldval) &&
- (ShowMsg(name, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) {
+ string tmp_name = name == NONEXISTANT_LOCALE ? head : g_Locale->getText(name);
+ if ((trim (*valueString) != trim(oldval)) &&
+ (ShowMsg(tmp_name, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) {
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
continue;
}
diff --git a/src/gui/widget/stringinput.h b/src/gui/widget/stringinput.h
index d435a7f84..b01d65c09 100644
--- a/src/gui/widget/stringinput.h
+++ b/src/gui/widget/stringinput.h
@@ -64,7 +64,7 @@ class CStringInput : public CMenuTarget
bool force_saveScreen;
fb_pixel_t *pixBuf;
- virtual void init();
+ virtual void init(const std::string &Name, std::string *Value, int Size, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2, const char * const Valid_Chars, CChangeObserver* Observ, const char * const Icon);
virtual void paint(bool sms = false);
virtual void paintChar(int pos, char c);
diff --git a/src/gui/widget/stringinput_ext.cpp b/src/gui/widget/stringinput_ext.cpp
index b83d5c38e..0de0282d9 100644
--- a/src/gui/widget/stringinput_ext.cpp
+++ b/src/gui/widget/stringinput_ext.cpp
@@ -267,7 +267,7 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & )
}
else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) )
{
- if(*valueString != oldval){
+ if (trim (*valueString) != trim(oldval)){
int erg = ShowMsg(name, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbNo | CMsgBox::mbYes | CMsgBox::mbCancel);
if(erg==CMsgBox::mbrYes){
*valueString = oldval;
diff --git a/src/gui/widget/textbox.h b/src/gui/widget/textbox.h
index 5df0762a7..c38ea5ef1 100644
--- a/src/gui/widget/textbox.h
+++ b/src/gui/widget/textbox.h
@@ -222,7 +222,7 @@ class CTextBox : public sigc::trackable
int getLines(){return(m_nNrOfLines);}
/**
- * Returns maximal width of passed text
+ * Returns width of largest line from passed text
* @param[in] text
* @li exepts type std::string
* @param[in] font
@@ -233,9 +233,10 @@ class CTextBox : public sigc::trackable
static int getMaxLineWidth(const std::string& text, Font* font);
/**
- * Returns internal defined maximal line width of an existent CTextBox instance.
+ * Returns internal defined largest line width of an existant CTextBox instance.
* @return width of largest line as int
* @see static version getMaxLineWidth()
+ * setText(), parameter: max_width
*/
int getMaxLineWidth() {return(m_nMaxTextWidth);}
diff --git a/src/neutrino.cpp b/src/neutrino.cpp
index 79bfc83ee..e17b7cfe1 100644
--- a/src/neutrino.cpp
+++ b/src/neutrino.cpp
@@ -367,6 +367,9 @@ int CNeutrinoApp::loadSetup(const char * fname)
}
parentallocked = !access(NEUTRINO_PARENTALLOCKED_FILE, R_OK);
+ //theme/color options
+ CThemes::getTheme(configfile);
+
//NI
g_settings.inetradio_autostart = configfile.getInt32("inetradio_autostart" , 0);
g_settings.lcd4l_support = configfile.getInt32("lcd4l_support" , 0);
@@ -555,15 +558,6 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.infobar_show_channeldesc = configfile.getBool("infobar_show_channeldesc" , false );
g_settings.infobar_subchan_disp_pos = configfile.getInt32("infobar_subchan_disp_pos", 4); // subchan display in infobar
g_settings.infobar_buttons_usertitle = configfile.getBool("infobar_buttons_usertitle", false );
- g_settings.progressbar_gradient = configfile.getBool("progressbar_gradient", true );
- g_settings.progressbar_design = configfile.getInt32("progressbar_design", CProgressBar::PB_GRAPHIC); //NI
- bool pb_color = configfile.getBool("progressbar_color", true );
- if (!pb_color)
- g_settings.progressbar_design = CProgressBar::PB_MONO;
- g_settings.progressbar_timescale_red = configfile.getInt32("progressbar_timescale_red", 0);
- g_settings.progressbar_timescale_green = configfile.getInt32("progressbar_timescale_green", 100);
- g_settings.progressbar_timescale_yellow = configfile.getInt32("progressbar_timescale_yellow", 70);
- g_settings.progressbar_timescale_invert = configfile.getBool("progressbar_timescale_invert", false);
g_settings.infobar_analogclock = configfile.getInt32("infobar_analogclock", 0); //NI
g_settings.infobar_show = configfile.getInt32("infobar_show", configfile.getInt32("infobar_cn", 0)); //NI
g_settings.infobar_show_channellogo = configfile.getInt32("infobar_show_channellogo" , 5 ); //NI
@@ -651,8 +645,6 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.widget_fade = false;
g_settings.widget_fade = configfile.getBool("widget_fade" , false );
- //theme/color options
- CThemes::getTheme(configfile);
g_settings.osd_colorsettings_advanced_mode = configfile.getBool("osd_colorsettings_advanced_mode", false);
//personalize
@@ -802,7 +794,6 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.eventlist_additional = configfile.getInt32("eventlist_additional", 1); //NI
g_settings.eventlist_epgplus = configfile.getInt32("eventlist_epgplus", 1);
g_settings.channellist_epgtext_align_right = configfile.getBool("channellist_epgtext_align_right" , false);
- g_settings.channellist_progressbar_design = configfile.getInt32("channellist_progressbar_design", g_settings.progressbar_design);
g_settings.channellist_foot = configfile.getInt32("channellist_foot" , 1);//default next Event
g_settings.channellist_new_zap_mode = configfile.getInt32("channellist_new_zap_mode", 0); //NI
g_settings.channellist_sort_mode = configfile.getInt32("channellist_sort_mode", 0);//sort mode: alpha, freq, sat
@@ -1054,6 +1045,8 @@ int CNeutrinoApp::loadSetup(const char * fname)
void CNeutrinoApp::upgradeSetup(const char * fname)
{
+ dprintf(DEBUG_NORMAL, "upgrade/cleanup %s\n", fname);
+
if (g_settings.version_pseudo < "20160226110000")
{
if (g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items == "7")
@@ -1086,12 +1079,35 @@ void CNeutrinoApp::upgradeSetup(const char * fname)
g_settings.timer_followscreenings = 2 /*always*/;
configfile.deleteKey("recording_tevents");
}
+ if (g_settings.version_pseudo < "20162912080000")
+ {
+ //convert and remove obsolete progressbar_* keys
+
+ g_settings.theme.progressbar_design = configfile.getInt32("progressbar_design", CProgressBar::PB_COLOR);
+ bool pb_color = configfile.getBool("progressbar_color", true );
+ if (!pb_color)
+ g_settings.theme.progressbar_design = CProgressBar::PB_MONO;
+ g_settings.theme.progressbar_design_channellist = configfile.getInt32("channellist_progressbar_design", g_settings.theme.progressbar_design);
+ g_settings.theme.progressbar_gradient = configfile.getBool("progressbar_gradient", true );
+ g_settings.theme.progressbar_timescale_red = configfile.getInt32("progressbar_timescale_red", 0);
+ g_settings.theme.progressbar_timescale_green = configfile.getInt32("progressbar_timescale_green", 100);
+ g_settings.theme.progressbar_timescale_yellow = configfile.getInt32("progressbar_timescale_yellow", 70);
+ g_settings.theme.progressbar_timescale_invert = configfile.getBool("progressbar_timescale_invert", false);
+
+ configfile.deleteKey("progressbar_design");
+ configfile.deleteKey("channellist_progressbar_design");
+ configfile.deleteKey("progressbar_color");
+ configfile.deleteKey("progressbar_gradient");
+ configfile.deleteKey("progressbar_timescale_red");
+ configfile.deleteKey("progressbar_timescale_green");
+ configfile.deleteKey("progressbar_timescale_yellow");
+ configfile.deleteKey("progressbar_timescale_invert");
+ }
g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO;
configfile.setString("version_pseudo", g_settings.version_pseudo);
- if (configfile.getModifiedFlag())
- configfile.saveConfig(fname);
+ saveSetup(NEUTRINO_SETTINGS_FILE);
}
/**************************************************************************************
@@ -1105,6 +1121,9 @@ void CNeutrinoApp::saveSetup(const char * fname)
dprintf(DEBUG_NORMAL, "error while saving scan-settings!\n");
}
+ //theme/color options
+ CThemes::setTheme(configfile);
+
//NI
configfile.setInt32("inetradio_autostart" , g_settings.inetradio_autostart);
configfile.setInt32("lcd4l_support" , g_settings.lcd4l_support);
@@ -1233,12 +1252,6 @@ 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.setBool("infobar_buttons_usertitle", g_settings.infobar_buttons_usertitle);
- configfile.setBool("progressbar_gradient", g_settings.progressbar_gradient);
- configfile.setInt32("progressbar_design", g_settings.progressbar_design);
- configfile.setInt32("progressbar_timescale_red", g_settings.progressbar_timescale_red);
- configfile.setInt32("progressbar_timescale_green", g_settings.progressbar_timescale_green);
- configfile.setInt32("progressbar_timescale_yellow", g_settings.progressbar_timescale_yellow);
- configfile.setInt32("progressbar_timescale_invert", g_settings.progressbar_timescale_invert);
configfile.setInt32("infobar_analogclock", g_settings.infobar_analogclock); //NI
configfile.setInt32("infobar_show", g_settings.infobar_show);
configfile.setInt32("infobar_show_channellogo" , g_settings.infobar_show_channellogo );
@@ -1310,8 +1323,6 @@ void CNeutrinoApp::saveSetup(const char * fname)
//widget settings
configfile.setBool("widget_fade" , g_settings.widget_fade );
- //theme/color options
- CThemes::setTheme(configfile);
configfile.setBool("osd_colorsettings_advanced_mode", g_settings.osd_colorsettings_advanced_mode);
//personalize
@@ -1428,7 +1439,6 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32("eventlist_epgplus", g_settings.eventlist_epgplus);
configfile.setInt32("channellist_additional", g_settings.channellist_additional);
configfile.setBool("channellist_epgtext_align_right", g_settings.channellist_epgtext_align_right);
- configfile.setInt32("channellist_progressbar_design", g_settings.channellist_progressbar_design);
configfile.setInt32("channellist_foot", g_settings.channellist_foot);
configfile.setInt32("channellist_new_zap_mode", g_settings.channellist_new_zap_mode);
configfile.setInt32("remote_control_hardware", g_settings.remote_control_hardware);
diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp
index 21cc20fa2..d1e15f291 100644
--- a/src/nhttpd/tuxboxapi/controlapi.cpp
+++ b/src/nhttpd/tuxboxapi/controlapi.cpp
@@ -61,6 +61,9 @@ extern cVideo * videoDecoder;
#include "gui/infoicons.h"
extern CInfoIcons *InfoIcons; /* neutrino.cpp */
+//NI
+#include "gui/update.h"
+
extern CPlugins *g_PluginList;//for relodplugins
extern CBouquetManager *g_bouquetManager;
#define EVENTDEV "/dev/input/input0"
@@ -239,7 +242,8 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
{"getdir", &CControlAPI::getDirCGI, "+xml"},
{"getmovies", &CControlAPI::getMoviesCGI, "+xml"},
//NI
- {"infoicons", &CControlAPI::InfoIconsCGI, "text/plain"}
+ {"infoicons", &CControlAPI::InfoIconsCGI, "text/plain"},
+ {"updateinfo", &CControlAPI::UpdateInfoCGI, ""}
};
//-----------------------------------------------------------------------------
// Main Dispatcher
@@ -3970,3 +3974,31 @@ void CControlAPI::InfoIconsCGI(CyhookHandler *hh)
hh->SendOk();
}
+
+//NI
+//-------------------------------------------------------------------------
+/** Display update info
+ *
+ * @param hh CyhookHandler
+ *
+ * @par nhttpd-usage
+ * @code
+ * /control/updateinfo[?format=plain|json|xml]
+ * @endcode
+ *
+ */
+//-----------------------------------------------------------------------------
+void CControlAPI::UpdateInfoCGI(CyhookHandler *hh)
+{
+ hh->outStart();
+ std::string result = "";
+
+ CFlashUpdate update;
+ if (update.checkOnlineVersion())
+ result = hh->outPair("available", "yes", false);
+ else
+ result = hh->outPair("available", "no", false);
+
+ result = hh->outObject("update", result);
+ hh->SendResult(result);
+}
diff --git a/src/nhttpd/tuxboxapi/controlapi.h b/src/nhttpd/tuxboxapi/controlapi.h
index 86c49a598..ee16cd450 100644
--- a/src/nhttpd/tuxboxapi/controlapi.h
+++ b/src/nhttpd/tuxboxapi/controlapi.h
@@ -138,6 +138,7 @@ private:
std::string getSubdirectories(CyhookHandler *hh, std::string path, std::string result);
void InfoIconsCGI(CyhookHandler *hh); //NI
+ void UpdateInfoCGI(CyhookHandler *hh); //NI
protected:
CNeutrinoAPI *NeutrinoAPI;
diff --git a/src/system/locals.h b/src/system/locals.h
index 2fececf52..d363b6005 100644
--- a/src/system/locals.h
+++ b/src/system/locals.h
@@ -382,6 +382,8 @@ typedef enum
LOCALE_COLORMENU_HD_PRESET,
LOCALE_COLORMENU_MENUCOLORS,
LOCALE_COLORMENU_OSD_PRESET,
+ LOCALE_COLORMENU_PROGRESSBAR_ACTIVE,
+ LOCALE_COLORMENU_PROGRESSBAR_PASSIVE,
LOCALE_COLORMENU_SD_PRESET,
LOCALE_COLORMENU_TEXTCOLOR,
LOCALE_COLORMENU_THEMESELECT,
@@ -1447,9 +1449,11 @@ typedef enum
LOCALE_MENU_HINT_PREF_LANG,
LOCALE_MENU_HINT_PREF_SUBS,
LOCALE_MENU_HINT_PROGRESSBAR,
+ LOCALE_MENU_HINT_PROGRESSBAR_ACTIVE,
LOCALE_MENU_HINT_PROGRESSBAR_COLOR,
LOCALE_MENU_HINT_PROGRESSBAR_GRADIENT,
LOCALE_MENU_HINT_PROGRESSBAR_INFOBAR_POSITION,
+ LOCALE_MENU_HINT_PROGRESSBAR_PASSIVE,
LOCALE_MENU_HINT_PROGRESSBAR_PREVIEW,
LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_GREEN,
LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_INVERT,
diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h
index aa8fce3bd..77ebcb11c 100644
--- a/src/system/locals_intern.h
+++ b/src/system/locals_intern.h
@@ -382,6 +382,8 @@ const char * locale_real_names[] =
"colormenu.hd_preset",
"colormenu.menucolors",
"colormenu.osd_preset",
+ "colormenu.progressbar_active",
+ "colormenu.progressbar_passive",
"colormenu.sd_preset",
"colormenu.textcolor",
"colormenu.themeselect",
@@ -1447,9 +1449,11 @@ const char * locale_real_names[] =
"menu.hint_pref_lang",
"menu.hint_pref_subs",
"menu.hint_progressbar",
+ "menu.hint_progressbar_active",
"menu.hint_progressbar_color",
"menu.hint_progressbar_gradient",
"menu.hint_progressbar_infobar_position",
+ "menu.hint_progressbar_passive",
"menu.hint_progressbar_preview",
"menu.hint_progressbar_timescale_green",
"menu.hint_progressbar_timescale_invert",
diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp
index 367ebe4b0..fb5efd086 100644
--- a/src/system/setting_helpers.cpp
+++ b/src/system/setting_helpers.cpp
@@ -201,6 +201,11 @@ void CColorSetupNotifier::setPalette()
convertSetupColor2RGB(int(t.menu_Content_red*0.6), int(t.menu_Content_green*0.6), int(t.menu_Content_blue*0.6)),
convertSetupColor2RGB(t.colored_events_red, t.colored_events_green, t.colored_events_blue),
8, convertSetupAlpha2Alpha(t.infobar_alpha) );
+ //NI
+ frameBuffer->paletteGenFade(COL_PROGRESSBAR,
+ convertSetupColor2RGB(t.progressbar_passive_red, t.progressbar_passive_green, t.progressbar_passive_blue),
+ convertSetupColor2RGB(t.progressbar_active_red, t.progressbar_active_green, t.progressbar_active_blue),
+ 8, convertSetupAlpha2Alpha(t.menu_Content_alpha));
// ##### TEXT COLORS #####
// COL_COLORED_EVENTS_TEXT
@@ -282,6 +287,11 @@ void CColorSetupNotifier::setPalette()
frameBuffer->paletteSetColor(COL_NEUTRINO_TEXT + 15,
convertSetupColor2RGB(t.clock_Digit_red, t.clock_Digit_green, t.clock_Digit_blue),
convertSetupAlpha2Alpha(t.clock_Digit_alpha));
+ //NI
+ // COL_PROGRESSBAR_ACTIVE
+ frameBuffer->paletteSetColor(COL_NEUTRINO_TEXT + 16,
+ convertSetupColor2RGB(t.progressbar_active_red, t.progressbar_active_green, t.progressbar_active_blue),
+ convertSetupAlpha2Alpha(t.menu_Content_alpha));
frameBuffer->paletteSet();
}
diff --git a/src/system/settings.h b/src/system/settings.h
index 7db215638..360c7392c 100644
--- a/src/system/settings.h
+++ b/src/system/settings.h
@@ -147,6 +147,22 @@ struct SNeutrinoTheme
unsigned char clock_Digit_red;
unsigned char clock_Digit_green;
unsigned char clock_Digit_blue;
+
+ int progressbar_design;
+ int progressbar_design_channellist;
+ int progressbar_gradient;
+ int progressbar_timescale_red;
+ int progressbar_timescale_green;
+ int progressbar_timescale_yellow;
+ int progressbar_timescale_invert;
+
+ //NI
+ unsigned char progressbar_active_red;
+ unsigned char progressbar_active_green;
+ unsigned char progressbar_active_blue;
+ unsigned char progressbar_passive_red;
+ unsigned char progressbar_passive_green;
+ unsigned char progressbar_passive_blue;
};
struct timer_remotebox_item
@@ -200,12 +216,6 @@ struct SNeutrinoSettings
int infobar_show;
int infobar_show_channellogo;
int infobar_progressbar;
- int progressbar_design;
- int progressbar_gradient;
- int progressbar_timescale_red;
- int progressbar_timescale_green;
- int progressbar_timescale_yellow;
- int progressbar_timescale_invert;
int infobar_casystem_display;
int infobar_casystem_dotmatrix;
int infobar_casystem_frame;
@@ -601,7 +611,6 @@ struct SNeutrinoSettings
int eventlist_epgplus;
int channellist_additional;
int channellist_epgtext_align_right;
- int channellist_progressbar_design;
int channellist_foot;
int channellist_new_zap_mode;
int channellist_sort_mode;
@@ -976,6 +985,8 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO
#define OFFSET_INNER_MIN 2
#define OFFSET_INNER_NONE 0
+#define SCROLLBAR_WIDTH OFFSET_INNER_MID + 2*OFFSET_INNER_MIN
+
struct SglobalInfo
{
unsigned char box_Type;
diff --git a/version_pseudo.h b/version_pseudo.h
index 24beacfde..bdfc25f5d 100644
--- a/version_pseudo.h
+++ b/version_pseudo.h
@@ -1 +1 @@
-#define NEUTRINO_VERSION_PSEUDO "20161411235900"
+#define NEUTRINO_VERSION_PSEUDO "20162912080000"
|