diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 3c6159b3d..824805be2 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -2159,6 +2159,7 @@ screensaver.dir Verzeichnis screensaver.menu Bildschirmschoner screensaver.mode Modus screensaver.mode_clock Uhr +screensaver.mode_clock_color Farbige Uhr screensaver.mode_image Bilder screensaver.off Bildschirmschoner aus screensaver.random Zufällige Bilderwahl diff --git a/data/locale/english.locale b/data/locale/english.locale index b8910c253..c6dff7ca6 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -2159,6 +2159,7 @@ screensaver.dir Directory screensaver.menu Screensaver screensaver.mode Mode screensaver.mode_clock Clock +screensaver.mode_clock_color Clock colored screensaver.mode_image Images screensaver.off Screensaver off screensaver.random Random Images diff --git a/lib/libdvbsub/Makefile.am b/lib/libdvbsub/Makefile.am index 31010176f..6ac627d08 100644 --- a/lib/libdvbsub/Makefile.am +++ b/lib/libdvbsub/Makefile.am @@ -2,11 +2,9 @@ AM_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir) \ -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/zapit/include - -AM_CPPFLAGS +=\ - @HWLIB_CFLAGS@ \ - @AVFORMAT_CFLAGS@ + -I$(top_srcdir)/src/zapit/include \ + @AVFORMAT_CFLAGS@ \ + @HWLIB_CFLAGS@ AM_CPPFLAGS += -fno-rtti -fno-exceptions diff --git a/lib/libtuxtxt/Makefile.am b/lib/libtuxtxt/Makefile.am index c207800a3..f40d16044 100644 --- a/lib/libtuxtxt/Makefile.am +++ b/lib/libtuxtxt/Makefile.am @@ -5,9 +5,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/libconfigfile \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/zapit/include \ - $(FREETYPE_CFLAGS) - -AM_CPPFLAGS += @HWLIB_CFLAGS@ + $(FREETYPE_CFLAGS) \ + @HWLIB_CFLAGS@ AM_CPPFLAGS += -fno-rtti -fno-exceptions diff --git a/src/Makefile.am b/src/Makefile.am index 3bc91c85c..583abd21c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,9 +21,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/libmd5sum \ -I$(top_srcdir)/lib/libupnpclient \ @SIGC_CFLAGS@ \ - @FREETYPE_CFLAGS@ - -AM_CPPFLAGS += \ + @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ @HWLIB_CFLAGS@ diff --git a/src/daemonc/Makefile.am b/src/daemonc/Makefile.am index 4d7fcd185..c272b2dee 100644 --- a/src/daemonc/Makefile.am +++ b/src/daemonc/Makefile.am @@ -11,12 +11,11 @@ AM_CPPFLAGS += \ -I$(top_srcdir)/lib/libnet \ -I$(top_srcdir)/lib/xmltree \ @SIGC_CFLAGS@ \ - @FREETYPE_CFLAGS@ - -AM_CPPFLAGS += \ + @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ @HWLIB_CFLAGS@ + noinst_LIBRARIES = libneutrino_daemonc.a libneutrino_daemonc_a_SOURCES = remotecontrol.cpp diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am index 8c166be61..cf228beda 100644 --- a/src/driver/Makefile.am +++ b/src/driver/Makefile.am @@ -13,9 +13,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/connection \ -I$(top_srcdir)/lib/libeventserver \ @SIGC_CFLAGS@ \ - @FREETYPE_CFLAGS@ - -AM_CPPFLAGS += \ + @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ @HWLIB_CFLAGS@ @@ -50,8 +48,8 @@ libneutrino_driver_a_SOURCES = \ if BOXTYPE_COOL libneutrino_driver_a_SOURCES += \ vfd.cpp - endif + if BOXTYPE_TRIPLE libneutrino_driver_a_SOURCES += \ newclock.cpp \ @@ -76,4 +74,3 @@ AM_CPPFLAGS += \ endif libneutrino_driver_netfile_a_SOURCES = netfile.cpp - diff --git a/src/driver/audiodec/Makefile.am b/src/driver/audiodec/Makefile.am index 254f93493..d3332a48a 100644 --- a/src/driver/audiodec/Makefile.am +++ b/src/driver/audiodec/Makefile.am @@ -9,9 +9,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/zapit/include \ -I$(top_srcdir)/lib/libconfigfile \ @SIGC_CFLAGS@ \ - @FREETYPE_CFLAGS@ - -AM_CPPFLAGS += \ + @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ @HWLIB_CFLAGS@ diff --git a/src/driver/pictureviewer/Makefile.am b/src/driver/pictureviewer/Makefile.am index eac9fabea..bff7f879e 100644 --- a/src/driver/pictureviewer/Makefile.am +++ b/src/driver/pictureviewer/Makefile.am @@ -11,6 +11,7 @@ AM_CPPFLAGS = \ @FREETYPE_CFLAGS@ \ @HWLIB_CFLAGS@ + noinst_LIBRARIES = libneutrino_pictureviewer.a libneutrino_pictureviewer_a_SOURCES = \ diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index d8f151a87..c588464f0 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -292,13 +292,11 @@ int CBEBouquetWidget::exec(CMenuTarget* parent, const std::string & /*actionKey* if (!(Bouquets->empty())) { int step = ((int) msg == g_settings.key_pagedown) ? listmaxshow : 1; // browse or step 1 int new_selected = selected + step; - if (new_selected >= (int) Bouquets->size()) { - if (((Bouquets->size() - listmaxshow -1 < selected) && (step != 1)) || (selected != (Bouquets->size() - 1))) + if (new_selected > (int) Bouquets->size() - 1) { + if ((selected != Bouquets->size() - 1)) new_selected = Bouquets->size() - 1; - else if (((Bouquets->size() / listmaxshow) + 1) * listmaxshow == Bouquets->size() + listmaxshow) // last page has full entries - new_selected = 0; else - new_selected = ((step == (int) listmaxshow) && (new_selected < (int) (((Bouquets->size() / listmaxshow)+1) * listmaxshow))) ? (Bouquets->size() - 1) : 0; + new_selected = 0; } updateSelection(new_selected); } diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 8385314ed..3a6a14ba5 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -380,14 +380,12 @@ int CBEChannelWidget::exec(CMenuTarget* parent, const std::string & /*actionKey* if (!(Channels->empty())) { int step = ((int) msg == g_settings.key_pagedown) ? listmaxshow : 1; // browse or step 1 int new_selected = selected + step; - if (new_selected >= (int) Channels->size()) { - if (((Channels->size() - listmaxshow -1 < selected) && (step != 1)) || (selected != (Channels->size() - 1))) - new_selected = Channels->size() - 1; - else if (((Channels->size() / listmaxshow) + 1) * listmaxshow == Channels->size() + listmaxshow) // last page has full entries - new_selected = 0; - else - new_selected = ((step == (int) listmaxshow) && (new_selected < (int) (((Channels->size() / listmaxshow)+1) * listmaxshow))) ? (Channels->size() - 1) : 0; - } + if (new_selected > (int) Channels->size() - 1) { + if ((selected != Channels->size() - 1)) + new_selected = Channels->size() - 1; + else + new_selected = 0; + } updateSelection(new_selected); } } diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 1c615d3cc..59d357aa9 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -547,13 +547,11 @@ int CBouquetList::show(bool bShowChannelList) if (!Bouquets.empty()) { int step = ((int) msg == g_settings.key_pagedown) ? listmaxshow : 1; // browse or step 1 int new_selected = selected + step; - if (new_selected >= (int) Bouquets.size()) { - if (((Bouquets.size() - listmaxshow -1 < selected) && (step != 1)) || (selected != (Bouquets.size() - 1))) + if (new_selected > (int) Bouquets.size() - 1) { + if ((selected != Bouquets.size() - 1)) new_selected = Bouquets.size() - 1; - else if (((Bouquets.size() / listmaxshow) + 1) * listmaxshow == Bouquets.size() + listmaxshow) // last page has full entries - new_selected = 0; else - new_selected = ((step == (int) listmaxshow) && (new_selected < (int) (((Bouquets.size() / listmaxshow)+1) * listmaxshow))) ? (Bouquets.size() - 1) : 0; + new_selected = 0; } updateSelection(new_selected); } diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 04138e00c..1540fced1 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -746,13 +746,11 @@ int CChannelList::show() displayList = 1; int step = ((int) msg == g_settings.key_pagedown) ? listmaxshow : 1; // browse or step 1 int new_selected = selected + step; - if (new_selected >= (int) (*chanlist).size()) { - if ((((*chanlist).size() - listmaxshow -1 < selected) && (step != 1)) || (selected != ((*chanlist).size() - 1))) + if (new_selected > (int) (*chanlist).size() - 1) { + if ((selected != (*chanlist).size() - 1)) new_selected = (*chanlist).size() - 1; - else if ((((*chanlist).size() / listmaxshow) + 1) * listmaxshow == (*chanlist).size() + listmaxshow) // last page has full entries - new_selected = 0; else - new_selected = ((step == (int) listmaxshow) && (new_selected < (int) ((((*chanlist).size() / listmaxshow)+1) * listmaxshow))) ? ((*chanlist).size() - 1) : 0; + new_selected = 0; } actzap = updateSelection(new_selected); } diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index e961d98cd..5bea94103 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -34,7 +34,7 @@ #include #define SB_MIN_HEIGHT 12 -#define REF_PERCENT_TXT "00% " +#define REF_PERCENT_TXT "100% " using namespace std; diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 962884397..56f2244b2 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -113,6 +113,7 @@ CInfoViewer::CInfoViewer () ChanNameY = 0; ChanWidth = 0; ChanHeight = 0; + numbox_offset = 0; time_width = 0; time_height = header_height = 0; lastsnr = 0; @@ -203,6 +204,7 @@ void CInfoViewer::start () ChanHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight()/* * 9/8*/; ChanHeight += g_SignalFont->getHeight()/2; ChanHeight = max(75, ChanHeight); + numbox_offset = 3; BoxStartX = g_settings.screen_StartX + 10; BoxEndX = g_settings.screen_EndX - 10; @@ -333,6 +335,9 @@ void CInfoViewer::showRecordIcon (const bool show) rec->setShadowWidth(SHADOW_OFFSET/2); rec->setCorner(RADIUS_MIN, CORNER_ALL); } + if (rec->getWidth() != box_len) + rec->setWidth(box_len); + if (!rec->isPainted()) rec->paint(CC_SAVE_SCREEN_NO); @@ -747,13 +752,12 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap logo_ok = ( g_settings.infobar_show_channellogo != 0 && ChannelLogoMode != 0); //fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",g_settings.infobar_show_channellogo, ChannelLogoMode, logo_ok); - int ChanNumYPos = BoxStartY + ChanHeight; if (g_settings.infobar_sat_display) { std::string name = (IS_WEBTV(current_channel_id))? "WebTV" : CServiceManager::getInstance()->GetSatelliteName(satellitePosition); int satNameWidth = g_SignalFont->getRenderWidth (name); std::string satname_tmp = name; - if (satNameWidth > (ChanWidth - 4)) { - satNameWidth = ChanWidth - 4; + if (satNameWidth > (ChanWidth - numbox_offset*2)) { + satNameWidth = ChanWidth - numbox_offset*2; size_t pos1 = name.find("(") ; size_t pos2 = name.find_last_of(")"); size_t pos0 = name.find(" ") ; @@ -767,13 +771,12 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap satname_tmp +=" "; satname_tmp += name.substr( pos1,pos2-pos1 ); satNameWidth = g_SignalFont->getRenderWidth (satname_tmp); - if (satNameWidth > (ChanWidth - 4)) - satNameWidth = ChanWidth - 4; + if (satNameWidth > (ChanWidth - numbox_offset*2)) + satNameWidth = ChanWidth - numbox_offset*2; } } - int chanH = g_SignalFont->getHeight (); - g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2) , numbox->getYPos() + chanH, satNameWidth, satname_tmp, COL_INFOBAR_TEXT); - ChanNumYPos += 10; + int h_sfont = g_SignalFont->getHeight(); + g_SignalFont->RenderString (BoxStartX + numbox_offset + ((ChanWidth - satNameWidth) / 2) , numbox->getYPos() + h_sfont, satNameWidth, satname_tmp, COL_INFOBAR_TEXT); } /* TODO: the logic will get much easier once we decouple channellogo and signal bars */ @@ -788,9 +791,9 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap y_tmp += h_sfont; } y_tmp += h_tmp/2 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight()/2; - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->RenderString(BoxStartX + (ChanWidth-g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(strChanNum))/2, + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->RenderString(BoxStartX + numbox_offset + (ChanWidth-g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(strChanNum))/2, y_tmp, - ChanWidth, + ChanWidth - 2*numbox_offset, strChanNum, col_NumBoxText); } @@ -1499,7 +1502,9 @@ void CInfoViewer::showSNR () /* right now, infobar_show_channellogo == 3 is the trigger for signal bars etc. TODO: decouple this */ if (!fileplay && !IS_WEBTV(current_channel_id) && ( g_settings.infobar_show_channellogo == 3 || g_settings.infobar_show_channellogo == 5 || g_settings.infobar_show_channellogo == 6 )) { - int chanH = g_SignalFont->getHeight(); + int y_freq = 2*g_SignalFont->getHeight(); + if (!g_settings.infobar_sat_display) + y_freq -= g_SignalFont->getHeight()/2; //half line up to center freq vertically int y_numbox = numbox->getYPos(); if ((newfreq && chanready) || SDT_freq_update) { char freq[20]; @@ -1513,13 +1518,15 @@ void CInfoViewer::showSNR () int frequency = CFEManager::getInstance()->getLiveFE()->getFrequency(); snprintf (freq, sizeof(freq), "%d.%d MHz %s", frequency / 1000, frequency % 1000, polarisation.c_str()); - int satNameWidth = g_SignalFont->getRenderWidth (freq); - g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2), y_numbox + 2 * chanH - 3, satNameWidth, freq, SDT_freq_update ? COL_COLORED_EVENTS_TEXT:COL_INFOBAR_TEXT); + int freqWidth = g_SignalFont->getRenderWidth(freq); + if (freqWidth > (ChanWidth - numbox_offset*2)) + freqWidth = ChanWidth - numbox_offset*2; + g_SignalFont->RenderString(BoxStartX + numbox_offset + ((ChanWidth - freqWidth) / 2), y_numbox + y_freq - 3, ChanWidth - 2*numbox_offset, freq, SDT_freq_update ? COL_COLORED_EVENTS_TEXT:COL_INFOBAR_TEXT); SDT_freq_update = false; } if (sigbox == NULL){ - int sb_x = ChanWidth *10/100; - sigbox = new CSignalBox(BoxStartX+sb_x, y_numbox+ChanHeight/2, ChanWidth-2*sb_x, ChanHeight/2, CFEManager::getInstance()->getLiveFE(), true, NULL, "S", "Q"); + int sigbox_offset = ChanWidth *10/100; + sigbox = new CSignalBox(BoxStartX + sigbox_offset, y_numbox+ChanHeight/2, ChanWidth - 2*sigbox_offset, ChanHeight/2, CFEManager::getInstance()->getLiveFE(), true, NULL, "S", "Q"); sigbox->setTextColor(COL_INFOBAR_TEXT); sigbox->doPaintBg(false); } diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index 5970a3dfb..92a374212 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -80,6 +80,7 @@ class CInfoViewer int ChanNameY; int ChanWidth; int ChanHeight; + int numbox_offset; CSectionsdClient::CurrentNextInfo info_CurrentNext; CSectionsdClient::CurrentNextInfo oldinfo; diff --git a/src/gui/lua/Makefile.am b/src/gui/lua/Makefile.am index 85efa57e7..4cf5c50aa 100644 --- a/src/gui/lua/Makefile.am +++ b/src/gui/lua/Makefile.am @@ -16,9 +16,7 @@ AM_CPPFLAGS += \ @SIGC_CFLAGS@ \ @CURL_CFLAGS@ \ @FREETYPE_CFLAGS@ \ - @LUA_CFLAGS@ - -AM_CPPFLAGS += \ + @LUA_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ @HWLIB_CFLAGS@ diff --git a/src/gui/lua/lua_menue.cpp b/src/gui/lua/lua_menue.cpp index fcd421e09..0f3998402 100644 --- a/src/gui/lua/lua_menue.cpp +++ b/src/gui/lua/lua_menue.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -56,7 +57,7 @@ bool CLuaMenuChangeObserver::changeNotify(lua_State *L, const std::string &luaAc int status = lua_pcall(L, 2 /* two args */, 1 /* one result */, 0); if (status) { fprintf(stderr, "[CLuaMenuChangeObserver::%s:%d] error in script: %s\n", __func__, __LINE__, lua_tostring(L, -1)); - luaL_error(L, " => %s", lua_tostring(L, -1)); + DisplayErrorMessage(lua_tostring(L, -1), "Lua Script Error:"); } double res = lua_isnumber(L, -1) ? lua_tonumber(L, -1) : 0; return (((int)res == menu_return::RETURN_REPAINT) || ((int)res == menu_return::RETURN_EXIT_REPAINT)); @@ -135,7 +136,7 @@ int CLuaMenuForwarder::exec(CMenuTarget* /*parent*/, const std::string & /*actio int status = lua_pcall(L, 1 /* one arg */, 1 /* one result */, 0); if (status) { fprintf(stderr, "[CLuaMenuForwarder::%s:%d] error in script: %s\n", __func__, __LINE__, lua_tostring(L, -1)); - luaL_error(L, " => %s", lua_tostring(L, -1)); + DisplayErrorMessage(lua_tostring(L, -1), "Lua Script Error:"); } if (lua_isnumber(L, -1)) res = (int) lua_tonumber(L, -1); @@ -179,7 +180,7 @@ int CLuaMenuFilebrowser::exec(CMenuTarget* /*parent*/, const std::string& /*acti int status = lua_pcall(L, 2 /* two arg */, 1 /* one result */, 0); if (status) { fprintf(stderr, "[CLuaMenuFilebrowser::%s:%d] error in script: %s\n", __func__, __LINE__, lua_tostring(L, -1)); - luaL_error(L, " => %s", lua_tostring(L, -1)); + DisplayErrorMessage(lua_tostring(L, -1), "Lua Script Error:"); } lua_pop(L, 1); } @@ -222,7 +223,7 @@ int CLuaMenuStringinput::exec(CMenuTarget* /*parent*/, const std::string & /*act int status = lua_pcall(L, 2 /* two arg */, 1 /* one result */, 0); if (status) { fprintf(stderr, "[CLuaMenuStringinput::%s:%d] error in script: %s\n", __func__, __LINE__, lua_tostring(L, -1)); - luaL_error(L, " => %s", lua_tostring(L, -1)); + DisplayErrorMessage(lua_tostring(L, -1), "Lua Script Error:"); } lua_pop(L, 2); } @@ -260,7 +261,7 @@ int CLuaMenuKeyboardinput::exec(CMenuTarget* /*parent*/, const std::string & /*a int status = lua_pcall(L, 2 /* two arg */, 1 /* one result */, 0); if (status) { fprintf(stderr, "[CLuaMenuKeyboardinput::%s:%d] error in script: %s\n", __func__, __LINE__, lua_tostring(L, -1)); - luaL_error(L, " => %s", lua_tostring(L, -1)); + DisplayErrorMessage(lua_tostring(L, -1), "Lua Script Error:"); } lua_pop(L, 2); } diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index a9e8f4950..5521c7d5d 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -2202,7 +2202,7 @@ void CMoviePlayerGui::parsePlaylist(CFile *file) if (strlen(cLine) > 0 && cLine[0]!='#') { char *url = NULL; - if ((url = strstr(cLine, "http://")) || (url = strstr(cLine, "rtmp://")) || (url = strstr(cLine, "rtsp://")) || (url = strstr(cLine, "mmsh://")) ) { + if ((url = strstr(cLine, "http://")) || (url = strstr(cLine, "https://")) || (url = strstr(cLine, "rtmp://")) || (url = strstr(cLine, "rtsp://")) || (url = strstr(cLine, "mmsh://")) ) { if (url != NULL) { printf("name %s [%d] url: %s\n", name, dur, url); tmp_file.Name = name; diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 6712383cc..9518bdf60 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -255,7 +255,8 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) if (xre != g_settings.screen_xres || yre != g_settings.screen_yres) { printf("[neutrino] new font scale settings x: %d%% y: %d%%\n", g_settings.screen_xres, g_settings.screen_yres); CNeutrinoApp::getInstance()->SetupFonts(CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT | CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT_INST | CNeutrinoFonts::FONTSETUP_DYN_FONT); - CNeutrinoApp::getInstance()->channelList->ResetModules(); //force re init of all modules + if (CNeutrinoApp::getInstance()->channelList) + CNeutrinoApp::getInstance()->channelList->ResetModules(); //force re init of all modules } return res; } @@ -1439,11 +1440,12 @@ void COsdSetup::showOsdScreenShotSetup(CMenuWidget *menu_screenshot) } #endif -#define SCREENSAVER_MODE_OPTION_COUNT 2 +#define SCREENSAVER_MODE_OPTION_COUNT 3 const CMenuOptionChooser::keyval SCREENSAVER_MODE_OPTIONS[SCREENSAVER_MODE_OPTION_COUNT] = { { 0, LOCALE_SCREENSAVER_MODE_IMAGE }, - { 1, LOCALE_SCREENSAVER_MODE_CLOCK } + { 1, LOCALE_SCREENSAVER_MODE_CLOCK }, + { 2, LOCALE_SCREENSAVER_MODE_CLOCK_COLOR } }; void COsdSetup::showOsdScreensaverSetup(CMenuWidget *menu_screensaver) diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index c6cb91405..dca06ad99 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -38,7 +38,7 @@ #include "screensaver.h" #include #include -extern CInfoClock *InfoClock; + #include extern cVideo * videoDecoder; @@ -53,6 +53,7 @@ CScreenSaver::CScreenSaver() index = 0; status_mute = CAudioMute::getInstance()->getStatus(); scr_clock = NULL; + clr.i_color = COL_DARK_GRAY; } CScreenSaver::~CScreenSaver() @@ -83,6 +84,9 @@ void CScreenSaver::Start() status_mute = CAudioMute::getInstance()->getStatus(); CAudioMute::getInstance()->enableMuteIcon(false); + if(!CInfoClock::getInstance()->isBlocked()) + CInfoClock::getInstance()->disableInfoClock(); + m_viewer->SetScaling((CPictureViewer::ScalingMode)g_settings.picviewer_scaling); m_viewer->SetVisible(g_settings.screen_StartX, g_settings.screen_EndX, g_settings.screen_StartY, g_settings.screen_EndY); @@ -124,7 +128,7 @@ void CScreenSaver::Stop() if (!OnAfterStop.empty()) OnAfterStop(); else - InfoClock->enableInfoClock(); + CInfoClock::getInstance()->enableInfoClock(); } void* CScreenSaver::ScreenSaverPrg(void* arg) @@ -250,7 +254,6 @@ void CScreenSaver::paint() if (!scr_clock){ scr_clock = new CComponentsFrmClock(1, 1, NULL, "%H.%M:%S", "%H.%M %S", true); scr_clock->setClockFont(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]); - scr_clock->setTextColor(COL_DARK_GRAY); scr_clock->enableSaveBg(); scr_clock->doPaintBg(false); } @@ -258,7 +261,33 @@ void CScreenSaver::paint() scr_clock->Stop(); scr_clock->kill(); + scr_clock->setTextColor(clr.i_color); scr_clock->setPosP(rand() % 80, rand() % 90); scr_clock->Start(); + + if (g_settings.screensaver_mode == SCR_MODE_CLOCK_COLOR) { + srand (time(NULL)); + uint32_t brightness; + + // sorcery, no darkness + do { + clr.i_color = rand(); + brightness = (unsigned int)clr.uc_color.r * 19595 + (unsigned int)clr.uc_color.g * 38469 + (unsigned int)clr.uc_color.b * 7471; + //printf("[%s] %s: brightness: %d\n", __FILE__, __FUNCTION__, brightness>> 16); + } + while(brightness >> 16 < 80); + + clr.i_color &= 0x00FFFFFF; + //printf("[%s] %s: clr.i_color: r %02x g %02x b %02x a %02x\n", __FILE__, __FUNCTION__, clr.uc_color.r, clr.uc_color.g, clr.uc_color.b, clr.uc_color.a); + } + else + clr.i_color = COL_DARK_GRAY; } } + +bool CScreenSaver::IsRun() +{ + if(thrScreenSaver) + return true; + return false; +} \ No newline at end of file diff --git a/src/gui/screensaver.h b/src/gui/screensaver.h index 865a12c08..696425fa7 100644 --- a/src/gui/screensaver.h +++ b/src/gui/screensaver.h @@ -46,16 +46,26 @@ class CScreenSaver : public sigc::trackable bool ReadDir(); void paint(); + union u_color { + struct s_color { + uint8_t b, g, r, a; + } uc_color; + unsigned int i_color; + }; + + u_color clr; + public: enum { SCR_MODE_IMAGE, - SCR_MODE_CLOCK + SCR_MODE_CLOCK, + SCR_MODE_CLOCK_COLOR }; CScreenSaver(); ~CScreenSaver(); static CScreenSaver* getInstance(); - + bool IsRun(); void Start(); void Stop(); sigc::signal OnBeforeStart; diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index fdc97b3a7..dd62f3659 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -33,7 +33,7 @@ #include #include #include - +#include "screensaver.h" CTimeOSD::CTimeOSD():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON, COL_LIGHT_GRAY, COL_MENUCONTENT_PLUS_0,COL_MENUCONTENTDARK_PLUS_0) @@ -45,7 +45,7 @@ void CTimeOSD::Init() { paint_bg = g_settings.infoClockBackground; m_time_show = time(0); - m_mode = MODE_ASC; + m_mode = MODE_HIDE; //use current theme colors setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); @@ -96,7 +96,7 @@ void CTimeOSD::initTimeString() void CTimeOSD::show(time_t time_show, bool force) { time_show /= 1000; - if (!force && (m_mode == MODE_HIDE || m_time_show == time_show)) + if (!force && (m_mode == MODE_HIDE || m_time_show == time_show || CScreenSaver::getInstance()->IsRun())) return; m_time_show = time_show; diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index d7cc5de49..509300bb0 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -504,13 +504,11 @@ void CUpnpBrowserGui::selectDevice() { int step = ((int) msg == g_settings.key_pagedown) ? m_listmaxshow : 1; // browse or step 1 int new_selected = m_selecteddevice + step; - if (new_selected >= (int) m_devices.size()) { - if (((m_devices.size() - m_listmaxshow -1 < m_selecteddevice) && (step != 1)) || (m_selecteddevice != (m_devices.size() - 1))) + if (new_selected > (int) m_devices.size() - 1) { + if ((m_selecteddevice != m_devices.size() - 1)) new_selected = m_devices.size() - 1; - else if (((m_devices.size() / m_listmaxshow) + 1) * m_listmaxshow == m_devices.size() + m_listmaxshow) // last page has full entries - new_selected = 0; else - new_selected = ((step == (int) m_listmaxshow) && (new_selected < (int) (((m_devices.size() / m_listmaxshow)+1) * m_listmaxshow))) ? (m_devices.size() - 1) : 0; + new_selected = 0; } updateDeviceSelection(new_selected); } diff --git a/src/gui/widget/listbox.cpp b/src/gui/widget/listbox.cpp index 947cba1b4..836ff5d7f 100644 --- a/src/gui/widget/listbox.cpp +++ b/src/gui/widget/listbox.cpp @@ -206,13 +206,11 @@ int CListBox::exec(CMenuTarget* parent, const std::string & /*actionKey*/) if(getItemCount()!=0) { int step = ((int) msg == g_settings.key_pagedown) ? listmaxshow : 1; // browse or step 1 int new_selected = selected + step; - if (new_selected >= (int) getItemCount()) { - if (((getItemCount() - listmaxshow -1 < selected) && (step != 1)) || (selected != (getItemCount() - 1))) + if (new_selected > (int) getItemCount() - 1) { + if ((selected != getItemCount() - 1)) new_selected = getItemCount() - 1; - else if (((getItemCount() / listmaxshow) + 1) * listmaxshow == getItemCount() + listmaxshow) // last page has full entries - new_selected = 0; else - new_selected = ((step == (int) listmaxshow) && (new_selected < (int) (((getItemCount() / listmaxshow)+1) * listmaxshow))) ? (getItemCount() - 1) : 0; + new_selected = 0; } updateSelection(new_selected); } diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 1b94f25de..22809b8d0 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1389,7 +1389,7 @@ void CNeutrinoApp::channelsInit(bool bOnly) memset(radiosort, -1, sizeof(tvsort)); const char * fav_bouquetname = g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME); - if(g_bouquetManager->existsUBouquet(fav_bouquetname, true) == -1) + if(g_bouquetManager && g_bouquetManager->existsUBouquet(fav_bouquetname, true) == -1) g_bouquetManager->addBouquet(fav_bouquetname, true, true); if(TVbouquetList) delete TVbouquetList; @@ -1539,29 +1539,31 @@ void CNeutrinoApp::channelsInit(bool bOnly) AllFavBouquetList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_FAVS)); /* Favorites and providers bouquets */ tvi = ri = 0; - for (i = 0; i < g_bouquetManager->Bouquets.size(); i++) { - CZapitBouquet *b = g_bouquetManager->Bouquets[i]; - if (!b->bHidden) { - if (b->getTvChannels(zapitList) || (g_settings.show_empty_favorites && b->bUser)) { - if(b->bUser) - tmp = TVfavList->addBouquet(b); - else - tmp = TVbouquetList->addBouquet(b); + if(g_bouquetManager){ + for (i = 0; i < g_bouquetManager->Bouquets.size(); i++) { + CZapitBouquet *b = g_bouquetManager->Bouquets[i]; + if (!b->bHidden) { + if (b->getTvChannels(zapitList) || (g_settings.show_empty_favorites && b->bUser)) { + if(b->bUser) + tmp = TVfavList->addBouquet(b); + else + tmp = TVbouquetList->addBouquet(b); - tmp->channelList->SetChannelList(&zapitList); - tvi++; - } - if (b->getRadioChannels(zapitList) || (g_settings.show_empty_favorites && b->bUser)) { - if(b->bUser) - tmp = RADIOfavList->addBouquet(b); - else - tmp = RADIObouquetList->addBouquet(b); + tmp->channelList->SetChannelList(&zapitList); + tvi++; + } + if (b->getRadioChannels(zapitList) || (g_settings.show_empty_favorites && b->bUser)) { + if(b->bUser) + tmp = RADIOfavList->addBouquet(b); + else + tmp = RADIObouquetList->addBouquet(b); - tmp->channelList->SetChannelList(&zapitList); - ri++; + tmp->channelList->SetChannelList(&zapitList); + ri++; + } + if(b->bUser) + AllFavBouquetList->addBouquet(b); } - if(b->bUser) - AllFavBouquetList->addBouquet(b); } } #if 0 diff --git a/src/nhttpd/tuxboxapi/Makefile.am b/src/nhttpd/tuxboxapi/Makefile.am index 10e046263..f208f7b02 100644 --- a/src/nhttpd/tuxboxapi/Makefile.am +++ b/src/nhttpd/tuxboxapi/Makefile.am @@ -14,9 +14,7 @@ AM_CPPFLAGS += \ -I$(top_srcdir)/lib/libconfigfile \ -I$(top_srcdir)/lib/xmltree \ @SIGC_CFLAGS@ \ - @FREETYPE_CFLAGS@ - -AM_CPPFLAGS += \ + @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ @HWLIB_CFLAGS@ diff --git a/src/system/Makefile.am b/src/system/Makefile.am index 31c544d14..184f688bf 100644 --- a/src/system/Makefile.am +++ b/src/system/Makefile.am @@ -18,9 +18,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/xmltree \ -I$(top_srcdir)/lib/jsoncpp/include \ @SIGC_CFLAGS@ \ - @FREETYPE_CFLAGS@ - -AM_CPPFLAGS += \ + @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ @HWLIB_CFLAGS@ diff --git a/src/system/locals.h b/src/system/locals.h index 2fbbe336a..4a3123646 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -2186,6 +2186,7 @@ typedef enum LOCALE_SCREENSAVER_MENU, LOCALE_SCREENSAVER_MODE, LOCALE_SCREENSAVER_MODE_CLOCK, + LOCALE_SCREENSAVER_MODE_CLOCK_COLOR, LOCALE_SCREENSAVER_MODE_IMAGE, LOCALE_SCREENSAVER_OFF, LOCALE_SCREENSAVER_RANDOM, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index b9ab8d2b4..a5dd56ea8 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -2186,6 +2186,7 @@ const char * locale_real_names[] = "screensaver.menu", "screensaver.mode", "screensaver.mode_clock", + "screensaver.mode_clock_color", "screensaver.mode_image", "screensaver.off", "screensaver.random", diff --git a/src/timerd/Makefile.am b/src/timerd/Makefile.am index f97ba11dd..b3c68456f 100644 --- a/src/timerd/Makefile.am +++ b/src/timerd/Makefile.am @@ -10,7 +10,8 @@ AM_CPPFLAGS += \ -I$(top_srcdir)/lib/libconfigfile \ -I$(top_srcdir)/lib/connection \ -I$(top_srcdir)/lib/libeventserver \ - -I$(top_srcdir)/lib/xmltree + -I$(top_srcdir)/lib/xmltree \ + @HWLIB_CFLAGS@ noinst_LIBRARIES = libtimerd.a