You can subscribe to this list here.
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2013 |
Jan
(8) |
Feb
(6) |
Mar
(5) |
Apr
(7) |
May
(3) |
Jun
(5) |
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(2) |
Nov
(8) |
Dec
(2) |
2014 |
Jan
(3) |
Feb
(2) |
Mar
(2) |
Apr
(3) |
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(4) |
Nov
(5) |
Dec
(1) |
2015 |
Jan
|
Feb
(6) |
Mar
(24) |
Apr
(29) |
May
(43) |
Jun
(17) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Thilo G. <tux...@ne...> - 2013-12-13 07:19:24
|
Project "Tuxbox-GIT: cdk": The branch, master has been updated via ccb8308380f4620e5ff0bad120cb44f130f7ced3 (commit) via 23848a2c7d43b6bfe884cbe2a2f47f66e7433674 (commit) from 01b50e825114b461ffad468b5d11fa4fa34cc832 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ccb8308380f4620e5ff0bad120cb44f130f7ced3 Author: GetAway <get...@t-...> Date: Fri Nov 29 08:23:21 2013 +0100 xfsprogs: fix building with newer compiler @Kernel 2.6 Signed-off-by: Thilo Graf <db...@no...> diff --git a/config/eglibc.config b/config/eglibc.config index 7f902e4..fdad281 100644 --- a/config/eglibc.config +++ b/config/eglibc.config @@ -9,7 +9,7 @@ OPTION_EGLIBC_ENVZ = n OPTION_EGLIBC_FCVT = n OPTION_EGLIBC_FMTMSG = n OPTION_EGLIBC_FSTAB = n -OPTION_EGLIBC_FTRAVERSE = n +OPTION_EGLIBC_FTRAVERSE = y OPTION_EGLIBC_GETLOGIN = n OPTION_EGLIBC_IDN = n OPTION_EGLIBC_INET_ANL = n diff --git a/make/ide-apps.mk b/make/ide-apps.mk index 79d2ee9..985a7e7 100644 --- a/make/ide-apps.mk +++ b/make/ide-apps.mk @@ -81,6 +81,8 @@ $(flashprefix)/root/bin/mount: utillinux | $(flashprefix)/root if ENABLE_UCLIBC E2FSPROGSOPT=--disable-tls XFSPROGSOPT=ac_cv_header_aio_h=yes ac_cv_lib_rt_lio_listio=yes +else +XFSPROGSOPT=LDFLAGS="-luuid -lrt" endif #e2fs2progs commit 23848a2c7d43b6bfe884cbe2a2f47f66e7433674 Author: GetAway <get...@t-...> Date: Fri Nov 29 08:19:32 2013 +0100 eglibc: EGLIBC_LOCALE_CODE enabled to build hddtemp with newer compiler @Kernel 2.6 Signed-off-by: Thilo Graf <db...@no...> diff --git a/config/eglibc.config b/config/eglibc.config index db4032d..7f902e4 100644 --- a/config/eglibc.config +++ b/config/eglibc.config @@ -14,7 +14,7 @@ OPTION_EGLIBC_GETLOGIN = n OPTION_EGLIBC_IDN = n OPTION_EGLIBC_INET_ANL = n OPTION_EGLIBC_LIBM_BIG = n -OPTION_EGLIBC_LOCALE_CODE = n +OPTION_EGLIBC_LOCALE_CODE = y OPTION_EGLIBC_MEMUSAGE = n OPTION_EGLIBC_NIS = n OPTION_EGLIBC_RCMD = n ----------------------------------------------------------------------- Summary of changes: config/eglibc.config | 4 ++-- make/ide-apps.mk | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) -- Tuxbox-GIT: cdk |
From: Thilo G. <tux...@ne...> - 2013-11-29 19:38:06
|
Project "Tuxbox-GIT: cdk": The branch, master has been updated via 01b50e825114b461ffad468b5d11fa4fa34cc832 (commit) from 7868daf277c2c31d31d814e15cf495372cac74e8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 01b50e825114b461ffad468b5d11fa4fa34cc832 Author: Stefan Seyfried <se...@tu...> Date: Fri Nov 29 13:42:44 2013 +0100 openntpd: fix build with gcc4.7/eglibc Signed-off-by: Thilo Graf <db...@no...> diff --git a/make/contrib-apps.mk b/make/contrib-apps.mk index b45009d..5ca2fe6 100644 --- a/make/contrib-apps.mk +++ b/make/contrib-apps.mk @@ -554,10 +554,14 @@ $(DEPDIR)/openntpd: bootstrap @DEPENDS_openntpd@ cd @DIR_openntpd@ && \ ln -s `which $(target)-strip` strip; \ echo "ac_cv_path_AR=$(target)-ar" > config.cache; \ + echo "ac_cv_func_setproctitle=no" >> config.cache; \ + echo "ac_cv_func_arc4random=no" >> config.cache; \ + echo "ac_cv_func_strlcpy=no" >> config.cache; \ $(BUILDENV) ./configure --cache-file=config.cache \ --build=$(build) \ --host=$(target) \ --prefix= \ + --with-builtin-arc4random \ --sysconfdir=/var/etc --with-privsep-user=nobody --with-privsep-path=/share/empty && \ $(MAKE) all &&\ PATH=.:$(PATH) @INSTALL_openntpd@ ----------------------------------------------------------------------- Summary of changes: make/contrib-apps.mk | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) -- Tuxbox-GIT: cdk |
From: Thilo G. <tux...@ne...> - 2013-11-29 07:15:30
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via e5d7bf233791791d64b7dd0a5cbb7c60e7298ec7 (commit) from eab429d4a91136d658e1e7dbc02c843644078f71 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e5d7bf233791791d64b7dd0a5cbb7c60e7298ec7 Author: GetAway <get...@t-...> Date: Mon Nov 18 19:58:05 2013 +0100 sudoku: add missing include for newer gcc Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/plugins/fx2/sudoku/menu.cpp b/tuxbox/plugins/fx2/sudoku/menu.cpp index 461d976..1412cd0 100644 --- a/tuxbox/plugins/fx2/sudoku/menu.cpp +++ b/tuxbox/plugins/fx2/sudoku/menu.cpp @@ -21,6 +21,7 @@ #include "menu.h" +#include <cstdio> #include <stdarg.h> //#define TEST ----------------------------------------------------------------------- Summary of changes: tuxbox/plugins/fx2/sudoku/menu.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- Tuxbox-GIT: apps |
From: Thilo G. <tux...@ne...> - 2013-11-28 08:50:02
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via eab429d4a91136d658e1e7dbc02c843644078f71 (commit) via 2d4c0588534006dc9b2d82065884b1a49228d7b6 (commit) via 4d8ddc9c0e1944afe28ff491af1549125eb52bae (commit) via fc1448d474ae1336fc006ad6e7c216743c57ca60 (commit) via a85f03f84b71c63dc0cd097d87950585a54d0a53 (commit) via cd85f180be5169b67932c7bed28ebf3c2740b0f7 (commit) via c934dfac1c77cd5e9dc8ba3d5fb9eacf935fcbb2 (commit) via 101a29e13e4c1b150e63bc134390cce15e04528b (commit) via cffa2be562c641fc8fb53a9c764167e273d1fd08 (commit) via 58ee586e3feec9f2964e8bf6756c80baa03b6199 (commit) via 9d0db55a47c86b50b25a02ff6bbe441bbcca7f67 (commit) via da1f5ec250e57b0bda6440b7bd915d98adaf4c40 (commit) via 89a1b556d44bb70d7f7a2c2a5430e09c6d951cda (commit) via 93512b78e8b6b07afc9f1502d63aabd6ebcb6d7c (commit) via 634835349a378951137f0c4c0781b650d74e5fd6 (commit) via 465f70fd399675ef68c1aa6df12d613c28f3fba2 (commit) via d6e3be234df5a7000f73c51b60009df1906d43e6 (commit) via 15ed627ba11e2409a29df510671de3ef93b9e209 (commit) via 091a86dc9533a83d2c37db213fafdea2f058cf03 (commit) via aa6175dd19654837b31e830872ea5f2eb643b1e0 (commit) via fb77773d8712040a98098fade59a004fa5d63c87 (commit) via 8fffa3f8c4fc80d2fef73bacbb123c5fbb0418e2 (commit) via 92d0c2a25cdcf1860eab634404f62639741fbd33 (commit) via 2763e238cf350f64b4955f7249ddbc245d4fc6d0 (commit) via 7b81882eb1663999ce5b12442dd4db3e7da9259b (commit) via 85aacb3b3758beb9c02b2abc6d0b66e38ed28000 (commit) from cda11023b20bf911fe2157dca2ac0b7ab3c584bb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit eab429d4a91136d658e1e7dbc02c843644078f71 Author: Christian Schuett <Gau...@ho...> Date: Sun Nov 17 19:59:05 2013 +0100 Neutrino LCDD: update 'percentOver' also while in menus Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/driver/lcdd.cpp b/tuxbox/neutrino/src/driver/lcdd.cpp index d838dd3..42ac881 100644 --- a/tuxbox/neutrino/src/driver/lcdd.cpp +++ b/tuxbox/neutrino/src/driver/lcdd.cpp @@ -698,14 +698,16 @@ void CLCD::showVolume(const char vol, const bool perform_update) void CLCD::showPercentOver(const unsigned char perc, const bool perform_update, const MODES m) { - if (mode != m) + bool tsmode = (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_ts); + if (m == MODE_TVRADIO && tsmode || m == MODE_MOVIE && !tsmode) return; - int left, top, width, height = 5; - bool draw = true; percentOver = perc; if (mode == MODE_TVRADIO || mode == MODE_MOVIE) { + int left, top, width, height = 5; + bool draw = true; + if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == STATUSLINE_PLAYTIME) { left = 12; top = 55; width = 60; commit 2d4c0588534006dc9b2d82065884b1a49228d7b6 Author: GetAway <get...@t-...> Date: Fri Nov 15 08:56:58 2013 +0100 fix error with newer compiler Signed-off-by: Thilo Graf <db...@no...> diff --git a/dvb/zapit/src/pzapit.cpp b/dvb/zapit/src/pzapit.cpp index 5da11c0..f9610c7 100644 --- a/dvb/zapit/src/pzapit.cpp +++ b/dvb/zapit/src/pzapit.cpp @@ -23,6 +23,7 @@ */ #include <cstdio> +#include <cstdlib> #include <cstring> #include <iostream> #include <unistd.h> /* sleep */ diff --git a/misc/libs/libconfigfile/configfile.cpp b/misc/libs/libconfigfile/configfile.cpp index 2291f95..b8e154b 100644 --- a/misc/libs/libconfigfile/configfile.cpp +++ b/misc/libs/libconfigfile/configfile.cpp @@ -33,6 +33,7 @@ #include <cstring> #include <sys/stat.h> +#include <unistd.h> CConfigFile::CConfigFile(const char p_delimiter, const bool p_saveDefaults) { diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index 47e5d26..eb68fab 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -64,6 +64,8 @@ #include <daemonc/remotecontrol.h> #include <zapit/client/zapittools.h> +#include <algorithm> + extern CBouquetList * bouquetList; /* neutrino.cpp */ extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ extern CZapitClient::SatelliteList satList; commit 4d8ddc9c0e1944afe28ff491af1549125eb52bae Author: Stefan Seyfried <se...@tu...> Date: Sat Nov 9 20:52:08 2013 +0100 Neutrino: remove unneeded CConfigFile from lcdd and shutdown_count Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/driver/lcdd.cpp b/tuxbox/neutrino/src/driver/lcdd.cpp index 697919b..d838dd3 100644 --- a/tuxbox/neutrino/src/driver/lcdd.cpp +++ b/tuxbox/neutrino/src/driver/lcdd.cpp @@ -7,7 +7,7 @@ Homepage: http://dbox.cyberphoria.org/ Copyright (C) 2008 Novell, Inc. Author: Stefan Seyfried - (C) 2009 Stefan Seyfried + (C) 2009-2013 Stefan Seyfried License: GPL @@ -53,7 +53,6 @@ extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ CLCD::CLCD() - : configfile('\t') { #ifdef LCD_UPDATE m_fileList = NULL; diff --git a/tuxbox/neutrino/src/driver/lcdd.h b/tuxbox/neutrino/src/driver/lcdd.h index 6e32fc2..4228809 100644 --- a/tuxbox/neutrino/src/driver/lcdd.h +++ b/tuxbox/neutrino/src/driver/lcdd.h @@ -43,8 +43,8 @@ #include "driver/file.h" #endif // LCD_UPDATE -#include <configfile.h> #include <pthread.h> +#include <string> #include <lcddisplay/fontrenderer.h> @@ -131,7 +131,6 @@ class CLCD bool muted; bool showclock; bool movie_is_ac3; - CConfigFile configfile; pthread_t thrTime; int last_toggle_state_power; int clearClock; diff --git a/tuxbox/neutrino/src/driver/shutdown_count.cpp b/tuxbox/neutrino/src/driver/shutdown_count.cpp index 08b1bcb..688bd85 100644 --- a/tuxbox/neutrino/src/driver/shutdown_count.cpp +++ b/tuxbox/neutrino/src/driver/shutdown_count.cpp @@ -37,7 +37,6 @@ SHTDCNT::SHTDCNT() - : configfile('\t') { } diff --git a/tuxbox/neutrino/src/driver/shutdown_count.h b/tuxbox/neutrino/src/driver/shutdown_count.h index 2bf7efe..81a68a2 100644 --- a/tuxbox/neutrino/src/driver/shutdown_count.h +++ b/tuxbox/neutrino/src/driver/shutdown_count.h @@ -26,7 +26,6 @@ #ifndef __shutdown_count__ #define __shutdown_count__ -#include <configfile.h> #include <pthread.h> class SHTDCNT @@ -35,7 +34,6 @@ class SHTDCNT pthread_t thrTime; unsigned int shutdown_cnt; - CConfigFile configfile; void shutdown_counter(); SHTDCNT(); commit fc1448d474ae1336fc006ad6e7c216743c57ca60 Author: Christian Schuett <Gau...@ho...> Date: Fri Nov 8 18:28:05 2013 +0100 Neutrino moviebrowser: don't save selection if cancelled while playing Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp index 8dbd284..6c9e6c9 100644 --- a/tuxbox/neutrino/src/gui/moviebrowser.cpp +++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp @@ -1104,9 +1104,13 @@ int CMovieBrowser::exec(const char* path, const int playstate) hide(); //TRACE(" return %d\r\n",res); - m_prevBrowserSelection = m_currentBrowserSelection; - m_prevRecordSelection = m_currentRecordSelection; - m_prevPlaySelection = m_currentPlaySelection; + // save current selection if movie has to be played or is not playing + if (res == true || m_playstate == CMoviePlayerGui::STOPPED) + { + m_prevBrowserSelection = m_currentBrowserSelection; + m_prevRecordSelection = m_currentRecordSelection; + m_prevPlaySelection = m_currentPlaySelection; + } saveSettings(&m_settings); // might be better done in ~CMovieBrowser, but for any reason this does not work if MB is killed by neutrino shutdown commit a85f03f84b71c63dc0cd097d87950585a54d0a53 Author: Christian Schuett <Gau...@ho...> Date: Thu Nov 7 19:48:52 2013 +0100 Neutrino moviebrowser: prevent reload while playing to avoid a segfault Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp index 2eaf4f4..8dbd284 100644 --- a/tuxbox/neutrino/src/gui/moviebrowser.cpp +++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp @@ -444,6 +444,7 @@ void CMovieBrowser::init(void) m_textTitle = g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD); m_currentStartPos = 0; + m_playstate = CMoviePlayerGui::STOPPED; m_movieSelectionHandler = NULL; m_currentBrowserSelection = 0; @@ -899,7 +900,7 @@ int CMovieBrowser::exec(CMenuTarget* parent, const std::string & actionKey) else if(actionKey == "run") { if(parent) parent->hide (); - exec(NULL); + exec(NULL, CMoviePlayerGui::STOPPED); } else if(actionKey == "book_clear_all") { @@ -919,7 +920,7 @@ int CMovieBrowser::exec(CMenuTarget* parent, const std::string & actionKey) return returnval; } -int CMovieBrowser::exec(const char* path) +int CMovieBrowser::exec(const char* path, const int playstate) { bool res = false; @@ -951,6 +952,8 @@ int CMovieBrowser::exec(const char* path) else m_selectedDir = "/"; + m_playstate = playstate; + if(paint() == false) return res;// paint failed due to less memory , exit @@ -1107,8 +1110,8 @@ int CMovieBrowser::exec(const char* path) saveSettings(&m_settings); // might be better done in ~CMovieBrowser, but for any reason this does not work if MB is killed by neutrino shutdown - // make stale if we should reload the next time, but not if movie has to be played - if(m_vMovieInfo.empty() || (m_settings.reload == true && res == false)) + // make stale if we should reload the next time, but not if movie has to be played or is playing + if(m_vMovieInfo.empty() || (m_settings.reload == true && res == false && m_playstate == CMoviePlayerGui::STOPPED)) { TRACE("[mb] force reload next time\r\n"); fileInfoStale(); @@ -1646,11 +1649,14 @@ void CMovieBrowser::refreshTitle(void) 0, true); // UTF-8 - int iconw, iconh; - CFrameBuffer::getInstance()->getIconSize(NEUTRINO_ICON_BUTTON_DBOX, &iconw, &iconh); - m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_DBOX, - m_cBoxFrameTitleRel.iX + m_cBoxFrameTitleRel.iWidth - iconw - 12, - m_cBoxFrameTitleRel.iY + m_cBoxFrameTitleRel.iHeight / 2 - iconh / 2); + if(m_playstate == CMoviePlayerGui::STOPPED) + { + int iconw, iconh; + CFrameBuffer::getInstance()->getIconSize(NEUTRINO_ICON_BUTTON_DBOX, &iconw, &iconh); + m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_DBOX, + m_cBoxFrameTitleRel.iX + m_cBoxFrameTitleRel.iWidth - iconw - 12, + m_cBoxFrameTitleRel.iY + m_cBoxFrameTitleRel.iHeight / 2 - iconh / 2); + } } /************************************************************************ @@ -1817,8 +1823,11 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) } else if (msg == CRCInput::RC_blue) { - loadMovies(); - refresh(); + if(m_playstate == CMoviePlayerGui::STOPPED) + { + loadMovies(); + refresh(); + } } else if (msg == CRCInput::RC_red ) { @@ -1858,7 +1867,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) } else if (msg == CRCInput::RC_setup) { - if(m_movieSelectionHandler != NULL) + if(m_playstate == CMoviePlayerGui::STOPPED && m_movieSelectionHandler != NULL) showMenu(m_movieSelectionHandler); } #ifdef MOVEMANAGER @@ -3179,7 +3188,7 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/) /** main menu ******************************************************/ CMovieHelp* movieHelp = new CMovieHelp(); #ifdef ENABLE_GUI_MOUNT - CNFSSmallMenu* nfs = new CNFSSmallMenu(); + //CNFSSmallMenu* nfs = new CNFSSmallMenu(); #endif CMenuWidget mainMenu(LOCALE_MOVIEBROWSER_MENU_MAIN_HEAD, NEUTRINO_ICON_STREAMING); @@ -3240,7 +3249,7 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/) delete movieHelp; #ifdef ENABLE_GUI_MOUNT - delete nfs; + //delete nfs; #endif //restart_mb_timeout = 1; diff --git a/tuxbox/neutrino/src/gui/moviebrowser.h b/tuxbox/neutrino/src/gui/moviebrowser.h index 658622f..029b8e1 100644 --- a/tuxbox/neutrino/src/gui/moviebrowser.h +++ b/tuxbox/neutrino/src/gui/moviebrowser.h @@ -252,6 +252,7 @@ class CMovieBrowser : public CMenuTarget MI_MOVIE_INFO* m_movieSelectionHandler; int m_currentStartPos; + int m_playstate; std::string m_selectedDir; MB_FOCUS m_windowFocus; @@ -283,7 +284,7 @@ class CMovieBrowser : public CMenuTarget CMovieBrowser(const char* path); //P1 CMovieBrowser(); //P1 ~CMovieBrowser(); //P1 - int exec(const char* path); //P1 + int exec(const char* path, const int playstate); //P1 int exec(CMenuTarget* parent, const std::string & actionKey); std::string getCurrentDir(void); //P1 for FileBrowser compatibility CFile* getSelectedFile(void); //P1 for FileBrowser compatibility diff --git a/tuxbox/neutrino/src/gui/movieplayer.cpp b/tuxbox/neutrino/src/gui/movieplayer.cpp index 4a621a8..c5a30de 100644 --- a/tuxbox/neutrino/src/gui/movieplayer.cpp +++ b/tuxbox/neutrino/src/gui/movieplayer.cpp @@ -3404,7 +3404,7 @@ void CMoviePlayerGui::PlayFile (int parental) if(isMovieBrowser == true) { // start the moviebrowser instead of the filebrowser - if(CMovieBrowser::getInstance()->exec(Path_local.c_str())) + if(CMovieBrowser::getInstance()->exec(Path_local.c_str(), g_playstate)) { // get the current path and file name Path_local = CMovieBrowser::getInstance()->getCurrentDir(); commit cd85f180be5169b67932c7bed28ebf3c2740b0f7 Author: Christian Schuett <Gau...@ho...> Date: Wed Nov 6 19:15:14 2013 +0100 nhttpd controlapi: rename XML tag for conformity with Neutrino-HD Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp index 269ed2b..0148c55 100644 --- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp @@ -1063,7 +1063,7 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh) 100 * (now - currentNextInfo.current_zeit.startzeit) / currentNextInfo.current_zeit.dauer : 0; hh->WriteLn("\t<firstEPG>"); - hh->printf("\t\t<id>%llu</id>\n" + hh->printf("\t\t<eventid>%llu</eventid>\n" "\t\t<startTime>%s</startTime>\n" "\t\t<description><![CDATA[%s]]></description>\n" "\t\t<timeElapsed>%d</timeElapsed>\n" @@ -1081,7 +1081,7 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh) { timestr = timeString(currentNextInfo.next_zeit.startzeit); hh->WriteLn("\t<secondEPG>"); - hh->printf("\t\t<id>%llu</id>\n" + hh->printf("\t\t<eventid>%llu</eventid>\n" "\t\t<startTime>%s</startTime>\n" "\t\t<description><![CDATA[%s]]></description>\n" "\t\t<timeTotal>%d</timeTotal>\n", commit c934dfac1c77cd5e9dc8ba3d5fb9eacf935fcbb2 Author: Christian Schuett <Gau...@ho...> Date: Mon Nov 4 19:42:26 2013 +0100 Neutrino: also restore bouquet of current channel if EXIT_ALL requested Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index c1d0bb0..30bbc81 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -2477,7 +2477,7 @@ void CNeutrinoApp::RealRun(CMenuWidget &menu) { channelList->zapTo(bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->getKey(nNewChannel)-1); } - else if(nNewChannel == -1) + else { bouquetList->adjustToChannel(channelList->getActiveChannelNumber()); } commit 101a29e13e4c1b150e63bc134390cce15e04528b Author: Christian Schuett <Gau...@ho...> Date: Sat Nov 2 19:27:37 2013 +0100 Neutrino deutsch.locale: use some more suitable locales Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale index 0c4d7ab..46a4f41 100644 --- a/tuxbox/neutrino/data/locale/deutsch.locale +++ b/tuxbox/neutrino/data/locale/deutsch.locale @@ -1019,9 +1019,9 @@ networkmenu.ntptitle Zeitsynchronisation networkmenu.reset_settings_now Sollen die vorherigen Einstellungen \nwieder hergestellt werden? networkmenu.samba Sambaserver networkmenu.setupnow Netzwerkeinstellungen jetzt zuweisen -networkmenu.setuponstartup Beim Starten Netzwerk setzen +networkmenu.setuponstartup Netzwerk beim Start aktivieren networkmenu.setupsaved Ãnderungen wurden gespeichert, aber noch \nnicht zugewiesen. Diese werden erst \nnach einem Neustart wirksam! -networkmenu.show aktive Netzwerkeinstellungen zeigen +networkmenu.show Aktive Netzwerkeinstellungen anzeigen networkmenu.test Netzwerk testen nfs.alreadymounted Verzeichnis bereits gemountet. nfs.automount Beim Start mounten @@ -1340,7 +1340,7 @@ servicemenu.reload_hint Kanallisten werden neu geladen,\nbitte warten... servicemenu.restart Neutrino neu starten servicemenu.restart_failed Neustart von Neutrino schlug fehl. servicemenu.restart_hint Neutrino wird neu gestartet... -servicemenu.restart_refused_recording Aufnahme läuft. Restart nicht möglich. +servicemenu.restart_refused_recording Aufnahme läuft. Neustart nicht möglich. servicemenu.scanmodes Scan-Modi servicemenu.scants Kanalsuche servicemenu.ucodecheck UCodes überprüfen commit cffa2be562c641fc8fb53a9c764167e273d1fd08 Author: Christian Schuett <Gau...@ho...> Date: Sat Nov 2 16:36:48 2013 +0100 Neutrino: calculate width of character input fields this prevents characters from overflowing its input fields with bigger horizontal font scale Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/widget/stringinput.cpp b/tuxbox/neutrino/src/gui/widget/stringinput.cpp index bb242f9..9476706 100644 --- a/tuxbox/neutrino/src/gui/widget/stringinput.cpp +++ b/tuxbox/neutrino/src/gui/widget/stringinput.cpp @@ -104,7 +104,8 @@ CStringInput::~CStringInput() void CStringInput::init() { - width = (size*20)+40; + cwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("M") + 1; + width = (size * cwidth) + 40; if (width<420) width = 420; @@ -496,7 +497,7 @@ void CStringInput::paint() void CStringInput::paintChar(int pos, const char c) { - const int xs = 20; + int xs = cwidth; int ys = mheight; int xpos = x+ 20+ pos* xs; int ypos = y+ hheight+ 25; diff --git a/tuxbox/neutrino/src/gui/widget/stringinput.h b/tuxbox/neutrino/src/gui/widget/stringinput.h index 16c5665..40b6ae4 100644 --- a/tuxbox/neutrino/src/gui/widget/stringinput.h +++ b/tuxbox/neutrino/src/gui/widget/stringinput.h @@ -48,6 +48,7 @@ class CStringInput : public CMenuTarget int x; int y; int width; + int cwidth; int height; int hheight; // head font height int hiconheight; diff --git a/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp b/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp index 7e659da..868bd5c 100644 --- a/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp +++ b/tuxbox/neutrino/src/gui/widget/stringinput_ext.cpp @@ -294,7 +294,7 @@ void CExtendedInput::paint() CExtendedInput_Item_Char::CExtendedInput_Item_Char(const std::string & Chars, bool Selectable ) { frameBuffer = CFrameBuffer::getInstance(); - idx = 20; + idx = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("M") + 1; idy = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); allowedChars = Chars; selectable = Selectable; commit 58ee586e3feec9f2964e8bf6756c80baa03b6199 Author: Christian Schuett <Gau...@ho...> Date: Fri Nov 1 22:18:19 2013 +0100 Neutrino string input: copy valueString to value in ::exec to follow external valueString updates based on patch by [CST] Focus <foc...@gm...> in Coolstream Git Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/widget/stringinput.cpp b/tuxbox/neutrino/src/gui/widget/stringinput.cpp index 73f77e7..bb242f9 100644 --- a/tuxbox/neutrino/src/gui/widget/stringinput.cpp +++ b/tuxbox/neutrino/src/gui/widget/stringinput.cpp @@ -78,10 +78,6 @@ CStringInput::CStringInput(const neutrino_locale_t Name, std::string* Value, int name = Name; value = new char[Size+1]; value[Size] = '\0'; - if (ValueIsUtf8) - strncpy(value, ZapitTools::UTF8_to_Latin1(Value->c_str()).c_str(), Size); - else - strncpy(value, Value->c_str(), Size); valueString = Value; valueStringIsUtf8 = ValueIsUtf8; size = Size; @@ -306,6 +302,14 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) if (parent) parent->hide(); + if (valueString != NULL) + { + if (valueStringIsUtf8) + strncpy(value, ZapitTools::UTF8_to_Latin1(valueString->c_str()).c_str(), size); + else + strncpy(value, valueString->c_str(), size); + } + for(int count=strlen(value)-1;count<size-1;count++) strcat(value, " "); strncpy(oldval, value, size); commit 9d0db55a47c86b50b25a02ff6bbe441bbcca7f67 Author: Christian Schuett <Gau...@ho...> Date: Wed Oct 30 21:14:21 2013 +0100 Neutrino timer list: fix overlapping texts with new standard font Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp index 62938a3..805e9d8 100644 --- a/tuxbox/neutrino/src/gui/timerlist.cpp +++ b/tuxbox/neutrino/src/gui/timerlist.cpp @@ -635,7 +635,7 @@ void CTimerList::paintItem(int pos) sprintf(srepeatcount,"00"); else sprintf(srepeatcount,"%ux",timer.repeatCount); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10+time_width+(real_width-10-time_width-140)/2, ypos+fheight, (real_width-10-time_width)/2-5, srepeatcount, color, fheight, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10+time_width+(real_width-10-time_width-110)/2, ypos+fheight, (real_width-10-time_width)/2-5, srepeatcount, color, fheight, true); // UTF-8 } g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10+time_width+(real_width-10-time_width)/2, ypos+fheight, (real_width-10-time_width)/2-5, convertTimerType2String(timer.eventType), color, fheight, true); // UTF-8 std::string zAddData(""); commit da1f5ec250e57b0bda6440b7bd915d98adaf4c40 Author: GetAway <get...@t-...> Date: Mon Oct 28 15:34:20 2013 +0100 neutrino: improve timeset event output Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/driver/rcinput.cpp b/tuxbox/neutrino/src/driver/rcinput.cpp index a62443c..a2a6fcd 100644 --- a/tuxbox/neutrino/src/driver/rcinput.cpp +++ b/tuxbox/neutrino/src/driver/rcinput.cpp @@ -1308,29 +1308,31 @@ void CRCInput::getMsg_us(neutrino_msg_t *msg, neutrino_msg_data_t *data, unsigne { gettimeofday(&tv, NULL); long long timeOld = tv.tv_usec + tv.tv_sec * 1000000LL; + long long timediff; time_t dvbtime = *((time_t*)p); if (dvbtime) { + timediff = (long long)dvbtime * 1000000LL - timeOld; printf("[neutrino] timeset event. "); - time_t difftime = dvbtime - tv.tv_sec; - if (abs(difftime) > 120) + time_t diff_time = dvbtime - tv.tv_sec; + if (abs(diff_time) > 120) { - printf("difference is %ld s, stepping...\n", difftime); + printf("difference is %ld s, stepping...\n", diff_time); tv.tv_sec = dvbtime; tv.tv_usec = 0; if (settimeofday(&tv, NULL) < 0) perror("[neutrino] settimeofday"); } - else if (difftime != 0) + else if (diff_time != 0) { struct timeval oldd; - tv.tv_sec = difftime; - tv.tv_usec = 0; + tv.tv_sec = timediff / 1000000LL; + tv.tv_usec = timediff % 1000000LL; if (adjtime(&tv, &oldd)) perror("adjtime"); - long long t = oldd.tv_sec * 1000000LL + oldd.tv_usec; - printf("difference is %ld s, using adjtime(). oldd: %lld us\n", difftime, t); + printf("difference is %ld s (< 120s), using adjtime(%d, %d). oldd(%d, %d)\n", diff_time, + (int)tv.tv_sec, (int)tv.tv_usec, (int)oldd.tv_sec, (int)oldd.tv_usec); } else printf("difference is 0 s, nothing to do...\n"); commit 89a1b556d44bb70d7f7a2c2a5430e09c6d951cda Author: Christian Schuett <Gau...@ho...> Date: Mon Oct 28 18:11:31 2013 +0100 Neutrino SMS string input: update cursor on LCD after pressing up or down Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/widget/stringinput.cpp b/tuxbox/neutrino/src/gui/widget/stringinput.cpp index 9c97947..73f77e7 100644 --- a/tuxbox/neutrino/src/gui/widget/stringinput.cpp +++ b/tuxbox/neutrino/src/gui/widget/stringinput.cpp @@ -629,6 +629,7 @@ void CStringInputSMS::keyUpPressed() selected = 0; paintChar(lastselected); paintChar(selected); + CLCD::getInstance()->showMenuText(1, value, selected+1); } } @@ -652,6 +653,7 @@ void CStringInputSMS::keyDownPressed() paintChar(lastselected); paintChar(selected); + CLCD::getInstance()->showMenuText(1, value, selected+1); } void CStringInputSMS::keyLeftPressed() commit 93512b78e8b6b07afc9f1502d63aabd6ebcb6d7c Author: Christian Schuett <Gau...@ho...> Date: Sun Oct 27 15:10:26 2013 +0100 Neutrino: close all windows on dbox key in event list and EPG viewer Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/epgview.cpp b/tuxbox/neutrino/src/gui/epgview.cpp index 8600269..ee3ddb7 100644 --- a/tuxbox/neutrino/src/gui/epgview.cpp +++ b/tuxbox/neutrino/src/gui/epgview.cpp @@ -844,6 +844,11 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_ loop = false; break; + case CRCInput::RC_setup: + loop = false; + res = menu_return::RETURN_EXIT_ALL; + break; + default: // konfigurierbare Keys handlen... if (msg == g_settings.key_channelList_cancel) diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index 16c0864..a276c66 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -618,6 +618,11 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]); } } + else if (msg == CRCInput::RC_setup) + { + loop = false; + res = menu_return::RETURN_EXIT_ALL; + } else { if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) commit 634835349a378951137f0c4c0781b650d74e5fd6 Author: Christian Schuett <Gau...@ho...> Date: Sun Oct 27 14:54:11 2013 +0100 Neutrino string input: update cursor on LCD after pressing left or right Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/widget/stringinput.cpp b/tuxbox/neutrino/src/gui/widget/stringinput.cpp index a2fd32f..9c97947 100644 --- a/tuxbox/neutrino/src/gui/widget/stringinput.cpp +++ b/tuxbox/neutrino/src/gui/widget/stringinput.cpp @@ -249,6 +249,7 @@ void CStringInput::keyLeftPressed() selected=size-1; paintChar(osel); paintChar(selected); + CLCD::getInstance()->showMenuText(1, value, selected+1); } } @@ -262,6 +263,7 @@ void CStringInput::keyRightPressed() selected=0; paintChar(osel); paintChar(selected); + CLCD::getInstance()->showMenuText(1, value, selected+1); } } commit 465f70fd399675ef68c1aa6df12d613c28f3fba2 Author: Christian Schuett <Gau...@ho...> Date: Sat Oct 26 23:01:25 2013 +0200 Neutrino eventlist: allow number buttons in button bar Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index 5b9bf50..16c0864 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -831,6 +831,7 @@ void EventList::showFunctionBar (bool show) CKeyHelper keyhelper; neutrino_msg_t dummy = CRCInput::RC_nokey; const char * icon = NULL; + std::string number_icons[5]; std::string btncaption; bx = x + 5; @@ -853,7 +854,14 @@ void EventList::showFunctionBar (bool show) if ((g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) && (g_settings.key_channelList_addrecord != CRCInput::RC_nokey)) { - keyhelper.get(&dummy, &icon, g_settings.key_channelList_addrecord); + if (CRCInput::isNumeric(g_settings.key_channelList_addrecord)) + { + number_icons[0] = CRCInput::getKeyName(g_settings.key_channelList_addrecord); + number_icons[0] += ".raw"; + icon = number_icons[0].c_str(); + } + else + keyhelper.get(&dummy, &icon, g_settings.key_channelList_addrecord); EventListButtons[0].button = icon; if(is_timer & EventList::TIMER_RECORD ) @@ -878,7 +886,14 @@ void EventList::showFunctionBar (bool show) // Button: Event Search if (!showfollow && g_settings.key_channelList_search != CRCInput::RC_nokey) { - keyhelper.get(&dummy, &icon, g_settings.key_channelList_search); + if (CRCInput::isNumeric(g_settings.key_channelList_search)) + { + number_icons[1] = CRCInput::getKeyName(g_settings.key_channelList_search); + number_icons[1] += ".raw"; + icon = number_icons[1].c_str(); + } + else + keyhelper.get(&dummy, &icon, g_settings.key_channelList_search); EventListButtons[1].button = icon; btncaption = g_Locale->getText(LOCALE_EVENTFINDER_SEARCH); @@ -894,7 +909,14 @@ void EventList::showFunctionBar (bool show) // Button: Timer Channelswitch if (g_settings.key_channelList_addremind != CRCInput::RC_nokey) { - keyhelper.get(&dummy, &icon, g_settings.key_channelList_addremind); + if (CRCInput::isNumeric(g_settings.key_channelList_addremind)) + { + number_icons[2] = CRCInput::getKeyName(g_settings.key_channelList_addremind); + number_icons[2] += ".raw"; + icon = number_icons[2].c_str(); + } + else + keyhelper.get(&dummy, &icon, g_settings.key_channelList_addremind); EventListButtons[2].button = icon; if(is_timer & EventList::TIMER_ZAPTO) @@ -919,7 +941,14 @@ void EventList::showFunctionBar (bool show) // Button: Event Re-Sort if (!showfollow && g_settings.key_channelList_sort != CRCInput::RC_nokey) { - keyhelper.get(&dummy, &icon, g_settings.key_channelList_sort); + if (CRCInput::isNumeric(g_settings.key_channelList_sort)) + { + number_icons[3] = CRCInput::getKeyName(g_settings.key_channelList_sort); + number_icons[3] += ".raw"; + icon = number_icons[3].c_str(); + } + else + keyhelper.get(&dummy, &icon, g_settings.key_channelList_sort); EventListButtons[3].button = icon; btncaption = g_Locale->getText(LOCALE_EVENTLISTBAR_EVENTSORT); @@ -935,7 +964,14 @@ void EventList::showFunctionBar (bool show) // Button: Event Reload/Refresh if (!showfollow && !m_showSearchResults && g_settings.key_channelList_reload != CRCInput::RC_nokey) { - keyhelper.get(&dummy, &icon, g_settings.key_channelList_reload); + if (CRCInput::isNumeric(g_settings.key_channelList_reload)) + { + number_icons[4] = CRCInput::getKeyName(g_settings.key_channelList_reload); + number_icons[4] += ".raw"; + icon = number_icons[4].c_str(); + } + else + keyhelper.get(&dummy, &icon, g_settings.key_channelList_reload); EventListButtons[4].button = icon; // paint 5th button diff --git a/tuxbox/neutrino/src/gui/keyhelper.h b/tuxbox/neutrino/src/gui/keyhelper.h index bad1b4f..580d746 100644 --- a/tuxbox/neutrino/src/gui/keyhelper.h +++ b/tuxbox/neutrino/src/gui/keyhelper.h @@ -86,23 +86,23 @@ class CKeyHelper int button = -1; if(prefered_key == CRCInput::RC_red) button = 0; - if(prefered_key == CRCInput::RC_green) + else if(prefered_key == CRCInput::RC_green) button = 1; - if(prefered_key == CRCInput::RC_yellow) + else if(prefered_key == CRCInput::RC_yellow) button = 2; - if(prefered_key == CRCInput::RC_blue) + else if(prefered_key == CRCInput::RC_blue) button = 3; - if(prefered_key == CRCInput::RC_setup) + else if(prefered_key == CRCInput::RC_setup) button = 4; - if(prefered_key == CRCInput::RC_help) + else if(prefered_key == CRCInput::RC_help) button = 5; - if(prefered_key == CRCInput::RC_plus) + else if(prefered_key == CRCInput::RC_plus) button = 6; - if(prefered_key == CRCInput::RC_minus) + else if(prefered_key == CRCInput::RC_minus) button = 7; - if(prefered_key == CRCInput::RC_left) + else if(prefered_key == CRCInput::RC_left) button = 8; - if(prefered_key == CRCInput::RC_right) + else if(prefered_key == CRCInput::RC_right) button = 9; if((button >= 0) && (button < BUTTONMAX) && (color_key_used[button] == true)) { commit d6e3be234df5a7000f73c51b60009df1906d43e6 Author: GetAway <get...@t-...> Date: Sat Oct 26 22:24:31 2013 +0200 sectionsd: use thread-safe functions localtime_r(), ctime_r() ... add some macros for future small improvement for debug output Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/daemons/sectionsd/SIevents.cpp b/tuxbox/neutrino/daemons/sectionsd/SIevents.cpp index 3f48894..15cc153 100644 --- a/tuxbox/neutrino/daemons/sectionsd/SIevents.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/SIevents.cpp @@ -23,6 +23,8 @@ // // +#include <dmxapi.h> +#include "global.h" #include <assert.h> #include <stdio.h> #include <time.h> @@ -43,7 +45,7 @@ #include "SIbouquets.hpp" #include "SInetworks.hpp" #include "SIsections.hpp" -#include <dmxapi.h> + const std::string languangeOFF = "OFF"; diff --git a/tuxbox/neutrino/daemons/sectionsd/SIevents.hpp b/tuxbox/neutrino/daemons/sectionsd/SIevents.hpp index f1d16d1..6d046ff 100644 --- a/tuxbox/neutrino/daemons/sectionsd/SIevents.hpp +++ b/tuxbox/neutrino/daemons/sectionsd/SIevents.hpp @@ -349,7 +349,8 @@ class SItime { (startzeit != t.startzeit); } void dump(void) const { - printf("Startzeit: %s", ctime(&startzeit)); + char tbuf[26]; + printf("Startzeit: %s", ctime_r(&startzeit, tbuf)); printf("Dauer: %02u:%02u:%02u (%umin, %us)\n", dauer/3600, (dauer%3600)/60, dauer%60, dauer/60, dauer); } int saveXML(FILE *file) const { // saves the time @@ -362,7 +363,7 @@ class SItime { fprintf(file, "\t\t\t\t\t<date>%02d.%02d.%04d</date>\n", zeit->tm_mday, zeit->tm_mon+1, zeit->tm_year+1900); fprintf(file, "\t\t\t\t\t<duration>%u</duration>\n", dauer); */ - fprintf(file, "\t\t\t<time start_time=\"%u\" duration=\"%u\"/>\n", startzeit, dauer); + fprintf(file, "\t\t\t<time start_time=\"%u\" duration=\"%u\"/>\n", (unsigned int)startzeit, dauer); return 0; } time_t startzeit; // lokale Zeit, 0 -> time shifted (cinedoms) diff --git a/tuxbox/neutrino/daemons/sectionsd/SIlanguage.cpp b/tuxbox/neutrino/daemons/sectionsd/SIlanguage.cpp index dc30e90..6781469 100644 --- a/tuxbox/neutrino/daemons/sectionsd/SIlanguage.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/SIlanguage.cpp @@ -21,6 +21,7 @@ // #include "SIlanguage.hpp" +#include "global.h" #include <string> #include <vector> diff --git a/tuxbox/neutrino/daemons/sectionsd/SIsections.cpp b/tuxbox/neutrino/daemons/sectionsd/SIsections.cpp index 2b6edb7..0b467ce 100644 --- a/tuxbox/neutrino/daemons/sectionsd/SIsections.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/SIsections.cpp @@ -23,6 +23,8 @@ // // +#include <dmxapi.h> +#include "global.h" #include <stdio.h> #include <unistd.h> #include <fcntl.h> @@ -39,7 +41,7 @@ #include "SIbouquets.hpp" #include "SInetworks.hpp" #include "SIsections.hpp" -#include <dmxapi.h> + #include <zapit/dvbstring.h> #ifdef ENABLE_FREESATEPG #include "FreesatTables.hpp" diff --git a/tuxbox/neutrino/daemons/sectionsd/SIutils.cpp b/tuxbox/neutrino/daemons/sectionsd/SIutils.cpp index 6e191e1..a47ec0d 100644 --- a/tuxbox/neutrino/daemons/sectionsd/SIutils.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/SIutils.cpp @@ -22,6 +22,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // +#include "global.h" #include <stdio.h> #include <time.h> diff --git a/tuxbox/neutrino/daemons/sectionsd/bat.cpp b/tuxbox/neutrino/daemons/sectionsd/bat.cpp index c80a467..95f06d4 100644 --- a/tuxbox/neutrino/daemons/sectionsd/bat.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/bat.cpp @@ -22,6 +22,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // +#include "global.h" #include <stdio.h> #include <time.h> diff --git a/tuxbox/neutrino/daemons/sectionsd/debug.cpp b/tuxbox/neutrino/daemons/sectionsd/debug.cpp index 9f198d0..3822028 100644 --- a/tuxbox/neutrino/daemons/sectionsd/debug.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/debug.cpp @@ -20,16 +20,20 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ + +#include "global.h" #include <stdio.h> #include <time.h> #include <sys/time.h> + bool debug = false; void printdate_ms(FILE *f) { timeval now; gettimeofday(&now, NULL); - struct tm *tm = localtime(&now.tv_sec); + struct tm lt; + localtime_r(&now.tv_sec, <); /* use strftime for that? */ - fprintf(f, "%02d:%02d:%02d.%03ld ", tm->tm_hour, tm->tm_min, tm->tm_sec, now.tv_usec/1000); + fprintf(f, "%02d:%02d:%02d.%03ld ", lt.tm_hour, lt.tm_min, lt.tm_sec, now.tv_usec/1000); } diff --git a/tuxbox/neutrino/daemons/sectionsd/debug.h b/tuxbox/neutrino/daemons/sectionsd/debug.h index 928118b..f29250d 100644 --- a/tuxbox/neutrino/daemons/sectionsd/debug.h +++ b/tuxbox/neutrino/daemons/sectionsd/debug.h @@ -34,6 +34,14 @@ extern bool debug; #define dputs(str) do { if (debug) { printdate_ms(stdout); puts(str); fflush(stdout); }} while (0) #define xprintf(fmt, args...) do { printdate_ms(stderr); fprintf(stderr, fmt, ## args); } while (0) +/* dont add \n when using this */ +#define xcprintf(fmt, args...) do { \ + fprintf(stderr, "%c[%d;%d;%dm", 0x1B, 1, 31, 40);\ + printdate_ms(stderr); \ + fprintf(stderr, fmt, ## args); \ + fprintf(stderr, "%c[%dm\n", 0x1B, 0); \ +} while (0) + void printdate_ms(FILE* f); #endif /* __sectionsd__debug_h__ */ diff --git a/tuxbox/neutrino/daemons/sectionsd/dmx.cpp b/tuxbox/neutrino/daemons/sectionsd/dmx.cpp index 25622be..7b48fc6 100644 --- a/tuxbox/neutrino/daemons/sectionsd/dmx.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/dmx.cpp @@ -26,6 +26,7 @@ #include <dmx.h> #include <dmxapi.h> #include <debug.h> +#include "global.h" #include <endian.h> #include <errno.h> @@ -38,6 +39,7 @@ #include <cstring> #include <map> + /* #define DEBUG_MUTEX 1 #define DEBUG_CACHED_SECTIONS 1 diff --git a/tuxbox/neutrino/daemons/sectionsd/dmxapi.cpp b/tuxbox/neutrino/daemons/sectionsd/dmxapi.cpp index 80ea313..0fd9bb8 100644 --- a/tuxbox/neutrino/daemons/sectionsd/dmxapi.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/dmxapi.cpp @@ -21,7 +21,7 @@ * */ - +#include "global.h" #include <dmxapi.h> #include <stdio.h> /* perror */ @@ -184,11 +184,13 @@ bool getUTC(UTC_t * const UTC, const bool TDT) cc[3] = 0; memcpy(cc, to->country_code, 3); time_t t = changeUTCtoCtime(&b2[2+6],0); + char tbuf[26]; + xprintf("getUTC(TOT): len=%d cc=%s reg_id=%d " "pol=%d offs=%04x new=%04x when=%s", b2[1], cc, to->country_region_id, to->local_time_offset_polarity, htons(to->local_time_offset), - htons(to->next_time_offset), ctime(&t)); + htons(to->next_time_offset), ctime_r(&t, tbuf)); } else { xprintf("getUTC(TOT): descriptor != 0x58: 0x%02x\n", b2[0]); } diff --git a/tuxbox/neutrino/daemons/sectionsd/epg.cpp b/tuxbox/neutrino/daemons/sectionsd/epg.cpp index c78f85f..8dad473 100644 --- a/tuxbox/neutrino/daemons/sectionsd/epg.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/epg.cpp @@ -24,6 +24,7 @@ //#define READ_PRESENT_INFOS +#include "global.h" #include <stdio.h> #include <time.h> diff --git a/tuxbox/neutrino/daemons/sectionsd/epgMini.cpp b/tuxbox/neutrino/daemons/sectionsd/epgMini.cpp index d247def..55bb9c6 100644 --- a/tuxbox/neutrino/daemons/sectionsd/epgMini.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/epgMini.cpp @@ -22,6 +22,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // +#include "global.h" #include <stdio.h> #include <time.h> diff --git a/tuxbox/neutrino/daemons/sectionsd/global.h b/tuxbox/neutrino/daemons/sectionsd/global.h new file mode 100644 index 0000000..d798b1b --- /dev/null +++ b/tuxbox/neutrino/daemons/sectionsd/global.h @@ -0,0 +1,17 @@ +#ifndef GLOBAL_H_ +#define GLOBAL_H_ + +/* =========================== + * sectionsd macros + * =========================== */ +// prevent use of unsafe or not thread-safe functions - u can add more +#define localtime(a) UNSAFE_LOCALTIME_NOT_THREADSAFE_USE_LOCALTIME_R() +#define ctime(a) UNSAFE_CTIME_NOT_THREADSAFE_USE_CS_CTIME_R() +#define gmtime(a) UNSAFE_GMTIME_NOT_THREADSAFE_USE_CS_GMTIME_R() +#define asctime(a) UNSAFE_ASCTIME_NOT_THREADSAFE_USE_ASCTIME_R() + +//#define strcpy(a,b) UNSAFE_STRCPY_USE_CS_STRNCPY_INSTEAD() +//#define sprintf(a,...) UNSAFE_SPRINTF_USE_SNPRINTF_INSTEAD() +//#define strtok(a,b) UNSAFE_STRTOK_USE_STRTOK_R_INSTEAD() + +#endif diff --git a/tuxbox/neutrino/daemons/sectionsd/nit.cpp b/tuxbox/neutrino/daemons/sectionsd/nit.cpp index d73a627..ed45d9d 100644 --- a/tuxbox/neutrino/daemons/sectionsd/nit.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/nit.cpp @@ -22,6 +22,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // +#include "global.h" #include <stdio.h> #include <time.h> diff --git a/tuxbox/neutrino/daemons/sectionsd/sdt.cpp b/tuxbox/neutrino/daemons/sectionsd/sdt.cpp index 248b164..f2a0bfd 100644 --- a/tuxbox/neutrino/daemons/sectionsd/sdt.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/sdt.cpp @@ -22,6 +22,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // +#include "global.h" #include <stdio.h> #include <time.h> diff --git a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp index 03a7886..dc387b0 100644 --- a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp @@ -30,6 +30,7 @@ #include <malloc.h> #include <dmx.h> #include <dmxapi.h> +#include "global.h" #include <debug.h> #include <sys/socket.h> @@ -2443,12 +2444,12 @@ static void sendAllEvents(int connfd, t_channel_id serviceUniqueKey, bool oldFor #define MAX_SIZE_STRTIME 50 char strZeit[MAX_SIZE_STRTIME]; char strZeit2[MAX_SIZE_STRTIME]; - struct tm *tmZeit; - - tmZeit = localtime(&(t->startzeit)); + struct tm tmZeit; + + localtime_r(&t->startzeit, &tmZeit); count += snprintf(strZeit, MAX_SIZE_STRTIME, "%012llx ", (*e)->uniqueKey()); count += snprintf(strZeit2, MAX_SIZE_STRTIME, "%02d.%02d %02d:%02d %u ", - tmZeit->tm_mday, tmZeit->tm_mon + 1, tmZeit->tm_hour, tmZeit->tm_min, (*e)->times.begin()->dauer / 60); + tmZeit.tm_mday, tmZeit.tm_mon + 1, tmZeit.tm_hour, tmZeit.tm_min, (*e)->times.begin()->dauer / 60); count += (*e)->getName().length() + 1; if (count < MAX_SIZE_EVENTLIST) { @@ -2594,6 +2595,7 @@ static void commandDumpStatusInformation(int connfd, char* /*data*/, const unsig #define MAX_SIZE_STATI 2024 char stati[MAX_SIZE_STATI]; + char tbuf[26]; snprintf(stati, MAX_SIZE_STATI, "$Id: sectionsd.cpp,v 1.346 2013/03/20 22:40:00 GetAway Exp $\n" @@ -2617,7 +2619,7 @@ static void commandDumpStatusInformation(int connfd, char* /*data*/, const unsig "" #endif , - ctime(&zeit), + ctime_r(&zeit, tbuf), secondsToCache / (60*60L), secondsExtendedTextCache / (60*60L), oldEventsAre / 60, anzServices, anzNVODservices, anzEvents, anzNVODevents, anzMetaServices, // resourceUsage.ru_maxrss, resourceUsage.ru_ixrss, resourceUsage.ru_idrss, resourceUsage.ru_isrss, speicherinfo.uordblks, speicherinfo.uordblks / 1024, @@ -3464,7 +3466,8 @@ static void commandGetNextEPG(int connfd, char *data, const unsigned dataLength) time_t *starttime = (time_t *)(data + 8); - dprintf("Request of next epg for 0x%llx %s", *uniqueEventKey, ctime(starttime)); + char tbuf[26]; + dprintf("Request of next epg for 0x%llx %s", *uniqueEventKey, ctime_r(starttime, tbuf)); readLockEvents(); @@ -3562,8 +3565,9 @@ static void commandGetEPGPrevNext(int connfd, char *data, const unsigned dataLen SItime next_zeit(0, 0); SIevent prev_evt; SIevent next_evt; + char tbuf[26]; - dprintf("Request of Prev/Next EPG for 0x%llx %s", *uniqueEventKey, ctime(starttime)); + dprintf("Request of Prev/Next EPG for 0x%llx %s", *uniqueEventKey, ctime_r(starttime, tbuf)); readLockEvents(); @@ -3933,8 +3937,9 @@ static void commandGetNextShort(int connfd, char *data, const unsigned dataLengt time_t *starttime = (time_t *)(data + 8); SItime zeit(*starttime, 0); + char tbuf[26]; - dprintf("Request of next short for 0x%llx %s", *uniqueEventKey, ctime(starttime)); + dprintf("Request of next short for 0x%llx %s", *uniqueEventKey, ctime_r(starttime, tbuf)); readLockEvents(); @@ -6775,6 +6780,7 @@ static void *timeThread(void *) struct timeval now; bool time_ntp = false; bool success = true; + long long timediff; try { @@ -6785,6 +6791,7 @@ static void *timeThread(void *) while(1) { + timediff = 0; if (bTimeCorrect == true){ // sectionsd started with parameter "-tc" if (first_time == true) { // only do this once! time_t actTime; @@ -6813,6 +6820,7 @@ static void *timeThread(void *) } else if (scanning && dvb_time_update) { + xcprintf("[%sThread] getting DVB time ...", "time"); success = getUTC(&UTC, first_time); // for first time, get TDT, then TOT if (success) { @@ -6830,11 +6838,14 @@ static void *timeThread(void *) } } - time_t actTime; - struct tm *tmTime; - actTime=time(NULL); - tmTime = localtime(&actTime); - xprintf("[%sThread] - %02d.%02d.%04d %02d:%02d:%02d, tim: %s", "time", tmTime->tm_mday, tmTime->tm_mon+1, tmTime->tm_year+1900, tmTime->tm_hour, tmTime->tm_min, tmTime->tm_sec, ctime(&tim)); + struct tm tmTime; + time_t actTime = time(NULL); + localtime_r(&actTime, &tmTime); + struct timeval lt; + gettimeofday(<, NULL); + timediff = (long long)tim * 1000000LL - (lt.tv_usec + lt.tv_sec * 1000000LL); + char tbuf[26]; + xprintf("[%sThread] timediff %lld, current: %02d.%02d.%04d %02d:%02d:%02d, dvb: %s", "time", timediff, tmTime.tm_mday, tmTime.tm_mon+1, tmTime.tm_year+1900, tmTime.tm_hour, tmTime.tm_min, tmTime.tm_sec, ctime_r(&tim, tbuf)); pthread_mutex_lock(&timeIsSetMutex); timeset = true; time_ntp= false; commit 15ed627ba11e2409a29df510671de3ef93b9e209 Author: Christian Schuett <Gau...@ho...> Date: Thu Oct 24 19:56:28 2013 +0200 Neutrino eventlist: change hotkeys in searchmenu for a smoother handling based on patch by svenhoefer <sve...@sv...> in Coolstream Git Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index 93da0d2..5b9bf50 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -1136,11 +1136,11 @@ int CEventFinderMenu::exec(CMenuTarget* parent, const std::string &actionkey) if(parent != NULL) parent->hide(); - if(actionkey =="") + if(actionkey == "") { res = showMenu(); } - else if(actionkey =="3") + else if(actionkey == "select_channel") { // get channel id / bouquet id if(*m_search_list == EventList::SEARCH_LIST_CHANNEL) @@ -1170,7 +1170,7 @@ int CEventFinderMenu::exec(CMenuTarget* parent, const std::string &actionkey) } } } - else if(actionkey =="5") + else if(actionkey == "start_search") { *m_event = true; res = menu_return::RETURN_EXIT; @@ -1206,11 +1206,11 @@ int CEventFinderMenu::showMenu(void) CStringInputSMS stringInput(LOCALE_EVENTFINDER_KEYWORD, m_search_keyword, 20, false, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-_/()<>=.,:!?\\'\"& "); - CMenuForwarder* mf0 = new CMenuForwarder(LOCALE_EVENTFINDER_KEYWORD, true, *m_search_keyword, &stringInput, NULL, CRCInput::RC_1, NEUTRINO_ICON_BUTTON_1); - CMenuOptionChooser* mo0 = new CMenuOptionChooser(LOCALE_EVENTFINDER_SEARCH_WITHIN_LIST, m_search_list, SEARCH_LIST_OPTIONS, SEARCH_LIST_OPTION_COUNT, true, this, CRCInput::RC_2, NEUTRINO_ICON_BUTTON_2); - m_search_channelname_mf = new CMenuForwarder("", *m_search_list != EventList::SEARCH_LIST_ALL, m_search_channelname, this, "3", CRCInput::RC_3, NEUTRINO_ICON_BUTTON_3); - CMenuOptionChooser* mo1 = new CMenuOptionChooser(LOCALE_EVENTFINDER_SEARCH_WITHIN_EPG, m_search_epg_item, SEARCH_EPG_OPTIONS, SEARCH_EPG_OPTION_COUNT, true, NULL, CRCInput::RC_4, NEUTRINO_ICON_BUTTON_4); - CMenuForwarder* mf1 = new CMenuForwarder(LOCALE_EVENTFINDER_START_SEARCH, true, NULL, this, "5", CRCInput::RC_5, NEUTRINO_ICON_BUTTON_5); + CMenuForwarder* mf0 = new CMenuForwarder(LOCALE_EVENTFINDER_KEYWORD, true, *m_search_keyword, &stringInput, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + CMenuOptionChooser* mo0 = new CMenuOptionChooser(LOCALE_EVENTFINDER_SEARCH_WITHIN_LIST, m_search_list, SEARCH_LIST_OPTIONS, SEARCH_LIST_OPTION_COUNT, true, this, CRCInput::RC_1, NEUTRINO_ICON_BUTTON_1); + m_search_channelname_mf = new CMenuForwarder("", *m_search_list != EventList::SEARCH_LIST_ALL, m_search_channelname, this, "select_channel", CRCInput::RC_2, NEUTRINO_ICON_BUTTON_2); + CMenuOptionChooser* mo1 = new CMenuOptionChooser(LOCALE_EVENTFINDER_SEARCH_WITHIN_EPG, m_search_epg_item, SEARCH_EPG_OPTIONS, SEARCH_EPG_OPTION_COUNT, true, NULL, CRCInput::RC_3, NEUTRINO_ICON_BUTTON_3); + CMenuForwarder* mf1 = new CMenuForwarder(LOCALE_EVENTFINDER_START_SEARCH, true, NULL, this, "start_search", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN); CMenuWidget searchMenu(LOCALE_EVENTFINDER_HEAD, NEUTRINO_ICON_FEATURES, 450); commit 091a86dc9533a83d2c37db213fafdea2f058cf03 Author: Christian Schuett <Gau...@ho...> Date: Wed Oct 23 21:07:33 2013 +0200 yWeb: add 'maxlength' to some inputs to prevent possible buffer overflows Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Settings_mount.yhtm b/tuxbox/neutrino/daemons/nhttpd/web/Y_Settings_mount.yhtm index dcc1965..8ca8d92 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Settings_mount.yhtm +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Settings_mount.yhtm @@ -41,23 +41,23 @@ function do_submit() </tr> <tr> <td>Verzeichnis</td> - <td><input type="text" name="dir" size="30" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_dir_{=R1=}=}" title="remote directory. For CIFS do not use a leading slash."/></td> + <td><input type="text" name="dir" size="30" maxlength="99" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_dir_{=R1=}=}" title="remote directory. For CIFS do not use a leading slash."/></td> </tr> <tr> <td>Lokales Verzeichnis</td> - <td><input type="text" name="localdir" size="30" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_local_dir_{=R1=}=}" title="local directory to by mounted"/></td> + <td><input type="text" name="localdir" size="30" maxlength="99" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_local_dir_{=R1=}=}" title="local directory to by mounted"/></td> </tr> <tr> <td>MAC</td> - <td><input type="text" name="mac" size="30" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_mac_{=R1=}=}"/></td> + <td><input type="text" name="mac" size="30" maxlength="30" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_mac_{=R1=}=}"/></td> </tr> <tr> <td>Optionen 1</td> - <td><input type="text" name="opt1" size="30" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_mount_options1_{=R1=}=}" title="mount options 1"/></td> + <td><input type="text" name="opt1" size="30" maxlength="30" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_mount_options1_{=R1=}=}" title="mount options 1"/></td> </tr> <tr> <td>Optionen 2</td> - <td><input type="text" name="opt2" size="30" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_mount_options2_{=R1=}=}" title="mount options 2"/></td> + <td><input type="text" name="opt2" size="30" maxlength="30" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_mount_options2_{=R1=}=}" title="mount options 2"/></td> </tr> <tr> <td>Automount</td> @@ -68,11 +68,11 @@ function do_submit() </tr> <tr> <td>Benutzername</td> - <td><input type="text" name="username" size="30" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_username_{=R1=}=}" title="username"/></td> + <td><input type="text" name="username" size="30" maxlength="30" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_username_{=R1=}=}" title="username"/></td> </tr> <tr> <td>Passwort</td> - <td><input type="password" name="password" size="30" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_password_{=R1=}=}" title="password"/></td> + <td><input type="password" name="password" size="30" maxlength="30" value="{=ini-get:/var/tuxbox/config/neutrino.conf;network_nfs_password_{=R1=}=}" title="password"/></td> </tr> </table> <br/> @@ -84,4 +84,4 @@ function do_submit() </div> </div> </body> -</html> \ No newline at end of file +</html> diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt b/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt index c6df64b..a8e3b95 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt @@ -1,5 +1,5 @@ -version=2.7.0.29 -date=20.10.2013 +version=2.7.0.30 +date=23.10.2013 type=Release info= diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_neutrino_Blocks.txt b/tuxbox/neutrino/daemons/nhttpd/web/Y_neutrino_Blocks.txt index 61c3e6a..61f9506 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_neutrino_Blocks.txt +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_neutrino_Blocks.txt @@ -68,7 +68,7 @@ start-block~neutrino_form-data_record <tr> <td>Aufnahmeserver Port</td> <td> - <input type="text" id="port" name="port" size="6" title="port"/> + <input type="text" id="port" name="port" size="6" maxlength="6" title="port"/> <input type="hidden" name="h_port"/> </td> </tr> @@ -83,7 +83,7 @@ start-block~neutrino_form-data_record <tr> <td>MAC Adresse</td> <td> - <input type="text" id="mac" name="mac" size="20" title="MAC"/> + <input type="text" id="mac" name="mac" size="20" maxlength="20" title="MAC"/> <input type="hidden" name="h_mac"/> </td> </tr> @@ -319,14 +319,14 @@ start-block~neutrino_form-data_movieplayer <tr> <td>DVD Laufwerk</td> <td> - <input type="text" name="streaming_server_cddrive" size="10" title="DVD drive on server"/> + <input type="text" name="streaming_server_cddrive" size="10" maxlength="20" title="DVD drive on server"/> <input type="hidden" name="h_streaming_server_cddrive"/> </td> </tr> <tr> <td>Verzeichnis (VLC)</td> <td> - <input type="text" name="streaming_server_startdir" size="40" title="VLC directory on server"/> + <input type="text" name="streaming_server_startdir" size="39" maxlength="39" title="VLC directory on server"/> <input type="hidden" name="h_streaming_server_startdir"/> </td> </tr> @@ -334,7 +334,7 @@ start-block~neutrino_form-data_movieplayer <tr> <td>Datenrate Video</td> <td> - <input type="text" name="streaming_videorate" size="6" title="video data rate"/> + <input type="text" name="streaming_videorate" size="5" maxlength="5" title="video data rate"/> <input type="hidden" name="h_streaming_videorate"/> </td> </tr> @@ -380,7 +380,7 @@ start-block~neutrino_form-data_movieplayer <tr> <td>Datenrate Audio</td> <td> - <input type="text" name="streaming_audiorate" size="6" title="audio data rate"/> + <input type="text" name="streaming_audiorate" size="5" maxlength="5" title="audio data rate"/> <input type="hidden" name="h_streaming_audiorate"/> </td> </tr> @@ -681,7 +681,7 @@ start-block~neutrino_form-data_diverse </tr> <tr> <td>Komplett ausschalten nach</td> - <td><input type="text" name="shutdown_count" size="3" value="{=ini-get:/var/tuxbox/config/neutrino.conf;shutdown_count;0~open=}" title="shutdown after x sec"/> Min.</td> + <td><input type="text" name="shutdown_count" size="3" maxlength="3" value="{=ini-get:/var/tuxbox/config/neutrino.conf;shutdown_count;0~open=}" title="shutdown after x min"/> Min.</td> </tr> <tr title="shutdown delay: off/on"> <td>Verzögerter Shutdown</td> @@ -1178,7 +1178,7 @@ start-block~neutrino_form-data_pictureviewer </tr> <tr> <td>Start-Verz.</td> - <td><input type="text" name="picviewer_picturedir" size="20" value="{=ini-get:/var/tuxbox/config/neutrino.conf;picviewer_picturedir~cache=}" title="directory to begin"/></td> + <td><input type="text" name="picviewer_picturedir" size="20" maxlength="99" value="{=ini-get:/var/tuxbox/config/neutrino.conf;picviewer_picturedir~cache=}" title="directory to begin"/></td> </tr> <tr> <td>Decoding-Server IP</td> @@ -1286,7 +1286,7 @@ start-block~neutrino_form-data_audioplayer </tr> <tr> <td>Start-Verz.</td> - <td><input type="text" name="audioplayer_audioplayerdir" size="20" value="{=ini-get:/var/tuxbox/config/neutrino.conf;audioplayer_audioplayerdir~cache=}" title="directory to begin"/></td> + <td><input type="text" name="audioplayer_audioplayerdir" size="20" maxlength="99" value="{=ini-get:/var/tuxbox/config/neutrino.conf;audioplayer_audioplayerdir~cache=}" title="directory to begin"/></td> </tr> <tr title="parse Shoutcast Meta-Data: off/on"> <td>Shoutcast Meta-Daten</td> commit aa6175dd19654837b31e830872ea5f2eb643b1e0 Author: Christian Schuett <Gau...@ho...> Date: Wed Oct 23 19:42:19 2013 +0200 Neutrino: clean up settings remove unused setting 'network_nfs_recordingdir' and move settings that don't need to be global into setup classes Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/driver_boot_setup.cpp b/tuxbox/neutrino/src/gui/driver_boot_setup.cpp index 9e325c9..6114f6a 100644 --- a/tuxbox/neutrino/src/gui/driver_boot_setup.cpp +++ b/tuxbox/neutrino/src/gui/driver_boot_setup.cpp @@ -128,6 +128,7 @@ int CDriverBootSetup::showSetup() CMenuWidget * dbs = new CMenuWidget(menue_title, menue_icon, width); dbs->setPreselected(selected); + int misc_option[DRIVER_SETTING_FILES_COUNT]; bool item_enabled[DRIVER_SETTING_FILES_COUNT]; #ifdef HAVE_DBOX_HARDWARE @@ -142,10 +143,10 @@ int CDriverBootSetup::showSetup() if (fd) { fclose(fd); - g_settings.misc_option[i] = 1; + misc... [truncated message content] |
From: Thilo G. <tux...@ne...> - 2013-11-28 08:44:16
|
Project "Tuxbox-GIT: cdk": The branch, master has been updated via 7868daf277c2c31d31d814e15cf495372cac74e8 (commit) from 0b96276d10ce152982c25c41d92517e47f9438a0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7868daf277c2c31d31d814e15cf495372cac74e8 Author: Stefan Seyfried <se...@tu...> Date: Wed Nov 27 11:39:18 2013 +0100 configure: error out when CONFIG_SITE is set Signed-off-by: Thilo Graf <db...@no...> diff --git a/configure.ac b/configure.ac index c1ca5db..2ae4ed3 100644 --- a/configure.ac +++ b/configure.ac @@ -1890,6 +1890,19 @@ AC_MSG_RESULT([ ]) fi +## just error out now instead of mysteriously failing later. +if test -n "$CONFIG_SITE"; then +AC_MSG_ERROR([ +*************************************************************** +* !!!ERROR!!! * +* The environment variable CONFIG_SITE is set on your system. * +* This will likely break your build. Please rerun with unset * +* CONFIG_SITE. * +* !!!ERROR!!! * +*************************************************************** +]) +fi + TUXBOX_CUSTOMIZE='[[ -x $(customizationsdir)/$(notdir $@)-local.sh ] && KERNEL='$used_kernelversion' KERNELVERSION=$(KERNELVERSION) LIBC='$used_libc' BOXTYPE=$(BOXTYPE) BOXMODEL=$(BOXMODEL) $(customizationsdir)/$(notdir $@)-local.sh $(flashprefix) $(buildprefix) || true]' AC_SUBST(TUXBOX_CUSTOMIZE) TUXBOX_YADD_CUSTOMIZE='[[ -x $(customizationsdir)/$(notdir $@)-local.sh ] && KERNEL='$used_kernelversion' KERNELVERSION=$(KERNELVERSION) LIBC='$used_libc' BOXTYPE=$(BOXTYPE) BOXMODEL=$(BOXMODEL) $(customizationsdir)/$(notdir $@)-local.sh $(targetprefix) $(buildprefix) || true]' ----------------------------------------------------------------------- Summary of changes: configure.ac | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) -- Tuxbox-GIT: cdk |
From: Thilo G. <tux...@ne...> - 2013-11-18 20:03:17
|
Project "Tuxbox-GIT: cdk": The branch, master has been updated via 0b96276d10ce152982c25c41d92517e47f9438a0 (commit) from dc4b81337c940b5c5adff3e1ccd1a75c029fd846 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0b96276d10ce152982c25c41d92517e47f9438a0 Author: GetAway <get...@t-...> Date: Mon Nov 18 20:26:05 2013 +0100 version bump binutils-2.24.51.0.1 Signed-off-by: Thilo Graf <db...@no...> diff --git a/rules-archive b/rules-archive index 07148aa..c68e143 100644 --- a/rules-archive +++ b/rules-archive @@ -15,7 +15,7 @@ linux-2.6.26.8.tar.bz2;http://sources.buildroot.net cifs-1.20c-2.4.tar.gz;http://us1.samba.org/samba/ftp/cifs-cvs linux-2.4.34-dbox2-mtd0305.diff.bz2 autofs4-2.4-module-20050404.tar.gz;http://www.kernel.org/pub/linux/daemons/autofs/v4 -binutils-2.23.52.0.1.tar.bz2;http://www.kernel.org/pub/linux/devel/binutils/ +binutils-2.24.51.0.1.tar.bz2;http://www.kernel.org/pub/linux/devel/binutils/ 300-001_ld_makefile_patch.patch;http://crosstool-ng.org/hg/crosstool-ng/raw-file/c7fa97debb36/patches/binutils/2.22 300-012_check_ldrunpath_length.patch;http://crosstool-ng.org/hg/crosstool-ng/raw-file/c7fa97debb36/patches/binutils/2.22 gcc-core-3.4.6.tar.bz2;ftp://$(gnuserver)/../../../gcc/releases/gcc-3.4.6 diff --git a/rules-make b/rules-make index 37eca5a..17f86b1 100644 --- a/rules-make +++ b/rules-make @@ -15,7 +15,7 @@ uboot;2012.04;u-boot-2012.04;u-boot-2012.04.tar.bz2:u-boot-2011.06.diff;extract:u-boot-2012.04.tar.bz2 linux24;2.4.37.11-dbox2;linux-2.4.37.11;linux-2.4.37.11.tar.bz2:linux-2.4-dbox2.diff:linux-2.4.34-dbox2-mtd0305.diff.bz2:linux-2.4-jffs2_lzma.diff:linux-2.4.git.diff;remove:linux;extract:linux-2.4.37.11.tar.bz2;patch:linux-2.4-dbox2.diff;patch:squashfs3.0-patch;patch:squashfs3.0_lzma-patch;patch:linux-2.4.git.diff;link:linux-2.4.37.11:linux linux;2.6.26.8-dbox2;linux-2.6.26.8;linux-2.6.26.8.tar.bz2:squashfs3.0.tar.gz:linux-2.6.26.4-dbox2.diff:linux-2.6.25-create-console.diff:linux-2.6.25-squashfs3.0.diff:linux-2.6.25.6-squashfs3.0.diff:linux-2.6.25.6-squashfs3.0_lzma.diff:linux-2.6-jffs2_lzma.diff;remove:linux;extract:linux-2.6.26.8.tar.bz2;extract:squashfs3.0.tar.gz;move:squashfs3.0/linux-2.6.15/squashfs3.0-patch:Patches/squashfs3.0_2.6-patch;remove:squashfs3.0;patch:linux-2.6.26.4-dbox2.diff;patch:linux-2.6.25-create-console.diff;patch:linux-2.6.25-squashfs3.0.diff;patch:squashfs3.0_2.6-patch;patch:linux-2.6.25.6-squashfs3.0.diff;patch:linux-2.6.25.6-squashfs3.0_lzma.diff;patch:linux-2.6.26.8-new-make.patch;link:linux-2.6.26.8:linux -binutils;2.23.52.0.1;binutils-2.23.52.0.1;binutils-2.23.52.0.1.tar.bz2:binutils.diff;extract:binutils-2.23.52.0.1.tar.bz2;patch:binutils.diff;apatch:300-001_ld_makefile_patch.patch;apatch:300-012_check_ldrunpath_length.patch +binutils;2.24.51.0.1;binutils-2.24.51.0.1;binutils-2.24.51.0.1.tar.bz2:binutils.diff;extract:binutils-2.24.51.0.1.tar.bz2;patch:binutils.diff;apatch:300-001_ld_makefile_patch.patch;apatch:300-012_check_ldrunpath_length.patch bootstrap_gcc;3.4.6;gcc-3.4.6;gcc-core-3.4.6.tar.bz2:gcc-core.diff;extract:gcc-core-3.4.6.tar.bz2;patch:gcc-core.diff bootstrap_gcc41;4.1.2;gcc-4.1.2;gcc-core-4.1.2.tar.bz2:gcc-4.1.2-patches-1.3.tar.bz2;extract:gcc-core-4.1.2.tar.bz2 gcc;3.4.6;gcc-3.4.6;gcc-core-3.4.6.tar.bz2:gcc-g++-3.4.6.tar.bz2:gcc-core.diff:gcc-binutils.diff;extract:gcc-core-3.4.6.tar.bz2;extract:gcc-g++-3.4.6.tar.bz2;patch:gcc-core.diff;patch:gcc-binutils.diff ----------------------------------------------------------------------- Summary of changes: rules-archive | 2 +- rules-make | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- Tuxbox-GIT: cdk |
From: Thilo G. <tux...@ne...> - 2013-11-17 19:51:18
|
Project "Tuxbox-GIT: cdk": The branch, master has been updated via dc4b81337c940b5c5adff3e1ccd1a75c029fd846 (commit) from 6e6bca4ab60d4e6650b79694b5c3cbfe510d31f2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dc4b81337c940b5c5adff3e1ccd1a75c029fd846 Author: GetAway <get...@t-...> Date: Sun Nov 17 20:02:33 2013 +0100 nfs-utils: fix compile error with newer gcc Signed-off-by: Thilo Graf <db...@no...> diff --git a/Patches/nfs-utils.diff b/Patches/nfs-utils.diff index 2732415..98de91a 100644 --- a/Patches/nfs-utils.diff +++ b/Patches/nfs-utils.diff @@ -1,3 +1,25 @@ +diff -uNr nfs-utils-1.1.1_orig/utils/exportfs/exportfs.c nfs-utils-1.1.1/utils/exportfs/exportfs.c +--- nfs-utils-1.1.1_orig/utils/exportfs/exportfs.c 2013-11-17 19:52:45.000000000 +0100 ++++ nfs-utils-1.1.1/utils/exportfs/exportfs.c 2013-11-17 19:53:09.000000000 +0100 +@@ -12,6 +12,7 @@ + #include <config.h> + #endif + ++#include <sys/stat.h> + #include <unistd.h> + #include <stdlib.h> + #include <string.h> +diff -uNr nfs-utils-1.1.1_orig/utils/mount/mount.c nfs-utils-1.1.1/utils/mount/mount.c +--- nfs-utils-1.1.1_orig/utils/mount/mount.c 2013-11-17 19:52:38.000000000 +0100 ++++ nfs-utils-1.1.1/utils/mount/mount.c 2013-11-17 19:53:14.000000000 +0100 +@@ -21,6 +21,7 @@ + #include "config.h" + #include <unistd.h> + #include <sys/types.h> ++#include <sys/stat.h> + #include <stdio.h> + #include <string.h> + #include <errno.h> diff -uNr nfs-utils-1.1.1.org/configure.ac nfs-utils-1.1.1/configure.ac --- nfs-utils-1.1.1.org/configure.ac 2007-10-19 05:07:28.000000000 +0200 +++ nfs-utils-1.1.1/configure.ac 2008-10-07 15:34:55.000000000 +0200 ----------------------------------------------------------------------- Summary of changes: Patches/nfs-utils.diff | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) -- Tuxbox-GIT: cdk |
From: Thilo G. <tux...@ne...> - 2013-11-10 16:27:41
|
Project "Tuxbox-GIT: cdk": The branch, master has been updated via 6e6bca4ab60d4e6650b79694b5c3cbfe510d31f2 (commit) from df5e3029a8364dba9ef42a2cceeea4df65ffda38 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6e6bca4ab60d4e6650b79694b5c3cbfe510d31f2 Author: GetAway <get...@t-...> Date: Sun Nov 10 15:29:46 2013 +0100 fixed the not applying kernel-patch Signed-off-by: Thilo Graf <db...@no...> diff --git a/Patches/linux-2.4-dbox2.diff b/Patches/linux-2.4-dbox2.diff index 4f9549c..9f8d35f 100644 --- a/Patches/linux-2.4-dbox2.diff +++ b/Patches/linux-2.4-dbox2.diff @@ -6072,8 +6072,8 @@ diff -Naur linux-2.4.36.2/include/asm-ppc/commproc.h linux-2.4.36.2_new/include/ #define PC_ENET_TENA ((ushort)0x0002) Index: b/kernel/timer.c =================================================================== ---- a/kernel/timer.c -+++ b/kernel/timer.c +--- timer.c.orig 2010-12-18 16:29:59.000000000 +0100 ++++ timer.c 2013-11-10 15:07:38.000000000 +0100 @@ -35,7 +35,12 @@ long tick = (1000000 + HZ/2) / HZ; /* ti struct timeval xtime __attribute__ ((aligned (16))); @@ -6089,14 +6089,14 @@ Index: b/kernel/timer.c DECLARE_TASK_QUEUE(tq_timer); DECLARE_TASK_QUEUE(tq_immediate); @@ -487,11 +492,19 @@ static void update_wall_time_one_tick(vo - * Limit the amount of the step to be in the range - * -tickadj .. +tickadj - */ + * Limit the amount of the step to be in the range + * -tickadj .. +tickadj + */ - if (time_adjust > tickadj) - time_adjust_step = tickadj; - else if (time_adjust < -tickadj) - time_adjust_step = -tickadj; -- +- + if (time_adjust > tickadj) { + if (time_adjust > bigadj) + time_adjust_step = 5 * tickadj / 2; @@ -6110,9 +6110,9 @@ Index: b/kernel/timer.c + time_adjust_step = -tickadj; + } + - /* Reduce by this step the amount of time left */ - time_adjust -= time_adjust_step; - } + /* Reduce by this step the amount of time left */ + time_adjust -= time_adjust_step; + } diff -uNr linux-2.4.37.11.org//arch/ppc/8xx_io/uart.c linux-2.4.37.11/arch/ppc/8xx_io/uart.c --- linux-2.4.37.11.org//arch/ppc/8xx_io/uart.c 2010-12-18 16:29:59.000000000 +0100 +++ linux-2.4.37.11/arch/ppc/8xx_io/uart.c 2011-04-27 12:47:55.000000000 +0200 ----------------------------------------------------------------------- Summary of changes: Patches/linux-2.4-dbox2.diff | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) -- Tuxbox-GIT: cdk |
From: Thilo G. <tux...@ne...> - 2013-11-10 13:18:37
|
Project "Tuxbox-GIT: cdk": The branch, master has been updated via df5e3029a8364dba9ef42a2cceeea4df65ffda38 (commit) via 6f085a33febe95f12aacb49988fc96beece6c3c5 (commit) via ecd43559f5dc54333ff24c7791f5d2d5566112cf (commit) from f466c8331cf4c01cc3064f5cc20924d0dc41fbf4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit df5e3029a8364dba9ef42a2cceeea4df65ffda38 Author: GetAway <get...@t-...> Date: Sun Nov 10 13:40:25 2013 +0100 version bump ccache-3.1.9 Signed-off-by: Thilo Graf <db...@no...> diff --git a/rules-archive b/rules-archive index 219072d..07148aa 100644 --- a/rules-archive +++ b/rules-archive @@ -45,7 +45,7 @@ cloog-0.16.3.tar.gz;http://www.bastoul.net/cloog/pages/download # # ccache # -ccache-3.1.4.tar.gz;http://samba.org/ftp/ccache +ccache-3.1.9.tar.gz;http://samba.org/ftp/ccache # # root diff --git a/rules-make b/rules-make index afa243e..37eca5a 100644 --- a/rules-make +++ b/rules-make @@ -169,7 +169,7 @@ nano;1.2.4;nano-1.2.4;nano-1.2.4.tar.gz:nano.diff;extract:nano-1.2.4.tar.gz;patc mc;4.6.2;mc-4.6.2;mc-4.6.2.tar.gz:mc-4.6.2.diff;extract:mc-4.6.2.tar.gz;patch:mc-4.6.2.diff joe;3.7;joe-3.7;joe-3.7.tar.gz;extract:joe-3.7.tar.gz bash;4.0;bash-4.0;bash-4.0.tar.gz;extract:bash-4.0.tar.gz -ccache;3.1.4;ccache-3.1.4;ccache-3.1.4.tar.gz;extract:ccache-3.1.4.tar.gz +ccache;3.1.9;ccache-3.1.9;ccache-3.1.9.tar.gz;extract:ccache-3.1.9.tar.gz # # java commit 6f085a33febe95f12aacb49988fc96beece6c3c5 Author: GetAway <get...@t-...> Date: Mon Oct 28 15:41:21 2013 +0100 Kernel: increase tickadj for damn dbox clock Allows use of additional factor 10 from the original tickadj for really slow / fast timer Signed-off-by: Thilo Graf <db...@no...> diff --git a/Patches/linux-2.4-dbox2.diff b/Patches/linux-2.4-dbox2.diff index 1d6d604..4f9549c 100644 --- a/Patches/linux-2.4-dbox2.diff +++ b/Patches/linux-2.4-dbox2.diff @@ -6074,22 +6074,45 @@ Index: b/kernel/timer.c =================================================================== --- a/kernel/timer.c +++ b/kernel/timer.c -@@ -33,11 +33,14 @@ long tick = (1000000 + HZ/2) / HZ; /* ti - - /* The current time */ +@@ -35,7 +35,12 @@ long tick = (1000000 + HZ/2) / HZ; /* ti struct timeval xtime __attribute__ ((aligned (16))); /* Don't completely fail for HZ > 500. */ -int tickadj = 500/HZ ? : 1; /* microsecs */ +/* due to the dbox inexact timer, we allow more than + 500 microsecs per tick Orignal would correct up to -+ 0.5%, change it to 2%... */ ++ 0.5%, change it to 2%... ++ for really bad timer, we allow factor 10 */ +int tickadj = 2000/HZ ? : 1; /* microsecs */ ++long bigadj = 1000000; /* large adjustment */ DECLARE_TASK_QUEUE(tq_timer); DECLARE_TASK_QUEUE(tq_immediate); - - /* +@@ -487,11 +492,19 @@ static void update_wall_time_one_tick(vo + * Limit the amount of the step to be in the range + * -tickadj .. +tickadj + */ +- if (time_adjust > tickadj) +- time_adjust_step = tickadj; +- else if (time_adjust < -tickadj) +- time_adjust_step = -tickadj; +- ++ if (time_adjust > tickadj) { ++ if (time_adjust > bigadj) ++ time_adjust_step = 5 * tickadj / 2; ++ else ++ time_adjust_step = tickadj; ++ } ++ else if (time_adjust < -tickadj) { ++ if (time_adjust < -bigadj) ++ time_adjust_step = 5 * -tickadj / 2; ++ else ++ time_adjust_step = -tickadj; ++ } ++ + /* Reduce by this step the amount of time left */ + time_adjust -= time_adjust_step; + } diff -uNr linux-2.4.37.11.org//arch/ppc/8xx_io/uart.c linux-2.4.37.11/arch/ppc/8xx_io/uart.c --- linux-2.4.37.11.org//arch/ppc/8xx_io/uart.c 2010-12-18 16:29:59.000000000 +0100 +++ linux-2.4.37.11/arch/ppc/8xx_io/uart.c 2011-04-27 12:47:55.000000000 +0200 commit ecd43559f5dc54333ff24c7791f5d2d5566112cf Author: GetAway <get...@t-...> Date: Thu Oct 31 09:40:04 2013 +0100 version bump ntpd-4.2.6p5 Signed-off-by: Thilo Graf <db...@no...> diff --git a/Patches/ntp.diff b/Patches/ntp.diff index ee788ae..b4e5594 100644 --- a/Patches/ntp.diff +++ b/Patches/ntp.diff @@ -1,17 +1,3 @@ -diff -uNr ntp-4.2.4p5.org/libisc/ifiter_ioctl.c ntp-4.2.4p5/libisc/ifiter_ioctl.c ---- ntp-4.2.4p5.org/libisc/ifiter_ioctl.c 2006-12-28 13:03:07.000000000 +0100 -+++ ntp-4.2.4p5/libisc/ifiter_ioctl.c 2009-03-13 13:50:02.000000000 +0100 -@@ -482,8 +482,8 @@ - for (i = 0; i < 16; i++) { - unsigned char byte; - static const char hex[] = "0123456789abcdef"; -- byte = ((index(hex, address[i * 2]) - hex) << 4) | -- (index(hex, address[i * 2 + 1]) - hex); -+ byte = ((strchr(hex, address[i * 2]) - hex) << 4) | -+ (strchr(hex, address[i * 2 + 1]) - hex); - addr6.s6_addr[i] = byte; - } - iter->current.af = AF_INET6; diff -uNr ntp-4.2.4p5.org/util/tickadj.c ntp-4.2.4p5/util/tickadj.c --- ntp-4.2.4p5.org/util/tickadj.c 2004-02-25 06:58:33.000000000 +0100 +++ ntp-4.2.4p5/util/tickadj.c 2009-03-13 13:50:05.000000000 +0100 diff --git a/rules-archive b/rules-archive index 53ef1fd..219072d 100644 --- a/rules-archive +++ b/rules-archive @@ -129,7 +129,7 @@ ncftp-3.2.2-src.tar.bz2;ftp://ftp.ncftp.com/ncftp screen-4.0.3.tar.gz;ftp://ftp.gnu.org/pub/gnu/screen links-1.00.tar.gz;http://www.jikos.cz/~mikulas/links//download links-2.7.tar.bz2;http://links.twibright.com/download -ntp-4.2.4p5.tar.gz;http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2 +ntp-4.2.6p5.tar.gz;http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2 ntpclient_2000_339.tar.gz;http://doolittle.icarus.com/ntpclient openntpd-3.9p1.tar.gz;http://ftp-stud.fht-esslingen.de/pub/OpenBSD/OpenNTPD esound-0.2.41.tar.bz2;ftp://ftp.gnome.org/pub/GNOME/sources/esound/0.2 diff --git a/rules-make b/rules-make index db35887..afa243e 100644 --- a/rules-make +++ b/rules-make @@ -121,7 +121,7 @@ ncftp;3.2.2;ncftp-3.2.2;ncftp-3.2.2-src.tar.bz2;extract:ncftp-3.2.2-src.tar.bz2 screen;4.0.3;screen-4.0.3;screen-4.0.3.tar.gz:screen.diff;extract:screen-4.0.3.tar.gz;patch:screen.diff links;1.0;links-1.00;links-1.00.tar.gz;extract:links-1.00.tar.gz links_g;2.7;links-2.7;links-2.7.tar.bz2;extract:links-2.7.tar.bz2 -ntpd;4.2.4p5;ntp-4.2.4p5;ntp-4.2.4p5.tar.gz:ntp.diff;extract:ntp-4.2.4p5.tar.gz;patch:ntp.diff +ntpd;4.2.6p5;ntp-4.2.6p5;ntp-4.2.6p5.tar.gz:ntp.diff;extract:ntp-4.2.6p5.tar.gz;patch:ntp.diff ntpclient;2000_339;ntpclient;ntpclient_2000_339.tar.gz:ntpclient.diff;extract:ntpclient_2000_339.tar.gz;patch:ntpclient.diff openntpd;3.9p1;openntpd-3.9p1;openntpd-3.9p1.tar.gz:openntpd-always-use-latest-offset.diff;extract:openntpd-3.9p1.tar.gz;patch:openntpd-always-use-latest-offset.diff esound;0.2.41;esound-0.2.41;esound-0.2.41.tar.bz2:esound.diff;extract:esound-0.2.41.tar.bz2;patch:esound.diff ----------------------------------------------------------------------- Summary of changes: Patches/linux-2.4-dbox2.diff | 35 +++++++++++++++++++++++++++++------ Patches/ntp.diff | 14 -------------- rules-archive | 4 ++-- rules-make | 4 ++-- 4 files changed, 33 insertions(+), 24 deletions(-) -- Tuxbox-GIT: cdk |
From: Thilo G. <tux...@ne...> - 2013-10-09 19:30:52
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via cda11023b20bf911fe2157dca2ac0b7ab3c584bb (commit) from 60b94000dd45add3c5500d695414e9c0088a1839 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit cda11023b20bf911fe2157dca2ac0b7ab3c584bb Author: Christian Schuett <Gau...@ho...> Date: Wed Oct 9 19:43:44 2013 +0200 Neutrino infoviewer: fix overlapping satfind values with new standard font Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp index 334ded9..8dd6ecd 100644 --- a/tuxbox/neutrino/src/gui/infoviewer.cpp +++ b/tuxbox/neutrino/src/gui/infoviewer.cpp @@ -198,12 +198,12 @@ void CInfoViewer::showSatfind() sprintf (percent, "ber %d%%", ber); g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 270, BoxEndY+ 25, BoxEndX- ChanInfoX- 270, percent, COL_INFOBAR_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 350, BoxEndY+ 25, BoxEndX- ChanInfoX- 350, freq, COL_INFOBAR_PLUS_0); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(ChanInfoX+ 345, BoxEndY+ 25, BoxEndX- ChanInfoX- 345, freq, COL_INFOBAR_PLUS_0); if (satpos != 0 && (g_info.delivery_system == DVB_S)) { sprintf (pos, "%d.%d%c", satpos < 0 ? -satpos / 10 : satpos / 10, satpos < 0 ? -satpos % 10 : satpos % 10, satpos < 0 ? 'W' : 'E'); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(BoxEndX- 60, BoxEndY+ 25, 60, pos, COL_INFOBAR_PLUS_0); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(BoxEndX- 55, BoxEndY+ 25, 55, pos, COL_INFOBAR_PLUS_0); } } } ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/gui/infoviewer.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) -- Tuxbox-GIT: apps |
From: Thilo G. <tux...@ne...> - 2013-10-08 18:29:37
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 60b94000dd45add3c5500d695414e9c0088a1839 (commit) via 4c00b3bb3e5e3843648a905114e454790a46cc22 (commit) via 811be23c9c30430b4f83281ce1e4972dc7f348b1 (commit) via 803552f7a379b4d434f1d28fb27b27d2aebdeee6 (commit) via cc3e7a66fbe098e78d50afa1b9b372bfb6752133 (commit) via 12ab0b7e20b05ddb3afe89356294d69e11e7093f (commit) via a08e7fedbaf7eb76ab8302a9fd5c8b1a9ada5814 (commit) via 1b5381ba119db406d542e2a88f705c4e96421989 (commit) via b5685c0abf361202341745a2a57a7b63c0e38561 (commit) via 358d43f095c2a123e4a45f8760872865b317da2a (commit) via 406febf33d8bbac872cdb1adae8afdfd09a5cee2 (commit) via 8fdfcc1e28e9f407f6858606e2fa105437e99377 (commit) via 0a0e89f81e7fb03b165a693426ff782e0cd298d7 (commit) via b2bf57b1861aafc5ffd3a23e97023436eb43d124 (commit) via 16d3f5ec18c7a3a736179a631716c1603460b16b (commit) via 775a5153d57c5ece8e42fd420c02097762b1028b (commit) via abd52a350476743defc79e8319aeb81d4357074d (commit) via dbaf75c798c74807f44491b4ec022c2661720d1f (commit) via 3c09ec2c982938669836f3e139d3f3973e68deef (commit) via 907effcb1b7b412e04ac6913a538bdf9dd75e9cb (commit) from b0d16a5af89815a4de0478a20b356abb2c0f0534 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 60b94000dd45add3c5500d695414e9c0088a1839 Author: Christian Schuett <Gau...@ho...> Date: Fri Oct 4 22:03:32 2013 +0200 Neutrino: consider event start time when finding current and selected ... ... event in alphabetically sorted event list events can have the same id with different start times, so maybe the wrong entries are marked Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index 759978d..93da0d2 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -354,7 +354,9 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam continue; event_id_t current_event_id = (current_event > -1) ? evtlist[current_event].eventID : 0; + time_t current_event_start_time = (current_event > -1) ? evtlist[current_event].startTime : 0; event_id_t selected_id = evtlist[selected].eventID; + time_t selected_start_time = evtlist[selected].startTime; if(sort_mode==0) { sort_mode++; @@ -370,14 +372,16 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam { for (current_event = 0; current_event < (int)evtlist.size(); current_event++) { - if (evtlist[current_event].eventID == current_event_id) + if (evtlist[current_event].eventID == current_event_id && + evtlist[current_event].startTime == current_event_start_time) break; } } // find selected for ( selected=0 ; selected < evtlist.size(); selected++ ) { - if ( evtlist[selected].eventID == selected_id ) + if (evtlist[selected].eventID == selected_id && + evtlist[selected].startTime == selected_start_time) break; } oldselected=selected; commit 4c00b3bb3e5e3843648a905114e454790a46cc22 Author: Christian Schuett <Gau...@ho...> Date: Thu Oct 3 17:57:06 2013 +0200 Neutrino: fix current event marker in alphabetically sorted event list Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index dc9e2f7..759978d 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -353,7 +353,8 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam if (showfollow) continue; - unsigned long long selected_id = evtlist[selected].eventID; + event_id_t current_event_id = (current_event > -1) ? evtlist[current_event].eventID : 0; + event_id_t selected_id = evtlist[selected].eventID; if(sort_mode==0) { sort_mode++; @@ -364,6 +365,15 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam sort_mode=0; sort(evtlist.begin(),evtlist.end(),sortByDateTime); } + // find current + if (current_event > -1) + { + for (current_event = 0; current_event < (int)evtlist.size(); current_event++) + { + if (evtlist[current_event].eventID == current_event_id) + break; + } + } // find selected for ( selected=0 ; selected < evtlist.size(); selected++ ) { commit 811be23c9c30430b4f83281ce1e4972dc7f348b1 Author: Christian Schuett <Gau...@ho...> Date: Thu Oct 3 14:54:29 2013 +0200 Neutrino: make member 'text' of CMenuSeparator protected Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp index 6dca5fb..13aaf64 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.cpp +++ b/tuxbox/neutrino/src/gui/widget/menue.cpp @@ -1228,8 +1228,7 @@ int CMenuSeparator::paint(bool /*selected*/) } if ((type & STRING)) { - const char * l_text; - l_text = getString(); + const char * l_text = getString(); if (text != NONEXISTANT_LOCALE || strlen(l_text) != 0) { diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h index af095e2..3ce475c 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.h +++ b/tuxbox/neutrino/src/gui/widget/menue.h @@ -137,11 +137,10 @@ class CMenuSeparator : public CMenuItem int type; protected: + neutrino_locale_t text; std::string separator_text; public: - neutrino_locale_t text; - enum { EMPTY = 0, @@ -161,7 +160,7 @@ class CMenuSeparator : public CMenuItem int getHeight(void) const; virtual const char * getString(void); - virtual void setString(const std::string& text); + virtual void setString(const std::string& s_text); }; class CMenuForwarder : public CMenuItem commit 803552f7a379b4d434f1d28fb27b27d2aebdeee6 Author: Christian Schuett <Gau...@ho...> Date: Wed Oct 2 21:51:43 2013 +0200 Neutrino: simplify CKeyValue, also rename a member of CMenuForwarder Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/widget/keychooser.cpp b/tuxbox/neutrino/src/gui/widget/keychooser.cpp index f45b291..7190d2a 100644 --- a/tuxbox/neutrino/src/gui/widget/keychooser.cpp +++ b/tuxbox/neutrino/src/gui/widget/keychooser.cpp @@ -45,7 +45,6 @@ class CKeyValue : public CMenuSeparator { - std::string the_text; public: int keyvalue; @@ -55,10 +54,10 @@ public: virtual const char * getString(void) { - the_text = g_Locale->getText(LOCALE_KEYCHOOSERMENU_CURRENTKEY); - the_text += ": "; - the_text += CRCInput::getKeyName(keyvalue); - return the_text.c_str(); + separator_text = g_Locale->getText(text); + separator_text += ": "; + separator_text += CRCInput::getKeyName(keyvalue); + return separator_text.c_str(); }; }; diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp index 672603c..6dca5fb 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.cpp +++ b/tuxbox/neutrino/src/gui/widget/menue.cpp @@ -1068,7 +1068,7 @@ CMenuForwarder::CMenuForwarder(const char * const Text, const bool Active, const option = Option; option_string = NULL; text = NONEXISTANT_LOCALE; - the_text = Text; + forwarder_text = Text; active = Active; jumpTarget = Target; actionKey = ActionKey ? ActionKey : ""; @@ -1081,7 +1081,7 @@ CMenuForwarder::CMenuForwarder(const char * const Text, const bool Active, const option = NULL; option_string = &Option; text = NONEXISTANT_LOCALE; - the_text = Text; + forwarder_text = Text; active = Active; jumpTarget = Target; actionKey = ActionKey ? ActionKey : ""; @@ -1118,7 +1118,7 @@ void CMenuForwarder::setTextLocale(const neutrino_locale_t Text) // Without this, the changeNotifiers would become machine-dependent. void CMenuForwarder::setText(const char * const Text) { - the_text = Text; + forwarder_text = Text; if (used && x != -1) paint(); @@ -1151,7 +1151,7 @@ const char * CMenuForwarder::getName(void) { if (text != NONEXISTANT_LOCALE) return g_Locale->getText(text); - return the_text.c_str(); + return forwarder_text.c_str(); } int CMenuForwarder::paint(bool selected) diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h index fbbe821..af095e2 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.h +++ b/tuxbox/neutrino/src/gui/widget/menue.h @@ -135,6 +135,8 @@ class CMenuItem class CMenuSeparator : public CMenuItem { int type; + + protected: std::string separator_text; public: @@ -171,7 +173,7 @@ class CMenuForwarder : public CMenuItem protected: neutrino_locale_t text; - std::string the_text; + std::string forwarder_text; virtual const char * getOption(void); virtual const char * getName(void); commit cc3e7a66fbe098e78d50afa1b9b372bfb6752133 Author: Christian Schuett <Gau...@ho...> Date: Wed Oct 2 20:10:04 2013 +0200 Neutrino: fix current event marker in event list and EPG search Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index 4f7ab49..dc9e2f7 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -93,7 +93,7 @@ EventList::EventList() { frameBuffer = CFrameBuffer::getInstance(); selected = 0; - current_event = 0; + current_event = -1; m_search_list = SEARCH_LIST_NONE; m_search_epg_item = SEARCH_LIST_NONE; @@ -242,7 +242,7 @@ void EventList::readEvents(const t_channel_id channel_id) sort(evtlist.begin(),evtlist.end(),sortByDateTime); } - current_event = (unsigned int)-1; + current_event = -1; for ( e=evtlist.begin(); e!=evtlist.end(); ++e ) { if ( e->startTime > azeit ) { @@ -258,12 +258,19 @@ void EventList::readEvents(const t_channel_id channel_id) evt.description = ZapitTools::UTF8_to_Latin1(g_Locale->getText(LOCALE_EPGLIST_NOEVENTS)); #warning FIXME: evtlist should be utf8-encoded evt.eventID = 0; + evt.startTime = 0; + evt.duration = 0; evtlist.push_back(evt); } - if (current_event == (unsigned int)-1) - current_event = 0; - selected= current_event; + if (current_event > -1) + { + selected = current_event; + if (evtlist[current_event].startTime + (long)evtlist[current_event].duration < azeit) + current_event = -1; + } + else + selected = 0; return; } @@ -631,7 +638,7 @@ void EventList::paintItem(unsigned int pos) bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; c_rad_mid = RADIUS_MID; } - else if (curpos == current_event) + else if ((int)curpos == current_event) { color = COL_MENUCONTENT + 1; bgcolor = COL_MENUCONTENT_PLUS_1; @@ -993,7 +1000,7 @@ int EventList::findEvents(void) // remove duplicates evtlist.resize(unique(evtlist.begin(), evtlist.end(), uniqueByIdAndDateTime) - evtlist.begin()); #endif - current_event = (unsigned int)-1; + current_event = -1; time_t azeit=time(NULL); CChannelEventList::iterator e; @@ -1008,12 +1015,20 @@ int EventList::findEvents(void) { CChannelEvent evt; evt.description = ZapitTools::UTF8_to_Latin1(g_Locale->getText(LOCALE_EPGLIST_NOEVENTS)); +#warning FIXME: evtlist should be utf8-encoded evt.eventID = 0; + evt.startTime = 0; + evt.duration = 0; evtlist.push_back(evt); } - if (current_event == (unsigned int)-1) - current_event = 0; - selected= current_event; + if (current_event > -1) + { + selected = current_event; + if (evtlist[current_event].startTime + (long)evtlist[current_event].duration < azeit) + current_event = -1; + } + else + selected = 0; name = (std::string)g_Locale->getText(LOCALE_EVENTFINDER_SEARCH) + ": '" + ZapitTools::Latin1_to_UTF8(m_search_keyword.c_str()) + "'"; } diff --git a/tuxbox/neutrino/src/gui/eventlist.h b/tuxbox/neutrino/src/gui/eventlist.h index c892eb8..2fb7417 100644 --- a/tuxbox/neutrino/src/gui/eventlist.h +++ b/tuxbox/neutrino/src/gui/eventlist.h @@ -90,10 +90,10 @@ class EventList CChannelEventList evtlist; void readEvents(const t_channel_id channel_id); unsigned int selected; - unsigned int current_event; unsigned int liststart; unsigned int listmaxshow; unsigned int numwidth; + int current_event; int fheight; // Fonthoehe Channellist-Inhalt int fheight1,fheight2; int fwidth1,fwidth2; commit 12ab0b7e20b05ddb3afe89356294d69e11e7093f Author: Christian Schuett <Gau...@ho...> Date: Wed Oct 2 18:21:48 2013 +0200 nhttpd controlapi: add possibility to get timers in XML format ported from Coolstream Git Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp index 17e9f04..b667f54 100644 --- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp @@ -169,7 +169,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]= {"vcroutput", &CControlAPI::VCROutputCGI, "text/plain"}, {"scartmode", &CControlAPI::ScartModeCGI, "text/plain"}, // timer - {"timer", &CControlAPI::TimerCGI, "text/plain"}, + {"timer", &CControlAPI::TimerCGI, ""}, // bouquet editing {"setbouquet", &CControlAPI::setBouquetCGI, "text/plain"}, {"savebouquet", &CControlAPI::saveBouquetCGI, "text/plain"}, @@ -251,6 +251,7 @@ void CControlAPI::TimerCGI(CyhookHandler *hh) { if (!hh->ParamList.empty() && hh->ParamList["format"].empty()) { + hh->SetHeader(HTTP_OK, "text/plain; charset=iso-8859-1"); if (hh->ParamList["action"] == "new") doNewTimer(hh); else if (hh->ParamList["action"] == "modify") @@ -275,7 +276,12 @@ void CControlAPI::TimerCGI(CyhookHandler *hh) } else - SendTimers(hh); + { + if (hh->ParamList["format"] == "xml") + SendTimersXML(hh); + else + SendTimers(hh); + } } else hh->SendError(); @@ -1662,6 +1668,8 @@ void CControlAPI::SendTimers(CyhookHandler *hh) NeutrinoAPI->Timerd->getTimerList(timerlist); CTimerd::TimerList::iterator timer = timerlist.begin(); + hh->SetHeader(HTTP_OK, "text/plain; charset=iso-8859-1"); + for(; timer != timerlist.end();timer++) { // Add Data @@ -1718,6 +1726,227 @@ void CControlAPI::SendTimers(CyhookHandler *hh) } //----------------------------------------------------------------------------- +void CControlAPI::_SendTime(CyhookHandler *hh, struct tm *Time, int digits) +{ + char zTime[25] = {0}; + char zDate[25] = {0}; + strftime(zTime, 20, "%H:%M", Time); + strftime(zDate, 20, "%d.%m.%Y", Time); + hh->printf("\t\t\t\t\t<text>%s %s</text>\n", zDate, zTime); + hh->printf("\t\t\t\t\t<date>%s</date>\n", zDate); + hh->printf("\t\t\t\t\t<time>%s</time>\n", zTime); + hh->printf("\t\t\t\t\t<digits>%d</digits>\n", digits); + hh->printf("\t\t\t\t\t<day>%d</day>\n", Time->tm_mday); + hh->printf("\t\t\t\t\t<month>%d</month>\n", Time->tm_mon + 1); + hh->printf("\t\t\t\t\t<year>%d</year>\n", Time->tm_year + 1900); + hh->printf("\t\t\t\t\t<hour>%d</hour>\n", Time->tm_hour); + hh->printf("\t\t\t\t\t<min>%d</min>\n", Time->tm_min); +} + +//----------------------------------------------------------------------------- +void CControlAPI::SendTimersXML(CyhookHandler *hh) +{ + // Init local timer iterator + CTimerd::TimerList timerlist; // List of timers + NeutrinoAPI->Timerd->getTimerList(timerlist); + sort(timerlist.begin(), timerlist.end()); // sort timer + CTimerd::TimerList::iterator timer = timerlist.begin(); + +// std::string xml_response = ""; + hh->SetHeader(HTTP_OK, "text/xml; charset=iso-8859-1"); + hh->WriteLn("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>"); + hh->WriteLn("<timer>"); + + // general timer configuration + hh->WriteLn("\t<config>"); + + // Look for Recording Safety Timers too + int pre = 0, post = 0; + NeutrinoAPI->Timerd->getRecordingSafety(pre, post); +// hh->printf("\t\t\t<recording_safety>%d</recording_safety>\n", (int)timer->recordingSafety); + hh->printf("\t\t\t<pre_delay>%d</pre_delay>\n", pre); + hh->printf("\t\t\t<post_delay>%d</post_delay>\n", post); + hh->WriteLn("\t</config>"); + + // start timer list + hh->WriteLn("\t<timer_list>"); + + for(; timer != timerlist.end(); ++timer) + { + hh->WriteLn("\t\t<timer>"); + hh->printf("\t\t\t<type>%s</type>\n", (NeutrinoAPI->timerEventType2Str(timer->eventType)).c_str()); + hh->printf("\t\t\t<id>%d</id>\n", timer->eventID); + hh->printf("\t\t\t<state>%d</state>\n", (int)timer->eventState); + hh->printf("\t\t\t<type_number>%d</type_number>\n", (int)timer->eventType); + + // alarmtime + hh->WriteLn("\t\t\t<alarm>"); + + struct tm *alarmTime = localtime(&(timer->alarmTime)); + hh->WriteLn("\t\t\t\t<normal>"); + _SendTime(hh, alarmTime, (int)timer->alarmTime); + hh->WriteLn("\t\t\t\t</normal>"); + + time_t real_alarmTimeT = timer->alarmTime - pre; + struct tm *safetyAlarmTime = localtime(&real_alarmTimeT); + hh->WriteLn("\t\t\t\t<safety>"); + _SendTime(hh, safetyAlarmTime, (int)real_alarmTimeT); + hh->WriteLn("\t\t\t\t</safety>"); + + hh->WriteLn("\t\t\t</alarm>"); + + // announcetime + hh->WriteLn("\t\t\t<announce>"); + struct tm *announceTime = localtime(&(timer->announceTime)); + hh->WriteLn("\t\t\t\t<normal>"); + _SendTime(hh, announceTime, (int)timer->announceTime); + hh->WriteLn("\t\t\t\t</normal>"); + + time_t real_announceTimeT = timer->announceTime - pre; + struct tm *safetyAnnounceTime = localtime(&real_announceTimeT); + hh->WriteLn("\t\t\t\t<safety>"); + _SendTime(hh, safetyAnnounceTime, (int)real_announceTimeT); + hh->WriteLn("\t\t\t\t</safety>"); + + hh->WriteLn("\t\t\t</announce>"); + + // stoptime + if (timer->stopTime > 0) + { + hh->WriteLn("\t\t\t<stop>"); + struct tm *stopTime = localtime(&(timer->stopTime)); + hh->WriteLn("\t\t\t\t<normal>"); + _SendTime(hh, stopTime, (int)timer->stopTime); + hh->WriteLn("\t\t\t\t</normal>"); + + time_t real_stopTimeT = timer->stopTime - post; + struct tm *safetyStopTime = localtime(&real_stopTimeT); + hh->WriteLn("\t\t\t\t<safety>"); + _SendTime(hh, safetyStopTime, (int)real_stopTimeT); + hh->WriteLn("\t\t\t\t</safety>"); + + hh->WriteLn("\t\t\t</stop>"); + } + + // repeat + std::string zRep = NeutrinoAPI->timerEventRepeat2Str(timer->eventRepeat); + std::string zRepCount; + if (timer->eventRepeat == CTimerd::TIMERREPEAT_ONCE) + zRepCount = "-"; + else + zRepCount = (timer->repeatCount == 0) ? "∞" : string_printf("%dx",timer->repeatCount); + hh->WriteLn("\t\t\t<repeat>"); + hh->printf("\t\t\t\t<count>%s</count>\n", zRepCount.c_str()); + hh->printf("\t\t\t\t<number>%d</number>\n", (int)timer->eventRepeat); + hh->printf("\t\t\t\t<text>%s</text>\n", zRep.c_str()); + char weekdays[8]= {0}; + NeutrinoAPI->Timerd->setWeekdaysToStr(timer->eventRepeat, weekdays); + hh->printf("\t\t\t\t<weekdays>%s</weekdays>\n", weekdays); + hh->WriteLn("\t\t\t</repeat>"); + + // channel infos + std::string channel_name = ZapitTools::UTF8_to_Latin1(NeutrinoAPI->Zapit->getChannelName(timer->channel_id).c_str()); + if (channel_name.empty()) + channel_name = NeutrinoAPI->Zapit->isChannelTVChannel(timer->channel_id) ? "Unbekannter TV-Kanal" : "Unbekannter Radiokanal"; + + // epg title + std::string title = timer->epgTitle; + if (timer->epgID != 0) + { + CEPGData epgdata; + if (NeutrinoAPI->Sectionsd->getEPGid(timer->epgID, timer->epg_starttime, &epgdata)) + title = epgdata.title; + } + + // timer specific data + switch (timer->eventType) + { + case CTimerd::TIMER_NEXTPROGRAM : + { + hh->printf("\t\t\t<channel_id>" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS "</channel_id>\n", timer->channel_id); + hh->printf("\t\t\t<channel_name><![CDATA[%s]]></channel_name>\n", channel_name.c_str()); + hh->printf("\t\t\t<title><![CDATA[%s]]></title>\n", title.c_str()); + } + break; + case CTimerd::TIMER_ZAPTO : + { + hh->printf("\t\t\t<channel_id>" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS "</channel_id>\n", timer->channel_id); + hh->printf("\t\t\t<channel_name><![CDATA[%s]]></channel_name>\n", channel_name.c_str()); + hh->printf("\t\t\t<title><![CDATA[%s]]></title>\n", title.c_str()); + } + break; + case CTimerd::TIMER_RECORD : + { + hh->printf("\t\t\t<channel_id>" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS "</channel_id>\n", timer->channel_id); + hh->printf("\t\t\t<channel_name><![CDATA[%s]]></channel_name>\n", channel_name.c_str()); + hh->printf("\t\t\t<title><![CDATA[%s]]></title>\n", title.c_str()); + + // audio + if (timer->apids != TIMERD_APIDS_CONF) + { + hh->WriteLn("\t\t\t<audio>"); + hh->WriteLn("\t\t\t\t<apids_conf>false</apids_conf>"); + if (timer->apids & TIMERD_APIDS_STD) + hh->WriteLn("\t\t\t\t<apids_std>true</apids_std>"); + else + hh->WriteLn("\t\t\t\t<apids_std>false</apids_std>"); + if (timer->apids & TIMERD_APIDS_ALT) + hh->WriteLn("\t\t\t\t<apids_alt>true</apids_alt>"); + else + hh->WriteLn("\t\t\t\t<apids_alt>false</apids_alt>"); + if (timer->apids & TIMERD_APIDS_AC3) + hh->WriteLn("\t\t\t\t<apids_ac3>true</apids_ac3>"); + else + hh->WriteLn("\t\t\t\t<apids_ac3>false</apids_ac3>"); + hh->WriteLn("\t\t\t</audio>"); + } + else + { + hh->WriteLn("\t\t\t<audio>"); + hh->WriteLn("\t\t\t\t<apids_conf>true</apids_conf>"); + hh->WriteLn("\t\t\t\t<apids_std>false</apids_std>"); + hh->WriteLn("\t\t\t\t<apids_alt>false</apids_alt>"); + hh->WriteLn("\t\t\t\t<apids_ac3>false</apids_ac3>"); + hh->WriteLn("\t\t\t</audio>"); + } + + hh->printf("\t\t\t<recording_dir>%s</recording_dir>\n", timer->recordingDir); + hh->printf("\t\t\t<epg_id>%d</epg_id>\n", (int)timer->epgID); + } + break; + case CTimerd::TIMER_STANDBY : + { + hh->printf("\t\t\t<status>%s</status>\n", (timer->standby_on)? "on" : "off"); + } + break; + case CTimerd::TIMER_REMIND : + { + std::string _message; + _message = std::string(timer->message).substr(0, 20); + hh->printf("\t\t\t<message><![CDATA[%s]]></message>\n", _message.c_str()); + } + break; + case CTimerd::TIMER_EXEC_PLUGIN : + { + hh->printf("\t\t\t<plugin>%s</plugin>\n", timer->pluginName); + } + break; + case CTimerd::TIMER_SLEEPTIMER : + {} + break; + case CTimerd::TIMER_IMMEDIATE_RECORD : + {} + break; + default: + {} + } + hh->WriteLn("\t\t</timer>"); + } + hh->WriteLn("\t</timer_list>"); + hh->WriteLn("</timer>"); +} + +//----------------------------------------------------------------------------- // yweb : Extentions //----------------------------------------------------------------------------- diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.h b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.h index 7657a73..ab51508 100644 --- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.h +++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.h @@ -38,11 +38,13 @@ private: void SendBouquet(CyhookHandler *hh,int BouquetNr); void SendChannelList(CyhookHandler *hh); void SendTimers(CyhookHandler *hh); + void SendTimersXML(CyhookHandler *hh); // subs friend class CNeutrinoWebserver; // for timer /fb/ compatibility void doModifyTimer(CyhookHandler *hh); void doNewTimer(CyhookHandler *hh); + void _SendTime(CyhookHandler *hh, struct tm *Time, int digits); //yweb void YWeb_SendVideoStreamingPids(CyhookHandler *hh, int apid_no); @@ -110,7 +112,7 @@ public: // virtual functions for HookHandler/Hook virtual std::string getHookName(void) {return std::string("mod_ControlAPI");} - virtual std::string getHookVersion(void) {return std::string("$Revision: 1.8 $");} + virtual std::string getHookVersion(void) {return std::string("$Revision: 1.9 $");} virtual THandleStatus Hook_SendResponse(CyhookHandler *hh); virtual THandleStatus Hook_PrepareResponse(CyhookHandler *hh); }; diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp index 2ffdc1e..dcece93 100644 --- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp @@ -334,7 +334,7 @@ std::string CNeutrinoAPI::timerEventType2Str(CTimerd::CTimerEventTypes type) result = "Shutdown"; break; case CTimerd::TIMER_NEXTPROGRAM: - result = "Nächstes Programm"; + result = "Nächstes Programm"; break; case CTimerd::TIMER_ZAPTO: result = "Umschalten"; @@ -349,7 +349,7 @@ std::string CNeutrinoAPI::timerEventType2Str(CTimerd::CTimerEventTypes type) result = "Erinnerung"; break; case CTimerd::TIMER_EXEC_PLUGIN: - result = "Plugin ausführen"; + result = "Plugin ausführen"; break; case CTimerd::TIMER_SLEEPTIMER: result = "Sleeptimer"; @@ -371,16 +371,16 @@ std::string CNeutrinoAPI::timerEventRepeat2Str(CTimerd::CTimerEventRepeat rep) result = "einmal"; break; case CTimerd::TIMERREPEAT_DAILY: - result = "täglich"; + result = "täglich"; break; case CTimerd::TIMERREPEAT_WEEKLY: - result = "wöchentlich"; + result = "wöchentlich"; break; case CTimerd::TIMERREPEAT_BIWEEKLY: - result = "2-wöchentlich"; + result = "2-wöchentlich"; break; case CTimerd::TIMERREPEAT_FOURWEEKLY: - result = "4-wöchentlich"; + result = "4-wöchentlich"; break; case CTimerd::TIMERREPEAT_MONTHLY: result = "monatlich"; commit a08e7fedbaf7eb76ab8302a9fd5c8b1a9ada5814 Author: Christian Schuett <Gau...@ho...> Date: Sun Sep 29 14:52:04 2013 +0200 Neutrino: use cancel button instead of back button in expert-functions Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/update.cpp b/tuxbox/neutrino/src/gui/update.cpp index 5b2f934..08e57b1 100644 --- a/tuxbox/neutrino/src/gui/update.cpp +++ b/tuxbox/neutrino/src/gui/update.cpp @@ -680,7 +680,7 @@ int CFlashExpert::showMTDSelector(const std::string & actionkey) { //mtd-selector erzeugen CMenuWidget* mtdselector = new CMenuWidget(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, NEUTRINO_ICON_UPDATE, width); - mtdselector->addIntroItems(LOCALE_FLASHUPDATE_MTDSELECTOR); + mtdselector->addIntroItems(LOCALE_FLASHUPDATE_MTDSELECTOR, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); CMTDInfo* mtdInfo =CMTDInfo::getInstance(); for (int i = 0; i < mtdInfo->getMTDCount(); i++) { @@ -696,7 +696,7 @@ int CFlashExpert::showMTDSelector(const std::string & actionkey) int CFlashExpert::showFileSelector(const std::string & actionkey) { CMenuWidget* fileselector = new CMenuWidget(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, NEUTRINO_ICON_UPDATE, width); - fileselector->addIntroItems(LOCALE_FLASHUPDATE_FILESELECTOR); + fileselector->addIntroItems(LOCALE_FLASHUPDATE_FILESELECTOR, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); struct dirent **namelist; int n = scandir("/tmp", &namelist, 0, alphasort); if (n < 0) commit 1b5381ba119db406d542e2a88f705c4e96421989 Author: Christian Schuett <Gau...@ho...> Date: Sun Sep 29 14:44:18 2013 +0200 Neutrino moviebrowser: add rounded corners to selected item Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/widget/listframe.cpp b/tuxbox/neutrino/src/gui/widget/listframe.cpp index f0f9b67..fa32990 100644 --- a/tuxbox/neutrino/src/gui/widget/listframe.cpp +++ b/tuxbox/neutrino/src/gui/widget/listframe.cpp @@ -570,7 +570,8 @@ void CListFrame::refreshList(void) y, m_cFrameListRel.iWidth, m_nFontListHeight, - LIST_BACKGROUND_COLOR_SELECTED); + LIST_BACKGROUND_COLOR_SELECTED, + RADIUS_SMALL); } int width; int x = m_cFrameListRel.iX + TEXT_BORDER_WIDTH; @@ -622,7 +623,8 @@ void CListFrame::refreshLine(int line) y, m_cFrameListRel.iWidth, m_nFontListHeight, - LIST_BACKGROUND_COLOR_SELECTED); + LIST_BACKGROUND_COLOR_SELECTED, + RADIUS_SMALL); } else { commit b5685c0abf361202341745a2a57a7b63c0e38561 Author: Christian Schuett <Gau...@ho...> Date: Sat Sep 28 23:22:12 2013 +0200 Neutrino filebrowser: fix a signed/unsigned comparison compiler warning Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp index 34ad9cf..115b491 100644 --- a/tuxbox/neutrino/src/gui/filebrowser.cpp +++ b/tuxbox/neutrino/src/gui/filebrowser.cpp @@ -1261,7 +1261,7 @@ void CFileBrowser::paintItem(unsigned int pos) char f_name[256]; std::string FileName = FILESYSTEM_ENCODING_TO_UTF8_STRING(actual_file->getFileName()); - int i = FileName.length(); + unsigned int i = FileName.length(); sprintf(f_name, "%s", FileName.c_str()); /* too long? cut it! */ commit 358d43f095c2a123e4a45f8760872865b317da2a Author: Christian Schuett <Gau...@ho...> Date: Sat Sep 28 23:16:36 2013 +0200 Neutrino: consolidate CMenuForwarderNonLocalized into CMenuForwarder Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/audio_select.cpp b/tuxbox/neutrino/src/gui/audio_select.cpp index 3cf0ade..7fb16b6 100644 --- a/tuxbox/neutrino/src/gui/audio_select.cpp +++ b/tuxbox/neutrino/src/gui/audio_select.cpp @@ -128,7 +128,7 @@ int CAudioSelectMenuHandler::doMenu() std::ostringstream actionKey; actionKey << "AUD: " << i; - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized( + CMenuForwarder* fw = new CMenuForwarder( g_RemoteControl->current_PIDs.APIDs[i].desc, true, NULL, this, actionKey.str().c_str(), CRCInput::convertDigitToKey(++digit)); @@ -183,7 +183,7 @@ int CAudioSelectMenuHandler::doMenu() } text.append(getISO639Description(g_RemoteControl->current_PIDs.SubPIDs[i].desc)); - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(text.c_str(), + CMenuForwarder* fw = new CMenuForwarder(text.c_str(), active, NULL, this, actionKey.str().c_str(), CRCInput::convertDigitToKey(++digit)); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); diff --git a/tuxbox/neutrino/src/gui/drive_setup.cpp b/tuxbox/neutrino/src/gui/drive_setup.cpp index 5666ba7..a08b1e1 100644 --- a/tuxbox/neutrino/src/gui/drive_setup.cpp +++ b/tuxbox/neutrino/src/gui/drive_setup.cpp @@ -801,7 +801,7 @@ void CDriveSetup::showExtMenu(CMenuWidget *extsettings) CMenuForwarder *fw_reset = new CMenuForwarder(LOCALE_DRIVE_SETUP_RESET, true, NULL, this, "reset_drive_setup", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); //extended settings: filesystem format options - vector<CMenuForwarderNonLocalized*> v_fs_opts_items; + vector<CMenuForwarder*> v_fs_opts_items; for (size_t i=0; i<MAXCOUNT_FSTYPES; i++){ for (size_t j = 0; j<v_fs_modules.size(); j++){ if (v_fs_modules[j] != fstype[i].fsname) @@ -810,8 +810,8 @@ void CDriveSetup::showExtMenu(CMenuWidget *extsettings) if (v_input_fs_options[i] == NULL ) v_input_fs_options[i] = new CStringInputSMS(LOCALE_DRIVE_SETUP_ADVANCED_SETTINGS_MODUL_LOADCMD_OPTIONS_INPUT, d_settings.drive_fs_format_option[i], 32, LOCALE_DRIVE_SETUP_ADVANCED_SETTINGS_MODUL_LOADCMD_OPTIONS_INPUT_L1, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz- "); - CMenuForwarderNonLocalized * fw_item= NULL; - fw_item = new CMenuForwarderNonLocalized(fstype[i].fsname.c_str(), true, d_settings.drive_fs_format_option[i], v_input_fs_options[i]); + CMenuForwarder * fw_item= NULL; + fw_item = new CMenuForwarder(fstype[i].fsname.c_str(), true, d_settings.drive_fs_format_option[i], v_input_fs_options[i]); v_fs_opts_items.push_back(fw_item); } } @@ -839,14 +839,14 @@ void CDriveSetup::showExtMenu(CMenuWidget *extsettings) void CDriveSetup::showMMCParameterMenu(CMenuWidget* w_mmc) { //prepare mmc parameter input - std::vector<CMenuForwarderNonLocalized*> v_fw_mmc_load_parameters; + std::vector<CMenuForwarder*> v_fw_mmc_load_parameters; for (uint i=0; i < MAXCOUNT_MMC_MODULES; i++){ if (v_input_mmc_parameters[i] == NULL) v_input_mmc_parameters[i] = new CStringInputSMS(LOCALE_DRIVE_SETUP_ADVANCED_SETTINGS_MODUL_LOADCMD_OPTIONS_INPUT, &d_settings.drive_mmc_modul_parameter[i], 20, false, LOCALE_DRIVE_SETUP_ADVANCED_SETTINGS_MODUL_MMC_OPTIONS_INPUT_L1, NONEXISTANT_LOCALE, "1234567890abcdefghijklmnopqrstuvwxyz-= "); string m_name = have_mmc_modul[i] ? mmc_modules[i]: mmc_modules[i] + " " + g_Locale->getText(LOCALE_DRIVE_SETUP_MMC_MODUL_NOT_INSTALLED); - v_fw_mmc_load_parameters.push_back(new CMenuForwarderNonLocalized(m_name.c_str(), have_mmc_modul[i], d_settings.drive_mmc_modul_parameter[i], v_input_mmc_parameters[i])); + v_fw_mmc_load_parameters.push_back(new CMenuForwarder(m_name.c_str(), have_mmc_modul[i], d_settings.drive_mmc_modul_parameter[i], v_input_mmc_parameters[i])); } //mmc:paint submenue mmc parameters @@ -971,7 +971,7 @@ void CDriveSetup::showHddSetupSub() string dev_name = g_Locale->getText(mn_data[current_device].entry_locale); //menue sub: generate part items - CMenuForwarderNonLocalized *sub_part_entry[MAXCOUNT_PARTS]; + CMenuForwarder *sub_part_entry[MAXCOUNT_PARTS]; string partname[MAXCOUNT_PARTS]; string item_name[MAXCOUNT_PARTS]; for (uint i = 0; i<MAXCOUNT_PARTS; i++) @@ -980,7 +980,7 @@ void CDriveSetup::showHddSetupSub() partname[i] = partitions[current_device][i]; item_name[i] = getPartEntryString(partname[i]).c_str(), isActivePartition(partname[i]); - sub_part_entry[i] = new CMenuForwarderNonLocalized(item_name[i].c_str(), isActivePartition(partname[i]), NULL, part[i], NULL/*part_num_actionkey[i]*/, CRCInput::convertDigitToKey(i+1)); + sub_part_entry[i] = new CMenuForwarder(item_name[i].c_str(), isActivePartition(partname[i]), NULL, part[i], NULL/*part_num_actionkey[i]*/, CRCInput::convertDigitToKey(i+1)); } // generate all usable DATA from Device generateAllUsableDataOfDevice(current_device); diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index a3a384e..4f7ab49 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -1179,7 +1179,7 @@ int CEventFinderMenu::showMenu(void) CMenuForwarder* mf0 = new CMenuForwarder(LOCALE_EVENTFINDER_KEYWORD, true, *m_search_keyword, &stringInput, NULL, CRCInput::RC_1, NEUTRINO_ICON_BUTTON_1); CMenuOptionChooser* mo0 = new CMenuOptionChooser(LOCALE_EVENTFINDER_SEARCH_WITHIN_LIST, m_search_list, SEARCH_LIST_OPTIONS, SEARCH_LIST_OPTION_COUNT, true, this, CRCInput::RC_2, NEUTRINO_ICON_BUTTON_2); - m_search_channelname_mf = new CMenuForwarderNonLocalized("", *m_search_list != EventList::SEARCH_LIST_ALL, m_search_channelname, this, "3", CRCInput::RC_3, NEUTRINO_ICON_BUTTON_3); + m_search_channelname_mf = new CMenuForwarder("", *m_search_list != EventList::SEARCH_LIST_ALL, m_search_channelname, this, "3", CRCInput::RC_3, NEUTRINO_ICON_BUTTON_3); CMenuOptionChooser* mo1 = new CMenuOptionChooser(LOCALE_EVENTFINDER_SEARCH_WITHIN_EPG, m_search_epg_item, SEARCH_EPG_OPTIONS, SEARCH_EPG_OPTION_COUNT, true, NULL, CRCInput::RC_4, NEUTRINO_ICON_BUTTON_4); CMenuForwarder* mf1 = new CMenuForwarder(LOCALE_EVENTFINDER_START_SEARCH, true, NULL, this, "5", CRCInput::RC_5, NEUTRINO_ICON_BUTTON_5); diff --git a/tuxbox/neutrino/src/gui/eventlist.h b/tuxbox/neutrino/src/gui/eventlist.h index d9b4f89..c892eb8 100644 --- a/tuxbox/neutrino/src/gui/eventlist.h +++ b/tuxbox/neutrino/src/gui/eventlist.h @@ -157,7 +157,7 @@ class CEventListHandler : public CMenuTarget class CEventFinderMenu : public CMenuTarget, CChangeObserver { private: - CMenuForwarderNonLocalized* m_search_channelname_mf; + CMenuForwarder* m_search_channelname_mf; int* m_event; int* m_search_epg_item; diff --git a/tuxbox/neutrino/src/gui/experimental_menu.cpp b/tuxbox/neutrino/src/gui/experimental_menu.cpp index 864cc31..54108cd 100644 --- a/tuxbox/neutrino/src/gui/experimental_menu.cpp +++ b/tuxbox/neutrino/src/gui/experimental_menu.cpp @@ -65,7 +65,7 @@ int CExperimentalSettingsMenuHandler::doMenu () // the following to lines are examples //ExperimentalSettings.addItem( new CMenuOptionNumberChooser(NONEXISTANT_LOCALE, (int*) &g_settings.show_ca_status, true, 0, 1, 0, 0, LOCALE_OPTIONS_OFF, "show CA Status")); - //ExperimentalSettings.addItem(new CMenuForwarderNonLocalized("experimental1", true, NULL, new CChMosaicHandler(), id, CRCInput::RC_nokey, ""), false); + //ExperimentalSettings.addItem(new CMenuForwarder("experimental1", true, NULL, new CChMosaicHandler(), id, CRCInput::RC_nokey, ""), false); return ExperimentalSettings.exec(NULL, ""); diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp index 3ec0763..2eaf4f4 100644 --- a/tuxbox/neutrino/src/gui/moviebrowser.cpp +++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp @@ -2941,7 +2941,7 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) CIntInput* pBookPosIntInput[MAX_NUMBER_OF_BOOKMARK_ITEMS]; CIntInput* pBookTypeIntInput[MAX_NUMBER_OF_BOOKMARK_ITEMS]; CMenuWidget* pBookItemMenu[MAX_NUMBER_OF_BOOKMARK_ITEMS]; - CMenuForwarderNonLocalized* pBookItemMenuForwarder[MAX_NUMBER_OF_BOOKMARK_ITEMS]; + CMenuForwarder* pBookItemMenuForwarder[MAX_NUMBER_OF_BOOKMARK_ITEMS]; CBookItemMenuForwarderNotifier* pBookItemMenuForwarderNotifier[MAX_NUMBER_OF_BOOKMARK_ITEMS]; CIntInput bookStartIntInput (LOCALE_MOVIEBROWSER_EDIT_BOOK, (int&)movie_info->bookmarks.start, 5, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2); @@ -2971,7 +2971,7 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) pBookItemMenu[i]->addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_POSITION, true, pBookPosIntInput[i]->getValue(), pBookPosIntInput[i])); pBookItemMenu[i]->addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_TYPE, true, pBookTypeIntInput[i]->getValue(),pBookTypeIntInput[i])); - pBookItemMenuForwarder[i] = new CMenuForwarderNonLocalized(movie_info->bookmarks.user[i].name.c_str(), true, pBookPosIntInput[i]->getValue(), pBookItemMenu[i]); + pBookItemMenuForwarder[i] = new CMenuForwarder(movie_info->bookmarks.user[i].name.c_str(), true, pBookPosIntInput[i]->getValue(), pBookItemMenu[i]); pBookItemMenuForwarderNotifier[i]->setItem(pBookItemMenuForwarder[i]); bookmarkMenu.addItem(pBookItemMenuForwarder[i]); @@ -3194,7 +3194,7 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/) #endif #ifdef MOVEMANAGER mainMenu.addItem(GenericMenuSeparatorLine); - mainMenu.addItem( new CMenuForwarderNonLocalized("Kopierwerk", true, NULL, CMoveManager::getInstance(), NULL)); + mainMenu.addItem( new CMenuForwarder("Kopierwerk", true, NULL, CMoveManager::getInstance(), NULL)); #endif // MOVEMANAGER mainMenu.addItem(GenericMenuSeparatorLine); mainMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_HELP_HEAD, true, NULL, movieHelp, NULL, CRCInput::RC_help, NEUTRINO_ICON_BUTTON_HELP)); @@ -3316,7 +3316,7 @@ int CMovieBrowser::showStartPosSelectionMenu(void) // P2 snprintf(book[i], 19,"%5d min",position[menu_nr]/60); sprintf(menu_nr_str, "%d", menu_nr); - startPosItem = new CMenuForwarderNonLocalized(m_movieSelectionHandler->bookmarks.user[i].name.c_str(), true, book[i], &startPosChanger, menu_nr_str); + startPosItem = new CMenuForwarder(m_movieSelectionHandler->bookmarks.user[i].name.c_str(), true, book[i], &startPosChanger, menu_nr_str); startPosItem->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); startPosSelectionMenu.addItem(startPosItem); menu_nr++; @@ -3628,12 +3628,12 @@ void CMovieBrowser::autoFindSerie(void) ************************************************************************/ -CBookItemMenuForwarderNotifier::CBookItemMenuForwarderNotifier(CMenuForwarderNonLocalized* MenuForwarder) +CBookItemMenuForwarderNotifier::CBookItemMenuForwarderNotifier(CMenuForwarder* MenuForwarder) { menuForwarder = MenuForwarder; } -void CBookItemMenuForwarderNotifier::setItem(CMenuForwarderNonLocalized* MenuForwarder) +void CBookItemMenuForwarderNotifier::setItem(CMenuForwarder* MenuForwarder) { menuForwarder = MenuForwarder; } @@ -3942,7 +3942,7 @@ int CDirMenu::show(void) { sprintf(tmp,"%d",i); tmp[1]=0; - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized((*dirList)[i].name.c_str(), (dirState[i] != DIR_STATE_UNKNOWN), dirOptionText[i], this, tmp); + CMenuForwarder* fw = new CMenuForwarder((*dirList)[i].name.c_str(), (dirState[i] != DIR_STATE_UNKNOWN), dirOptionText[i], this, tmp); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); dirMenu.addItem(fw, i == 0); } diff --git a/tuxbox/neutrino/src/gui/moviebrowser.h b/tuxbox/neutrino/src/gui/moviebrowser.h index 44e9893..658622f 100644 --- a/tuxbox/neutrino/src/gui/moviebrowser.h +++ b/tuxbox/neutrino/src/gui/moviebrowser.h @@ -386,10 +386,10 @@ class CMovieBrowser : public CMenuTarget class CBookItemMenuForwarderNotifier : public CChangeObserver { private: - CMenuForwarderNonLocalized* menuForwarder; + CMenuForwarder* menuForwarder; public: - CBookItemMenuForwarderNotifier(CMenuForwarderNonLocalized* MenuForwarder = NULL); - void setItem(CMenuForwarderNonLocalized* MenuForwarder); + CBookItemMenuForwarderNotifier(CMenuForwarder* MenuForwarder = NULL); + void setItem(CMenuForwarder* MenuForwarder); bool changeNotify(const neutrino_locale_t, void* Data); }; diff --git a/tuxbox/neutrino/src/gui/movieplayer.cpp b/tuxbox/neutrino/src/gui/movieplayer.cpp index c9cd0b2..4a621a8 100644 --- a/tuxbox/neutrino/src/gui/movieplayer.cpp +++ b/tuxbox/neutrino/src/gui/movieplayer.cpp @@ -3607,7 +3607,7 @@ void CMoviePlayerGui::PlayFile (int parental) std::ostringstream actionKey; actionKey << "AUD: " << count; - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(apidtitle.c_str(), + CMenuForwarder* fw = new CMenuForwarder(apidtitle.c_str(), true, NULL, APIDChanger, actionKey.str().c_str(), CRCInput::convertDigitToKey(++digit)); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); @@ -3632,7 +3632,7 @@ void CMoviePlayerGui::PlayFile (int parental) std::ostringstream actionKey; actionKey << "AUD: " << count; - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(apidtitle.c_str(), + CMenuForwarder* fw = new CMenuForwarder(apidtitle.c_str(), true, NULL, APIDChanger, actionKey.str().c_str(), CRCInput::convertDigitToKey(++digit)); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); @@ -3671,7 +3671,7 @@ void CMoviePlayerGui::PlayFile (int parental) std::ostringstream actionKey; actionKey << "TTX: " << p_movie_info->subPids[i].subPage; - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(apidtitle.c_str(), + CMenuForwarder* fw = new CMenuForwarder(apidtitle.c_str(), hasTuxtxtPlugin, NULL, APIDChanger, actionKey.str().c_str(), CRCInput::convertDigitToKey(++digit)); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); @@ -3706,7 +3706,7 @@ void CMoviePlayerGui::PlayFile (int parental) std::ostringstream actionKey; actionKey << "DVB: " << subpid; - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(apidtitle.c_str(), + CMenuForwarder* fw = new CMenuForwarder(apidtitle.c_str(), hasDvbsubPlugin, NULL, APIDChanger, actionKey.str().c_str(), CRCInput::convertDigitToKey(++digit)); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); diff --git a/tuxbox/neutrino/src/gui/movieplayer2.cpp b/tuxbox/neutrino/src/gui/movieplayer2.cpp index a6ab3c0..b723969 100644 --- a/tuxbox/neutrino/src/gui/movieplayer2.cpp +++ b/tuxbox/neutrino/src/gui/movieplayer2.cpp @@ -3101,7 +3101,7 @@ CMoviePlayerGui::PlayStream(int streamtype) std::ostringstream actionKey; actionKey << "AUD: " << count; - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(apidtitle.c_str(), + CMenuForwarder* fw = new CMenuForwarder(apidtitle.c_str(), true, NULL, APIDChanger, actionKey.str().c_str(), CRCInput::convertDigitToKey(++digit)); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); @@ -3148,7 +3148,7 @@ CMoviePlayerGui::PlayStream(int streamtype) std::ostringstream actionKey; actionKey << "AUD: " << count; - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(apidtitle.c_str(), + CMenuForwarder* fw = new CMenuForwarder(apidtitle.c_str(), true, NULL, APIDChanger, actionKey.str().c_str(), CRCInput::convertDigitToKey(++digit)); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); @@ -3187,7 +3187,7 @@ CMoviePlayerGui::PlayStream(int streamtype) std::ostringstream actionKey; actionKey << "TTX: " << movieinfo.subPids[i].subPage; - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(apidtitle.c_str(), + CMenuForwarder* fw = new CMenuForwarder(apidtitle.c_str(), hasTuxtxtPlugin, NULL, APIDChanger, actionKey.str().c_str(), CRCInput::convertDigitToKey(++digit)); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); @@ -3236,7 +3236,7 @@ CMoviePlayerGui::PlayStream(int streamtype) std::ostringstream actionKey; actionKey << "DVB: " << subpid; - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(apidtitle.c_str(), + CMenuForwarder* fw = new CMenuForwarder(apidtitle.c_str(), hasDvbsubPlugin, NULL, APIDChanger, actionKey.str().c_str(), CRCInput::convertDigitToKey(++digit)); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); diff --git a/tuxbox/neutrino/src/gui/movieplayer_setup.cpp b/tuxbox/neutrino/src/gui/movieplayer_setup.cpp index 5e00021..58a951a 100644 --- a/tuxbox/neutrino/src/gui/movieplayer_setup.cpp +++ b/tuxbox/neutrino/src/gui/movieplayer_setup.cpp @@ -271,7 +271,7 @@ int CMoviePlayerSetup::showMoviePlayerSelectPlugin() sprintf(id, "%d", count); enabled_count++; - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(pluginName.c_str(), + CMenuForwarder* fw = new CMenuForwarder(pluginName.c_str(), true, NULL, this, id, CRCInput::convertDigitToKey(enabled_count)); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); diff --git a/tuxbox/neutrino/src/gui/neutrino_menu.cpp b/tuxbox/neutrino/src/gui/neutrino_menu.cpp index 465e61d..e5fcfae 100644 --- a/tuxbox/neutrino/src/gui/neutrino_menu.cpp +++ b/tuxbox/neutrino/src/gui/neutrino_menu.cpp @@ -467,7 +467,7 @@ bool CNeutrinoApp::showUserMenu(int button) if (StreamFeaturesChanger == NULL) StreamFeaturesChanger = new CStreamFeaturesChangeExec(); keyhelper.get(&key, &icon, cnt == 0 ? CRCInput::RC_blue : CRCInput::RC_nokey); - menu_item = new CMenuForwarderNonLocalized(g_PluginList->getName(count), true, NULL, StreamFeaturesChanger, id, key, icon); + menu_item = new CMenuForwarder(g_PluginList->getName(count), true, NULL, StreamFeaturesChanger, id, key, icon); menu->addItem(menu_item, (cnt == 0)); cnt++; } @@ -486,7 +486,7 @@ bool CNeutrinoApp::showUserMenu(int button) if (StreamFeaturesChanger == NULL) StreamFeaturesChanger = new CStreamFeaturesChangeExec(); keyhelper.get(&key, &icon, cnt == 0 ? CRCInput::RC_blue : CRCInput::RC_nokey); - menu_item = new CMenuForwarderNonLocalized(g_PluginList->getName(count), true, NULL, StreamFeaturesChanger, id, key, icon); + menu_item = new CMenuForwarder(g_PluginList->getName(count), true, NULL, StreamFeaturesChanger, id, key, icon); menu->addItem(menu_item, (cnt == 0)); cnt++; } diff --git a/tuxbox/neutrino/src/gui/nfs.cpp b/tuxbox/neutrino/src/gui/nfs.cpp index bf02791..ef978c8 100644 --- a/tuxbox/neutrino/src/gui/nfs.cpp +++ b/tuxbox/neutrino/src/gui/nfs.cpp @@ -162,7 +162,7 @@ int CNFSMountGui::menu() { sprintf(s2,"mountentry%d",i); sprintf(ISO_8859_1_entry[i],ZapitTools::UTF8_to_Latin1(m_entry[i]).c_str()); - mountMenuEntry[i] = new CMenuForwarderNonLocalized("", true, ISO_8859_1_entry[i], this, s2); + mountMenuEntry[i] = new CMenuForwarder("", true, ISO_8859_1_entry[i], this, s2); if (CFSMounter::isMounted(g_settings.network_nfs_local_dir[i])) mountMenuEntry[i]->iconName = NEUTRINO_ICON_MOUNTED; else @@ -304,7 +304,7 @@ int CNFSUmountGui::menu() s1 += it->mountPoint; std::string s2 = "doumount "; s2 += it->mountPoint; - CMenuForwarder *forwarder = new CMenuForwarderNonLocalized(s1.c_str(), true, NULL, this, s2.c_str()); + CMenuForwarder *forwarder = new CMenuForwarder(s1.c_str(), true, NULL, this, s2.c_str()); forwarder->iconName = NEUTRINO_ICON_MOUNTED; umountMenu.addItem(forwarder); } diff --git a/tuxbox/neutrino/src/gui/nfs.h b/tuxbox/neutrino/src/gui/nfs.h index 0a9932a..ea2c343 100644 --- a/tuxbox/neutrino/src/gui/nfs.h +++ b/tuxbox/neutrino/src/gui/nfs.h @@ -48,7 +48,7 @@ class CNFSMountGui : public CMenuTarget char m_entry[NETWORK_NFS_NR_OF_ENTRIES][200]; char ISO_8859_1_entry[NETWORK_NFS_NR_OF_ENTRIES][200]; - CMenuForwarderNonLocalized* mountMenuEntry[NETWORK_NFS_NR_OF_ENTRIES]; + CMenuForwarder* mountMenuEntry[NETWORK_NFS_NR_OF_ENTRIES]; CFSMounter::FS_Support m_nfs_sup; CFSMounter::FS_Support m_cifs_sup; diff --git a/tuxbox/neutrino/src/gui/osdlang_setup.cpp b/tuxbox/neutrino/src/gui/osdlang_setup.cpp index faaed36..cec7552 100644 --- a/tuxbox/neutrino/src/gui/osdlang_setup.cpp +++ b/tuxbox/neutrino/src/gui/osdlang_setup.cpp @@ -125,7 +125,7 @@ int COsdLangSetup::showSetup() if(pos != NULL) { *pos = '\0'; - CMenuForwarderNonLocalized* oj = new CMenuForwarderNonLocalized(locale, true, "", this, locale); + CMenuForwarder* oj = new CMenuForwarder(locale, true, "", this, locale); oj->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); osdl_setup->addItem(oj, strcmp(g_settings.language, locale) == 0); } diff --git a/tuxbox/neutrino/src/gui/personalize.cpp b/tuxbox/neutrino/src/gui/personalize.cpp index 72912c5..6e0372e 100644 --- a/tuxbox/neutrino/src/gui/personalize.cpp +++ b/tuxbox/neutrino/src/gui/personalize.cpp @@ -271,7 +271,7 @@ int CPersonalizeGui::ShowPersonalizationMenu() pMenu->addItem(new CMenuForwarder(LOCALE_PERSONALIZE_PINCODE, true, g_settings.personalize_pincode, &pinChangeWidget)); pMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_PERSONALIZE_ACCESS)); - CMenuForwarderNonLocalized *p_mn[widget_count]; + CMenuForwarder *p_mn[widget_count]; string mn_name; for (int i = 0; i<(widget_count); i++) @@ -281,7 +281,7 @@ int CPersonalizeGui::ShowPersonalizationMenu() string s(i_str.str()); string action_key = s; mn_name = v_widget[i]->getName(); - p_mn[i] = new CMenuForwarderNonLocalized(mn_name.c_str(), true, NULL, this, action_key.c_str(), CRCInput::convertDigitToKey(i+1)); + p_mn[i] = new CMenuForwarder(mn_name.c_str(), true, NULL, this, action_key.c_str(), CRCInput::convertDigitToKey(i+1)); pMenu->addItem(p_mn[i]); } diff --git a/tuxbox/neutrino/src/gui/record_setup.cpp b/tuxbox/neutrino/src/gui/record_setup.cpp index 2344932..1c7a25b 100644 --- a/tuxbox/neutrino/src/gui/record_setup.cpp +++ b/tuxbox/neutrino/src/gui/record_setup.cpp @@ -233,7 +233,7 @@ int CRecordSetup::showRecordSetup() temp[9] = 0; // terminate for sure CMenuWidget* dirRecordingSettings = new CMenuWidget(LOCALE_RECORDINGMENU_FILESETTINGS, NEUTRINO_ICON_RECORDING, width); toDelete.push_back(dirRecordingSettings); - dirMenu->addItem(new CMenuForwarderNonLocalized(temp, true, g_settings.recording_dir[i], dirRecordingSettings)); + dirMenu->addItem(new CMenuForwarder(temp, true, g_settings.recording_dir[i], dirRecordingSettings)); // subhead snprintf(temp, 10, " %d", i + 1); diff --git a/tuxbox/neutrino/src/gui/subchannel_select.cpp b/tuxbox/neutrino/src/gui/subchannel_select.cpp index cc83711..b39af9d 100644 --- a/tuxbox/neutrino/src/gui/subchannel_select.cpp +++ b/tuxbox/neutrino/src/gui/subchannel_select.cpp @@ -101,14 +101,14 @@ int CSubChannelSelectMenu::doMenu() nvod_time_x[0] = 0; sprintf(nvod_s, "%s - %s %s", nvod_time_a, nvod_time_e, nvod_time_x); - SubChannelSelector.addItem(new CMenuForwarderNonLocalized(nvod_s, true, NULL, this, nvod_id), count == g_RemoteControl->selected_subchannel); + SubChannelSelector.addItem(new CMenuForwarder(nvod_s, true, NULL, this, nvod_id), count == g_RemoteControl->selected_subchannel); } else { if (count == 0) - SubChannelSelector.addItem(new CMenuForwarderNonLocalized(Latin1_to_UTF8(e->subservice_name).c_str(), true, NULL, this, nvod_id, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); + SubChannelSelector.addItem(new CMenuForwarder(Latin1_to_UTF8(e->subservice_name).c_str(), true, NULL, this, nvod_id, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); else - SubChannelSelector.addItem(new CMenuForwarderNonLocalized(Latin1_to_UTF8(e->subservice_name).c_str(), true, NULL, this, nvod_id, CRCInput::convertDigitToKey(count)), count == g_RemoteControl->selected_subchannel); + SubChannelSelector.addItem(new CMenuForwarder(Latin1_to_UTF8(e->subservice_name).c_str(), true, NULL, this, nvod_id, CRCInput::convertDigitToKey(count)), count == g_RemoteControl->selected_subchannel); } count++; diff --git a/tuxbox/neutrino/src/gui/themes.cpp b/tuxbox/neutrino/src/gui/themes.cpp index 327f1fe..4981d07 100644 --- a/tuxbox/neutrino/src/gui/themes.cpp +++ b/tuxbox/neutrino/src/gui/themes.cpp @@ -135,9 +135,9 @@ void CThemes::readThemes(CMenuWidget &themes) *pos = '\0'; if ( p == 1 ) { userThemeFile = "{U}" + (std::string)file; - oj = new CMenuForwarderNonLocalized(file, true, "", this, userThemeFile.c_str()); + oj = new CMenuForwarder(file, true, "", this, userThemeFile.c_str()); } else - oj = new CMenuForwarderNonLocalized(file, true, "", this, file); + oj = new CMenuForwarder(file, true, "", this, file); oj->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); themes.addItem( oj ); } diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp index 4b42791..62938a3 100644 --- a/tuxbox/neutrino/src/gui/timerlist.cpp +++ b/tuxbox/neutrino/src/gui/timerlist.cpp @@ -1078,12 +1078,12 @@ int CTimerList::newTimer() PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS ",", channel->channel_id); - CMenuForwarderNonLocalized *tv_ch_item = new CMenuForwarderNonLocalized(channel->name, true, NULL, this, (std::string(cChannelId) + channel->name).c_str()); + CMenuForwarder *tv_ch_item = new CMenuForwarder(channel->name, true, NULL, this, (std::string(cChannelId) + channel->name).c_str()); tv_ch_item->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); mwtv->addItem(tv_ch_item); } if (!subchannellist.empty()) - mctv.addItem(new CMenuForwarderNonLocalized(bouquet->name, true, NULL, mwtv)); + mctv.addItem(new CMenuForwarder(bouquet->name, true, NULL, mwtv)); subchannellist.clear(); //radio @@ -1098,12 +1098,12 @@ int CTimerList::newTimer() PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS ",", channel->channel_id); - CMenuForwarderNonLocalized *radio_ch_item = new CMenuForwarderNonLocalized(channel->name, true, NULL, this, (std::string(cChannelId) + channel->name).c_str()); + CMenuForwarder *radio_ch_item = new CMenuForwarder(channel->name, true, NULL, this, (std::string(cChannelId) + channel->name).c_str()); radio_ch_item->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); mwradio->addItem(radio_ch_item); } if (!subchannellist.empty()) - mcradio.addItem(new CMenuForwarderNonLocalized(bouquet->name, true, NULL, mwradio)); + mcradio.addItem(new CMenuForwarder(bouquet->name, true, NULL, mwradio)); } //selct mode (tv/radio) CMenuWidget mm(LOCALE_TIMERLIST_MODESELECT, NEUTRINO_ICON_TIMER, width); diff --git a/tuxbox/neutrino/src/gui/update.cpp b/tuxbox/neutrino/src/gui/update.cpp index 0acd9f5..5b2f934 100644 --- a/tuxbox/neutrino/src/gui/update.cpp +++ b/tuxbox/neutrino/src/gui/update.cpp @@ -201,7 +201,7 @@ bool CFlashUpdate::selectHttpImage(void) descriptions.push_back(description); /* workaround since CMenuForwarder does not store the Option String itself */ update_menu_targets.push_back(new CUpdateMenuTarget(i, &selected)); - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(names[i].c_str(), true, descriptions[i].c_str(), update_menu_targets.back()); + CMenuForwarder* fw = new CMenuForwarder(names[i].c_str(), true, descriptions[i].c_str(), update_menu_targets.back()); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); SelectionWidget.addItem(fw); i++; @@ -686,7 +686,7 @@ int CFlashExpert::showMTDSelector(const std::string & actionkey) { char sActionKey[20]; sprintf(sActionKey, "%s%d", actionkey.c_str(), i); - mtdselector->addItem(new CMenuForwarderNonLocalized(mtdInfo->getMTDName(i).c_str(), true, NULL, this, sActionKey, CRCInput::convertDigitToKey(i+1))); + mtdselector->addItem(new CMenuForwarder(mtdInfo->getMTDName(i).c_str(), true, NULL, this, sActionKey, CRCInput::convertDigitToKey(i+1))); } int res = mtdselector->exec(NULL,""); delete mtdselector; @@ -715,7 +715,7 @@ int CFlashExpert::showFileSelector(const std::string & actionkey) || (int(filen.find(".flfs")) != -1) ) { - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(filen.c_str(), true, NULL, this, (actionkey + filen).c_str()); + CMenuForwarder* fw = new CMenuForwarder(filen.c_str(), true, NULL, this, (actionkey + filen).c_str()); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); fileselector->addItem(fw); #warning TODO: make sure filen is UTF-8 encoded diff --git a/tuxbox/neutrino/src/gui/widget/dirchooser.cpp b/tuxbox/neutrino/src/gui/widget/dirchooser.cpp index d7ee98e..50a8c65 100755 --- a/tuxbox/neutrino/src/gui/widget/dirchooser.cpp +++ b/tuxbox/neutrino/src/gui/widget/dirchooser.cpp @@ -195,7 +195,7 @@ void CRecDirChooser::initMenu(void) dirOptionText[i]=tmp; } snprintf(indexStr,10,"MID:%d",i); - CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(g_settings.recording_dir[i].c_str(), true, dirOptionText[i], this, indexStr); + CMenuForwarder* fw = new CMenuForwarder(g_settings.recording_dir[i].c_str(), true, dirOptionText[i], this, indexStr); fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true); addItem(fw, i == 0); // select first item } diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp index 5fa3cbc..672603c 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.cpp +++ b/tuxbox/neutrino/src/gui/widget/menue.cpp @@ -981,7 +981,7 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent) if (strcmp(options[count].c_str(), optionValue) == 0) selected = true; sprintf(cnt, "%d", count); - CMenuForwarderNonLocalized *mn_option = new CMenuForwarderNonLocalized(options[count].c_str(), true, NULL, selector, cnt); + CMenuForwarder *mn_option = new CMenuForwarder(options[count].c_str(), true, NULL, selector, cnt); mn_option->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true /*for selected item*/); menu->addItem(mn_option, selected); } @@ -1063,6 +1063,32 @@ CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active, iconName = IconName ? IconName : ""; } +CMenuForwarder::CMenuForwarder(const char * const Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName) +{ + option = Option; + option_string = NULL; + text = NONEXISTANT_LOCALE; + the_text = Text; + active = Active; + jumpTarget = Target; + actionKey = ActionKey ? ActionKey : ""; + directKey = DirectKey; + iconName = IconName ? IconName : ""; +} + +CMenuForwarder::CMenuForwarder(const char * cons... [truncated message content] |
From: Thilo G. <tux...@ne...> - 2013-09-28 16:19:39
|
Project "Tuxbox-GIT: cdk": The branch, master has been updated via f466c8331cf4c01cc3064f5cc20924d0dc41fbf4 (commit) from b6cf0c29568bf560ce0308ce2d3fdaec9df8c878 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f466c8331cf4c01cc3064f5cc20924d0dc41fbf4 Author: GetAway <get...@t-...> Date: Mon Sep 23 20:11:38 2013 +0200 busybox: fix building without procps Signed-off-by: Thilo Graf <db...@no...> diff --git a/config/busybox.config.m4 b/config/busybox.config.m4 index 7b77688..b698dbe 100644 --- a/config/busybox.config.m4 +++ b/config/busybox.config.m4 @@ -928,7 +928,9 @@ ifdef(`procps', `option(`CONFIG_PS', `y', `y') option(`CONFIG_FEATURE_PS_WIDE', `n', `n')', `# CONFIG_PS is not set -# CONFIG_FEATURE_PS_WIDE is not set') +# CONFIG_FEATURE_PS_WIDE is not set +') +# CONFIG_FEATURE_PS_LONG is not set # CONFIG_FEATURE_PS_TIME is not set # CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set # CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set ----------------------------------------------------------------------- Summary of changes: config/busybox.config.m4 | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) -- Tuxbox-GIT: cdk |
From: Thilo G. <tux...@ne...> - 2013-09-19 08:02:48
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via b0d16a5af89815a4de0478a20b356abb2c0f0534 (commit) via 53088f164b4873c57104ec437cd847b528336690 (commit) via 25ae510f8eb532311b27e95f737221ced4be96c8 (commit) from 70b73286b2cb14b6609589b38a5c65bb0407b84c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b0d16a5af89815a4de0478a20b356abb2c0f0534 Author: Christian Schuett <Gau...@ho...> Date: Wed Sep 18 22:45:27 2013 +0200 Neutrino channel list: mark current channel if not selected Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index 6e08f55..82d3189 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -266,7 +266,9 @@ CChannelList::CChannel* CChannelList::getChannel( int number) int CChannelList::getKey(int id) { - return chanlist[id]->key; + if (id > -1 && id < (int)chanlist.size()) + return chanlist[id]->key; + return 0; } static const std::string empty_string; @@ -275,29 +277,28 @@ const std::string & CChannelList::getActiveChannelName(void) const { if (selected < chanlist.size()) return chanlist[selected]->name; - else - return empty_string; + return empty_string; } t_satellite_position CChannelList::getActiveSatellitePosition(void) const { if (selected < chanlist.size()) return chanlist[selected]->satellitePosition; - else - return 0; + return 0; } t_channel_id CChannelList::getActiveChannel_ChannelID(void) const { if (selected < chanlist.size()) return chanlist[selected]->channel_id; - else - return 0; + return 0; } int CChannelList::getActiveChannelNumber(void) const { - return (selected + 1); + if (selected < chanlist.size()) + return chanlist[selected]->number; + return 0; } void CChannelList::updateSelection(unsigned int newpos) @@ -1299,6 +1300,12 @@ void CChannelList::paintItem(int pos) paintItem2DetailsLine(pos); c_rad_small = RADIUS_SMALL; } + else if (getKey(curr) == CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber()) + { + color = !displayNext ? COL_MENUCONTENT + 1 : COL_MENUCONTENTINACTIVE; + bgcolor = !displayNext ? COL_MENUCONTENT_PLUS_1 : COL_MENUCONTENTINACTIVE_PLUS_0; + c_rad_small = RADIUS_SMALL; + } else { color = !displayNext ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE; commit 53088f164b4873c57104ec437cd847b528336690 Author: Christian Schuett <Gau...@ho...> Date: Wed Sep 18 19:21:58 2013 +0200 Neutrino channel list: format satellite position in details box Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index 81ee4d8..6e08f55 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -1193,17 +1193,11 @@ void CChannelList::paintDetails(unsigned int index) if (g_info.delivery_system == DVB_S) { - char sstr[20]; - for (CZapitClient::SatelliteList::const_iterator satList_it = satList.begin(); satList_it != satList.end(); ++satList_it) - { - if (satList_it->satPosition == getActiveSatellitePosition()) - { - snprintf(sstr, 19, "%d", satList_it->satPosition); - sstr[19] = '\0'; - break; - } - } - desc = desc + " (" + sstr + ")"; + int satpos = getActiveSatellitePosition(); + char satpos_str[6]; + snprintf(satpos_str, 5, "%d.%d%c", satpos < 0 ? -satpos / 10 : satpos / 10, satpos < 0 ? -satpos % 10 : satpos % 10, satpos < 0 ? 'W' : 'E'); + satpos_str[5] = '\0'; + desc = desc + " (" + satpos_str + ")"; } g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true); commit 25ae510f8eb532311b27e95f737221ced4be96c8 Author: GetAway <get...@t-...> Date: Fri Sep 13 16:23:16 2013 +0200 shellexec: add parameter MENUTIMEOUT readme.txt contains information diff --git a/tuxbox/plugins/shellexec/readme.txt b/tuxbox/plugins/shellexec/readme.txt index 526d561..7289020 100644 --- a/tuxbox/plugins/shellexec/readme.txt +++ b/tuxbox/plugins/shellexec/readme.txt @@ -84,6 +84,16 @@ Wurde der Eintrag "FONT=" bereits weggelassen, sollte auch dieser Eintrag nicht verwendet werden, damit das Plugin den zum "pakenham.ttf" passenden Wert von 30 verwendet. +Mit der Angabe + +MENUTIMEOUT= + +kann das MENÃ-Timeout von z.Z. 60 Sek., das aus der neutrino.conf(timing.menu) +ausgelesen wird, überschrieben werden. Der Wert 0 schaltet das Timeout für das +FlexMenü aus. Es wird dann solange angezeigt, bis der Home-Button gedrückt wird. +120 Sekunden werden gesetzt, wenn neutrino.conf fehlt oder nicht gelesen werden +kann und keine Angabe mit MENUTIMEOUT gemacht wurde. + Der Eintrag PAGING=1 diff --git a/tuxbox/plugins/shellexec/shellexec.c b/tuxbox/plugins/shellexec/shellexec.c index e2bce11..374a85b 100644 --- a/tuxbox/plugins/shellexec/shellexec.c +++ b/tuxbox/plugins/shellexec/shellexec.c @@ -42,7 +42,7 @@ static char CFG_FILE[128]="/var/tuxbox/config/shellexec.conf"; #define LCD_CPL 12 #define LCD_RDIST 10 -#define SH_VERSION 2.56 +#define SH_VERSION 2.57 typedef struct {int fnum; FILE *fh[16];} FSTRUCT, *PFSTRUCT; static int direct[32]; @@ -472,6 +472,10 @@ FSTRUCT fstr; FSIZE_BIG=(FSIZE_MED*5)/4; FSIZE_SMALL=(FSIZE_MED*4)/5; } + if(strstr(line_buffer,"MENUTIMEOUT=")==line_buffer) + { + sscanf(strchr(line_buffer,'=')+1,"%d",&mtmo); + } if(strstr(line_buffer,"PAGING=")==line_buffer) { sscanf(strchr(line_buffer,'=')+1,"%d",&paging); @@ -907,6 +911,8 @@ time_t tm1,tm2; case -1: knew=0; + if (mtmo == 0) + break; time(&tm2); //printf("TLeft: %3d\r",mtmo-(tm2-tm1)); if((tm2-tm1)<mtmo) ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/gui/channellist.cpp | 39 ++++++++++++++++--------------- tuxbox/plugins/shellexec/readme.txt | 10 ++++++++ tuxbox/plugins/shellexec/shellexec.c | 8 +++++- 3 files changed, 37 insertions(+), 20 deletions(-) -- Tuxbox-GIT: apps |
From: Thilo G. <tux...@ne...> - 2013-09-18 06:33:01
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 70b73286b2cb14b6609589b38a5c65bb0407b84c (commit) via c4cea2baa889c59cc6221133583199fac25bfbd3 (commit) via 36fad8db9cb7e22a5bad0ec7ae59fea6bfaa5e61 (commit) via 8c39cdf259a902b2983f6609d6da48ec75ce4f50 (commit) via 7772724dd2c7278c7c4d8c075825b9205163fb1d (commit) via 9dd7c08dd86dad4f43b10562f6d70480446169b2 (commit) via c394bb8445eb4daaec6812c9eeba7dc7f119b3b9 (commit) via de5c2e36ecc34fa93c71d8d17433d89aefe46833 (commit) via 9ccaa7057551db077573fc85b005b97ea856edf4 (commit) via ee95c7976f52a542d87da5d126653d5da5807227 (commit) via 76e09074197aa84b4fd50bdc5fc80721737b3a90 (commit) via ae78557dff047b50ff66a5ed440670e5eb332e78 (commit) via d1650a8e70132c16ca7a31a28da5bd19c2f29bf7 (commit) from f40104ddf98ecec4d2915fa498460755035df921 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 70b73286b2cb14b6609589b38a5c65bb0407b84c Author: Christian Schuett <Gau...@ho...> Date: Tue Sep 17 20:51:10 2013 +0200 Neutrino channel list: only show current tuning params on current channel Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index 141e14c..81ee4d8 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -1135,7 +1135,7 @@ void CChannelList::paintDetails(unsigned int index) else { g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, full_width - 20, g_Locale->getText(LOCALE_EPGLIST_NOEVENTS), COL_MENUCONTENTDARK, 0, true); // UTF-8 } - if(g_settings.channellist_foot == FOOT_FREQ) { + if (g_settings.channellist_foot == FOOT_FREQ && g_Zapit->getCurrentServiceID() == getActiveChannel_ChannelID()) { TP_params TP; g_Zapit->get_current_TP(&TP); std::string desc = ""; commit c4cea2baa889c59cc6221133583199fac25bfbd3 Author: Christian Schuett <Gau...@ho...> Date: Tue Sep 17 20:49:09 2013 +0200 Neutrino channel list: remove bouquet name from details box Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index 16ff4f5..141e14c 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -1191,9 +1191,8 @@ void CChannelList::paintDetails(unsigned int index) } #endif - if (!(name.empty())) - desc+= " (" + name + ")"; - else if (g_info.delivery_system == DVB_S) { + if (g_info.delivery_system == DVB_S) + { char sstr[20]; for (CZapitClient::SatelliteList::const_iterator satList_it = satList.begin(); satList_it != satList.end(); ++satList_it) { commit 36fad8db9cb7e22a5bad0ec7ae59fea6bfaa5e61 Author: Christian Schuett <Gau...@ho...> Date: Sun Sep 15 01:14:10 2013 +0200 Neutrino channel list: fix tripledragon build Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index 9cf68e7..16ff4f5 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -1147,13 +1147,18 @@ void CChannelList::paintDetails(unsigned int index) sprintf (buf, "%d", TP.feparams.frequency / 1000000); desc = desc + buf + " "; - if (g_info.delivery_system == DVB_S) - sprintf(buf, "%d", TP.feparams.u.qpsk.symbol_rate / 1000); - else - sprintf(buf, "%d", TP.feparams.u.qam.symbol_rate / 1000); +#ifdef HAVE_TRIPLEDRAGON + sprintf(buf, "%d", TP.feparams.symbolrate / 1000); +#else + sprintf(buf, "%d", TP.feparams.u.qam.symbol_rate / 1000); +#endif desc = desc + buf + " "; - switch(TP.feparams.u.qam.fec_inner) +#ifdef HAVE_TRIPLEDRAGON + switch (TP.feparams.fec) +#else + switch (TP.feparams.u.qam.fec_inner) +#endif { case FEC_NONE: desc+= "NONE"; break; case FEC_1_2: desc+= "1/2"; break; @@ -1171,6 +1176,9 @@ void CChannelList::paintDetails(unsigned int index) } desc+= " DVB "; +#ifdef HAVE_TRIPLEDRAGON + desc+= "QPSK"; +#else switch (TP.feparams.u.qam.modulation) { case 0x00: desc+= "QPSK"; break; @@ -1181,6 +1189,7 @@ void CChannelList::paintDetails(unsigned int index) case 0x05: desc+= "QAM_256"; break; default: desc+= "QAM_AUTO"; break; } +#endif if (!(name.empty())) desc+= " (" + name + ")"; @@ -1198,7 +1207,6 @@ void CChannelList::paintDetails(unsigned int index) desc = desc + " (" + sstr + ")"; } - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true); } else if( !displayNext && g_settings.channellist_foot == FOOT_NEXT) { commit 8c39cdf259a902b2983f6609d6da48ec75ce4f50 Author: Christian Schuett <Gau...@ho...> Date: Sat Sep 14 20:29:33 2013 +0200 zapit: remove unnecessary #if HAVE_DVB_API_VERSION Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/dvb/zapit/src/zapit.cpp b/dvb/zapit/src/zapit.cpp index 8f90097..68d03e6 100644 --- a/dvb/zapit/src/zapit.cpp +++ b/dvb/zapit/src/zapit.cpp @@ -1714,11 +1714,7 @@ bool parse_command(CBasicMessage::Header &rmsg, int connfd) { TP_params TP; get_transponder(&TP); -#if HAVE_DVB_API_VERSION < 3 - INFO("current frequency: %lu", (long unsigned int)TP.feparams.Frequency); -#else INFO("current frequency: %lu", (long unsigned int)TP.feparams.frequency); -#endif CBasicServer::send_data(connfd, &TP, sizeof(TP)); break; } commit 7772724dd2c7278c7c4d8c075825b9205163fb1d Author: Christian Schuett <Gau...@ho...> Date: Thu Sep 12 20:34:55 2013 +0200 Neutrino: fix dreambox build and move some duplicate defines to zapittypes.h Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/dvb/zapit/include/zapit/client/zapittypes.h b/dvb/zapit/include/zapit/client/zapittypes.h index 5edc0e2..7e8b8b6 100644 --- a/dvb/zapit/include/zapit/client/zapittypes.h +++ b/dvb/zapit/include/zapit/client/zapittypes.h @@ -58,6 +58,18 @@ #define FE_SET_TONE SEC_SET_TONE #define FE_SET_VOLTAGE SEC_SET_VOLTAGE #define FE_DISEQC_RESET_OVERLOAD SEC_RESET_OVERLOAD +#define frequency Frequency +#define symbol_rate SymbolRate +#define inversion Inversion +#define fec_inner FEC_inner +#define modulation QAM +#define bandwidth bandWidth +#define code_rate_LP LP_CodeRate +#define code_rate_HP HP_CodeRate +#define constellation Constellation +#define transmission_mode TransmissionMode +#define guard_interval guardInterval +#define hierarchy_information HierarchyInformation struct dvb_diseqc_master_cmd { __u8 msg [6]; /* { framing, address, command, data [3] } */ diff --git a/dvb/zapit/src/getservices.cpp b/dvb/zapit/src/getservices.cpp index f58edfb..d0412cc 100644 --- a/dvb/zapit/src/getservices.cpp +++ b/dvb/zapit/src/getservices.cpp @@ -29,21 +29,6 @@ #include <configfile.h> #include <sys/stat.h> -#if !defined HAVE_TRIPLEDRAGON && HAVE_DVB_API_VERSION < 3 -#define frequency Frequency -#define symbol_rate SymbolRate -#define inversion Inversion -#define fec_inner FEC_inner -#define modulation QAM -#define bandwidth bandWidth -#define code_rate_LP LP_CodeRate -#define code_rate_HP HP_CodeRate -#define constellation Constellation -#define transmission_mode TransmissionMode -#define guard_interval guardInterval -#define hierarchy_information HierarchyInformation -#endif - extern transponder_list_t transponders; extern tallchans allchans; diff --git a/dvb/zapit/src/scan.cpp b/dvb/zapit/src/scan.cpp index 871cd80..9f6055a 100644 --- a/dvb/zapit/src/scan.cpp +++ b/dvb/zapit/src/scan.cpp @@ -40,21 +40,6 @@ #include <zapit/settings.h> #include <xmltree/xmlinterface.h> -#if !defined HAVE_TRIPLEDRAGON && HAVE_DVB_API_VERSION < 3 -#define frequency Frequency -#define symbol_rate SymbolRate -#define inversion Inversion -#define fec_inner FEC_inner -#define modulation QAM -#define bandwidth bandWidth -#define code_rate_LP LP_CodeRate -#define code_rate_HP HP_CodeRate -#define constellation Constellation -#define transmission_mode TransmissionMode -#define guard_interval guardInterval -#define hierarchy_information HierarchyInformation -#endif - short scan_runs; short curr_sat; static int status = 0; diff --git a/dvb/zapit/src/zapost/frontend.cpp b/dvb/zapit/src/zapost/frontend.cpp index 3433b13..e01fbb5 100644 --- a/dvb/zapit/src/zapost/frontend.cpp +++ b/dvb/zapit/src/zapost/frontend.cpp @@ -38,13 +38,6 @@ #define min(x,y) ((x < y) ? x : y) #define max(x,y) ((x > y) ? x : y) -#if HAVE_DVB_API_VERSION < 3 -#define frequency Frequency -#define inversion Inversion -#define modulation QAM -#define FE_SET_VOLTAGE SEC_SET_VOLTAGE -#endif - #define SOUTH 0 #define NORTH 1 #define EAST 0 diff --git a/dvb/zapit/src/zapsi/descriptors.cpp b/dvb/zapit/src/zapsi/descriptors.cpp index e19a46e..9fe7fd4 100644 --- a/dvb/zapit/src/zapsi/descriptors.cpp +++ b/dvb/zapit/src/zapsi/descriptors.cpp @@ -39,14 +39,6 @@ #ifdef _DVBFRONTEND_H_ #error HAVE_TRIPLEDRAGON && _DVBFRONTEND_H_ #endif -#else /* !TRIPLEDRAGON */ -#if HAVE_DVB_API_VERSION < 3 -#define frequency Frequency -#define symbol_rate SymbolRate -#define inversion Inversion -#define fec_inner FEC_inner -#define modulation QAM -#endif #endif extern tallchans allchans; // defined in zapit.cpp extern transponder_list_t transponders; // defined in zapit.cpp diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index ec411ba..9cf68e7 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -1159,10 +1159,13 @@ void CChannelList::paintDetails(unsigned int index) case FEC_1_2: desc+= "1/2"; break; case FEC_2_3: desc+= "2/3"; break; case FEC_3_4: desc+= "3/4"; break; - case FEC_4_5: desc+= "4/5"; break; case FEC_5_6: desc+= "5/6"; break; + case FEC_7_8: desc+= "7/8"; break; +#if HAVE_DVB_API_VERSION >= 3 + case FEC_4_5: desc+= "4/5"; break; case FEC_6_7: desc+= "6/7"; break; case FEC_8_9: desc+= "8/9"; break; +#endif case FEC_AUTO: desc+= "AUTO"; break; default: desc+= "UNKNOWN"; break; } diff --git a/tuxbox/neutrino/src/gui/scan_setup.cpp b/tuxbox/neutrino/src/gui/scan_setup.cpp index a6b5872..2def724 100644 --- a/tuxbox/neutrino/src/gui/scan_setup.cpp +++ b/tuxbox/neutrino/src/gui/scan_setup.cpp @@ -103,25 +103,14 @@ int CScanSetup::exec(CMenuTarget* parent, const std::string &actionKey) } #define SATSETUP_SCANTP_FEC_COUNT 5 -#if HAVE_DVB_API_VERSION < 3 const CMenuOptionChooser::keyval SATSETUP_SCANTP_FEC[SATSETUP_SCANTP_FEC_COUNT] = { - { 1, LOCALE_SCANTP_FEC_1_2 }, - { 2, LOCALE_SCANTP_FEC_2_3 }, - { 3, LOCALE_SCANTP_FEC_3_4 }, - { 4, LOCALE_SCANTP_FEC_5_6 }, - { 5, LOCALE_SCANTP_FEC_7_8 } + { FEC_1_2, LOCALE_SCANTP_FEC_1_2 }, + { FEC_2_3, LOCALE_SCANTP_FEC_2_3 }, + { FEC_3_4, LOCALE_SCANTP_FEC_3_4 }, + { FEC_5_6, LOCALE_SCANTP_FEC_5_6 }, + { FEC_7_8, LOCALE_SCANTP_FEC_7_8 } }; -#else -const CMenuOptionChooser::keyval SATSETUP_SCANTP_FEC[SATSETUP_SCANTP_FEC_COUNT] = -{ - { 1, LOCALE_SCANTP_FEC_1_2 }, - { 2, LOCALE_SCANTP_FEC_2_3 }, - { 3, LOCALE_SCANTP_FEC_3_4 }, - { 5, LOCALE_SCANTP_FEC_5_6 }, - { 7, LOCALE_SCANTP_FEC_7_8 } -}; -#endif #define CABLESETUP_SCANTP_MOD_COUNT 7 const CMenuOptionChooser::keyval CABLESETUP_SCANTP_MOD[CABLESETUP_SCANTP_MOD_COUNT] = @@ -131,8 +120,10 @@ const CMenuOptionChooser::keyval CABLESETUP_SCANTP_MOD[CABLESETUP_SCANTP_MOD_COU { QAM_32 , LOCALE_SCANTP_MOD_QAM_32 }, { QAM_64 , LOCALE_SCANTP_MOD_QAM_64 }, { QAM_128 , LOCALE_SCANTP_MOD_QAM_128 }, - { QAM_256 , LOCALE_SCANTP_MOD_QAM_256 }, - { QAM_AUTO, LOCALE_SCANTP_MOD_QAM_AUTO } + { QAM_256 , LOCALE_SCANTP_MOD_QAM_256 } +#if HAVE_DVB_API_VERSION >= 3 + , { QAM_AUTO, LOCALE_SCANTP_MOD_QAM_AUTO } +#endif }; #define SATSETUP_SCANTP_POL_COUNT 2 commit 9dd7c08dd86dad4f43b10562f6d70480446169b2 Author: GetAway <get...@t-...> Date: Tue Sep 10 09:09:39 2013 +0200 filebrowser: fix len of file description by using dots diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp index ae26658..e78a0ed 100644 --- a/tuxbox/neutrino/src/gui/filebrowser.cpp +++ b/tuxbox/neutrino/src/gui/filebrowser.cpp @@ -380,8 +380,8 @@ void CFileBrowser::commonInit() selected = 0; selections.clear(); - width = w_max(720, 40); - height = h_max(576, 40); + width = w_max(720, 30); + height = h_max(576, 30); theight = fnt_title->getHeight(); fheight = fnt_item->getHeight(); @@ -1226,8 +1226,8 @@ void CFileBrowser::paintItem(unsigned int pos) colwidth2 = 0; else colwidth2 = fnt_item->getRenderWidth("rwxrwxrwx"); - colwidth3 = fnt_item->getRenderWidth("222.222G"); - colwidth1 = width - 35 - colwidth2 - colwidth3 - 10; + colwidth3 = fnt_item->getRenderWidth("200.200G"); // zero is mostly the bigger digit + colwidth1 = width - 35 - colwidth2 - colwidth3 - 25; frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, c_rad_small); @@ -1260,7 +1260,21 @@ void CFileBrowser::paintItem(unsigned int pos) } frameBuffer->paintIcon(fileicon, x+5 , ypos + (fheight-16) / 2 ); - fnt_item->RenderString(x + 35, ypos + fheight, colwidth1 - 10 , FILESYSTEM_ENCODING_TO_UTF8_STRING(actual_file->getFileName()), color, 0, true); // UTF-8 + char f_name[256]; + std::string FileName = FILESYSTEM_ENCODING_TO_UTF8_STRING(actual_file->getFileName()); + int i = FileName.length(); + sprintf(f_name, "%s", FileName.c_str()); + + /* too long? cut it! */ + while ((fnt_item->getRenderWidth(&f_name[0], true) >= colwidth1) && (i > 2)) { + f_name[--i] = '\0'; + } + + if ( i < FileName.length()) { + f_name[i-2] = '\0'; + sprintf(f_name, "%s%s", &f_name[0], "..."); + } + fnt_item->RenderString(x + 35, ypos + fheight, colwidth1, &f_name[0], color, 0, true); // UTF-8 if( S_ISREG(actual_file->Mode) ) { commit c394bb8445eb4daaec6812c9eeba7dc7f119b3b9 Author: Christian Schuett <Gau...@ho...> Date: Sat Sep 7 20:46:53 2013 +0200 Neutrino: don't stop movieplayer after pressing home key in infobar Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp index 6db652d..5f84ab8 100644 --- a/tuxbox/neutrino/src/gui/infoviewer.cpp +++ b/tuxbox/neutrino/src/gui/infoviewer.cpp @@ -785,7 +785,7 @@ requests to sectionsd. } else { - if (( msg != CRCInput::RC_timeout ) && (msg != CRCInput::RC_ok)) + if (!tsmode && (msg != CRCInput::RC_timeout) && (msg != CRCInput::RC_ok)) g_RCInput->postMsg( msg, data ); res = messages_return::cancel_info; } commit de5c2e36ecc34fa93c71d8d17433d89aefe46833 Author: [CST] Focus <foc...@gm...> Date: Fri Sep 6 18:34:17 2013 +0200 Neutrino netfile: fix crash, id3 struct not initialized Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/driver/netfile.cpp b/tuxbox/neutrino/src/driver/netfile.cpp index f04123f..9547dfd 100644 --- a/tuxbox/neutrino/src/driver/netfile.cpp +++ b/tuxbox/neutrino/src/driver/netfile.cpp @@ -307,6 +307,7 @@ int request_file(URL *url) char str[255], *ptr; int slot; ID3 id3; + memset(&id3, 0, sizeof(ID3)); /* get the cache slot for this stream. A negative return value */ /* indicates that no cache has been set up for this stream */ commit 9ccaa7057551db077573fc85b005b97ea856edf4 Author: [CST] Focus <foc...@gm...> Date: Fri Sep 6 18:30:49 2013 +0200 libupnpclient: fix fd leak Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/misc/libs/libupnpclient/UPNPDevice.cpp b/misc/libs/libupnpclient/UPNPDevice.cpp index 797536e..314d71f 100644 --- a/misc/libs/libupnpclient/UPNPDevice.cpp +++ b/misc/libs/libupnpclient/UPNPDevice.cpp @@ -438,6 +438,7 @@ std::string CUPnPDevice::HTTP(std::string url, std::string post, std::string act buf[received] = 0; reply << buf; } + close(t_socket); return reply.str(); } commit ee95c7976f52a542d87da5d126653d5da5807227 Author: Christian Schuett <Gau...@ho...> Date: Fri Aug 23 18:34:10 2013 +0200 Neutrino timerlist: change home button caption to clarify its purpose Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale index 997db14..5702189 100644 --- a/tuxbox/neutrino/data/locale/deutsch.locale +++ b/tuxbox/neutrino/data/locale/deutsch.locale @@ -1429,6 +1429,7 @@ timerlist.apids_dflt Voreingestellte Tonspuren aufn. timerlist.bouquetselect Bouquet wählen timerlist.channel Kanal timerlist.channelselect Kanal wählen +timerlist.close SchlieÃen timerlist.delete Löschen timerlist.menumodify Timer bearbeiten timerlist.menunew Neuer Timer diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale index b849e12..c8fd982 100644 --- a/tuxbox/neutrino/data/locale/english.locale +++ b/tuxbox/neutrino/data/locale/english.locale @@ -1429,6 +1429,7 @@ timerlist.apids_dflt record default audio streams timerlist.bouquetselect choose bouquet timerlist.channel Channel timerlist.channelselect choose channel +timerlist.close Exit timerlist.delete Delete timerlist.menumodify Modify timer timerlist.menunew New timer diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp index 636d7ba..71e1ca4 100644 --- a/tuxbox/neutrino/src/gui/timerlist.cpp +++ b/tuxbox/neutrino/src/gui/timerlist.cpp @@ -764,7 +764,7 @@ const struct button_label TimerListButtons[5] = { NEUTRINO_ICON_BUTTON_RED , LOCALE_TIMERLIST_DELETE }, { NEUTRINO_ICON_BUTTON_GREEN , LOCALE_TIMERLIST_NEW }, { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERLIST_RELOAD }, - { NEUTRINO_ICON_BUTTON_HOME , LOCALE_MENU_CANCEL }, + { NEUTRINO_ICON_BUTTON_HOME , LOCALE_TIMERLIST_CLOSE }, { NEUTRINO_ICON_BUTTON_OKAY , LOCALE_TIMERLIST_MODIFY } }; diff --git a/tuxbox/neutrino/src/system/locals.h b/tuxbox/neutrino/src/system/locals.h index e3568e6..7146d89 100644 --- a/tuxbox/neutrino/src/system/locals.h +++ b/tuxbox/neutrino/src/system/locals.h @@ -1456,6 +1456,7 @@ typedef enum LOCALE_TIMERLIST_BOUQUETSELECT, LOCALE_TIMERLIST_CHANNEL, LOCALE_TIMERLIST_CHANNELSELECT, + LOCALE_TIMERLIST_CLOSE, LOCALE_TIMERLIST_DELETE, LOCALE_TIMERLIST_MENUMODIFY, LOCALE_TIMERLIST_MENUNEW, diff --git a/tuxbox/neutrino/src/system/locals_intern.h b/tuxbox/neutrino/src/system/locals_intern.h index 48f7703..79344af 100644 --- a/tuxbox/neutrino/src/system/locals_intern.h +++ b/tuxbox/neutrino/src/system/locals_intern.h @@ -1456,6 +1456,7 @@ const char * locale_real_names[] = "timerlist.bouquetselect", "timerlist.channel", "timerlist.channelselect", + "timerlist.close", "timerlist.delete", "timerlist.menumodify", "timerlist.menunew", commit 76e09074197aa84b4fd50bdc5fc80721737b3a90 Author: Christian Schuett <Gau...@ho...> Date: Sat Aug 17 17:08:45 2013 +0200 Neutrino: only record configured APIDs if recording is restarted Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index 13321fa..043a178 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -1849,7 +1849,14 @@ bool CNeutrinoApp::doGuiRecord(char * preselectedDir, bool addTimer, char * file eventinfo.epg_starttime = 0; strcpy(eventinfo.epgTitle, ""); } - eventinfo.apids = TIMERD_APIDS_CONF; + if (filename != NULL) + { + CTimerd::responseGetTimer timer; + g_Timerd->getTimer(timer, recording_id); + eventinfo.apids = timer.apids; + } + else + eventinfo.apids = TIMERD_APIDS_CONF; bool doRecord = true; if (g_settings.recording_type == RECORDING_FILE) { commit ae78557dff047b50ff66a5ed440670e5eb332e78 Author: Christian Schuett <Gau...@ho...> Date: Sat Aug 17 15:12:51 2013 +0200 Neutrino streaminfo: only show PMT and PCR PID if not 0 Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/streaminfo2.cpp b/tuxbox/neutrino/src/gui/streaminfo2.cpp index 8e4d619..2cb3aae 100644 --- a/tuxbox/neutrino/src/gui/streaminfo2.cpp +++ b/tuxbox/neutrino/src/gui/streaminfo2.cpp @@ -665,13 +665,19 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) //pmtpid ypos+= sheight+5; //blank line - sprintf((char*) buf, "0x%04x", si.pmtpid); + if (si.pmtpid != 0) + sprintf((char*) buf, "0x%04x", si.pmtpid); + else + sprintf((char*) buf, "%s", g_Locale->getText(LOCALE_STREAMINFO_NOT_AVAILABLE)); g_Font[font_small]->RenderString(xpos, ypos, width-10, "PMTpid:", COL_MENUCONTENT, 0, true); // UTF-8 g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8 //pcrpid ypos+= sheight; - sprintf((char*) buf, "0x%04x", si.pcrpid); + if (si.pcrpid != 0) + sprintf((char*) buf, "0x%04x", si.pcrpid); + else + sprintf((char*) buf, "%s", g_Locale->getText(LOCALE_STREAMINFO_NOT_AVAILABLE)); g_Font[font_small]->RenderString(xpos, ypos, width-10, "PCRpid:", COL_MENUCONTENT, 0, true); // UTF-8 g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8 @@ -688,7 +694,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) //apid if (g_RemoteControl->current_PIDs.APIDs.empty()){ ypos+= sheight; - sprintf((char*) buf, "Apid(s): %s", g_Locale->getText(LOCALE_STREAMINFO_NOT_AVAILABLE)); + sprintf((char*) buf, "Apid(s): %s", g_Locale->getText(LOCALE_STREAMINFO_NOT_AVAILABLE)); g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8 } else { unsigned int i; commit d1650a8e70132c16ca7a31a28da5bd19c2f29bf7 Author: Christian Schuett <Gau...@ho...> Date: Sat Aug 17 15:01:41 2013 +0200 Neutrino: only add PCR PID to direct recording and live streaming if not 0 Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp index 2b70340..e87e8e5 100644 --- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp @@ -1760,13 +1760,13 @@ void CControlAPI::YWeb_SendVideoStreamingPids(CyhookHandler *hh, int apid_no) if(hh->ParamList["no_commas"] != "") { hh->printf("0x%04x 0x%04x 0x%04x",pids.PIDs.pmtpid,pids.PIDs.vpid,apid); - if (pids.PIDs.pcrpid != pids.PIDs.vpid) + if (pids.PIDs.pcrpid != 0 && pids.PIDs.pcrpid != pids.PIDs.vpid) hh->printf(" 0x%04x", pids.PIDs.pcrpid); } else { hh->printf("0x%04x,0x%04x,0x%04x",pids.PIDs.pmtpid,pids.PIDs.vpid,apid); - if (pids.PIDs.pcrpid != pids.PIDs.vpid) + if (pids.PIDs.pcrpid != 0 && pids.PIDs.pcrpid != pids.PIDs.vpid) hh->printf(",0x%04x", pids.PIDs.pcrpid); } } @@ -2241,7 +2241,7 @@ void CControlAPI::build_live_url(CyhookHandler *hh) if(!pids.APIDs.empty()) apid = pids.APIDs[apid_idx].pid; xpids = string_printf("0x%04x,0x%04x,0x%04x",pids.PIDs.pmtpid,pids.PIDs.vpid,apid); - if (pids.PIDs.pcrpid != pids.PIDs.vpid) + if (pids.PIDs.pcrpid != 0 && pids.PIDs.pcrpid != pids.PIDs.vpid) xpids += string_printf(",0x%04x", pids.PIDs.pcrpid); } else if ( mode == CZapitClient::MODE_RADIO) diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp index 6e39a20..c6299ff 100644 --- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -492,7 +492,7 @@ std::string CNeutrinoYParser::func_get_video_pids(CyhookHandler */*hh*/, std::s if(!pids.APIDs.empty()) apid = pids.APIDs[apid_idx].pid; yresult = string_printf("0x%04x,0x%04x,0x%04x", pids.PIDs.pmtpid, pids.PIDs.vpid, apid); - if (pids.PIDs.pcrpid != pids.PIDs.vpid) + if (pids.PIDs.pcrpid != 0 && pids.PIDs.pcrpid != pids.PIDs.vpid) yresult += string_printf(",0x%04x", pids.PIDs.pcrpid); return yresult; } diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp index 927949c..1acda13 100644 --- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp +++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp @@ -765,7 +765,7 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c if (GenPsi && sptsmode) transfer_pids(si.vpid, EN_TYPE_VIDEO, 0); - if (si.pcrpid != si.vpid) + if (si.pcrpid != 0 && si.pcrpid != si.vpid) { pids[1] = si.pcrpid; numpids = 2; ----------------------------------------------------------------------- Summary of changes: dvb/zapit/include/zapit/client/zapittypes.h | 12 +++++++ dvb/zapit/src/getservices.cpp | 15 --------- dvb/zapit/src/scan.cpp | 15 --------- dvb/zapit/src/zapit.cpp | 4 -- dvb/zapit/src/zapost/frontend.cpp | 7 ---- dvb/zapit/src/zapsi/descriptors.cpp | 8 ----- misc/libs/libupnpclient/UPNPDevice.cpp | 1 + .../daemons/nhttpd/tuxboxapi/controlapi.cpp | 6 ++-- .../daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp | 2 +- tuxbox/neutrino/data/locale/deutsch.locale | 1 + tuxbox/neutrino/data/locale/english.locale | 1 + tuxbox/neutrino/src/driver/netfile.cpp | 1 + tuxbox/neutrino/src/driver/vcrcontrol.cpp | 2 +- tuxbox/neutrino/src/gui/channellist.cpp | 32 +++++++++++++------- tuxbox/neutrino/src/gui/filebrowser.cpp | 24 ++++++++++++--- tuxbox/neutrino/src/gui/infoviewer.cpp | 2 +- tuxbox/neutrino/src/gui/scan_setup.cpp | 27 +++++----------- tuxbox/neutrino/src/gui/streaminfo2.cpp | 12 +++++-- tuxbox/neutrino/src/gui/timerlist.cpp | 2 +- tuxbox/neutrino/src/neutrino.cpp | 9 +++++- tuxbox/neutrino/src/system/locals.h | 1 + tuxbox/neutrino/src/system/locals_intern.h | 1 + 22 files changed, 91 insertions(+), 94 deletions(-) -- Tuxbox-GIT: apps |
From: Thilo G. <tux...@ne...> - 2013-09-18 06:30:47
|
Project "Tuxbox-GIT: cdk": The branch, master has been updated via b6cf0c29568bf560ce0308ce2d3fdaec9df8c878 (commit) from cc0b185ccc4070d75255c7b08bec767e5af4a519 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b6cf0c29568bf560ce0308ce2d3fdaec9df8c878 Author: GetAway <get...@t-...> Date: Wed Apr 17 04:30:18 2013 +0200 version bump busybox-1.20.2 diff --git a/Patches/busybox-1.17.1.diff b/Patches/busybox-1.17.1.diff index 1a26fe4..3ad3045 100644 --- a/Patches/busybox-1.17.1.diff +++ b/Patches/busybox-1.17.1.diff @@ -1,7 +1,7 @@ -diff -uNr busybox-1.17.1.org//init/init.c busybox-1.17.1/init/init.c ---- busybox-1.17.1.org//init/init.c 2010-07-25 00:12:43.000000000 +0200 -+++ busybox-1.17.1/init/init.c 2010-08-01 11:42:45.000000000 +0200 -@@ -194,8 +194,10 @@ +diff -u -pr busybox-1.17.1.org/init/init.c busybox-1.17.1/init/init.c +--- busybox-1.17.1.org/init/init.c 2012-06-26 15:35:45.000000000 +0200 ++++ busybox-1.17.1/init/init.c 2013-04-16 20:19:23.000000000 +0200 +@@ -306,8 +306,10 @@ static void console_init(void) /* Not a linux terminal, probably serial console. * Force the TERM setting to vt102 * if TERM is set to linux (the default) */ @@ -11,11 +11,11 @@ diff -uNr busybox-1.17.1.org//init/init.c busybox-1.17.1/init/init.c +*/ if (!ENABLE_FEATURE_INIT_SYSLOG) log_console = NULL; - } else if (!s) -diff -uNr busybox-1.17.1.org//libbb/procps.c busybox-1.17.1/libbb/procps.c ---- busybox-1.17.1.org//libbb/procps.c 2010-07-06 04:25:54.000000000 +0200 -+++ busybox-1.17.1/libbb/procps.c 2010-08-01 11:42:45.000000000 +0200 -@@ -364,6 +364,20 @@ + } else +diff -u -pr busybox-1.17.1.org/libbb/procps.c busybox-1.17.1/libbb/procps.c +--- busybox-1.17.1.org/libbb/procps.c 2012-06-26 15:35:45.000000000 +0200 ++++ busybox-1.17.1/libbb/procps.c 2013-04-16 20:19:23.000000000 +0200 +@@ -483,6 +483,20 @@ procps_status_t* FAST_FUNC procps_scan(p sp->state[2] = ' '; } @@ -34,12 +34,23 @@ diff -uNr busybox-1.17.1.org//libbb/procps.c busybox-1.17.1/libbb/procps.c + } + #if ENABLE_FEATURE_TOPMEM - if (flags & (PSSCAN_SMAPS)) { - FILE *file; -diff -uNr busybox-1.17.1.org//miscutils/hdparm.c busybox-1.17.1/miscutils/hdparm.c ---- busybox-1.17.1.org//miscutils/hdparm.c 2010-07-06 04:25:54.000000000 +0200 -+++ busybox-1.17.1/miscutils/hdparm.c 2010-08-01 11:42:45.000000000 +0200 -@@ -288,6 +288,7 @@ + if (flags & PSSCAN_SMAPS) + procps_read_smaps(pid, &sp->smaps, NULL, NULL); +diff -u -pr busybox-1.17.1.org/loginutils/passwd.c busybox-1.17.1/loginutils/passwd.c +--- busybox-1.17.1.org/loginutils/passwd.c 2012-06-26 15:35:45.000000000 +0200 ++++ busybox-1.17.1/loginutils/passwd.c 2013-04-16 20:19:23.000000000 +0200 +@@ -15,6 +15,7 @@ + + #include "libbb.h" + #include <syslog.h> ++#include <sys/resource.h> + + static void nuke_str(char *str) + { +diff -u -pr busybox-1.17.1.org/miscutils/hdparm.c busybox-1.17.1/miscutils/hdparm.c +--- busybox-1.17.1.org/miscutils/hdparm.c 2012-06-26 15:35:45.000000000 +0200 ++++ busybox-1.17.1/miscutils/hdparm.c 2013-04-16 20:19:23.000000000 +0200 +@@ -339,6 +339,7 @@ struct globals { smallint set_sleepnow; smallint get_powermode; smallint getset_apmmode; @@ -47,7 +58,7 @@ diff -uNr busybox-1.17.1.org//miscutils/hdparm.c busybox-1.17.1/miscutils/hdparm int xfermode_requested; unsigned long dkeep; unsigned long standby_requested; /* 0..255 */ -@@ -297,6 +298,7 @@ +@@ -348,6 +349,7 @@ struct globals { unsigned long wcache; unsigned long doorlock; unsigned long apmmode; @@ -55,7 +66,7 @@ diff -uNr busybox-1.17.1.org//miscutils/hdparm.c busybox-1.17.1/miscutils/hdparm #endif IF_FEATURE_HDPARM_GET_IDENTITY( smallint get_IDentity;) IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( smallint getset_busstate;) -@@ -361,6 +363,8 @@ +@@ -412,6 +414,8 @@ struct BUG_G_too_big { #define set_sleepnow (G.set_sleepnow ) #define get_powermode (G.get_powermode ) #define getset_apmmode (G.getset_apmmode ) @@ -64,7 +75,7 @@ diff -uNr busybox-1.17.1.org//miscutils/hdparm.c busybox-1.17.1/miscutils/hdparm #define xfermode_requested (G.xfermode_requested ) #define dkeep (G.dkeep ) #define standby_requested (G.standby_requested ) -@@ -1680,6 +1684,10 @@ +@@ -1732,6 +1736,10 @@ static void process_dev(char *devname) ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args); args[1] = 0; } @@ -75,7 +86,7 @@ diff -uNr busybox-1.17.1.org//miscutils/hdparm.c busybox-1.17.1/miscutils/hdparm if (getset_wcache == IS_SET) { #ifdef DO_FLUSHCACHE #ifndef WIN_FLUSHCACHE -@@ -1986,7 +1994,7 @@ +@@ -2038,7 +2046,7 @@ static const char hdparm_options[] ALIGN IF_FEATURE_HDPARM_GET_IDENTITY("iI") IF_FEATURE_HDPARM_HDIO_GETSET_DMA("d::") #ifdef HDIO_DRIVE_CMD @@ -84,7 +95,7 @@ diff -uNr busybox-1.17.1.org//miscutils/hdparm.c busybox-1.17.1/miscutils/hdparm #endif IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF("U:") #ifdef HDIO_GET_QDMA -@@ -2026,6 +2034,7 @@ +@@ -2080,6 +2088,7 @@ int hdparm_main(int argc, char **argv) if (c == 'k') getset_keep = parse_opts_0_1(&keep); if (c == 'a') getset_readahead = parse_opts_0_INTMAX(&Xreadahead); if (c == 'B') getset_apmmode = parse_opts(&apmmode, 1, 255); @@ -92,10 +103,21 @@ diff -uNr busybox-1.17.1.org//miscutils/hdparm.c busybox-1.17.1/miscutils/hdparm do_flush |= do_timings |= (c == 't'); do_flush |= do_ctimings |= (c == 'T'); #ifdef HDIO_DRIVE_CMD -diff -uNr busybox-1.17.1.org//modutils/Config.src busybox-1.17.1/modutils/Config.src ---- busybox-1.17.1.org//modutils/Config.src 2010-07-25 00:12:43.000000000 +0200 -+++ busybox-1.17.1/modutils/Config.src 2010-08-01 11:42:45.000000000 +0200 -@@ -139,6 +139,13 @@ +diff -u -pr busybox-1.17.1.org/miscutils/time.c busybox-1.17.1/miscutils/time.c +--- busybox-1.17.1.org/miscutils/time.c 2012-06-26 15:35:45.000000000 +0200 ++++ busybox-1.17.1/miscutils/time.c 2013-04-16 20:19:23.000000000 +0200 +@@ -16,6 +16,7 @@ + //usage: "\n -v Verbose" + + #include "libbb.h" ++#include <sys/resource.h> + + /* Information on the resources used by a child process. */ + typedef struct { +diff -u -pr busybox-1.17.1.org/modutils/Config.src busybox-1.17.1/modutils/Config.src +--- busybox-1.17.1.org/modutils/Config.src 2012-06-26 15:35:45.000000000 +0200 ++++ busybox-1.17.1/modutils/Config.src 2013-04-16 20:19:23.000000000 +0200 +@@ -150,6 +150,13 @@ config FEATURE_INSMOD_TRY_MMAP Choosing N saves about 250 bytes of code (on 32-bit x86). @@ -109,7 +131,7 @@ diff -uNr busybox-1.17.1.org//modutils/Config.src busybox-1.17.1/modutils/Config config FEATURE_INSMOD_VERSION_CHECKING bool "Enable module version checking" default n -@@ -228,7 +235,7 @@ +@@ -247,7 +254,7 @@ config FEATURE_MODUTILS_SYMBOLS config DEFAULT_MODULES_DIR string "Default directory containing modules" default "/lib/modules" @@ -118,12 +140,12 @@ diff -uNr busybox-1.17.1.org//modutils/Config.src busybox-1.17.1/modutils/Config help Directory that contains kernel modules. Defaults to "/lib/modules" -diff -uNr busybox-1.17.1.org//modutils/insmod.c busybox-1.17.1/modutils/insmod.c ---- busybox-1.17.1.org//modutils/insmod.c 2010-07-06 04:25:54.000000000 +0200 -+++ busybox-1.17.1/modutils/insmod.c 2010-08-01 11:42:45.000000000 +0200 -@@ -32,11 +32,42 @@ - //usage: "\n -x Don't export externs" +diff -u -pr busybox-1.17.1.org/modutils/insmod.c busybox-1.17.1/modutils/insmod.c +--- busybox-1.17.1.org/modutils/insmod.c 2012-06-26 15:35:45.000000000 +0200 ++++ busybox-1.17.1/modutils/insmod.c 2013-04-16 21:58:24.000000000 +0200 +@@ -35,11 +35,42 @@ //usage: ) + //usage:#endif +#include <sys/utsname.h> +static char *m_filename; @@ -164,11 +186,11 @@ diff -uNr busybox-1.17.1.org//modutils/insmod.c busybox-1.17.1/modutils/insmod.c /* Compat note: * 2.6 style insmod has no options and required filename -@@ -55,9 +86,107 @@ +@@ -58,9 +89,107 @@ int insmod_main(int argc UNUSED_PARAM, c if (!filename) bb_show_usage(); -- rc = bb_init_module(filename, parse_cmdline_module_options(argv)); +- rc = bb_init_module(filename, parse_cmdline_module_options(argv, /*quote_spaces:*/ 0)); + /* Grab the module name */ + tmp = xstrdup(filename); + len = strlen(filename); @@ -267,17 +289,17 @@ diff -uNr busybox-1.17.1.org//modutils/insmod.c busybox-1.17.1/modutils/insmod.c + + + -+ rc = bb_init_module(m_filename, parse_cmdline_module_options(argv)); ++ rc = bb_init_module(m_filename, parse_cmdline_module_options(argv, /*quote_spaces:*/ 0)); if (rc) - bb_error_msg("can't insert '%s': %s", filename, moderror(rc)); + bb_error_msg("can't insert '%s': %s", m_filename, moderror(rc)); return rc; } -diff -uNr busybox-1.17.1.org//networking/ifupdown.c busybox-1.17.1/networking/ifupdown.c ---- busybox-1.17.1.org//networking/ifupdown.c 2010-07-06 04:25:54.000000000 +0200 -+++ busybox-1.17.1/networking/ifupdown.c 2010-08-01 11:42:45.000000000 +0200 -@@ -990,7 +990,7 @@ +diff -u -pr busybox-1.17.1.org/networking/ifupdown.c busybox-1.17.1/networking/ifupdown.c +--- busybox-1.17.1.org/networking/ifupdown.c 2012-07-02 16:19:22.000000000 +0200 ++++ busybox-1.17.1/networking/ifupdown.c 2013-04-16 20:19:23.000000000 +0200 +@@ -1025,7 +1025,7 @@ static int doit(char *str) static int execute_all(struct interface_defn_t *ifd, const char *opt) { @@ -286,7 +308,7 @@ diff -uNr busybox-1.17.1.org//networking/ifupdown.c busybox-1.17.1/networking/if char *buf; for (i = 0; i < ifd->n_options; i++) { if (strcmp(ifd->option[i].name, opt) == 0) { -@@ -1000,9 +1000,15 @@ +@@ -1035,9 +1035,15 @@ static int execute_all(struct interface_ } } @@ -305,29 +327,40 @@ diff -uNr busybox-1.17.1.org//networking/ifupdown.c busybox-1.17.1/networking/if } static int check(char *str) -diff -uNr busybox-1.17.1.org//networking/libiproute/ipaddress.c busybox-1.17.1/networking/libiproute/ipaddress.c ---- busybox-1.17.1.org//networking/libiproute/ipaddress.c 2010-07-25 00:12:43.000000000 +0200 -+++ busybox-1.17.1/networking/libiproute/ipaddress.c 2010-08-01 11:43:20.000000000 +0200 -@@ -164,6 +164,7 @@ +diff -u -pr busybox-1.17.1.org/networking/inetd.c busybox-1.17.1/networking/inetd.c +--- busybox-1.17.1.org/networking/inetd.c 2012-07-02 16:08:25.000000000 +0200 ++++ busybox-1.17.1/networking/inetd.c 2013-04-16 20:19:23.000000000 +0200 +@@ -166,6 +166,7 @@ + + #include <syslog.h> + #include <sys/un.h> ++#include <sys/resource.h> + + #include "libbb.h" + +diff -u -pr busybox-1.17.1.org/networking/libiproute/ipaddress.c busybox-1.17.1/networking/libiproute/ipaddress.c +--- busybox-1.17.1.org/networking/libiproute/ipaddress.c 2012-06-26 15:35:45.000000000 +0200 ++++ busybox-1.17.1/networking/libiproute/ipaddress.c 2013-04-16 20:19:23.000000000 +0200 +@@ -162,6 +162,7 @@ static NOINLINE int print_linkinfo(const printf("master %s ", ll_idx_n2a(*(int*)RTA_DATA(tb[IFLA_MASTER]), b1)); } #endif +#if 0 + /* IFLA_OPERSTATE was added to kernel with the same commit as IFF_DORMANT */ + #ifdef IFF_DORMANT if (tb[IFLA_OPERSTATE]) { - static const char operstate_labels[] ALIGN1 = - "UNKNOWN\0""NOTPRESENT\0""DOWN\0""LOWERLAYERDOWN\0" -@@ -171,6 +172,7 @@ - printf("state %s ", nth_string(operstate_labels, +@@ -172,6 +173,7 @@ static NOINLINE int print_linkinfo(const *(uint8_t *)RTA_DATA(tb[IFLA_OPERSTATE]))); } + #endif +#endif if (G_filter.showqueue) print_queuelen((char*)RTA_DATA(tb[IFLA_IFNAME])); -diff -uNr busybox-1.17.1.org//networking/libiproute/iplink.c busybox-1.17.1/networking/libiproute/iplink.c ---- busybox-1.17.1.org//networking/libiproute/iplink.c 2010-07-25 00:12:43.000000000 +0200 -+++ busybox-1.17.1/networking/libiproute/iplink.c 2010-08-01 11:55:39.000000000 +0200 -@@ -274,6 +274,7 @@ +diff -u -pr busybox-1.17.1.org/networking/libiproute/iplink.c busybox-1.17.1/networking/libiproute/iplink.c +--- busybox-1.17.1.org/networking/libiproute/iplink.c 2012-06-26 15:35:45.000000000 +0200 ++++ busybox-1.17.1/networking/libiproute/iplink.c 2013-04-16 20:19:23.000000000 +0200 +@@ -277,6 +277,7 @@ static int ipaddr_list_link(char **argv) return ipaddr_list_or_flush(argv, 0); } @@ -335,7 +368,7 @@ diff -uNr busybox-1.17.1.org//networking/libiproute/iplink.c busybox-1.17.1/netw #ifndef NLMSG_TAIL #define NLMSG_TAIL(nmsg) \ ((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len))) -@@ -360,20 +361,22 @@ +@@ -363,20 +364,22 @@ static int do_change(char **argv, const return 2; return 0; } @@ -362,10 +395,32 @@ diff -uNr busybox-1.17.1.org//networking/libiproute/iplink.c busybox-1.17.1/netw return do_set(argv); } /* show, lst, list */ -diff -uNr busybox-1.17.1.org//util-linux/mount.c busybox-1.17.1/util-linux/mount.c ---- busybox-1.17.1.org//util-linux/mount.c 2010-07-06 04:25:54.000000000 +0200 -+++ busybox-1.17.1/util-linux/mount.c 2010-08-01 11:42:45.000000000 +0200 -@@ -418,6 +418,24 @@ +diff -u -pr busybox-1.17.1.org/networking/udhcp/dhcpc.c busybox-1.17.1/networking/udhcp/dhcpc.c +--- busybox-1.17.1.org/networking/udhcp/dhcpc.c 2012-07-02 16:08:25.000000000 +0200 ++++ busybox-1.17.1/networking/udhcp/dhcpc.c 2013-04-16 20:26:27.000000000 +0200 +@@ -25,6 +25,7 @@ + #include "dhcpd.h" + #include "dhcpc.h" + ++#include <asm/types.h> + #include <netinet/if_ether.h> + #include <netpacket/packet.h> + #include <linux/filter.h> +diff -u -pr busybox-1.17.1.org/shell/shell_common.c busybox-1.17.1/shell/shell_common.c +--- busybox-1.17.1.org/shell/shell_common.c 2012-06-26 15:35:45.000000000 +0200 ++++ busybox-1.17.1/shell/shell_common.c 2013-04-16 20:19:23.000000000 +0200 +@@ -18,6 +18,7 @@ + */ + #include "libbb.h" + #include "shell_common.h" ++#include <sys/resource.h> + + const char defifsvar[] ALIGN1 = "IFS= \t\n"; + +diff -u -pr busybox-1.17.1.org/util-linux/mount.c busybox-1.17.1/util-linux/mount.c +--- busybox-1.17.1.org/util-linux/mount.c 2012-07-02 16:08:25.000000000 +0200 ++++ busybox-1.17.1/util-linux/mount.c 2013-04-16 22:05:02.000000000 +0200 +@@ -546,6 +546,24 @@ static void delete_block_backed_filesyst void delete_block_backed_filesystems(void); #endif @@ -390,7 +445,7 @@ diff -uNr busybox-1.17.1.org//util-linux/mount.c busybox-1.17.1/util-linux/mount // Perform actual mount of specific filesystem at specific location. // NB: mp->xxx fields may be trashed on exit static int mount_it_now(struct mntent *mp, long vfsflags, char *filteropts) -@@ -875,7 +893,11 @@ +@@ -981,7 +999,11 @@ find_kernel_nfs_mount_version(void) kernel_version = get_linux_version_code(); if (kernel_version) { @@ -403,7 +458,7 @@ diff -uNr busybox-1.17.1.org//util-linux/mount.c busybox-1.17.1/util-linux/mount nfs_mount_version = 3; /* else v4 since 2.3.99pre4 */ } -@@ -1608,8 +1630,6 @@ +@@ -1758,8 +1780,6 @@ static int singlemount(struct mntent *mp llist_t *fl = NULL; struct stat st; @@ -412,7 +467,7 @@ diff -uNr busybox-1.17.1.org//util-linux/mount.c busybox-1.17.1/util-linux/mount vfsflags = parse_mount_options(mp->mnt_opts, &filteropts); // Treat fstype "auto" as unspecified -@@ -1651,41 +1671,52 @@ +@@ -1801,40 +1821,51 @@ static int singlemount(struct mntent *mp && (mp->mnt_fsname[0] == '/' || mp->mnt_fsname[0] == '\\') && mp->mnt_fsname[0] == mp->mnt_fsname[1] ) { @@ -476,22 +531,21 @@ diff -uNr busybox-1.17.1.org//util-linux/mount.c busybox-1.17.1/util-linux/mount } // Might this be an NFS filesystem? - if (ENABLE_FEATURE_MOUNT_NFS -- && (!mp->mnt_type || strcmp(mp->mnt_type, "nfs") == 0) -+ && (!mp->mnt_type || !strcmp(mp->mnt_type, "nfs")) +- if ((!mp->mnt_type || strncmp(mp->mnt_type, "nfs", 3) == 0) ++ if ((!mp->mnt_type || !strcmp(mp->mnt_type, "nfs")) && strchr(mp->mnt_fsname, ':') != NULL ) { - rc = nfsmount(mp, vfsflags, filteropts); -@@ -1703,7 +1734,7 @@ + if (!mp->mnt_type) +@@ -1854,7 +1885,7 @@ static int singlemount(struct mntent *mp if (ENABLE_FEATURE_MOUNT_LOOP && S_ISREG(st.st_mode)) { loopFile = bb_simplify_path(mp->mnt_fsname); mp->mnt_fsname = NULL; // will receive malloced loop dev name -- if (set_loop(&mp->mnt_fsname, loopFile, 0) < 0) { -+ if (set_loop(&(mp->mnt_fsname), loopFile, 0) < 0) { +- if (set_loop(&mp->mnt_fsname, loopFile, 0, /*ro:*/ 0) < 0) { ++ if (set_loop(&(mp->mnt_fsname), loopFile, 0, /*ro:*/ 0) < 0) { if (errno == EPERM || errno == EACCES) bb_error_msg(bb_msg_perm_denied_are_you_root); else -@@ -1830,8 +1861,7 @@ +@@ -1990,8 +2021,7 @@ int mount_main(int argc UNUSED_PARAM, ch llist_t *lst_o = NULL; const char *fstabname; FILE *fstab; @@ -501,7 +555,7 @@ diff -uNr busybox-1.17.1.org//util-linux/mount.c busybox-1.17.1/util-linux/mount unsigned opt; struct mntent mtpair[2], *mtcur = mtpair; IF_NOT_DESKTOP(const int nonroot = 0;) -@@ -1871,9 +1901,9 @@ +@@ -2033,9 +2063,9 @@ int mount_main(int argc UNUSED_PARAM, ch { // Don't show rootfs. FIXME: why?? // util-linux 2.12a happily shows rootfs... @@ -513,7 +567,7 @@ diff -uNr busybox-1.17.1.org//util-linux/mount.c busybox-1.17.1/util-linux/mount printf("%s on %s type %s (%s)\n", mtpair->mnt_fsname, mtpair->mnt_dir, mtpair->mnt_type, mtpair->mnt_opts); -@@ -1919,14 +1949,14 @@ +@@ -2081,14 +2111,14 @@ int mount_main(int argc UNUSED_PARAM, ch return rc; } @@ -533,7 +587,7 @@ diff -uNr busybox-1.17.1.org//util-linux/mount.c busybox-1.17.1/util-linux/mount fstab = setmntent(fstabname, "r"); if (!fstab) bb_perror_msg_and_die("can't read '%s'", fstabname); -@@ -1951,13 +1981,10 @@ +@@ -2113,13 +2143,10 @@ int mount_main(int argc UNUSED_PARAM, ch if (argv[0]) { // Is this what we're looking for? @@ -551,7 +605,7 @@ diff -uNr busybox-1.17.1.org//util-linux/mount.c busybox-1.17.1/util-linux/mount // Remember this entry. Something later may have // overmounted it, and we want the _last_ match. -@@ -1965,7 +1992,6 @@ +@@ -2127,7 +2154,6 @@ int mount_main(int argc UNUSED_PARAM, ch // If we're mounting all } else { @@ -559,7 +613,7 @@ diff -uNr busybox-1.17.1.org//util-linux/mount.c busybox-1.17.1/util-linux/mount // No, mount -a won't mount anything, // even user mounts, for mere humans if (nonroot) -@@ -1993,25 +2019,10 @@ +@@ -2155,25 +2181,10 @@ int mount_main(int argc UNUSED_PARAM, ch // NFS mounts want this to be xrealloc-able mtcur->mnt_opts = xstrdup(mtcur->mnt_opts); @@ -589,7 +643,7 @@ diff -uNr busybox-1.17.1.org//util-linux/mount.c busybox-1.17.1/util-linux/mount } free(mtcur->mnt_opts); } -@@ -2052,24 +2063,13 @@ +@@ -2214,24 +2225,13 @@ int mount_main(int argc UNUSED_PARAM, ch bb_error_msg_and_die(bb_msg_you_must_be_root); } @@ -621,10 +675,10 @@ diff -uNr busybox-1.17.1.org//util-linux/mount.c busybox-1.17.1/util-linux/mount } //ret: -diff -uNr busybox-1.17.1.org//util-linux/swaponoff.c busybox-1.17.1/util-linux/swaponoff.c ---- busybox-1.17.1.org//util-linux/swaponoff.c 2010-07-06 04:25:54.000000000 +0200 -+++ busybox-1.17.1/util-linux/swaponoff.c 2010-08-01 11:42:45.000000000 +0200 -@@ -55,15 +55,36 @@ +diff -u -pr busybox-1.17.1.org/util-linux/swaponoff.c busybox-1.17.1/util-linux/swaponoff.c +--- busybox-1.17.1.org/util-linux/swaponoff.c 2012-06-26 15:35:45.000000000 +0200 ++++ busybox-1.17.1/util-linux/swaponoff.c 2013-04-16 20:19:23.000000000 +0200 +@@ -77,15 +77,36 @@ static int swap_enable_disable(char *dev return 0; } @@ -663,47 +717,3 @@ diff -uNr busybox-1.17.1.org//util-linux/swaponoff.c busybox-1.17.1/util-linux/s err = 0; while ((m = getmntent(f)) != NULL) { -diff -uNr busybox-1.19.4.org/loginutils/passwd.c busybox-1.19.4/loginutils/passwd.c ---- busybox-1.19.4.org/loginutils/passwd.c 2012-02-04 20:34:24.000000000 +0100 -+++ busybox-1.19.4/loginutils/passwd.c 2012-04-08 15:03:50.000000000 +0200 -@@ -15,6 +15,7 @@ - - #include "libbb.h" - #include <syslog.h> -+#include <sys/resource.h> - - static void nuke_str(char *str) - { -diff -uNr busybox-1.19.4.org/miscutils/time.c busybox-1.19.4/miscutils/time.c ---- busybox-1.19.4.org/miscutils/time.c 2012-02-04 20:24:55.000000000 +0100 -+++ busybox-1.19.4/miscutils/time.c 2012-04-08 15:04:49.000000000 +0200 -@@ -16,6 +16,7 @@ - //usage: "\n -v Verbose" - - #include "libbb.h" -+#include <sys/resource.h> - - /* Information on the resources used by a child process. */ - typedef struct { -diff -uNr busybox-1.19.4.org/networking/inetd.c busybox-1.19.4/networking/inetd.c ---- busybox-1.19.4.org/networking/inetd.c 2012-02-04 20:34:24.000000000 +0100 -+++ busybox-1.19.4/networking/inetd.c 2012-04-08 15:05:32.000000000 +0200 -@@ -166,6 +166,7 @@ - - #include <syslog.h> - #include <sys/un.h> -+#include <sys/resource.h> - - #include "libbb.h" - -diff -uNr busybox-1.19.4.org/shell/shell_common.c busybox-1.19.4/shell/shell_common.c ---- busybox-1.19.4.org/shell/shell_common.c 2012-02-04 20:34:24.000000000 +0100 -+++ busybox-1.19.4/shell/shell_common.c 2012-04-08 15:06:29.000000000 +0200 -@@ -18,6 +18,7 @@ - */ - #include "libbb.h" - #include "shell_common.h" -+#include <sys/resource.h> - - const char defifsvar[] ALIGN1 = "IFS= \t\n"; - diff --git a/config/busybox.config.m4 b/config/busybox.config.m4 index 7a435d9..7b77688 100644 --- a/config/busybox.config.m4 +++ b/config/busybox.config.m4 @@ -51,7 +51,10 @@ option(`CONFIG_BUILD_LIBBUSYBOX', `n', `n') option(`CONFIG_FEATURE_SHARED_BUSYBOX', `n', `n') option(`CONFIG_LFS', `y', `y') CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_SYSROOT="" CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" # # Debugging Options @@ -83,8 +86,10 @@ CONFIG_PREFIX=PREFIX # # Busybox Library Tuning # +# CONFIG_FEATURE_SYSTEMD is not set +# CONFIG_FEATURE_RTMINMAX is not set CONFIG_PASSWORD_MINLEN=5 -CONFIG_MD5_SIZE_VS_SPEED=2 +CONFIG_MD5_SMALL=1 option(`CONFIG_FEATURE_FAST_TOP', `n', `n') option(`CONFIG_FEATURE_ETC_NETWORKS', `n', `n') option(`CONFIG_FEATURE_EDITING', `y', `y') @@ -99,6 +104,7 @@ option(`CONFIG_FEATURE_EDITING_FANCY_PROMPT', `y', `y') # CONFIG_FEATURE_NON_POSIX_CP is not set # CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set CONFIG_FEATURE_COPYBUF_KB=4 +option(`CONFIG_FEATURE_SKIP_ROOTFS', `y', `y') option(`CONFIG_MONOTONIC_SYSCALL', `n', `n') option(`CONFIG_IOCTL_HEX2STR_ERROR', `y', `y') # CONFIG_FEATURE_HWIB is not set @@ -129,6 +135,7 @@ option(`CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY', `n', `n') option(`CONFIG_GUNZIP', `y', `y') option(`CONFIG_GZIP', `y', `y') # CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set +CONFIG_GZIP_FAST=0 option(`CONFIG_LZOP', `n', `n') # CONFIG_LZOP_COMPR_HIGH is not set option(`CONFIG_RPM2CPIO', `n', `n') @@ -203,9 +210,9 @@ option(`CONFIG_HEAD', `y', `n') option(`CONFIG_FEATURE_FANCY_HEAD', `n', `n') option(`CONFIG_HOSTID', `n', `n') option(`CONFIG_ID', `y', `n') +option(`CONFIG_GROUPS', `n', `n') option(`CONFIG_INSTALL', `n', `n') option(`CONFIG_FEATURE_INSTALL_LONG_OPTIONS', `n', `n') -option(`CONFIG_LENGTH', `n', `n') option(`CONFIG_LN', `y', `y') option(`CONFIG_LOGNAME', `n', `n') option(`CONFIG_LS', `y', `y') @@ -260,6 +267,7 @@ option(`CONFIG_FEATURE_TEE_USE_BLOCK_IO', `n', `n') option(`CONFIG_TEST', `y', `y') option(`CONFIG_FEATURE_TEST_64', `n', `n') option(`CONFIG_TOUCH', `y', `y') +option(`CONFIG_FEATURE_TOUCH_SUSV3', `n', `n') option(`CONFIG_TR', `n', `n') option(`CONFIG_FEATURE_TR_CLASSES', `n', `n') option(`CONFIG_FEATURE_TR_EQUIV', `n', `n') @@ -349,6 +357,7 @@ option(`CONFIG_FEATURE_VI_8BIT', `y', `y') option(`CONFIG_FEATURE_VI_COLON', `y', `y') option(`CONFIG_FEATURE_VI_YANKMARK', `y', `y') option(`CONFIG_FEATURE_VI_SEARCH', `y', `y') +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set option(`CONFIG_FEATURE_VI_USE_SIGNALS', `y', `y') option(`CONFIG_FEATURE_VI_DOT_CMD', `y', `y') option(`CONFIG_FEATURE_VI_READONLY', `y', `y') @@ -439,6 +448,7 @@ option(`CONFIG_GETTY', `n', `n') option(`CONFIG_FEATURE_UTMP', `n', `n') option(`CONFIG_FEATURE_WTMP', `n', `n') option(`CONFIG_LOGIN', `y', `y') +# CONFIG_LOGIN_SESSION_AS_CHILD is not set option(`CONFIG_PAM', `n', `n') option(`CONFIG_LOGIN_SCRIPTS', `y', `n') option(`CONFIG_FEATURE_NOLOGIN', `n', `n') @@ -447,6 +457,7 @@ option(`CONFIG_PASSWD', `y', `y') option(`CONFIG_FEATURE_PASSWD_WEAK_CHECK', `n', `n') option(`CONFIG_CRYPTPW', `n', `n') option(`CONFIG_CHPASSWD', `n', `n') +CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des" option(`CONFIG_SU', `n', `n') option(`CONFIG_FEATURE_SU_SYSLOG', `n', `n') option(`CONFIG_FEATURE_SU_CHECKS_SHELLS', `n', `n') @@ -634,8 +645,13 @@ option(`CONFIG_FEATURE_MTAB_SUPPORT', `n', `n') # CONFIG_CONSPY is not set # CONFIG_NANDWRITE is not set # CONFIG_NANDDUMP is not set +# CONFIG_SETSERIAL is not set # CONFIG_UBIATTACH is not set # CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set option(`CONFIG_ADJTIMEX', `n', `n') option(`CONFIG_BBCONFIG', `n', `n') option(`CONFIG_BEEP', `n', `n') @@ -814,6 +830,7 @@ option(`CONFIG_FEATURE_NTPD_SERVER', `n', `n') option(`CONFIG_PING', `y', `y') option(`CONFIG_PING6', `n', `n') option(`CONFIG_FEATURE_FANCY_PING', `y', `y') +option(`CONFIG_WHOIS', `n', `n') option(`CONFIG_PSCAN', `n', `n') option(`CONFIG_ROUTE', `y', `y') option(`CONFIG_SLATTACH', `n', `n') @@ -845,6 +862,7 @@ option(`CONFIG_UDHCPC', `y', `y') # CONFIG_FEATURE_UDHCP_PORT is not set CONFIG_UDHCP_DEBUG=0 # CONFIG_FEATURE_UDHCP_RFC3397 is not set +# CONFIG_FEATURE_UDHCP_8021Q is not set CONFIG_UDHCPC_DEFAULT_SCRIPT="/share/udhcpc/default.script" CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-b -R" @@ -863,6 +881,7 @@ ifdef(`openvpn', `# CONFIG_TUNCTL is not set' ) # CONFIG_FEATURE_TUNCTL_UG is not set +# CONFIG_UDHCPC6 is not set # CONFIG_UDPSVD is not set # @@ -887,9 +906,12 @@ CONFIG_FEATURE_MIME_CHARSET="" # Process Utilities # # CONFIG_IOSTAT is not set +# CONFIG_LSOF is not set # CONFIG_MPSTAT is not set # CONFIG_PMAP is not set # CONFIG_POWERTOP is not set +# CONFIG_PSTREE is not set +# CONFIG_PWDX is not set # CONFIG_SMEMCAP is not set option(`CONFIG_FREE', `y', `y') option(`CONFIG_FUSER', `n', `n') @@ -970,6 +992,7 @@ option(`CONFIG_ASH', `y', `y') # Ash Shell Options # # CONFIG_ASH_BASH_COMPAT is not set +# CONFIG_ASH_IDLE_TIMEOUT is not set option(`CONFIG_ASH_JOB_CONTROL', `y', `n') option(`CONFIG_ASH_ALIAS', `y', `y') option(`CONFIG_ASH_GETOPTS', `n', `n') @@ -1004,6 +1027,7 @@ option(`CONFIG_MSH', `n', `n') option(`CONFIG_FEATURE_SH_EXTRA_QUIET', `n', `n') # CONFIG_FEATURE_SH_STANDALONE is not set # CONFIG_FEATURE_SH_NOFORK is not set +# CONFIG_FEATURE_SH_HISTFILESIZE is not set option(`CONFIG_CTTYHACK', `n', `n') # @@ -1013,6 +1037,7 @@ option(`CONFIG_SYSLOGD', `y', `y') option(`CONFIG_FEATURE_ROTATE_LOGFILE', `y', `y') option(`CONFIG_FEATURE_REMOTE_LOG', `y', `y') option(`CONFIG_FEATURE_SYSLOGD_DUP', `n', `n') +option(`CONFIG_FEATURE_SYSLOGD_CFG', `n', `n') option(`CONFIG_FEATURE_IPC_SYSLOG', `n', `n') CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 diff --git a/rules-archive b/rules-archive index b6e7fb6..53ef1fd 100644 --- a/rules-archive +++ b/rules-archive @@ -50,7 +50,7 @@ ccache-3.1.4.tar.gz;http://samba.org/ftp/ccache # # root # -busybox-1.18.5.tar.bz2;http://www.busybox.net/downloads +busybox-1.20.2.tar.bz2;http://www.busybox.net/downloads autofs-4.1.4.tar.gz;http://www.kernel.org/pub/linux/daemons/autofs/v4 nfs-utils-1.1.1.tar.gz;http://prdownloads.sourceforge.net/sourceforge/nfs fuse-2.5.3.tar.gz;http://prdownloads.sourceforge.net/sourceforge/fuse diff --git a/rules-make b/rules-make index 434bdc9..db35887 100644 --- a/rules-make +++ b/rules-make @@ -40,7 +40,7 @@ gcc47;4.7.2;gcc-4.7.2;gcc-4.7.2.tar.bz2;extract:gcc-4.7.2.tar.bz2;apatch:410-lib # # root # -busybox;1.18.5;busybox-1.18.5;busybox-1.18.5.tar.bz2:busybox-1.17.1.diff;extract:busybox-1.18.5.tar.bz2;patch:busybox-1.17.1.diff +busybox;1.20.2;busybox-1.20.2;busybox-1.20.2.tar.bz2:busybox-1.17.1.diff;extract:busybox-1.20.2.tar.bz2;patch:busybox-1.17.1.diff automount;4.1.4;autofs-4.1.4;autofs-4.1.4.tar.gz;extract:autofs-4.1.4.tar.gz;patch:autofs.diff nfs_utils;1.1.1;nfs-utils-1.1.1;nfs-utils-1.1.1.tar.gz;extract:nfs-utils-1.1.1.tar.gz;patch:nfs-utils.diff fusekernel;2.5.3;fuse-2.5.3;fuse-2.5.3.tar.gz;extract:fuse-2.5.3.tar.gz;patch:fuse.diff ----------------------------------------------------------------------- Summary of changes: Patches/busybox-1.17.1.diff | 250 ++++++++++++++++++++++--------------------- config/busybox.config.m4 | 29 +++++- rules-archive | 2 +- rules-make | 2 +- 4 files changed, 159 insertions(+), 124 deletions(-) -- Tuxbox-GIT: cdk |
From: Thilo G. <tux...@ne...> - 2013-08-08 19:29:15
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via f40104ddf98ecec4d2915fa498460755035df921 (commit) from f9ae6bced89a6c856507141072ae4e9700ab14c5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f40104ddf98ecec4d2915fa498460755035df921 Author: Christian Schuett <Gau...@ho...> Date: Thu Aug 8 19:39:42 2013 +0200 Neutrino: fix PSI generation * only transfer PIDs if 'Insert PSI in TS' is enabled to avoid a buffer overflow in the APID array after some recordings * reset PIDs before recording and not after patching the TS-file to avoid PSI with PIDs == 0 if splitsize != 0 Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/driver/genpsi.c b/tuxbox/neutrino/src/driver/genpsi.c index 475eade..8e91fdd 100644 --- a/tuxbox/neutrino/src/driver/genpsi.c +++ b/tuxbox/neutrino/src/driver/genpsi.c @@ -69,6 +69,13 @@ void transfer_pids(uint16_t pid,uint16_t pidart,short isAC3) break; } } +void reset_pids(void) +{ + avPids.pcrpid = 0; + avPids.vpid = 0; + avPids.nba = 0; +} + //-- special enigma stream description packet for -- //-- at least 1 video, 1 audo and 1 PCR-Pid stream -- //------------------------------------------------------------------------------------ @@ -204,9 +211,6 @@ int genpsi(int fd2) calc_crc32psi(&pkt[data_len], &pkt[OFS_HDR_2], data_len-OFS_HDR_2 ); //-- write TS packet -- bytes += write(fd2, pkt, SIZE_TS_PKT); -//-- finish -- - avPids.pcrpid=0; - avPids.vpid=0; - avPids.nba=0; + return 1; } diff --git a/tuxbox/neutrino/src/driver/genpsi.h b/tuxbox/neutrino/src/driver/genpsi.h index 91bf58e..7b2ae0b 100644 --- a/tuxbox/neutrino/src/driver/genpsi.h +++ b/tuxbox/neutrino/src/driver/genpsi.h @@ -33,5 +33,6 @@ $Id: genpsi.h,v 1.1 2005/08/15 14:47:52 metallica Exp $ int genpsi(int fd2); void transfer_pids(uint16_t pid,uint16_t pidart,short isAC3); +void reset_pids(void); #endif diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp index 0ef635e..927949c 100644 --- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp +++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp @@ -718,8 +718,8 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c CutBackNeutrino(channel_id, mode); - int repeatcount=0; #ifdef HAVE_DBOX_HARDWARE + int repeatcount=0; int actmode=g_Zapit->PlaybackState(); // get actual decoder mode bool sptsmode=g_settings.misc_spts; // take default from settings @@ -756,18 +756,20 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c unsigned int pos; CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo(); + if (GenPsi && sptsmode) + reset_pids(); if (si.vpid != 0) { pids[0] = si.vpid; numpids = 1; - if(sptsmode) + if (GenPsi && sptsmode) transfer_pids(si.vpid, EN_TYPE_VIDEO, 0); if (si.pcrpid != si.vpid) { pids[1] = si.pcrpid; numpids = 2; - if(sptsmode) + if (GenPsi && sptsmode) transfer_pids(si.pcrpid, EN_TYPE_PCR, 0); } } @@ -781,7 +783,7 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c for(APIDList::iterator it = apid_list.begin(); it != apid_list.end(); ++it) { pids[numpids++] = it->apid; - if(sptsmode) + if (GenPsi && sptsmode) transfer_pids(it->apid, EN_TYPE_AUDIO, it->ac3 ? 1 : 0); } if(!apid_list.empty()) @@ -1109,8 +1111,8 @@ bool CVCRControl::CServerDevice::Record(const t_channel_id channel_id, int mode, CutBackNeutrino(channel_id, mode); - int repeatcount=0; #ifdef HAVE_DBOX_HARDWARE + int repeatcount=0; int actmode=g_Zapit->PlaybackState() ; // get actual decoder mode // aviaEXT is loaded, actual mode is not SPTS and switchoption is set , only in tvmode ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/driver/genpsi.c | 12 ++++++++---- tuxbox/neutrino/src/driver/genpsi.h | 1 + tuxbox/neutrino/src/driver/vcrcontrol.cpp | 12 +++++++----- 3 files changed, 16 insertions(+), 9 deletions(-) -- Tuxbox-GIT: apps |
From: Thilo G. <tux...@ne...> - 2013-08-08 14:11:05
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via f9ae6bced89a6c856507141072ae4e9700ab14c5 (commit) via 4c11160dbd4ad136e3b6e4d46ca5feab2a805210 (commit) via 5f12efedb20aca25e63f3483faf97efecb137905 (commit) via 3093a9f6daedc7cfc0eb2be27c1a02f8e0b27612 (commit) via 4f2bf6c6a65575ec429065f358fd5cf5bf6831b9 (commit) via fecd6a6e72121df43a80b42b87edd2608fbe342d (commit) via 7b9fe4c296c9f56e84e78ce3ebd2d69427110169 (commit) via 73590e667d2b2e7f196b497b9e2fee032f0d92d8 (commit) via 1bafbcabc9d67c86acd4178187f8a4e1ad93af07 (commit) via b834a5a65e6eb5a2752fa3e8954c9c04d6f3db6d (commit) via 3f8c798027c79fe2bbe191117faef78873377b37 (commit) via f0b7d2a1bacf38a978b175c6251eafe30c832eb6 (commit) via 07d6b10a3f055ab2230628878beb61c799cd4ad1 (commit) via 8327a2a566daf66761b19cb7794e01a64678d005 (commit) via 694e186ffdb5aa62fbef44d5a7e62702edf5e43d (commit) via f5e16560ba1d4cea50794e3b3da17ceacf637db3 (commit) via 9241ea2b6fb01b08a8b59b45268ceca004674a97 (commit) via bb0321e2c068d9575b099c9fd71b362a1eb743c6 (commit) via 0146883b8270a54e7f23e0370a12029d95c432d7 (commit) via cf4e20f99f611e4e3af05c89a13a3ddf833ed4ec (commit) from 748ac5faf482b3a475f75530f972074d8e724bad (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f9ae6bced89a6c856507141072ae4e9700ab14c5 Author: Christian Schuett <Gau...@ho...> Date: Wed Aug 7 20:43:09 2013 +0200 yWeb: add PMT and PCR PID to streaminfo Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_StreamInfo.yhtm b/tuxbox/neutrino/daemons/nhttpd/web/Y_StreamInfo.yhtm index 4c42162..bf13c8b 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_StreamInfo.yhtm +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_StreamInfo.yhtm @@ -71,6 +71,16 @@ <TD class="set"> <div align="left">{=tsfrequency=} ({=polarisation=})</div></TD> </TR> <TR> +<TD class="set"><B>pmtpid:</B></TD> +<TD> </TD> +<TD class="set"> <div align="left">{=pmtpid=}</div></TD> +</TR> +<TR> +<TD class="set"><B>pcrpid:</B></TD> +<TD> </TD> +<TD class="set"> <div align="left">{=pcrpid=}</div></TD> +</TR> +<TR> <TD class="set"><B>vpid:</B></TD> <TD> </TD> <TD class="set"> <div align="left">{=vpid=}</div></TD> diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt b/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt index a5fa020..89a579f 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt @@ -1,5 +1,5 @@ -version=2.7.0.27 -date=24.04.2013 +version=2.7.0.28 +date=07.08.2013 type=Release info= commit 4c11160dbd4ad136e3b6e4d46ca5feab2a805210 Author: Christian Schuett <Gau...@ho...> Date: Wed Aug 7 19:51:40 2013 +0200 nhttpd controlapi: add charset iso-8859-1 to response header Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp index d783e48..2b70340 100644 --- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp @@ -225,11 +225,11 @@ void CControlAPI::Execute(CyhookHandler *hh) ; else if(std::string(yCgiCallList[index].mime_type) == "+xml") // Parameter xml? if (hh->ParamList["xml"] != "") - hh->SetHeader(HTTP_OK, "text/xml"); + hh->SetHeader(HTTP_OK, "text/xml; charset=iso-8859-1"); else - hh->SetHeader(HTTP_OK, "text/html"); + hh->SetHeader(HTTP_OK, "text/html; charset=iso-8859-1"); else - hh->SetHeader(HTTP_OK, yCgiCallList[index].mime_type); + hh->SetHeader(HTTP_OK, std::string(yCgiCallList[index].mime_type) + "; charset=iso-8859-1"); // response hh->status = HANDLED_READY; if (hh->Method == M_HEAD) // HEAD or function call @@ -348,11 +348,11 @@ void CControlAPI::ExecCGI(CyhookHandler *hh) std::string script, result; // override standard header if (hh->ParamList.size() > 1 && hh->ParamList["xml"].empty()) - hh->SetHeader(HTTP_OK, "text/html"); + hh->SetHeader(HTTP_OK, "text/html; charset=iso-8859-1"); else if (hh->ParamList.size() > 1 && !hh->ParamList["xml"].empty()) - hh->SetHeader(HTTP_OK, "text/xml"); + hh->SetHeader(HTTP_OK, "text/xml; charset=iso-8859-1"); else - hh->SetHeader(HTTP_OK, "text/plain"); + hh->SetHeader(HTTP_OK, "text/plain; charset=iso-8859-1"); if (!hh->ParamList.empty()) { script = hh->ParamList["1"]; @@ -1068,7 +1068,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) if (hh->ParamList.empty()) { - hh->SetHeader(HTTP_OK, "text/plain"); + hh->SetHeader(HTTP_OK, "text/plain; charset=iso-8859-1"); CZapitClient::BouquetChannelList *channellist = NeutrinoAPI->GetChannelList(CZapitClient::MODE_CURRENT); CZapitClient::BouquetChannelList::iterator channel = channellist->begin(); for(; channel != channellist->end();channel++) @@ -1084,7 +1084,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) } else if (hh->ParamList["xml"].empty()) { - hh->SetHeader(HTTP_OK, "text/plain"); + hh->SetHeader(HTTP_OK, "text/plain; charset=iso-8859-1"); if (hh->ParamList["1"] == "ext") { CZapitClient::BouquetChannelList *channellist = NeutrinoAPI->GetChannelList(CZapitClient::MODE_CURRENT); @@ -1169,7 +1169,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) // stoptime : show only items until stoptime reached else if (!(hh->ParamList["xml"].empty())) { - hh->SetHeader(HTTP_OK, "text/xml"); + hh->SetHeader(HTTP_OK, "text/xml; charset=iso-8859-1"); t_channel_id channel_id = (t_channel_id)-1; @@ -2273,7 +2273,7 @@ void CControlAPI::build_live_url(CyhookHandler *hh) } else { - hh->SetHeader(HTTP_OK, "text/html"); + hh->SetHeader(HTTP_OK, "text/html; charset=iso-8859-1"); hh->Write(url); } } commit 5f12efedb20aca25e63f3483faf97efecb137905 Author: Christian Schuett <Gau...@ho...> Date: Wed Aug 7 17:41:34 2013 +0200 Neutrino: add PCR PID handling to direct recording and live streaming based on patch by Jacek Jendrzej <cra...@go...> in Coolstream Git Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp index 3376076..d783e48 100644 --- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp @@ -1631,7 +1631,8 @@ void CControlAPI::SendAllCurrentVAPid(CyhookHandler *hh) hh->printf("%05u vtxt\n",pids.PIDs.vtxtpid); if (pids.PIDs.pmtpid) hh->printf("%05u pmt\n",pids.PIDs.pmtpid); - + if (pids.PIDs.pcrpid) + hh->printf("%05u pcr\n",pids.PIDs.pcrpid); } //----------------------------------------------------------------------------- @@ -1757,9 +1758,17 @@ void CControlAPI::YWeb_SendVideoStreamingPids(CyhookHandler *hh, int apid_no) if(!pids.APIDs.empty()) apid = pids.APIDs[apid_idx].pid; if(hh->ParamList["no_commas"] != "") + { hh->printf("0x%04x 0x%04x 0x%04x",pids.PIDs.pmtpid,pids.PIDs.vpid,apid); + if (pids.PIDs.pcrpid != pids.PIDs.vpid) + hh->printf(" 0x%04x", pids.PIDs.pcrpid); + } else + { hh->printf("0x%04x,0x%04x,0x%04x",pids.PIDs.pmtpid,pids.PIDs.vpid,apid); + if (pids.PIDs.pcrpid != pids.PIDs.vpid) + hh->printf(",0x%04x", pids.PIDs.pcrpid); + } } //----------------------------------------------------------------------------- @@ -2232,6 +2241,8 @@ void CControlAPI::build_live_url(CyhookHandler *hh) if(!pids.APIDs.empty()) apid = pids.APIDs[apid_idx].pid; xpids = string_printf("0x%04x,0x%04x,0x%04x",pids.PIDs.pmtpid,pids.PIDs.vpid,apid); + if (pids.PIDs.pcrpid != pids.PIDs.vpid) + xpids += string_printf(",0x%04x", pids.PIDs.pcrpid); } else if ( mode == CZapitClient::MODE_RADIO) { diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp index c8147c3..6e39a20 100644 --- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -478,6 +478,7 @@ std::string CNeutrinoYParser::func_get_mode(CyhookHandler */*hh*/, std::string //------------------------------------------------------------------------- std::string CNeutrinoYParser::func_get_video_pids(CyhookHandler */*hh*/, std::string para) { + std::string yresult; CZapitClient::responseGetPIDs pids; int apid=0,apid_no=0,apid_idx=0; pids.PIDs.vpid=0; @@ -490,7 +491,10 @@ std::string CNeutrinoYParser::func_get_video_pids(CyhookHandler */*hh*/, std::s apid_idx=apid_no; if(!pids.APIDs.empty()) apid = pids.APIDs[apid_idx].pid; - return string_printf("0x%04x,0x%04x,0x%04x",pids.PIDs.pmtpid,pids.PIDs.vpid,apid); + yresult = string_printf("0x%04x,0x%04x,0x%04x", pids.PIDs.pmtpid, pids.PIDs.vpid, apid); + if (pids.PIDs.pcrpid != pids.PIDs.vpid) + yresult += string_printf(",0x%04x", pids.PIDs.pcrpid); + return yresult; } //------------------------------------------------------------------------- // y-func : get_radio_pids (returns: 0x0000) @@ -671,6 +675,7 @@ std::string CNeutrinoYParser::func_get_current_stream_info(CyhookHandler *hh, s hh->ParamList["apid"] = itoh(serviceinfo.apid); hh->ParamList["vtxtpid"] = (serviceinfo.vtxtpid != 0)?itoh(serviceinfo.vtxtpid):"nicht verfügbar"; hh->ParamList["pmtpid"] = (serviceinfo.pmtpid != 0)?itoh(serviceinfo.pmtpid):"nicht verfügbar"; + hh->ParamList["pcrpid"] = (serviceinfo.pcrpid != 0)?itoh(serviceinfo.pcrpid):"nicht verfügbar"; if (serviceinfo.polarisation != 2) /* only satellite has polarisation */ { hh->ParamList["tsfrequency"] = string_printf("%d.%03d MHz", serviceinfo.tsfrequency / 1000, serviceinfo.tsfrequency % 1000); diff --git a/tuxbox/neutrino/src/driver/genpsi.c b/tuxbox/neutrino/src/driver/genpsi.c index c0166b7..475eade 100644 --- a/tuxbox/neutrino/src/driver/genpsi.c +++ b/tuxbox/neutrino/src/driver/genpsi.c @@ -37,13 +37,10 @@ $Id: genpsi.c,v 1.2 2006/01/16 12:45:54 sat_man Exp $ #define ES_TYPE_MPA 0x03 #define ES_TYPE_AC3 0x81 -#define EN_TYPE_VIDEO 0x00 -#define EN_TYPE_AUDIO 0x01 -#define EN_TYPE_TELTEX 0x02 -#define EN_TYPE_PCR 0x03 typedef struct { short nba; + uint16_t pcrpid; uint16_t vpid; uint16_t apid[10]; short isAC3[10]; @@ -55,6 +52,7 @@ void transfer_pids(uint16_t pid,uint16_t pidart,short isAC3) switch(pidart) { case EN_TYPE_VIDEO: + avPids.pcrpid=pid; avPids.vpid=pid; break; case EN_TYPE_AUDIO: @@ -64,7 +62,9 @@ void transfer_pids(uint16_t pid,uint16_t pidart,short isAC3) break; case EN_TYPE_TELTEX: break; - + case EN_TYPE_PCR: + avPids.pcrpid=pid; + break; default: break; } @@ -157,8 +157,8 @@ int genpsi(int fd2) //-- write row with desc. for pcr stream (eq. video) -- pkt[ofs] = EN_TYPE_PCR; pkt[ofs+1] = 0x02; - pkt[ofs+2] = (avPids.vpid>>8); - pkt[ofs+3] = (avPids.vpid & 0xFF); + pkt[ofs+2] = (avPids.pcrpid>>8); + pkt[ofs+3] = (avPids.pcrpid & 0xFF); //-- calculate CRC -- calc_crc32psi(&pkt[data_len], &pkt[OFS_HDR_2], data_len-OFS_HDR_2 ); @@ -180,8 +180,8 @@ int genpsi(int fd2) pkt[OFS_HDR_2+2] = (patch_len & 0xFF); //-- patch pcr PID -- ofs = OFS_PMT_DATA; - pkt[ofs] |= (avPids.vpid>>8); - pkt[ofs+1] = (avPids.vpid & 0xFF); + pkt[ofs] |= (avPids.pcrpid>>8); + pkt[ofs+1] = (avPids.pcrpid & 0xFF); //-- write row with desc. for ES video stream -- ofs = OFS_STREAM_TAB; pkt[ofs] = ES_TYPE_MPEG12; @@ -205,6 +205,7 @@ int genpsi(int fd2) //-- write TS packet -- bytes += write(fd2, pkt, SIZE_TS_PKT); //-- finish -- + avPids.pcrpid=0; avPids.vpid=0; avPids.nba=0; return 1; diff --git a/tuxbox/neutrino/src/driver/genpsi.h b/tuxbox/neutrino/src/driver/genpsi.h index 8085894..91bf58e 100644 --- a/tuxbox/neutrino/src/driver/genpsi.h +++ b/tuxbox/neutrino/src/driver/genpsi.h @@ -26,6 +26,11 @@ $Id: genpsi.h,v 1.1 2005/08/15 14:47:52 metallica Exp $ #define __genpsi_h__ #include <inttypes.h> +#define EN_TYPE_VIDEO 0x00 +#define EN_TYPE_AUDIO 0x01 +#define EN_TYPE_TELTEX 0x02 +#define EN_TYPE_PCR 0x03 + int genpsi(int fd2); void transfer_pids(uint16_t pid,uint16_t pidart,short isAC3); diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp index 341d88c..0ef635e 100644 --- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp +++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp @@ -761,7 +761,15 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c pids[0] = si.vpid; numpids = 1; if(sptsmode) - transfer_pids(si.vpid,0x00,0); + transfer_pids(si.vpid, EN_TYPE_VIDEO, 0); + + if (si.pcrpid != si.vpid) + { + pids[1] = si.pcrpid; + numpids = 2; + if(sptsmode) + transfer_pids(si.pcrpid, EN_TYPE_PCR, 0); + } } else { @@ -774,7 +782,7 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c { pids[numpids++] = it->apid; if(sptsmode) - transfer_pids(it->apid,0x01, it->ac3 ? 1 : 0); + transfer_pids(it->apid, EN_TYPE_AUDIO, it->ac3 ? 1 : 0); } if(!apid_list.empty()) g_Zapit->setAudioChannel(apid_list.begin()->index); commit 3093a9f6daedc7cfc0eb2be27c1a02f8e0b27612 Author: Christian Schuett <Gau...@ho...> Date: Tue Aug 6 17:40:54 2013 +0200 Neutrino: fix calculation of volume bar position Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index b46bc31..13321fa 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -3550,41 +3550,41 @@ void CNeutrinoApp::setVolume(const neutrino_msg_t key, const bool bDoPaint) const int iw = 24; // icon width const int dx = w + b*2 + iw + nw + r; // width + 2*border + icon + numbers + round const int bwx = 20; // border width x from left and right - const int bwtop = 47; // border width y from top - const int bwbot = 47; // border width y from bottom + const int bwtop = 20; // border width y from top + const int bwbot = 20; // border width y from bottom int x, y; int a_step = atoi(g_settings.audio_step); volumeBarIsVisible = ((g_settings.volumebar_disp_pos != VOLUMEBAR_DISP_POS_OFF) ? true : false); if( g_settings.volumebar_disp_pos == VOLUMEBAR_DISP_POS_TOP_RIGHT ) { - x = g_settings.screen_EndX - dx - bwx - 40; - y = g_settings.screen_StartY + dy + bwtop; + x = g_settings.screen_EndX - dx - bwx; + y = g_settings.screen_StartY + bwtop; } else if( g_settings.volumebar_disp_pos == VOLUMEBAR_DISP_POS_TOP_LEFT ) { x = g_settings.screen_StartX + bwx; - y = g_settings.screen_StartY + dy + bwtop; + y = g_settings.screen_StartY + bwtop; } else if( g_settings.volumebar_disp_pos == VOLUMEBAR_DISP_POS_BOTTOM_LEFT ) { x = g_settings.screen_StartX + bwx; - y = g_settings.screen_EndY - bwbot; + y = g_settings.screen_EndY - dy - bwbot; } else if( g_settings.volumebar_disp_pos == VOLUMEBAR_DISP_POS_BOTTOM_RIGHT ) { x = g_settings.screen_EndX - dx - bwx; - y = g_settings.screen_EndY- bwbot; + y = g_settings.screen_EndY - dy - bwbot; } else if( g_settings.volumebar_disp_pos == VOLUMEBAR_DISP_POS_HIGHER_CENTER ) { x = (((g_settings.screen_EndX- g_settings.screen_StartX)- dx) / 2) + g_settings.screen_StartX; - y = g_settings.screen_EndY - bwbot-140; + y = g_settings.screen_EndY - dy - bwbot - 140; } else /* if (g_settings.volumebar_disp_pos == VOLUMEBAR_DISP_POS_DEFAULT_CENTER) */ { x = (((g_settings.screen_EndX- g_settings.screen_StartX)- dx) / 2) + g_settings.screen_StartX; - y = g_settings.screen_EndY - bwbot; + y = g_settings.screen_EndY - dy - bwbot; } fb_pixel_t * pixbuf = NULL; commit 4f2bf6c6a65575ec429065f358fd5cf5bf6831b9 Author: Christian Schuett <Gau...@ho...> Date: Sun Aug 4 22:06:12 2013 +0200 Neutrino streaminfo: show PCR PID Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/streaminfo2.cpp b/tuxbox/neutrino/src/gui/streaminfo2.cpp index 395a8b2..8e4d619 100644 --- a/tuxbox/neutrino/src/gui/streaminfo2.cpp +++ b/tuxbox/neutrino/src/gui/streaminfo2.cpp @@ -64,8 +64,8 @@ CStreamInfo2::CStreamInfo2() iheight = g_Font[font_info]->getHeight(); sheight = g_Font[font_small]->getHeight(); - width = w_max(SCREEN_X, 10); - height = h_max(SCREEN_Y, 10); + width = w_max(SCREEN_X, 20); + height = h_max(SCREEN_Y, 20); x = getScreenStartX(width); //mainwindow position y = getScreenStartY(height); @@ -475,9 +475,9 @@ void CStreamInfo2::paint(int/*mode*/) } // Info Output - paint_techinfo ( xpos, ypos ); + paint_techinfo(xpos, ypos); - paint_signal_fe_box ( pigboxes_x,(ypos + 175), 240, 190); + paint_signal_fe_box(pigboxes_x, ypos + 185, 240, 190); // buttons int button_y = ypos+background_h-8; @@ -496,7 +496,7 @@ void CStreamInfo2::paint(int/*mode*/) frameBuffer->paintBoxRel(0, 0, max_width, max_height, COL_MENUCONTENT_PLUS_0); // -- paint large signal graph - paint_signal_fe_box ( x, y, width, height - 100); + paint_signal_fe_box(x, y, width, height - 100); // -- buttons int button_y = y + height; @@ -669,6 +669,12 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) g_Font[font_small]->RenderString(xpos, ypos, width-10, "PMTpid:", COL_MENUCONTENT, 0, true); // UTF-8 g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8 + //pcrpid + ypos+= sheight; + sprintf((char*) buf, "0x%04x", si.pcrpid); + g_Font[font_small]->RenderString(xpos, ypos, width-10, "PCRpid:", COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8 + //vpid ypos+= sheight; if ( g_RemoteControl->current_PIDs.PIDs.vpid > 0 ){ commit fecd6a6e72121df43a80b42b87edd2608fbe342d Author: Christian Schuett <Gau...@ho...> Date: Sun Aug 4 19:13:57 2013 +0200 Neutrino infoviewer: fix spelling of an enum Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp index dfb356a..6db652d 100644 --- a/tuxbox/neutrino/src/gui/infoviewer.cpp +++ b/tuxbox/neutrino/src/gui/infoviewer.cpp @@ -537,7 +537,7 @@ void CInfoViewer::showTitle(const int ChanNum, const std::string & Channel, cons int ChannelLogoMode = showChannelLogo(channel_id); // get logo mode, paint channel logo if adjusted - if (ChannelLogoMode != LOGO_AS_CHANNELLUM) // no logo in numberbox + if (ChannelLogoMode != LOGO_AS_CHANNELNUM) // no logo in numberbox { // show channel number in numberbox g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->RenderString(BoxStartX + ((ChanWidth - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(strChanNum))>>1), ChanNumYPos, ChanWidth, strChanNum, col_NumBoxText); @@ -1908,7 +1908,6 @@ int CInfoViewer::showChannelLogo( const t_channel_id logo_channel_id ) if (g_settings.infobar_show_channellogo != NO_LOGO) { - // check if logo is available if (access(strAbsIconChIDPath.c_str(), 0) != -1) { @@ -1932,7 +1931,7 @@ int CInfoViewer::showChannelLogo( const t_channel_id logo_channel_id ) } else { - if (g_settings.infobar_show_channellogo == LOGO_AS_CHANNELLUM) + if (g_settings.infobar_show_channellogo == LOGO_AS_CHANNELNUM) { // calculate mid of numberbox int satNameHeight = 0; // no sat name display now, picon doesnt need to set an offset for y @@ -1942,7 +1941,7 @@ int CInfoViewer::showChannelLogo( const t_channel_id logo_channel_id ) // check logo dimensions if ((logo_w > ChanWidth) || (logo_h > ChanHeight)) { - printf(strErrText.c_str(), ChanWidth, ChanHeight, logo_w, logo_h, LOGO_AS_CHANNELLUM); + printf(strErrText.c_str(), ChanWidth, ChanHeight, logo_w, logo_h, LOGO_AS_CHANNELNUM); } else { @@ -1951,7 +1950,7 @@ int CInfoViewer::showChannelLogo( const t_channel_id logo_channel_id ) // get position of channel logo, must be centered in number box logo_x = x_mid - logo_w/2; logo_y = y_mid - logo_h/2; - res = LOGO_AS_CHANNELLUM; + res = LOGO_AS_CHANNELNUM; } } else if (g_settings.infobar_show_channellogo == LOGO_AS_CHANNELNAME) diff --git a/tuxbox/neutrino/src/gui/infoviewer.h b/tuxbox/neutrino/src/gui/infoviewer.h index 00338a5..b959967 100644 --- a/tuxbox/neutrino/src/gui/infoviewer.h +++ b/tuxbox/neutrino/src/gui/infoviewer.h @@ -166,7 +166,7 @@ class CInfoViewer enum { NO_LOGO, - LOGO_AS_CHANNELLUM, + LOGO_AS_CHANNELNUM, LOGO_AS_CHANNELNAME, LOGO_BESIDE_CHANNELNAME }; diff --git a/tuxbox/neutrino/src/gui/osd_setup.cpp b/tuxbox/neutrino/src/gui/osd_setup.cpp index dd88ed4..e8d6a6e 100644 --- a/tuxbox/neutrino/src/gui/osd_setup.cpp +++ b/tuxbox/neutrino/src/gui/osd_setup.cpp @@ -467,7 +467,7 @@ const CMenuOptionChooser::keyval INFOBAR_EPG_SHOW_OPTIONS[INFOBAR_EPG_SHOW_OPTI const CMenuOptionChooser::keyval INFOBAR_CHANNELLOGO_SHOW_OPTIONS[INFOBAR_CHANNELLOGO_SHOW_OPTIONS_COUNT]= { { CInfoViewer::NO_LOGO , LOCALE_INFOVIEWER_CHANNELLOGO_OFF }, - { CInfoViewer::LOGO_AS_CHANNELLUM , LOCALE_INFOVIEWER_CHANNELLOGO_SHOW_IN_NUMBERBOX }, + { CInfoViewer::LOGO_AS_CHANNELNUM , LOCALE_INFOVIEWER_CHANNELLOGO_SHOW_IN_NUMBERBOX }, { CInfoViewer::LOGO_AS_CHANNELNAME , LOCALE_INFOVIEWER_CHANNELLOGO_SHOW_AS_CHANNELNAME }, { CInfoViewer::LOGO_BESIDE_CHANNELNAME, LOCALE_INFOVIEWER_CHANNELLOGO_SHOW_BESIDE_CHANNELNAME } }; commit 7b9fe4c296c9f56e84e78ce3ebd2d69427110169 Author: Christian Schuett <Gau...@ho...> Date: Sat Aug 3 19:53:12 2013 +0200 Neutrino infoviewer: use enums instead of numbers Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp index 32381e7..dfb356a 100644 --- a/tuxbox/neutrino/src/gui/infoviewer.cpp +++ b/tuxbox/neutrino/src/gui/infoviewer.cpp @@ -537,9 +537,9 @@ void CInfoViewer::showTitle(const int ChanNum, const std::string & Channel, cons int ChannelLogoMode = showChannelLogo(channel_id); // get logo mode, paint channel logo if adjusted - if (ChannelLogoMode != 1) // no logo in numberbox + if (ChannelLogoMode != LOGO_AS_CHANNELLUM) // no logo in numberbox { - // show logo in numberbox + // show channel number in numberbox g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->RenderString(BoxStartX + ((ChanWidth - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getRenderWidth(strChanNum))>>1), ChanNumYPos, ChanWidth, strChanNum, col_NumBoxText); } @@ -1888,14 +1888,6 @@ void CInfoViewer::Set_CA_Status(int Status) } int CInfoViewer::showChannelLogo( const t_channel_id logo_channel_id ) -/* **************************************************************************** -returns mode of painted channel logo, -0 = no logo painted -1 = in number box -2 = in place of channel name -3 = beside channel name -******************************************************************************* -*/ { char strChanId[16]; sprintf((char*) strChanId, "%llx", logo_channel_id); @@ -1909,10 +1901,10 @@ returns mode of painted channel logo, int x_mid, y_mid, logo_w = 0, logo_h = 0; int logo_x=0, logo_y=0; - int res = 0; + int res = NO_LOGO; int start_x = ChanNameX, chan_w = BoxEndX- (start_x+ 20)- time_width- 15; - bool logo_available; + bool logo_available = false; if (g_settings.infobar_show_channellogo != NO_LOGO) { @@ -1928,8 +1920,6 @@ returns mode of painted channel logo, strAbsIconPath = strAbsIconChNamePath; // strLogoName; logo_available = true; } - else - logo_available = false; if (logo_available) { @@ -1939,9 +1929,8 @@ returns mode of painted channel logo, if ((logo_w == 0) || (logo_h == 0)) // corrupt logo size? { printf("[infoviewer] channel logo: \n -> %s (%s) has no size\n -> please check logo file!\n",strAbsIconPath.c_str(), ChannelName.c_str()); - return 0; } - + else { if (g_settings.infobar_show_channellogo == LOGO_AS_CHANNELLUM) { @@ -1953,8 +1942,7 @@ returns mode of painted channel logo, // check logo dimensions if ((logo_w > ChanWidth) || (logo_h > ChanHeight)) { - printf(strErrText.c_str(),ChanWidth, ChanHeight, logo_w, logo_h, g_settings.infobar_show_channellogo); - res = 0; + printf(strErrText.c_str(), ChanWidth, ChanHeight, logo_w, logo_h, LOGO_AS_CHANNELLUM); } else { @@ -1963,7 +1951,7 @@ returns mode of painted channel logo, // get position of channel logo, must be centered in number box logo_x = x_mid - logo_w/2; logo_y = y_mid - logo_h/2; - res = 1; + res = LOGO_AS_CHANNELLUM; } } else if (g_settings.infobar_show_channellogo == LOGO_AS_CHANNELNAME) @@ -1971,8 +1959,7 @@ returns mode of painted channel logo, // check logo dimensions if ((logo_w > chan_w) || (logo_h > ChanHeight)) { - printf(strErrText.c_str(), chan_w, ChanHeight, logo_w, logo_h, g_settings.infobar_show_channellogo); - res = 0; + printf(strErrText.c_str(), chan_w, ChanHeight, logo_w, logo_h, LOGO_AS_CHANNELNAME); } else { @@ -1982,7 +1969,7 @@ returns mode of painted channel logo, y_mid = (ChanNameY+time_height) - time_height/2; logo_x = start_x+10; logo_y = y_mid - logo_h/2; - res = 2; + res = LOGO_AS_CHANNELNAME; } } else if (g_settings.infobar_show_channellogo == LOGO_BESIDE_CHANNELNAME) @@ -1991,8 +1978,7 @@ returns mode of painted channel logo, int Logo_max_width = chan_w - logo_w - 10; if ((logo_w > Logo_max_width) || (logo_h > ChanHeight)) { - printf(strErrText.c_str(), Logo_max_width, ChanHeight, logo_w, logo_h, g_settings.infobar_show_channellogo); - res = 0; + printf(strErrText.c_str(), Logo_max_width, ChanHeight, logo_w, logo_h, LOGO_BESIDE_CHANNELNAME); } else { @@ -2003,16 +1989,12 @@ returns mode of painted channel logo, // set channel name x pos ChanNameX = start_x + logo_w + 10; - res = 3; + res = LOGO_BESIDE_CHANNELNAME; } } - else - { - res = 0; - } // paint logo background (shaded/framed) - if ((g_settings.infobar_channellogo_background != NO_BACKGROUND) && (res != 0)) + if ((g_settings.infobar_channellogo_background != NO_BACKGROUND) && (res != NO_LOGO)) { int frame_w = 2, logo_bg_x=0, logo_bg_y=0, logo_bg_w=0, logo_bg_h=0; @@ -2036,9 +2018,10 @@ returns mode of painted channel logo, } // paint the logo - if (res !=0) { + if (res != NO_LOGO) + { if (!frameBuffer->paintIcon(strAbsIconPath, logo_x, logo_y)) - return 0; // paint logo was failed + res = NO_LOGO; // paint logo was failed } } } commit 73590e667d2b2e7f196b497b9e2fee032f0d92d8 Author: Christian Schuett <Gau...@ho...> Date: Sat Aug 3 18:13:52 2013 +0200 Neutrino: fix one more delete[] vs delete error Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index d5ef65a..b46bc31 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -2660,7 +2660,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t m, neutrino_msg_data_t data) if (msg == CRCInput::RC_ignore) { - delete (unsigned char*) data; + delete [] (unsigned char*) data; return messages_return::handled; } commit 1bafbcabc9d67c86acd4178187f8a4e1ad93af07 Author: [CST] Focus <foc...@gm...> Date: Tue Jul 30 21:01:19 2013 +0200 Neutrino english.locale: little changes/corrections Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale index e80f401..b849e12 100644 --- a/tuxbox/neutrino/data/locale/english.locale +++ b/tuxbox/neutrino/data/locale/english.locale @@ -1086,7 +1086,7 @@ osdsettings.show_mute_icon Mute-Icon on volume 0 osdsettings.themeselect Select Theme osdsettings.volumebar_disp_pos Volumebar parentallock.changepin change PIN code -parentallock.changepin_hint1 Enter your new youth protection pin code here! +parentallock.changepin_hint1 Enter your new parental lock pin code here! parentallock.changetolocked on locked bouquets parentallock.head Enter PIN code parentallock.lockage lock program @@ -1097,7 +1097,7 @@ parentallock.lockedchannel Locked sender... parentallock.lockedprogram Locked program (from %d years up) parentallock.never never parentallock.onsignal on broadcasted lock -parentallock.parentallock Youth protection +parentallock.parentallock Parental lock parentallock.prompt prompt for PIN personalize.access Access options personalize.apply_settings Apply changes? @@ -1111,7 +1111,7 @@ personalize.help_line3 can be set to visible, not visible, activate, deactivate personalize.help_line4 or PIN-protected. personalize.help_line5 The access to personalization can be protected personalize.help_line6 with PIN. The PIN is identical for all protected menus -personalize.help_line7 (not for youth protection). +personalize.help_line7 (not for parental lock). personalize.help_line8 Default PIN is: 0000 personalize.menuconfiguration Menu Configuration personalize.menudisabledhint The requested menu is currently disabled @@ -1211,7 +1211,7 @@ recordingmenu.server_ip Recording Server IP recordingmenu.server_mac MAC Address recordingmenu.server_port Recording Server Port recordingmenu.server_wakeup Recording Server WOL -recordingmenu.setupnow activate changes +recordingmenu.setupnow Activate changes recordingmenu.splitsize Maximum File Size (MB) recordingmenu.stopplayback Stop playback recordingmenu.stream_subtitle_pid Record Subtitles commit b834a5a65e6eb5a2752fa3e8954c9c04d6f3db6d Author: Christian Schuett <Gau...@ho...> Date: Sat Jul 27 23:19:07 2013 +0200 Neutrino pluginlist: small optimization Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/pluginlist.cpp b/tuxbox/neutrino/src/gui/pluginlist.cpp index 1cadfca..5b98811 100644 --- a/tuxbox/neutrino/src/gui/pluginlist.cpp +++ b/tuxbox/neutrino/src/gui/pluginlist.cpp @@ -130,7 +130,7 @@ int CPluginList::exec(CMenuTarget* parent, const std::string & /*actionKey*/) pluginlist.push_back(tmp); } } - if (selected >= pluginlist.size() - 1) + if (selected >= pluginlist.size()) selected = pluginlist.size() - 1; paint(); commit 3f8c798027c79fe2bbe191117faef78873377b37 Author: Christian Schuett <Gau...@ho...> Date: Sat Jul 27 20:02:32 2013 +0200 Neutrino timerlist: also adapt selection if list shrinks by more than one Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp index b2e18bb..636d7ba 100644 --- a/tuxbox/neutrino/src/gui/timerlist.cpp +++ b/tuxbox/neutrino/src/gui/timerlist.cpp @@ -420,7 +420,7 @@ void CTimerList::updateEvents(void) listmaxshow=timerlist.size(); height = theight+footHeight+0+listmaxshow*fheight*2; // recalc height } - if (!timerlist.empty() && selected==timerlist.size()) + if (!timerlist.empty() && selected >= timerlist.size()) { selected=timerlist.size()-1; liststart = (selected/listmaxshow)*listmaxshow; commit f0b7d2a1bacf38a978b175c6251eafe30c832eb6 Author: [CST] Focus <foc...@gm...> Date: Sat Jul 20 19:41:44 2013 +0200 Neutrino filebrowser: restore selection, remove double paint on exec(), remember selected to restore on dir enter with OK button Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp index 2eb90ff..ae26658 100644 --- a/tuxbox/neutrino/src/gui/filebrowser.cpp +++ b/tuxbox/neutrino/src/gui/filebrowser.cpp @@ -842,9 +842,13 @@ bool CFileBrowser::exec(const char * const dirname) name = dirname; std::replace(name.begin(), name.end(), '\\', '/'); + int selection = -1; + if (name == Path) + selection = selected; + paintHead(); - ChangeDir(name); - paint(); + ChangeDir(name, selection); + //paint(); paintFoot(); int oldselected = selected; @@ -1038,7 +1042,10 @@ bool CFileBrowser::exec(const char * const dirname) ChangeDir(filelist[selected].Url); else #endif + { + selections.push_back(selected); ChangeDir(filelist[selected].Name); + } } else { commit 07d6b10a3f055ab2230628878beb61c799cd4ad1 Author: Christian Schuett <Gau...@ho...> Date: Sat Jul 13 15:13:47 2013 +0200 Neutrino menu separator: use enum instead of number in constructor Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h index c1be247..08fae78 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.h +++ b/tuxbox/neutrino/src/gui/widget/menue.h @@ -152,7 +152,7 @@ class CMenuSeparator : public CMenuItem }; - CMenuSeparator(const int Type = 0, const neutrino_locale_t Text = NONEXISTANT_LOCALE); + CMenuSeparator(const int Type = EMPTY, const neutrino_locale_t Text = NONEXISTANT_LOCALE); virtual ~CMenuSeparator(){} int paint(bool selected=false); commit 8327a2a566daf66761b19cb7794e01a64678d005 Author: Christian Schuett <Gau...@ho...> Date: Fri Jul 12 22:24:39 2013 +0200 Neutrino: add some more enums and use them instead of numbers Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/driver/lcdd.cpp b/tuxbox/neutrino/src/driver/lcdd.cpp index 7dab7b9..697919b 100644 --- a/tuxbox/neutrino/src/driver/lcdd.cpp +++ b/tuxbox/neutrino/src/driver/lcdd.cpp @@ -439,10 +439,10 @@ static std::string splitString(const std::string & text, const int maxwidth, Lcd void CLCD::showTextScreen(const std::string & big, const std::string & small, const int showmode, const bool perform_wakeup) { /* the "showmode" variable is a bit map: - 0x01 show "big" string - 0x02 show "small" string - 0x04 show separator line if big and small are present / shown - 0x08 show only one line of "big" string + EPG_NAME show "big" string + EPG_SHORT show only one line of "big" string + EPG_TITLE show "small" string + EPG_SEPLINE show separator line if big and small are present / shown */ /* draw_fill_rect is braindead: it actually fills _inside_ the described rectangle, @@ -455,10 +455,10 @@ void CLCD::showTextScreen(const std::string & big, const std::string & small, co std::string cname[2]; std::string event[4]; int namelines = 0, eventlines = 0, maxnamelines = 2; - if (showmode & 8) + if (showmode & EPG_SHORT) maxnamelines = 1; - if ((showmode & 1) && !big.empty()) + if ((showmode & EPG_NAME) && !big.empty()) { bool dumb = false; big_utf8 = isUTF8(big); @@ -482,7 +482,7 @@ void CLCD::showTextScreen(const std::string & big, const std::string & small, co // one nameline => 2 eventlines, 2 namelines => 1 eventline int maxeventlines = 4 - (namelines * 3 + 1) / 2; - if ((showmode & 2) && !small.empty()) + if ((showmode & EPG_TITLE) && !small.empty()) { bool dumb = false; small_utf8 = isUTF8(small); @@ -520,7 +520,7 @@ void CLCD::showTextScreen(const std::string & big, const std::string & small, co fonts.channelname->RenderString(x, y, LCD_COLS + 10, cname[i].c_str(), CLCDDisplay::PIXEL_ON, 0, big_utf8); } y++; - if (eventlines > 0 && namelines > 0 && showmode & 4) + if (eventlines > 0 && namelines > 0 && (showmode & EPG_SEPLINE)) { y++; display.draw_line(0, y, LCD_COLS - 1, y, CLCDDisplay::PIXEL_ON); @@ -546,11 +546,6 @@ void CLCD::showTextScreen(const std::string & big, const std::string & small, co void CLCD::showServicename(const std::string name, const bool perform_wakeup) { - /* - 1 = show servicename - 2 = show epg title - 4 = draw separator line between name and EPG - */ int showmode = g_settings.lcd_setting[SNeutrinoSettings::LCD_EPGMODE]; //printf("CLCD::showServicename '%s' epg: '%s'\n", name.c_str(), epg_title.c_str()); @@ -589,7 +584,7 @@ void CLCD::setMoviePlaymode(const AUDIOMODES playmode) void CLCD::setMovieInfo(const std::string big, const std::string small) { int showmode = g_settings.lcd_setting[SNeutrinoSettings::LCD_EPGMODE]; - showmode |= 3; // take only the separator line from the config + showmode |= EPG_NAME | EPG_TITLE; // take only the separator line from the config movie_big = big; movie_small = small; @@ -670,11 +665,11 @@ void CLCD::showVolume(const char vol, const bool perform_update) { volume = vol; if ( - ((mode == MODE_TVRADIO) && (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME])) || - ((mode == MODE_MOVIE) && (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME])) || + ((mode == MODE_TVRADIO || mode == MODE_MOVIE) && + g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != STATUSLINE_PLAYTIME) || (mode == MODE_SCART) || (mode == MODE_AUDIO) - ) + ) { display.draw_fill_rect (11,53,73,61, CLCDDisplay::PIXEL_OFF); //strichlin diff --git a/tuxbox/neutrino/src/driver/lcdd.h b/tuxbox/neutrino/src/driver/lcdd.h index 815bf00..6e32fc2 100644 --- a/tuxbox/neutrino/src/driver/lcdd.h +++ b/tuxbox/neutrino/src/driver/lcdd.h @@ -91,6 +91,13 @@ class CLCD EPGALIGN_LEFT, EPGALIGN_CENTER }; + enum EPGMODE + { + EPG_NAME = 1, // show service name + EPG_TITLE = 2, // show EPG title + EPG_SEPLINE = 4, // draw separator line between name and title + EPG_SHORT = 8 // show only one line of service name + }; private: diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index e8d146f..ec411ba 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -686,7 +686,7 @@ void CChannelList::zapTo(int pos, bool forceStoreToLastChannels) #endif tuned = pos; - if (g_settings.lcd_setting[SNeutrinoSettings::LCD_EPGMODE] & 0x02) + if (g_settings.lcd_setting[SNeutrinoSettings::LCD_EPGMODE] & CLCD::EPG_TITLE) { /* microoptimization: only poll sectionsd if epg title display is configured not sure if this is necessary, but the extra check won't hurt... */ CSectionsdClient::CurrentNextInfo info; diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp index 32aedd6..32381e7 100644 --- a/tuxbox/neutrino/src/gui/infoviewer.cpp +++ b/tuxbox/neutrino/src/gui/infoviewer.cpp @@ -2049,7 +2049,7 @@ returns mode of painted channel logo, void CInfoViewer::showLcdPercentOver() { - if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != 1) + if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != CLCD::STATUSLINE_VOLUME) { static long long old_interval = 0; int runningPercent=-1; diff --git a/tuxbox/neutrino/src/gui/lcd_setup.cpp b/tuxbox/neutrino/src/gui/lcd_setup.cpp index 16e6ce3..d0384f1 100644 --- a/tuxbox/neutrino/src/gui/lcd_setup.cpp +++ b/tuxbox/neutrino/src/gui/lcd_setup.cpp @@ -86,12 +86,12 @@ const CMenuOptionChooser::keyval LCDMENU_STATUSLINE_OPTIONS[LCDMENU_STATUSLINE_O #define LCDMENU_EPG_OPTION_COUNT 6 const CMenuOptionChooser::keyval LCDMENU_EPG_OPTIONS[LCDMENU_EPG_OPTION_COUNT] = { - { 1, LOCALE_LCDMENU_EPG_NAME }, - { 2, LOCALE_LCDMENU_EPG_TITLE }, - { 3, LOCALE_LCDMENU_EPG_NAME_TITLE }, - { 7, LOCALE_LCDMENU_EPG_NAME_SEPLINE_TITLE }, - { 11, LOCALE_LCDMENU_EPG_NAMESHORT_TITLE }, - { 15, LOCALE_LCDMENU_EPG_NAMESHORT_SEPLINE_TITLE } + { CLCD::EPG_NAME , LOCALE_LCDMENU_EPG_NAME }, + { CLCD::EPG_TITLE , LOCALE_LCDMENU_EPG_TITLE }, + { CLCD::EPG_NAME | CLCD::EPG_TITLE , LOCALE_LCDMENU_EPG_NAME_TITLE }, + { CLCD::EPG_NAME | CLCD::EPG_TITLE | CLCD::EPG_SEPLINE , LOCALE_LCDMENU_EPG_NAME_SEPLINE_TITLE }, + { CLCD::EPG_NAME | CLCD::EPG_SHORT | CLCD::EPG_TITLE , LOCALE_LCDMENU_EPG_NAMESHORT_TITLE }, + { CLCD::EPG_NAME | CLCD::EPG_SHORT | CLCD::EPG_TITLE | CLCD::EPG_SEPLINE, LOCALE_LCDMENU_EPG_NAMESHORT_SEPLINE_TITLE } }; #define LCDMENU_EPGALIGN_OPTION_COUNT 2 diff --git a/tuxbox/neutrino/src/gui/scan_setup.cpp b/tuxbox/neutrino/src/gui/scan_setup.cpp index 8f47229..a6b5872 100644 --- a/tuxbox/neutrino/src/gui/scan_setup.cpp +++ b/tuxbox/neutrino/src/gui/scan_setup.cpp @@ -126,14 +126,13 @@ const CMenuOptionChooser::keyval SATSETUP_SCANTP_FEC[SATSETUP_SCANTP_FEC_COUNT] #define CABLESETUP_SCANTP_MOD_COUNT 7 const CMenuOptionChooser::keyval CABLESETUP_SCANTP_MOD[CABLESETUP_SCANTP_MOD_COUNT] = { - {0, LOCALE_SCANTP_MOD_QPSK } , - {1, LOCALE_SCANTP_MOD_QAM_16 } , - {2, LOCALE_SCANTP_MOD_QAM_32 } , - {3, LOCALE_SCANTP_MOD_QAM_64 } , - {4, LOCALE_SCANTP_MOD_QAM_128 } , - {5, LOCALE_SCANTP_MOD_QAM_256 } , - {6, LOCALE_SCANTP_MOD_QAM_AUTO } - + { QPSK , LOCALE_SCANTP_MOD_QPSK }, + { QAM_16 , LOCALE_SCANTP_MOD_QAM_16 }, + { QAM_32 , LOCALE_SCANTP_MOD_QAM_32 }, + { QAM_64 , LOCALE_SCANTP_MOD_QAM_64 }, + { QAM_128 , LOCALE_SCANTP_MOD_QAM_128 }, + { QAM_256 , LOCALE_SCANTP_MOD_QAM_256 }, + { QAM_AUTO, LOCALE_SCANTP_MOD_QAM_AUTO } }; #define SATSETUP_SCANTP_POL_COUNT 2 diff --git a/tuxbox/neutrino/src/system/settings.h b/tuxbox/neutrino/src/system/settings.h index b4b45b8..ef91bda 100644 --- a/tuxbox/neutrino/src/system/settings.h +++ b/tuxbox/neutrino/src/system/settings.h @@ -561,7 +561,7 @@ const time_settings_struct_t timing_setting[TIMING_SETTING_COUNT] = #define DEFAULT_LCD_INVERSE 0x00 #define DEFAULT_LCD_AUTODIMM 0x00 #define DEFAULT_LCD_SHOW_VOLUME CLCD::STATUSLINE_VOLUME -#define DEFAULT_LCD_EPGMODE 0x01 /* 0x1 = name 0x2 = epgtitle 0x4 = separator */ +#define DEFAULT_LCD_EPGMODE CLCD::EPG_NAME #define DEFAULT_LCD_BIAS 0x00 /* 0x0 = default for philips rev 2, 0x1 = default for all others */ #define DEFAULT_LCD_EPGALIGN CLCD::EPGALIGN_LEFT commit 694e186ffdb5aa62fbef44d5a7e62702edf5e43d Author: Christian Schuett <Gau...@ho...> Date: Sat Jul 6 21:53:27 2013 +0200 Neutrino: remove unnecessary SendSectionsdConfig() calls sectionsd saves and rereads its config when restarted Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp index 42636cb..341d88c 100644 --- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp +++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp @@ -358,7 +358,6 @@ void CVCRControl::CFileAndServerDevice::RestoreNeutrino(void) { g_Sectionsd->setPauseScanning(false); g_Sectionsd->setServiceChanged(g_RemoteControl->current_channel_id, false); - CNeutrinoApp::getInstance()->SendSectionsdConfig(); } // alten mode wieder herstellen (ausser wen zwischenzeitlich auf oder aus sb geschalten wurde) diff --git a/tuxbox/neutrino/src/gui/movieplayer.cpp b/tuxbox/neutrino/src/gui/movieplayer.cpp index 303fd90..c9cd0b2 100644 --- a/tuxbox/neutrino/src/gui/movieplayer.cpp +++ b/tuxbox/neutrino/src/gui/movieplayer.cpp @@ -567,7 +567,6 @@ CMoviePlayerGui::exec (CMenuTarget * parent, const std::string & actionKey) { g_Sectionsd->setPauseScanning(false); g_Sectionsd->setServiceChanged(g_RemoteControl->current_channel_id, false); - CNeutrinoApp::getInstance()->SendSectionsdConfig(); } // Restore last mode diff --git a/tuxbox/neutrino/src/gui/movieplayer2.cpp b/tuxbox/neutrino/src/gui/movieplayer2.cpp index b533345..a6ab3c0 100644 --- a/tuxbox/neutrino/src/gui/movieplayer2.cpp +++ b/tuxbox/neutrino/src/gui/movieplayer2.cpp @@ -542,7 +542,6 @@ CMoviePlayerGui::exec(CMenuTarget *parent, const std::string &actionKey) { g_Sectionsd->setPauseScanning(false); g_Sectionsd->setServiceChanged(g_RemoteControl->current_channel_id, false); - CNeutrinoApp::getInstance()->SendSectionsdConfig(); } // Restore last mode diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index 0adc64c..d5ef65a 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -4193,7 +4193,6 @@ int CNeutrinoApp::exec(CMenuTarget* /*parent*/, const std::string & actionKey) g_Sectionsd->RegisterNeutrino(); g_Sectionsd->setPauseScanning(false); g_Sectionsd->setServiceChanged(g_RemoteControl->current_channel_id, false); - SendSectionsdConfig(); returnval = menu_return::RETURN_REPAINT; // just to show that something was done } #ifdef ENABLE_MOVIEPLAYER2 commit f5e16560ba1d4cea50794e3b3da17ceacf637db3 Author: Christian Schuett <Gau...@ho...> Date: Sat Jul 6 21:10:54 2013 +0200 Neutrino: add some enums and use them instead of numbers Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/driver/lcdd.cpp b/tuxbox/neutrino/src/driver/lcdd.cpp index 3ecd059..7dab7b9 100644 --- a/tuxbox/neutrino/src/driver/lcdd.cpp +++ b/tuxbox/neutrino/src/driver/lcdd.cpp @@ -512,7 +512,7 @@ void CLCD::showTextScreen(const std::string & big, const std::string & small, co int x = 1; for (int i = 0; i < namelines; i++) { y += 14; - if (g_settings.lcd_setting[SNeutrinoSettings::LCD_EPGALIGN] == 1) // centered + if (g_settings.lcd_setting[SNeutrinoSettings::LCD_EPGALIGN] == EPGALIGN_CENTER) { int w = fonts.channelname->getRenderWidth(cname[i].c_str(), big_utf8); x = (LCD_COLS - w) / 2; @@ -529,7 +529,7 @@ void CLCD::showTextScreen(const std::string & big, const std::string & small, co { for (int i = 0; i < eventlines; i++) { y += 10; - if (g_settings.lcd_setting[SNeutrinoSettings::LCD_EPGALIGN] == 1) // centered + if (g_settings.lcd_setting[SNeutrinoSettings::LCD_EPGALIGN] == EPGALIGN_CENTER) { int w = fonts.menu->getRenderWidth(event[i].c_str(), small_utf8); x = (LCD_COLS - w) / 2; @@ -712,15 +712,15 @@ void CLCD::showPercentOver(const unsigned char perc, const bool perform_update, percentOver = perc; if (mode == MODE_TVRADIO || mode == MODE_MOVIE) { - if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 0) + if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == STATUSLINE_PLAYTIME) { left = 12; top = 55; width = 60; } - else if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 2) + else if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == STATUSLINE_BOTH) { left = 12; top = 3; width = 104; } - else if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 3) + else if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == STATUSLINE_BOTH_AUDIO) { left = 12; top = 3; width = 84; @@ -897,20 +897,20 @@ void CLCD::setMode(const MODES m, const char * const title) case MODE_MOVIE: switch (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME]) { - case 0: + case STATUSLINE_PLAYTIME: display.load_screen(&(background[BACKGROUND_LCD2])); showPercentOver(percentOver, false, mode); break; - case 1: + case STATUSLINE_VOLUME: display.load_screen(&(background[BACKGROUND_LCD])); showVolume(volume, false); break; - case 2: + case STATUSLINE_BOTH: display.load_screen(&(background[BACKGROUND_LCD3])); showVolume(volume, false); showPercentOver(percentOver, false, mode); break; - case 3: + case STATUSLINE_BOTH_AUDIO: display.load_screen(&(background[BACKGROUND_LCD4])); showVolume(volume, false); showPercentOver(percentOver, false, mode); diff --git a/tuxbox/neutrino/src/driver/lcdd.h b/tuxbox/neutrino/src/driver/lcdd.h index ca5aff2..815bf00 100644 --- a/tuxbox/neutrino/src/driver/lcdd.h +++ b/tuxbox/neutrino/src/driver/lcdd.h @@ -79,6 +79,18 @@ class CLCD AUDIO_MODE_PAUSE, AUDIO_MODE_REV }; + enum STATUSLINE + { + STATUSLINE_PLAYTIME, + STATUSLINE_VOLUME, + STATUSLINE_BOTH, + STATUSLINE_BOTH_AUDIO + }; + enum EPGALIGN + { + EPGALIGN_LEFT, + EPGALIGN_CENTER + }; private: diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp index 8126ef8..42636cb 100644 --- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp +++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp @@ -350,11 +350,11 @@ void CVCRControl::CFileAndServerDevice::RestoreNeutrino(void) g_Zapit->setRecordMode( false ); // sectionsd starten, wenn er gestoppt oder neu gestartet wurde - if (StopSectionsd == 1) + if (StopSectionsd == CNeutrinoApp::SECTIONSD_STOP) { g_Sectionsd->setPauseScanning(false); } - else if (StopSectionsd == 2) + else if (StopSectionsd == CNeutrinoApp::SECTIONSD_RESTART) { g_Sectionsd->setPauseScanning(false); g_Sectionsd->setServiceChanged(g_RemoteControl->current_channel_id, false); @@ -420,11 +420,11 @@ void CVCRControl::CFileAndServerDevice::CutBackNeutrino(const t_channel_id chann if(StopPlayBack && g_Zapit->isPlayBackActive()) // wenn playback gestoppt werden soll und noch l�uft g_Zapit->stopPlayBack(); // dann playback stoppen - if (StopSectionsd == 1) // wenn sectionsd gestoppt werden soll + if (StopSectionsd == CNeutrinoApp::SECTIONSD_STOP) { g_Sectionsd->setPauseScanning(true); // sectionsd stoppen } - else if (StopSectionsd == 2) // wenn sectionsd neu gestartet werden soll + else if (StopSectionsd == CNeutrinoApp::SECTIONSD_RESTART) { g_Sectionsd->Restart(); // sectionsd neu starten (pausiert automatisch) g_Sectionsd->RegisterNeutrino(); diff --git a/tuxbox/neutrino/src/gui/audio_setup.cpp b/tuxbox/neutrino/src/gui/audio_setup.cpp index c58b978..2dd8cea 100644 --- a/tuxbox/neutrino/src/gui/audio_setup.cpp +++ b/tuxbox/neutrino/src/gui/audio_setup.cpp @@ -109,15 +109,15 @@ const CMenuOptionChooser::keyval AUDIOMENU_AVS_CONTROL_OPTIONS[AUDIOMENU_AVS_CON #define AUDIOMENU_LEFT_RIGHT_SELECTABLE_OPTION_COUNT 2 const CMenuOptionChooser::keyval AUDIOMENU_LEFT_RIGHT_SELECTABEL_OPTIONS[AUDIOMENU_LEFT_RIGHT_SELECTABLE_OPTION_COUNT] = { - { true, LOCALE_OPTIONS_ON }, - { false, LOCALE_OPTIONS_OFF } + { 1, LOCALE_OPTIONS_ON }, + { 0, LOCALE_OPTIONS_OFF } }; #define AUDIOMENU_AUDIOCHANNEL_UP_DOWN_ENABLE_COUNT 2 const CMenuOptionChooser::keyval AUDIOMENU_AUDIOCHANNEL_UP_DOWN_ENABLE_OPTIONS[AUDIOMENU_AUDIOCHANNEL_UP_DOWN_ENABLE_COUNT] = { - { true, LOCALE_OPTIONS_ON }, - { false, LOCALE_OPTIONS_OFF } + { 1, LOCALE_OPTIONS_ON }, + { 0, LOCALE_OPTIONS_OFF } }; /* audio settings menu */ diff --git a/tuxbox/neutrino/src/gui/bouquetlist.h b/tuxbox/neutrino/src/gui/bouquetlist.h index c5a2d10..a5a9c04 100644 --- a/tuxbox/neutrino/src/gui/bouquetlist.h +++ b/tuxbox/neutrino/src/gui/bouquetlist.h @@ -44,9 +44,9 @@ typedef enum bouquetSwitchMode { - bsmBouquets, // pressing OK shows list of all Bouquets - bsmChannels, // pressing OK shows list of all channels of active bouquets - bsmAllChannels // OK shows lsit of all channels + bsmChannels, // pressing OK shows list of all channels of active bouquet + bsmBouquets, // pressing OK shows list of all bouquets + bsmAllChannels // pressing OK shows list of all channels } BouquetSwitchMode; class CBouquet diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index 7b64849..e8d146f 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -139,7 +139,7 @@ int CChannelList::exec() void CChannelList::calcSize() { full_width = w_max(720, 2 * ConnectLineBox_Width); - if (g_settings.channellist_additional) + if (g_settings.channellist_additional != ADDITIONAL_OFF) #if defined BOXMODEL_DM500 || defined HAVE_IPBOX_HARDWARE // the dm500 seems to like only half / quarter resolution... width = full_width - 180 -10; @@ -448,7 +448,7 @@ int CChannelList::show() } else if ( msg == CRCInput::RC_blue ) { - if (g_settings.channellist_additional) { + if (g_settings.channellist_additional != ADDITIONAL_OFF) { displayList = !displayList; if (displayList) paint_events(selected); @@ -1135,7 +1135,7 @@ void CChannelList::paintDetails(unsigned int index) else { g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, full_width - 20, g_Locale->getText(LOCALE_EPGLIST_NOEVENTS), COL_MENUCONTENTDARK, 0, true); // UTF-8 } - if(g_settings.channellist_foot == 0) { + if(g_settings.channellist_foot == FOOT_FREQ) { TP_params TP; g_Zapit->get_current_TP(&TP); std::string desc = ""; @@ -1198,7 +1198,7 @@ void CChannelList::paintDetails(unsigned int index) g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true); } - else if( !displayNext && g_settings.channellist_foot == 1) { // next Event 1 + else if( !displayNext && g_settings.channellist_foot == FOOT_NEXT) { char buf[128] = {0}; char cFrom[50] = {0}; // UTF-8 CSectionsdClient::CurrentNextInfo CurrentNext; @@ -1213,7 +1213,7 @@ void CChannelList::paintDetails(unsigned int index) g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- from_len, y+ height+ 5+ 3*fheight, from_len, cFrom, COL_MENUCONTENTDARK, 0, true); // UTF-8 } } - if (g_settings.channellist_additional) { + if (g_settings.channellist_additional != ADDITIONAL_OFF) { if (displayList) paint_events(selected); else @@ -1494,7 +1494,7 @@ void CChannelList::paintButtonBar() int ButtonWidth = (full_width - 20) / 4; //manage now/next button - if (g_settings.channellist_additional) + if (g_settings.channellist_additional != ADDITIONAL_OFF) { if (displayList) CChannelListButtons[2].locale = LOCALE_FONTSIZE_CHANNELLIST_DESCR; @@ -1534,7 +1534,7 @@ void CChannelList::paint() // paint background for main box frameBuffer->paintBoxRel(x, y+theight, width, height-footerHeight-theight, COL_MENUCONTENT_PLUS_0); - if (g_settings.channellist_additional) + if (g_settings.channellist_additional != ADDITIONAL_OFF) // paint background for right box frameBuffer->paintBoxRel(x+width,y+theight,infozone_width,pig_height+infozone_height,COL_MENUCONTENT_PLUS_0); diff --git a/tuxbox/neutrino/src/gui/channellist.h b/tuxbox/neutrino/src/gui/channellist.h index 510d9c3..c94b252 100644 --- a/tuxbox/neutrino/src/gui/channellist.h +++ b/tuxbox/neutrino/src/gui/channellist.h @@ -45,12 +45,6 @@ #include <string> #include <vector> - enum { - ADDITIONAL_OFF, - ADDITIONAL_ON, - ADDITIONAL_MTV - }; - class CChannelList { public: @@ -137,6 +131,20 @@ class CChannelList void processTextToArray(std::string text); public: + enum + { + ADDITIONAL_OFF, + ADDITIONAL_ON, + ADDITIONAL_MTV + }; + + enum + { + FOOT_FREQ, + FOOT_NEXT, + FOOT_OFF + }; + CChannelList(const char * const Name, bool historyMode = false, bool UsedInBouquet = false); ~CChannelList(); void addChannel(int key, int number, const std::string& name, const t_satellite_position satellitePosition, t_channel_id ids = 0); // UTF-8 diff --git a/tuxbox/neutrino/src/gui/driver_boot_setup.cpp b/tuxbox/neutrino/src/gui/driver_boot_setup.cpp index ab37921..45e7b6c 100644 --- a/tuxbox/neutrino/src/gui/driver_boot_setup.cpp +++ b/tuxbox/neutrino/src/gui/driver_boot_setup.cpp @@ -80,9 +80,9 @@ const CMenuOptionChooser::keyval OPTIONS_OFF1_ON0_OPTIONS[OPTIONS_OFF1_ON0_OPTIO #define DRIVERSETTINGS_FB_DESTINATION_OPTION_COUNT 3 const CMenuOptionChooser::keyval DRIVERSETTINGS_FB_DESTINATION_OPTIONS[DRIVERSETTINGS_FB_DESTINATION_OPTION_COUNT] = { - { 0, LOCALE_OPTIONS_NULL }, - { 1, LOCALE_OPTIONS_SERIAL }, - { 2, LOCALE_OPTIONS_FB } + { CNeutrinoApp::UBOOT_CONSOLE_NULL , LOCALE_OPTIONS_NULL }, + { CNeutrinoApp::UBOOT_CONSOLE_SERIAL, LOCALE_OPTIONS_SERIAL }, + { CNeutrinoApp::UBOOT_CONSOLE_FB , LOCALE_OPTIONS_FB } }; #define DRIVERSETTINGS_FDX_OPTION_COUNT 3 diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp index 3af00be..32aedd6 100644 --- a/tuxbox/neutrino/src/gui/infoviewer.cpp +++ b/tuxbox/neutrino/src/gui/infoviewer.cpp @@ -895,7 +895,7 @@ void CInfoViewer::showSubchan() int dx = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth(text, subChannelNameIsUTF) + 20; int dy = 25; - if( g_settings.infobar_subchan_disp_pos == 4 ) + if( g_settings.infobar_subchan_disp_pos == SUBCHAN_DISP_POS_INFOBAR ) { // show full infobar for subschannel g_RCInput->postMsg( NeutrinoMessages::SHOW_INFOBAR , 0 ); @@ -913,27 +913,23 @@ void CInfoViewer::showSubchan() dy= dy +5; int x=0,y=0; - if( g_settings.infobar_subchan_disp_pos == 0 ) + if( g_settings.infobar_subchan_disp_pos == SUBCHAN_DISP_POS_TOP_RIGHT ) { - // Rechts-Oben x = g_settings.screen_EndX - dx - 10; y = g_settings.screen_StartY + 10; } - else if( g_settings.infobar_subchan_disp_pos == 1 ) + else if( g_settings.infobar_subchan_disp_pos == SUBCHAN_DISP_POS_TOP_LEFT ) { - // Links-Oben x = g_settings.screen_StartX + 10; y = g_settings.screen_StartY + 10; } - else if( g_settings.infobar_subchan_disp_pos == 2 ) + else if( g_settings.infobar_subchan_disp_pos == SUBCHAN_DISP_POS_BOTTOM_LEFT ) { - // Links-Unten x = g_settings.screen_StartX + 10; y = g_settings.screen_EndY - dy - 10; } - else if( g_settings.infobar_subchan_disp_pos == 3 ) + else if( g_settings.infobar_subchan_disp_pos == SUBCHAN_DISP_POS_BOTTOM_RIGHT ) { - // Rechts-Unten x = g_settings.screen_EndX - dx - 10; y = g_settings.screen_EndY - dy - 10; } @@ -1918,7 +1914,7 @@ returns mode of painted channel logo, bool logo_available; - if (g_settings.infobar_show_channellogo) // show logo only if "infobar_show_channellogo" adjusted to true, else use defaults + if (g_settings.infobar_show_channellogo != NO_LOGO) { // check if logo is available @@ -1947,7 +1943,7 @@ returns mode of painted channel logo, } { - if (g_settings.infobar_show_channellogo == 1) // paint logo in numberbox + if (g_settings.infobar_show_channellogo == LOGO_AS_CHANNELLUM) { // calculate mid of numberbox int satNameHeight = 0; // no sat name display now, picon doesnt need to set an offset for y @@ -1970,7 +1966,7 @@ returns mode of painted channel logo, res = 1; } } - else if (g_settings.infobar_show_channellogo == 2) // paint logo in place of channel name + else if (g_settings.infobar_show_channellogo == LOGO_AS_CHANNELNAME) { // check logo dimensions if ((logo_w > chan_w) || (logo_h > ChanHeight)) @@ -1989,7 +1985,7 @@ returns mode of painted channel logo, res = 2; } } - else if (g_settings.infobar_show_channellogo == 3) // paint logo beside channel name + else if (g_settings.infobar_show_channellogo == LOGO_BESIDE_CHANNELNAME) { // check logo dimensions int Logo_max_width = chan_w - logo_w - 10; @@ -2016,11 +2012,11 @@ returns mode of painted channel logo, } // paint logo background (shaded/framed) - if ((g_settings.infobar_channellogo_background !=0) && (res !=0)) // with background + if ((g_settings.infobar_channellogo_background != NO_BACKGROUND) && (res != 0)) { int frame_w = 2, logo_bg_x=0, logo_bg_y=0, logo_bg_w=0, logo_bg_h=0; - if (g_settings.infobar_channellogo_background == 1) // framed + if (g_settings.infobar_channellogo_background == LOGO_FRAMED) { //sh_offset = 2; logo_bg_x = logo_x-frame_w; @@ -2028,7 +2024,7 @@ returns mode of painted channel logo, logo_bg_w = logo_w+frame_w*2; logo_bg_h = logo_h+frame_w*2; } - else if (g_settings.infobar_channellog... [truncated message content] |
From: Thilo G. <tux...@ne...> - 2013-06-23 18:42:33
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 748ac5faf482b3a475f75530f972074d8e724bad (commit) via ca75825eda2c655bbbfa44ff7720061e6e81c24a (commit) via e3067794a3d9cacc8eef78134abcadf7bb238780 (commit) via 44e467d2069f39618e488cacdbeb8071c76e3436 (commit) via e825376f3a58902806c4cf96e278bb49b039211f (commit) via be9752cd5487884fca4bd20d43b849eefeba1b4e (commit) via a744299f0b646b36c6a1e1d185d76efd7fdcd4eb (commit) via 98515b993e9fd66795b9e4e83f29d9a914fc4ae0 (commit) via 8d66985acb23003f08c2adffb5a88208c9220dff (commit) via 758d8b7e1c3a50b5545aedca33f090045c7063b8 (commit) via a08eebdc9b737e9987da12a6b906d5f74542303f (commit) via d680e1d391ea0433d9d979858ca63f3151574f85 (commit) via e70d4041d96883016bc1a4efe40853194f13ccf6 (commit) from 2577990c6e8effa45d04738e87c8082cf3ffe52d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 748ac5faf482b3a475f75530f972074d8e724bad Author: Christian Schuett <Gau...@ho...> Date: Mon Jun 17 22:42:08 2013 +0200 Neutrino CMenuWidget: move duplicate code into new method updateSelection() Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp index 0d16b68..99a7d30 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.cpp +++ b/tuxbox/neutrino/src/gui/widget/menue.cpp @@ -430,27 +430,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) else pos = (selected + count) % items.size(); - CMenuItem* item = items[pos]; - - if (item->isSelectable()) - { - if ((pos < page_start[current_page + 1]) && - (pos >= page_start[current_page])) - { // Item is currently on screen - //clear prev. selected - items[selected]->paint(false); - //select new - item->paint(true); - selected = pos; - break; - } - else - { - selected = pos; - paintItems(); - break; - } - } + if (updateSelection(pos)) + break; } break; } @@ -507,22 +488,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) pos = page_start[current_page] - 1; for (unsigned int count = pos; count > 0; count--) { - CMenuItem* item = items[pos]; - if (item->isSelectable()) - { - if ((pos < page_start[current_page + 1]) && (pos >= page_start[current_page])) - { - items[selected]->paint(false); - item->paint(true); - selected = pos; - } - else - { - selected = pos; - paintItems(); - } + if (updateSelection(pos)) break; - } pos--; } } @@ -531,22 +498,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) pos = 0; for (unsigned int count = 0; count < items.size(); count++) { - CMenuItem* item = items[pos]; - if (item->isSelectable()) - { - if ((pos < page_start[current_page + 1]) && (pos >= page_start[current_page])) - { - items[selected]->paint(false); - item->paint(true); - selected = pos; - } - else - { - selected = pos; - paintItems(); - } + if (updateSelection(pos)) break; - } pos++; } } @@ -558,22 +511,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) pos = items.size() - 1; for (unsigned int count = pos; count < items.size(); count++) { - CMenuItem* item = items[pos]; - if (item->isSelectable()) - { - if ((pos < page_start[current_page + 1]) && (pos >= page_start[current_page])) - { - items[selected]->paint(false); - item->paint(true); - selected = pos; - } - else - { - selected = pos; - paintItems(); - } + if (updateSelection(pos)) break; - } pos++; } } @@ -732,7 +671,7 @@ void CMenuWidget::paintItems() } else { - ypos = item->paint(selected==((signed int) count) ); + ypos = item->paint(selected == count); } } else @@ -743,6 +682,30 @@ void CMenuWidget::paintItems() } } +bool CMenuWidget::updateSelection(int pos) +{ + CMenuItem* item = items[pos]; + if (item->isSelectable()) + { + if ((pos < page_start[current_page + 1]) && + (pos >= page_start[current_page])) + { // Item is currently on screen + //clear prev. selected + items[selected]->paint(false); + //select new + item->paint(true); + selected = pos; + } + else + { + selected = pos; + paintItems(); + } + return true; + } + return false; +} + /*adds the typical menu intro with optional subhead, separator, back button and separatorline to menu*/ void CMenuWidget::addIntroItems(neutrino_locale_t subhead_text, neutrino_locale_t section_text, int buttontype) { diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h index bb0d6c4..c1be247 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.h +++ b/tuxbox/neutrino/src/gui/widget/menue.h @@ -320,6 +320,7 @@ class CMenuWidget : public CMenuTarget unsigned int total_pages; virtual void paintItems(); + virtual bool updateSelection(int pos); public: CMenuWidget(); commit ca75825eda2c655bbbfa44ff7720061e6e81c24a Author: Stefan Seyfried <se...@tu...> Date: Mon Jun 17 20:43:49 2013 +0200 Neutrino CMenuWidget: make page_start[] int, avoids lots of casts Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp index bd4db51..0d16b68 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.cpp +++ b/tuxbox/neutrino/src/gui/widget/menue.cpp @@ -434,8 +434,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) if (item->isSelectable()) { - if ((pos < (int)page_start[current_page + 1]) && - (pos >= (int)page_start[current_page])) + if ((pos < page_start[current_page + 1]) && + (pos >= page_start[current_page])) { // Item is currently on screen //clear prev. selected items[selected]->paint(false); @@ -504,13 +504,13 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) { if (current_page) { - pos = (int)page_start[current_page] - 1; + pos = page_start[current_page] - 1; for (unsigned int count = pos; count > 0; count--) { CMenuItem* item = items[pos]; if (item->isSelectable()) { - if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page])) + if ((pos < page_start[current_page + 1]) && (pos >= page_start[current_page])) { items[selected]->paint(false); item->paint(true); @@ -534,7 +534,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) CMenuItem* item = items[pos]; if (item->isSelectable()) { - if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page])) + if ((pos < page_start[current_page + 1]) && (pos >= page_start[current_page])) { items[selected]->paint(false); item->paint(true); @@ -553,7 +553,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) } else if (msg == g_settings.key_menu_pagedown) { - pos = (int)page_start[current_page + 1]; + pos = page_start[current_page + 1]; if (pos >= (int)items.size()) pos = items.size() - 1; for (unsigned int count = pos; count < items.size(); count++) @@ -561,7 +561,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) CMenuItem* item = items[pos]; if (item->isSelectable()) { - if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page])) + if ((pos < page_start[current_page + 1]) && (pos >= page_start[current_page])) { items[selected]->paint(false); item->paint(true); @@ -703,9 +703,9 @@ void CMenuWidget::paintItems() //Item not currently on screen if (selected >= 0) { - while(selected < (int)page_start[current_page]) + while(selected < page_start[current_page]) current_page--; - while(selected >= (int)page_start[current_page + 1]) + while(selected >= page_start[current_page + 1]) current_page++; } @@ -717,7 +717,7 @@ void CMenuWidget::paintItems() } frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0); int ypos=item_start_y; - for (unsigned int count = 0; count < items.size(); count++) + for (int count = 0; count < (int)items.size(); count++) { CMenuItem* item = items[count]; diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h index 1a0de0a..bb0d6c4 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.h +++ b/tuxbox/neutrino/src/gui/widget/menue.h @@ -303,7 +303,7 @@ class CMenuWidget : public CMenuTarget std::string nameString; CFrameBuffer *frameBuffer; std::vector<CMenuItem*> items; - std::vector<unsigned int> page_start; + std::vector<int> page_start; std::string iconfile; int width; commit e3067794a3d9cacc8eef78134abcadf7bb238780 Author: Christian Schuett <Gau...@ho...> Date: Mon Jun 17 18:38:04 2013 +0200 Neutrino: don't restore old selection in bouquets if cancelled this is not needed because current bouquet and channel are selected automatically after closing the channel list, so let's keep current position in all other bouquets Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index bc41c5c..7b64849 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -108,8 +108,10 @@ CChannelList::CChannelList(const char * const Name, bool hMode, bool UsedInBouqu CChannelList::~CChannelList() { if (!usedInBouquet) + { for (std::vector<CChannel *>::iterator it = chanlist.begin(); it != chanlist.end(); ++it) delete (*it); + } chanlist.clear(); } @@ -360,7 +362,8 @@ int CChannelList::show() if (msg == CRCInput::RC_timeout || msg == g_settings.key_channelList_cancel) { - selected = oldselected; + if (!usedInBouquet) + selected = oldselected; loop=false; } else if (msg_repeatok == CRCInput::RC_up || msg_repeatok == g_settings.key_channelList_pageup) @@ -414,7 +417,8 @@ int CChannelList::show() (CRCInput::isNumeric(msg)) ) { //pushback key if... - selected = oldselected; + if (!usedInBouquet) + selected = oldselected; g_RCInput->postMsg( msg, data ); loop=false; } commit 44e467d2069f39618e488cacdbeb8071c76e3436 Author: Christian Schuett <Gau...@ho...> Date: Sun Jun 16 19:39:49 2013 +0200 Neutrino: store channels only once in memory Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/bouquetlist.h b/tuxbox/neutrino/src/gui/bouquetlist.h index a541c3c..c5a2d10 100644 --- a/tuxbox/neutrino/src/gui/bouquetlist.h +++ b/tuxbox/neutrino/src/gui/bouquetlist.h @@ -61,7 +61,7 @@ class CBouquet { unique_key = Unique_key; bLocked = locked; - channelList = new CChannelList(Name); + channelList = new CChannelList(Name, false, true); } ~CBouquet() diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index a729c39..bc41c5c 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -88,7 +88,7 @@ CChannelList::CChannel::CChannel(const int _key, const int _number, const std::s } -CChannelList::CChannelList(const char * const Name, bool hMode) +CChannelList::CChannelList(const char * const Name, bool hMode, bool UsedInBouquet) { frameBuffer = CFrameBuffer::getInstance(); if (pig == NULL) @@ -101,15 +101,15 @@ CChannelList::CChannelList(const char * const Name, bool hMode) tuned=0xfffffff; zapProtection = NULL; this->historyMode = hMode; + usedInBouquet = UsedInBouquet; eventFont = SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT; } CChannelList::~CChannelList() { - for (std::vector<CChannel *>::iterator it = chanlist.begin(); it != chanlist.end(); ++it) - { - delete (*it); - } + if (!usedInBouquet) + for (std::vector<CChannel *>::iterator it = chanlist.begin(); it != chanlist.end(); ++it) + delete (*it); chanlist.clear(); } diff --git a/tuxbox/neutrino/src/gui/channellist.h b/tuxbox/neutrino/src/gui/channellist.h index a39c033..510d9c3 100644 --- a/tuxbox/neutrino/src/gui/channellist.h +++ b/tuxbox/neutrino/src/gui/channellist.h @@ -111,6 +111,7 @@ class CChannelList CEPGData epgData; bool historyMode; + bool usedInBouquet; bool displayNext; bool displayList; @@ -136,7 +137,7 @@ class CChannelList void processTextToArray(std::string text); public: - CChannelList(const char * const Name, bool historyMode = false ); + CChannelList(const char * const Name, bool historyMode = false, bool UsedInBouquet = false); ~CChannelList(); void addChannel(int key, int number, const std::string& name, const t_satellite_position satellitePosition, t_channel_id ids = 0); // UTF-8 void addChannel(CChannel* chan); diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index b8f7791..232465e 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -1480,7 +1480,7 @@ void CNeutrinoApp::channelsInit(int init_mode, int _mode) for (uint j = 0; j < zapitChannels.size(); j++) { - CChannelList::CChannel* channel = new CChannelList::CChannel(zapitChannels[j].nr, zapitChannels[j].nr, zapitChannels[j].name, zapitChannels[j].satellitePosition, zapitChannels[j].channel_id); // UTF-8 + CChannelList::CChannel* channel = channelListTV->getChannel(zapitChannels[j].nr); /* observe that "bouquetList->Bouquets[i]" refers to the bouquet we just created using bouquetList->addBouquet */ bouquetListTV->Bouquets[i]->channelList->addChannel(channel); @@ -1528,7 +1528,7 @@ void CNeutrinoApp::channelsInit(int init_mode, int _mode) for (uint j = 0; j < zapitChannels.size(); j++) { - CChannelList::CChannel* channel = new CChannelList::CChannel(zapitChannels[j].nr, zapitChannels[j].nr, zapitChannels[j].name, zapitChannels[j].satellitePosition, zapitChannels[j].channel_id); // UTF-8 + CChannelList::CChannel* channel = channelListRADIO->getChannel(zapitChannels[j].nr); /* observe that "bouquetList->Bouquets[i]" refers to the bouquet we just created using bouquetList->addBouquet */ bouquetListRADIO->Bouquets[i]->channelList->addChannel(channel); @@ -1604,7 +1604,7 @@ void CNeutrinoApp::channelsInit4Record(void) for (uint j = 0; j < zapitChannels.size(); j++) { channel_nr++; - CChannelList::CChannel* channel = new CChannelList::CChannel(channel_nr, channel_nr, zapitChannels[j].name, zapitChannels[j].satellitePosition, zapitChannels[j].channel_id); // UTF-8 + CChannelList::CChannel* channel = channelListRecord->getChannel(channel_nr); /* observe that "bouquetList->Bouquets[i]" refers to the bouquet we just created using bouquetList->addBouquet */ bouquetListRecord->Bouquets[i]->channelList->addChannel(channel); commit e825376f3a58902806c4cf96e278bb49b039211f Author: Christian Schuett <Gau...@ho...> Date: Sun Jun 16 16:31:05 2013 +0200 Neutrino: fix numbering of channels in bouquets while recording this also fixes some segfaults in channel list when switching channels or navigating through bouquets while recording Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/bouquetlist.cpp b/tuxbox/neutrino/src/gui/bouquetlist.cpp index 3a28a1f..c8f35dd 100644 --- a/tuxbox/neutrino/src/gui/bouquetlist.cpp +++ b/tuxbox/neutrino/src/gui/bouquetlist.cpp @@ -102,7 +102,7 @@ void CBouquetList::adjustToChannel( int nChannelNr) { for (uint i=0; i<Bouquets.size(); i++) { - int nChannelPos = CNeutrinoApp::getInstance ()->recordingstatus ?nChannelNr-1: Bouquets[i]->channelList->hasChannel(nChannelNr); + int nChannelPos = Bouquets[i]->channelList->hasChannel(nChannelNr); if (nChannelPos > -1) { selected = i; diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index 5663cab..a729c39 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -1315,7 +1315,7 @@ void CChannelList::paintItem(int pos) title_offset=6; } - snprintf((char*) tmp, sizeof(tmp), "%d", this->historyMode ? pos : CNeutrinoApp::getInstance ()->recordingstatus ? curr+1 : chan->number); + snprintf((char*) tmp, sizeof(tmp), "%d", this->historyMode ? pos : chan->number); CChannelEvent *p_event = NULL; if (displayNext) { diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index 3f4774b..b8f7791 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -1504,8 +1504,8 @@ void CNeutrinoApp::channelsInit(int init_mode, int _mode) // same for the RADIO channels if (channelListRADIO) delete channelListRADIO; - channelListRADIO = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_HEAD)); + g_Zapit->getChannels(zapitChannels, CZapitClient::MODE_RADIO, CZapitClient::SORT_BOUQUET, true); // UTF-8 for(uint i=0; i<zapitChannels.size(); i++) { @@ -1571,22 +1571,26 @@ void CNeutrinoApp::channelsInit4Record(void) CZapitClient::BouquetChannelList zapitChannels; CZapitClient::BouquetList zapitBouquets; + int channel_nr = 0; //deleting old channelList for mode-switching. if (channelListRecord) delete channelListRecord; - channelListRecord = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_HEAD)); + g_Zapit->getChannels(zapitChannels, CZapitClient::MODE_CURRENT, CZapitClient::SORT_BOUQUET, true); // UTF-8 for(uint i=0; i<zapitChannels.size(); i++) { - channelListRecord->addChannel(zapitChannels[i].nr, zapitChannels[i].nr, zapitChannels[i].name, zapitChannels[i].satellitePosition, zapitChannels[i].channel_id); // UTF-8 + channel_nr++; + channelListRecord->addChannel(channel_nr, channel_nr, zapitChannels[i].name, zapitChannels[i].satellitePosition, zapitChannels[i].channel_id); // UTF-8 } + channel_nr = 0; + if (bouquetListRecord) delete bouquetListRecord; bouquetListRecord = new CBouquetList(); - bouquetListRecord ->orgChannelList = channelListRecord; + bouquetListRecord->orgChannelList = channelListRecord; /* load non-empty bouquets only */ g_Zapit->getBouquets(zapitBouquets, false, true); // UTF-8 @@ -1599,7 +1603,8 @@ void CNeutrinoApp::channelsInit4Record(void) for (uint j = 0; j < zapitChannels.size(); j++) { - CChannelList::CChannel* channel = new CChannelList::CChannel(zapitChannels[j].nr, zapitChannels[j].nr, zapitChannels[j].name, zapitChannels[j].satellitePosition, zapitChannels[j].channel_id); // UTF-8 + channel_nr++; + CChannelList::CChannel* channel = new CChannelList::CChannel(channel_nr, channel_nr, zapitChannels[j].name, zapitChannels[j].satellitePosition, zapitChannels[j].channel_id); // UTF-8 /* observe that "bouquetList->Bouquets[i]" refers to the bouquet we just created using bouquetList->addBouquet */ bouquetListRecord->Bouquets[i]->channelList->addChannel(channel); @@ -2457,9 +2462,9 @@ void CNeutrinoApp::RealRun(CMenuWidget &menu) int nNewChannel = bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->show(); if(nNewChannel>-1) { - recordingstatus ? channelList->zapTo(nNewChannel): channelList->zapTo(bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->getKey(nNewChannel)-1); + channelList->zapTo(bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->getKey(nNewChannel)-1); } - else if(nNewChannel == -1 && recordingstatus == 0) + else if(nNewChannel == -1) { bouquetList->adjustToChannel(channelList->getActiveChannelNumber()); } commit be9752cd5487884fca4bd20d43b849eefeba1b4e Author: Christian Schuett <Gau...@ho...> Date: Sat Jun 15 15:39:12 2013 +0200 Neutrino: always show bouquet of current channel first in channel list Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index e13acf2..3f4774b 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -2459,6 +2459,10 @@ void CNeutrinoApp::RealRun(CMenuWidget &menu) { recordingstatus ? channelList->zapTo(nNewChannel): channelList->zapTo(bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->getKey(nNewChannel)-1); } + else if(nNewChannel == -1 && recordingstatus == 0) + { + bouquetList->adjustToChannel(channelList->getActiveChannelNumber()); + } } else { commit a744299f0b646b36c6a1e1d185d76efd7fdcd4eb Author: Christian Schuett <Gau...@ho...> Date: Sat Jun 15 15:37:44 2013 +0200 Neutrino channel list: don't paint PIG multiple times Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index c0f4a8c..5663cab 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -1545,7 +1545,9 @@ void CChannelList::paint() if (g_settings.channellist_additional == ADDITIONAL_MTV) // with miniTV { - if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_tv) { + if (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_tv && + pig->getStatus() == CPIG::HIDE) + { // paint PIG #if defined BOXMODEL_DM500 || defined HAVE_IPBOX_HARDWARE // the dm500 seems to like only half / quarter resolution... commit 98515b993e9fd66795b9e4e83f29d9a914fc4ae0 Author: Christian Schuett <Gau...@ho...> Date: Sat Jun 15 15:35:39 2013 +0200 Neutrino channel list: make member 'pig' static Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index bb3c215..c0f4a8c 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -74,6 +74,8 @@ extern "C" int tuxtxt_stop(); #define ConnectLineBox_Width 12 +CPIG * CChannelList::pig = NULL; + CChannelList::CChannel::CChannel(const int _key, const int _number, const std::string& _name, const t_satellite_position _satellitePosition, const t_channel_id ids) { key = _key; @@ -89,7 +91,8 @@ CChannelList::CChannel::CChannel(const int _key, const int _number, const std::s CChannelList::CChannelList(const char * const Name, bool hMode) { frameBuffer = CFrameBuffer::getInstance(); - pig = new CPIG(0); + if (pig == NULL) + pig = new CPIG(0); x = y = 0; info_height = 0; name = Name; @@ -108,7 +111,6 @@ CChannelList::~CChannelList() delete (*it); } chanlist.clear(); - delete pig; } int CChannelList::exec() diff --git a/tuxbox/neutrino/src/gui/channellist.h b/tuxbox/neutrino/src/gui/channellist.h index 17393d8..a39c033 100644 --- a/tuxbox/neutrino/src/gui/channellist.h +++ b/tuxbox/neutrino/src/gui/channellist.h @@ -93,7 +93,7 @@ class CChannelList int eventFont; int ffheight; - CPIG *pig; + static CPIG *pig; std::string name; std::vector<CChannel*> chanlist; commit 8d66985acb23003f08c2adffb5a88208c9220dff Author: Christian Schuett <Gau...@ho...> Date: Sun Jun 9 19:09:10 2013 +0200 Neutrino: use defines for styles in CNeutrinoApp::SetupFonts() Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index 59fcc33..e13acf2 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -1767,7 +1767,7 @@ void CNeutrinoApp::SetupFonts() else{ font.filename = strdup(g_settings.font_file); } - style[0] = g_fontRenderer->AddFont(font.filename); + style[FONT_STYLE_REGULAR] = g_fontRenderer->AddFont(font.filename); if(font.name != NULL) free((void *)font.name); @@ -1776,9 +1776,9 @@ void CNeutrinoApp::SetupFonts() printf("[neutrino] font family %s\n", font.name); - style[1] = "Bold Regular"; + style[FONT_STYLE_BOLD] = "Bold Regular"; - style[2] = g_fontRenderer->AddFont(font.filename, true); // make italics + style[FONT_STYLE_ITALIC] = g_fontRenderer->AddFont(font.filename, true); // make italics for (int i = 0; i < SNeutrinoSettings::FONT_TYPE_COUNT; i++) { commit 758d8b7e1c3a50b5545aedca33f090045c7063b8 Author: Christian Schuett <Gau...@ho...> Date: Fri Jun 7 21:33:30 2013 +0200 Neutrino image info: fix paint with new standard font Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/imageinfo.cpp b/tuxbox/neutrino/src/gui/imageinfo.cpp index e8dc842..9e52ef5 100644 --- a/tuxbox/neutrino/src/gui/imageinfo.cpp +++ b/tuxbox/neutrino/src/gui/imageinfo.cpp @@ -607,7 +607,7 @@ void CImageInfo::paint() ypos += iheight; //license lines - ypos += sheight; + ypos += iheight; paintLicense(ypos); //paint foot commit a08eebdc9b737e9987da12a6b906d5f74542303f Author: Christian Schuett <Gau...@ho...> Date: Fri Jun 7 19:39:03 2013 +0200 Neutrino: fix memleaks when using getFont() Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/lcdapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/lcdapi.cpp index bc8fc68..722313d 100755 --- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/lcdapi.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/lcdapi.cpp @@ -97,6 +97,7 @@ void CLCDAPI::DrawText(int px, int py, int psize, int pcolor, int pfont, char *p return; } font->RenderString(px, py, 130, pmsg, color, 0, true); // UTF-8 + delete font; } bool CLCDAPI::ShowPng(char *filename) diff --git a/tuxbox/neutrino/src/driver/lcdd.cpp b/tuxbox/neutrino/src/driver/lcdd.cpp index 39b4926..3ecd059 100644 --- a/tuxbox/neutrino/src/driver/lcdd.cpp +++ b/tuxbox/neutrino/src/driver/lcdd.cpp @@ -68,6 +68,9 @@ CLCD::CLCD() m_progressLocal = 0; #endif // LCD_UPDATE fontRenderer = NULL; + fonts.menu = NULL; + fonts.time = NULL; + fonts.channelname = NULL; muted = false; percentOver = 0; volume = 0; @@ -199,8 +202,10 @@ const char * const background_path[NUMBER_OF_PATHS] = { bool CLCD::lcdInit(const char *fontfile, const char *fontfile2, const char *fontfile3) { - if (fontRenderer != NULL) - delete fontRenderer; + delete fonts.menu; + delete fonts.time; + delete fonts.channelname; + delete fontRenderer; fontRenderer = new LcdFontRenderClass(&display); const char * style_name = fontRenderer->AddFont(fontfile); commit d680e1d391ea0433d9d979858ca63f3151574f85 Author: Christian Schuett <Gau...@ho...> Date: Wed Jun 5 18:44:04 2013 +0200 zapit: only change saved last and start channels if needed Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/dvb/zapit/src/zapit.cpp b/dvb/zapit/src/zapit.cpp index 8375692..8f90097 100644 --- a/dvb/zapit/src/zapit.cpp +++ b/dvb/zapit/src/zapit.cpp @@ -716,10 +716,16 @@ void saveSettings(bool write) if (write) { config.setBool("saveLastChannel", saveLastChannel); config.setInt32("lastChannelMode", (currentMode & RADIO_MODE) ? 1 : 0); - config.setInt32("lastChannelRadio", lastChannelRadio); - config.setInt32("lastChannelTV", lastChannelTV); - config.setInt32("startChannelRadio", startChannelRadio); - config.setInt32("startChannelTV", startChannelTV); + if (saveLastChannel) + { + config.setInt32("lastChannelRadio", lastChannelRadio); + config.setInt32("lastChannelTV", lastChannelTV); + } + else + { + config.setInt32("startChannelRadio", startChannelRadio); + config.setInt32("startChannelTV", startChannelTV); + } config.setBool("saveAudioPIDs", save_audioPIDs); config.setBool("makeRemainingChannelsBouquet", bouquetManager->remainingChannelsBouquet); commit e70d4041d96883016bc1a4efe40853194f13ccf6 Author: GetAway <get...@t-...> Date: Sun Jun 9 14:21:36 2013 +0200 neutrino: move select font from console to menu Standard Font is now LiberationSans-Regular. micron_italic.ttf is no longer installed. FT can handle BOLD and ITALICS by itself. The command line syntax to select a font for LCD has changed. Please use now: [--lcdfont /dir/menu.ttf [/dir/time.ttf [/dir/channelname.ttf]]] Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/data/fonts/Makefile.am b/tuxbox/neutrino/data/fonts/Makefile.am index be39404..47f888a 100644 --- a/tuxbox/neutrino/data/fonts/Makefile.am +++ b/tuxbox/neutrino/data/fonts/Makefile.am @@ -1,10 +1,5 @@ installdir = $(FONTDIR) install_DATA = \ - micron.ttf micron_bold.ttf micron_italic.ttf \ + LiberationSans-Regular.ttf micron.ttf micron_bold.ttf \ 12.pcf.gz 14B.pcf.gz 15B.pcf.gz - -if ENABLE_EPGPLUS -install_DATA += \ - md_khmurabi_10.ttf -endif diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale index 71246d0..4a00659 100644 --- a/tuxbox/neutrino/data/locale/deutsch.locale +++ b/tuxbox/neutrino/data/locale/deutsch.locale @@ -528,11 +528,12 @@ fontmenu.eventlist Event-Liste fontmenu.gamelist Spiele-Liste fontmenu.head Schrift fontmenu.infobar Infobar -fontmenu.scaling Schriftgrössenfaktor +fontmenu.scaling SchriftgröÃenfaktor fontmenu.scaling_x Horizontal (in %) fontmenu.scaling_x_hint2 Horizontal (in %) min 50 / max 200 fontmenu.scaling_y Vertikal (in %) fontmenu.scaling_y_hint2 Vertikal (in %) min 50 / max 200 +fontmenu.sizes SchriftgröÃen fontsize.channel_num_zap Direktauswahl fontsize.channellist Kanalliste fontsize.channellist_descr Beschreibung @@ -1058,7 +1059,8 @@ options.serial seriell osdsettings.colormenu.background Hintergrundfarbe osdsettings.colormenu.background_head Hintergrundfarbe osdsettings.colormenu.fade Menüs faden -osdsettings.colormenu.font SchriftgröÃe +osdsettings.colormenu.font Neutrino Schriftart +osdsettings.colormenu.fontsize SchriftgröÃe osdsettings.colormenu.gtx_alpha Transparenz (GTX) osdsettings.colormenu.head Farben osdsettings.colormenu.menucolors Menüfarben diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale index 1c5bda4..3c44c03 100644 --- a/tuxbox/neutrino/data/locale/english.locale +++ b/tuxbox/neutrino/data/locale/english.locale @@ -533,6 +533,7 @@ fontmenu.scaling_x Horizontal (in %) fontmenu.scaling_x_hint2 Horizontal (in %) min 50 / max 200 fontmenu.scaling_y Vertical (in %) fontmenu.scaling_y_hint2 Vertical (in %) min 50 / max 200 +fontmenu.sizes Font sizes fontsize.channel_num_zap direct selection fontsize.channellist Channellist fontsize.channellist_descr Description @@ -1058,7 +1059,8 @@ options.serial serial osdsettings.colormenu.background Background osdsettings.colormenu.background_head Background osdsettings.colormenu.fade Fade Menus -osdsettings.colormenu.font Font Size +osdsettings.colormenu.font Select GUI font +osdsettings.colormenu.fontsize Font Size osdsettings.colormenu.gtx_alpha Transparency (GTX) osdsettings.colormenu.head Colors osdsettings.colormenu.menucolors Menu Colors diff --git a/tuxbox/neutrino/src/gui/epgplus.cpp b/tuxbox/neutrino/src/gui/epgplus.cpp index ca84297..7954d7d 100644 --- a/tuxbox/neutrino/src/gui/epgplus.cpp +++ b/tuxbox/neutrino/src/gui/epgplus.cpp @@ -80,17 +80,16 @@ int EpgPlus::channelsTableWidth = 0; int EpgPlus::sliderBackColor = 0; int EpgPlus::sliderKnobColor = 0; -static EpgPlus::FontSetting fontSettingDefaultTable[] = -{ - { EpgPlus::EPGPlus_header_font , "EPGPlus.header_font" , LOCALE_EPGPLUS_HEADER_FONT , "md_khmurabi_10.ttf", "Bold" , 20, true}, - { EpgPlus::EPGPlus_timeline_fonttime , "EPGPlus.timeline_fonttime" , LOCALE_EPGPLUS_TIMELINE_FONTTIME , "micron.ttf", "Bold" , 16, true}, - { EpgPlus::EPGPlus_timeline_fontdate , "EPGPlus.timeline_fontdate" , LOCALE_EPGPLUS_TIMELINE_FONTDATE , "micron.ttf", "Bold" , 14, true}, - { EpgPlus::EPGPlus_channelentry_font , "EPGPlus.channelentry_font" , LOCALE_EPGPLUS_CHANNELENTRY_FONT , "micron.ttf", "Bold" , 16, true}, - { EpgPlus::EPGPlus_channelevententry_font , "EPGPlus.channelevententry_font" , LOCALE_EPGPLUS_CHANNELEVENTENTRY_FONT , "micron.ttf", "Regular", 16, true}, - { EpgPlus::EPGPlus_footer_fontbouquetchannelname , "EPGPlus.footer_fontbouquetchannelname" , LOCALE_EPGPLUS_FOOTER_FONTBOUQUETCHANNELNAME , "micron.ttf", "Bold" , 24, true}, - { EpgPlus::EPGPlus_footer_fonteventdescription , "EPGPlus.footer_fonteventdescription" , LOCALE_EPGPLUS_FOOTER_FONTEVENTDESCRIPTION , "micron.ttf", "Regular", 16, true}, - { EpgPlus::EPGPlus_footer_fonteventshortdescription, "EPGPlus.footer_fonteventshortdescription" , LOCALE_EPGPLUS_FOOTER_FONTEVENTSHORTDESCRIPTION , "micron.ttf", "Regular", 16, true}, - { EpgPlus::EPGPlus_footer_fontbuttons , "EPGPlus.footer_fontbuttons" , LOCALE_EPGPLUS_FOOTER_FONTBUTTONS , "md_khmurabi_10.ttf", "Regular", 16, true}, +static EpgPlus::FontSetting fontSettingTable[] = { + { EpgPlus::EPGPlus_header_font , "Bold" , 22 }, + { EpgPlus::EPGPlus_timeline_fonttime , "Bold" , 16 }, + { EpgPlus::EPGPlus_timeline_fontdate , "Bold" , 14 }, + { EpgPlus::EPGPlus_channelentry_font , "Bold" , 16 }, + { EpgPlus::EPGPlus_channelevententry_font , "Regular", 16 }, + { EpgPlus::EPGPlus_footer_fontbouquetchannelname , "Bold" , 24 }, + { EpgPlus::EPGPlus_footer_fonteventdescription , "Regular", 16 }, + { EpgPlus::EPGPlus_footer_fonteventshortdescription, "Regular", 16 }, + { EpgPlus::EPGPlus_footer_fontbuttons , "Regular", 16 } }; static EpgPlus::ColorSetting colorSettingDefaultTable[] = @@ -138,7 +137,7 @@ EpgPlus::Settings::~Settings() EpgPlus::Settings::Settings(bool doInit) { - fontSettings = new FontSetting [sizeof(fontSettingDefaultTable) / sizeof(FontSetting)]; + fontSettings = new FontSetting [sizeof(fontSettingTable) / sizeof(FontSetting)]; colorSettings = new ColorSetting[sizeof(colorSettingDefaultTable)/ sizeof(ColorSetting)]; sizeSettings = new SizeSetting [sizeof(sizeSettingDefaultTable) / sizeof(SizeSetting)]; @@ -146,9 +145,9 @@ EpgPlus::Settings::Settings(bool doInit) { for (size_t i = 0; i < NumberOfFontSettings; ++i) { - fontSettings[i] = fontSettingDefaultTable[i]; + fontSettings[i] = fontSettingTable[i]; if (bigfont && (fontSettings[i].settingID == EpgPlus::EPGPlus_channelentry_font || fontSettings[i].settingID == EpgPlus::EPGPlus_channelevententry_font)) - fontSettings[i].size = fontSettingDefaultTable[i].size * 3 / 2; + fontSettings[i].size = fontSettingTable[i].size * 3 / 2; } for (size_t i = 0; i < NumberOfColorSettings; ++i) colorSettings[i] = colorSettingDefaultTable[i]; @@ -766,20 +765,15 @@ void EpgPlus::init() { settings = new EpgPlus::Settings(true); + std::string FileName = std::string (g_settings.font_file); for (size_t i = 0; i < NumberOfFontSettings; ++i) { FontSetting* fontSetting = &settings->fontSettings[i]; - std::string FileName; - FileName += std::string(FONTDIR); - FileName += "/"; - FileName += fontSetting->name; - - std::string defaultStyle = g_fontRenderer->AddFont(FileName.c_str()); - std::string family = g_fontRenderer->getFamily(FileName.c_str()); - Font* font = g_fontRenderer->getFont(family.c_str(), fontSetting->name, fontSetting->size); + std::string family = g_fontRenderer->getFamily (FileName.c_str()); + Font *font = g_fontRenderer->getFont(family.c_str(), fontSetting->style, fontSetting->size); if (font == NULL) - font = g_fontRenderer->getFont(family.c_str(), defaultStyle.c_str(), fontSetting->size); + font = g_fontRenderer->getFont(family.c_str(), "Regular", fontSetting->size); fonts[fontSetting->settingID] = font; } diff --git a/tuxbox/neutrino/src/gui/epgplus.h b/tuxbox/neutrino/src/gui/epgplus.h index d4f325a..f52d890 100644 --- a/tuxbox/neutrino/src/gui/epgplus.h +++ b/tuxbox/neutrino/src/gui/epgplus.h @@ -110,12 +110,8 @@ public: struct FontSetting { FontSettingID settingID; - const char* settingName; - neutrino_locale_t locale; - const char* name; const char* style; int size; - bool isConfigurable; }; struct ColorSetting diff --git a/tuxbox/neutrino/src/gui/osd_setup.cpp b/tuxbox/neutrino/src/gui/osd_setup.cpp index fc7cde1..e2573d7 100644 --- a/tuxbox/neutrino/src/gui/osd_setup.cpp +++ b/tuxbox/neutrino/src/gui/osd_setup.cpp @@ -169,6 +169,20 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) int res = showOsdChannelListSetup(); return res; } + else if (actionKey=="select_font") + { + CFileBrowser fileBrowser; + CFileFilter fileFilter; + fileFilter.addFilter("ttf"); + fileBrowser.Filter = &fileFilter; + if (fileBrowser.exec(FONTDIR)) + { + strcpy(g_settings.font_file, fileBrowser.getSelectedFile()->Name.c_str()); + printf("[neutrino] new font file %s\n", fileBrowser.getSelectedFile()->Name.c_str()); + CNeutrinoApp::getInstance()->SetupFonts(); + } + return menu_return::RETURN_REPAINT; + } else if (actionKey=="show_fontsize_setup") { int res = showOsdFontSizeSetup(); @@ -631,6 +645,12 @@ int COsdSetup::showOsdFontSizeSetup() CMenuWidget * fontSettings = new CMenuWidget(menue_title, menue_icon, width); fontSettings->addIntroItems(LOCALE_FONTMENU_HEAD); + // select gui font file + CMenuForwarder *mf = new CMenuForwarder(LOCALE_OSDSETTINGS_COLORMENU_FONT, true, NULL, this, "select_font", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED); + fontSettings->addItem(mf); + fontSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_FONTMENU_SIZES)); + + // submenu font scaling CMenuWidget * fontscale = new CMenuWidget(LOCALE_FONTMENU_HEAD, menue_icon, width); fontscale->addIntroItems(LOCALE_FONTMENU_SCALING); diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index 4dedf79..59fcc33 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -248,6 +248,8 @@ CNeutrinoApp::CNeutrinoApp() obeyStartMode = true; menuGamesIsVisible = true; menuScriptsIsVisible = true; + memset(&font, 0, sizeof(neutrino_font_descr_struct)); + memset(&lcd_font, 0, sizeof(lcd_font_descr_struct)); } /*------------------------------------------------------------------------------------- @@ -731,6 +733,8 @@ int CNeutrinoApp::loadSetup() strcpy(g_settings.softupdate_proxyusername, configfile.getString("softupdate_proxyusername", "" ).c_str()); strcpy(g_settings.softupdate_proxypassword, configfile.getString("softupdate_proxypassword", "" ).c_str()); #endif + // GUI font + strcpy(g_settings.font_file, configfile.getString( "font_file", FONTDIR"/LiberationSans-Regular.ttf" ).c_str()); //BouquetHandling g_settings.bouquetlist_mode = configfile.getInt32( "bouquetlist_mode", 0 ); @@ -1276,6 +1280,8 @@ void CNeutrinoApp::saveSetup() configfile.setString("softupdate_proxyusername" , g_settings.softupdate_proxyusername ); configfile.setString("softupdate_proxypassword" , g_settings.softupdate_proxypassword ); #endif + // GUI font + configfile.setString("font_file", g_settings.font_file); //BouquetHandling configfile.setInt32( "bouquetlist_mode", g_settings.bouquetlist_mode ); @@ -1625,7 +1631,9 @@ void CNeutrinoApp::CmdParser(int argc, char **argv) softupdate = false; fromflash = false; - font.filename[0] = NULL; + font.name = NULL; + font.filename = NULL; + lcd_font.filename[0] = NULL; for(int x=1; x<argc; x++) { @@ -1639,30 +1647,28 @@ void CNeutrinoApp::CmdParser(int argc, char **argv) dprintf(DEBUG_NORMAL, "enable flash\n"); fromflash = true; } - else if (!strcmp(argv[x], "--font")) + else if (!strcmp(argv[x], "--lcdfont")) { - if ((x + 2) < argc) + if ((x + 1) < argc) { - font.is_unicode = -1; - font.size_offset = atoi(argv[x + 1]); - font.filename[0] = argv[x + 2]; - if ((x + 3) < argc) + lcd_font.filename[0] = argv[x + 1]; + if ((x + 2) < argc) { - font.filename[1] = argv[x + 3]; + lcd_font.filename[1] = argv[x + 2]; x++; } else - font.filename[1] = NULL; + lcd_font.filename[1] = NULL; - if ((x + 3) < argc) + if ((x + 2) < argc) { - font.filename[2] = argv[x + 3]; + lcd_font.filename[2] = argv[x + 2]; x++; } else - font.filename[2] = NULL; + lcd_font.filename[2] = NULL; } - x += 2; + x++; } else if (((!strcmp(argv[x], "-v")) || (!strcmp(argv[x], "--verbose"))) && (x+1 < argc)) { @@ -1673,7 +1679,7 @@ void CNeutrinoApp::CmdParser(int argc, char **argv) } else { - fprintf(stderr, "Usage: neutrino [-u | --enable-update] [-f | --enable-flash] [-v | --verbose 0..3] [--font sizeoffset /dir/file.ttf [/dir/bold.ttf [/dir/italic.ttf]]]\n"); + fprintf(stderr, "Usage: neutrino [-u | --enable-update] [-f | --enable-flash] [-v | --verbose 0..3] [--lcdfont /dir/menu.ttf [/dir/time.ttf [/dir/channelname.ttf]]]\n"); exit(0); } } @@ -1706,31 +1712,29 @@ void CNeutrinoApp::SetupFrameBuffer() * * **************************************************************************************/ -const neutrino_font_descr_struct predefined_font[2] = -{ - { {FONTDIR "/micron.ttf" , FONTDIR "/micron_bold.ttf", FONTDIR "/micron_italic.ttf"}, 0, 0}, - { {FONTDIR "/md_khmurabi_10.ttf", NULL , NULL }, 0, 1} -}; - -const char* predefined_lcd_font[2][3] = +const lcd_font_descr_struct predefined_lcd_font[2] = { - {FONTDIR "/12.pcf.gz", FONTDIR "/14B.pcf.gz", FONTDIR "/15B.pcf.gz"}, - {FONTDIR "/md_khmurabi_10.ttf", NULL, NULL} + { {FONTDIR "/12.pcf.gz", FONTDIR "/14B.pcf.gz", FONTDIR "/15B.pcf.gz"} }, + { {FONTDIR "/LiberationSans-Regular.ttf", NULL, NULL} } }; bool CNeutrinoApp::ChangeFonts(int unicode_locale) { - if (font.is_unicode == -1) /* user defined font, don't mess with that */ - return false; if (unicode_locale == CLocaleManager::NO_SUCH_LOCALE) /* should not happen, but anyway.. */ return false; /* avoid crash from negative array index */ - if (font.is_unicode != unicode_locale) + if (loadLocale_ret != unicode_locale) { - font = predefined_font[unicode_locale]; - CLCD::getInstance()->reinit(predefined_lcd_font[unicode_locale][0], - predefined_lcd_font[unicode_locale][1], - predefined_lcd_font[unicode_locale][2]); - SetupFonts(); + loadLocale_ret = unicode_locale; + if (unicode_locale == CLocaleManager::UNICODE_FONT && + strcmp(g_settings.font_file, FONTDIR"/LiberationSans-Regular.ttf") != 0) + { + strcpy(g_settings.font_file, FONTDIR"/LiberationSans-Regular.ttf"); + SetupFonts(); + } + if (lcd_font.filename[0] == NULL) + CLCD::getInstance()->reinit(predefined_lcd_font[unicode_locale].filename[0], + predefined_lcd_font[unicode_locale].filename[1], + predefined_lcd_font[unicode_locale].filename[2]); } return true; } @@ -1738,41 +1742,51 @@ bool CNeutrinoApp::ChangeFonts(int unicode_locale) void CNeutrinoApp::SetupFonts() { const char * style[3]; - char *fontname; if (g_fontRenderer != NULL) delete g_fontRenderer; g_fontRenderer = new FBFontRenderClass(72 * g_settings.screen_xres / 100, 72 * g_settings.screen_yres / 100); - style[0] = g_fontRenderer->AddFont(font.filename[0]); + if(font.filename != NULL) + free((void *)font.filename); - fontname = strdup(g_fontRenderer->getFamily(font.filename[0]).c_str()); - fprintf(stderr, "[neutrino] SetupFonts filename: %s fontname: %s\n", font.filename[0], fontname); + printf("[neutrino] settings font file %s\n", g_settings.font_file); - if (font.filename[1] == NULL) - { - g_fontRenderer->AddFont(font.filename[0], true); - style[1] = "Bold Regular"; - } - else - style[1] = g_fontRenderer->AddFont(font.filename[1]); + if(access(g_settings.font_file, F_OK)) { + if(!access(FONTDIR"/LiberationSans-Regular.ttf", F_OK)){ + font.filename = strdup(FONTDIR"/LiberationSans-Regular.ttf"); + strcpy(g_settings.font_file, font.filename); + } + else{ + fprintf( stderr,"[neutrino] font file [%s] not found\n neutrino exit\n",FONTDIR"/LiberationSans-Regular.ttf"); + _exit(0); + } - if (font.filename[2] == NULL) - { - g_fontRenderer->AddFont(font.filename[0], true); // make italics - style[2] = "Italic"; } - else - style[2] = g_fontRenderer->AddFont(font.filename[2]); + else{ + font.filename = strdup(g_settings.font_file); + } + style[0] = g_fontRenderer->AddFont(font.filename); + + if(font.name != NULL) + free((void *)font.name); + + font.name = strdup(g_fontRenderer->getFamily(font.filename).c_str()); + + printf("[neutrino] font family %s\n", font.name); + + style[1] = "Bold Regular"; + + style[2] = g_fontRenderer->AddFont(font.filename, true); // make italics for (int i = 0; i < SNeutrinoSettings::FONT_TYPE_COUNT; i++) { - g_Font[i] = g_fontRenderer->getFont(fontname, style[neutrino_font[i].style], configfile.getInt32(locale_real_names[neutrino_font[i].name], neutrino_font[i].defaultsize) + neutrino_font[i].size_offset * font.size_offset); + delete g_Font[i]; + g_Font[i] = g_fontRenderer->getFont(font.name, style[neutrino_font[i].style], configfile.getInt32(locale_real_names[neutrino_font[i].name], neutrino_font[i].defaultsize)/* + neutrino_font[i].size_offset * font.size_offset*/); } - free(fontname); - /* recalculate infobar, EPGDate and eventlist position */ + /* recalculate infobar, EPGData and eventlist position */ if (g_InfoViewer) g_InfoViewer->start(); if (g_EpgData) @@ -2116,7 +2130,7 @@ int CNeutrinoApp::run(int argc, char **argv) /* load locales before setting up any fonts to determine whether we need a true unicode font */ bool display_language_selection; - CLocaleManager::loadLocale_ret_t loadLocale_ret = g_Locale->loadLocale(g_settings.language); + loadLocale_ret = g_Locale->loadLocale(g_settings.language); if (loadLocale_ret == CLocaleManager::NO_SUCH_LOCALE) { strcpy(g_settings.language, "deutsch"); // Fallback if rest fails @@ -2135,18 +2149,18 @@ int CNeutrinoApp::run(int argc, char **argv) else display_language_selection = false; - if (font.filename[0] == NULL) /* no font specified in command line */ + unsigned int use_true_unicode_font = (loadLocale_ret == CLocaleManager::ISO_8859_1_FONT) ? 0 : 1; + if (use_true_unicode_font) + strcpy(g_settings.font_file, FONTDIR"/LiberationSans-Regular.ttf"); + if (lcd_font.filename[0] == NULL) /* no lcd font specified in command line */ { - unsigned int use_true_unicode_font = (loadLocale_ret == CLocaleManager::ISO_8859_1_FONT) ? 0 : 1; - - font = predefined_font[use_true_unicode_font]; - CLCD::getInstance()->init(predefined_lcd_font[use_true_unicode_font][0], - predefined_lcd_font[use_true_unicode_font][1], - predefined_lcd_font[use_true_unicode_font][2]); + CLCD::getInstance()->init(predefined_lcd_font[use_true_unicode_font].filename[0], + predefined_lcd_font[use_true_unicode_font].filename[1], + predefined_lcd_font[use_true_unicode_font].filename[2]); } else { - CLCD::getInstance()->init(font.filename[0]); + CLCD::getInstance()->init(lcd_font.filename[0], lcd_font.filename[1], lcd_font.filename[2]); } CLCD::getInstance()->showVolume(g_Controld->getVolume((CControld::volume_type)g_settings.audio_avs_Control)); diff --git a/tuxbox/neutrino/src/neutrino.h b/tuxbox/neutrino/src/neutrino.h index 82e1e25..6376db7 100644 --- a/tuxbox/neutrino/src/neutrino.h +++ b/tuxbox/neutrino/src/neutrino.h @@ -64,9 +64,9 @@ typedef struct neutrino_font_descr { - const char *filename[3]; /* name of regular, bold, italics font file */ - int size_offset; - int is_unicode; /* -1 == don't know (external font), 0 == no, 1 == yes */ + const char * name; + const char * filename; /* name of regular font file */ + /*int size_offset;*/ } neutrino_font_descr_struct; typedef struct font_sizes @@ -77,6 +77,11 @@ typedef struct font_sizes const unsigned int size_offset; } font_sizes_struct; +typedef struct lcd_font_descr +{ + const char * filename[3]; /* name of menu, time, channelname lcd font file */ +} lcd_font_descr_struct; + typedef struct font_sizes_groups { const neutrino_locale_t groupname; @@ -160,6 +165,8 @@ class CNeutrinoApp : public CMenuTarget, CChangeObserver CScanSettings scanSettings; neutrino_font_descr_struct font; + lcd_font_descr_struct lcd_font; + int loadLocale_ret; int mode; int lastMode; diff --git a/tuxbox/neutrino/src/system/locals.h b/tuxbox/neutrino/src/system/locals.h index 2e09f3e..e3568e6 100644 --- a/tuxbox/neutrino/src/system/locals.h +++ b/tuxbox/neutrino/src/system/locals.h @@ -560,6 +560,7 @@ typedef enum LOCALE_FONTMENU_SCALING_X_HINT2, LOCALE_FONTMENU_SCALING_Y, LOCALE_FONTMENU_SCALING_Y_HINT2, + LOCALE_FONTMENU_SIZES, LOCALE_FONTSIZE_CHANNEL_NUM_ZAP, LOCALE_FONTSIZE_CHANNELLIST, LOCALE_FONTSIZE_CHANNELLIST_DESCR, @@ -1086,6 +1087,7 @@ typedef enum LOCALE_OSDSETTINGS_COLORMENU_BACKGROUND_HEAD, LOCALE_OSDSETTINGS_COLORMENU_FADE, LOCALE_OSDSETTINGS_COLORMENU_FONT, + LOCALE_OSDSETTINGS_COLORMENU_FONTSIZE, LOCALE_OSDSETTINGS_COLORMENU_GTX_ALPHA, LOCALE_OSDSETTINGS_COLORMENU_HEAD, LOCALE_OSDSETTINGS_COLORMENU_MENUCOLORS, diff --git a/tuxbox/neutrino/src/system/locals_intern.h b/tuxbox/neutrino/src/system/locals_intern.h index 828bb62..48f7703 100644 --- a/tuxbox/neutrino/src/system/locals_intern.h +++ b/tuxbox/neutrino/src/system/locals_intern.h @@ -560,6 +560,7 @@ const char * locale_real_names[] = "fontmenu.scaling_x_hint2", "fontmenu.scaling_y", "fontmenu.scaling_y_hint2", + "fontmenu.sizes", "fontsize.channel_num_zap", "fontsize.channellist", "fontsize.channellist_descr", @@ -1086,6 +1087,7 @@ const char * locale_real_names[] = "osdsettings.colormenu.background_head", "osdsettings.colormenu.fade", "osdsettings.colormenu.font", + "osdsettings.colormenu.fontsize", "osdsettings.colormenu.gtx_alpha", "osdsettings.colormenu.head", "osdsettings.colormenu.menucolors", diff --git a/tuxbox/neutrino/src/system/settings.h b/tuxbox/neutrino/src/system/settings.h index 1ec81e7..7df17e5 100644 --- a/tuxbox/neutrino/src/system/settings.h +++ b/tuxbox/neutrino/src/system/settings.h @@ -479,6 +479,9 @@ struct SNeutrinoSettings int uboot_lcd_contrast; int uboot_lcd_bias; + //osd + char font_file[100]; + // USERMENU typedef enum { ----------------------------------------------------------------------- Summary of changes: dvb/zapit/src/zapit.cpp | 14 ++- .../neutrino/daemons/nhttpd/tuxboxapi/lcdapi.cpp | 1 + tuxbox/neutrino/data/fonts/Makefile.am | 7 +- tuxbox/neutrino/data/locale/deutsch.locale | 6 +- tuxbox/neutrino/data/locale/english.locale | 4 +- tuxbox/neutrino/src/driver/lcdd.cpp | 9 +- tuxbox/neutrino/src/gui/bouquetlist.cpp | 2 +- tuxbox/neutrino/src/gui/bouquetlist.h | 2 +- tuxbox/neutrino/src/gui/channellist.cpp | 26 ++- tuxbox/neutrino/src/gui/channellist.h | 5 +- tuxbox/neutrino/src/gui/epgplus.cpp | 40 ++--- tuxbox/neutrino/src/gui/epgplus.h | 4 - tuxbox/neutrino/src/gui/imageinfo.cpp | 2 +- tuxbox/neutrino/src/gui/osd_setup.cpp | 20 +++ tuxbox/neutrino/src/gui/widget/menue.cpp | 107 +++++--------- tuxbox/neutrino/src/gui/widget/menue.h | 3 +- tuxbox/neutrino/src/neutrino.cpp | 159 +++++++++++--------- tuxbox/neutrino/src/neutrino.h | 13 ++- tuxbox/neutrino/src/system/locals.h | 2 + tuxbox/neutrino/src/system/locals_intern.h | 2 + tuxbox/neutrino/src/system/settings.h | 3 + 21 files changed, 231 insertions(+), 200 deletions(-) -- Tuxbox-GIT: apps |
From: Thilo G. <tux...@ne...> - 2013-06-15 14:06:36
|
Project "Tuxbox-GIT: cdk": The branch, master has been updated via cc0b185ccc4070d75255c7b08bec767e5af4a519 (commit) from 7e7921525b7f4535f6b943be878a21b82ac01135 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit cc0b185ccc4070d75255c7b08bec767e5af4a519 Author: GetAway <get...@t-...> Date: Sat Jun 15 01:05:52 2013 +0200 version bump inadyn-mt.v.02.24.38 Signed-off-by: Thilo Graf <db...@no...> diff --git a/rules-archive b/rules-archive index ef001c1..b6e7fb6 100644 --- a/rules-archive +++ b/rules-archive @@ -143,7 +143,7 @@ openvpn-2.1.4.tar.gz;http://swupdate.openvpn.net/community/releases ipkg-0.99.163.tar.gz;http://www.handhelds.org/download/packages/ipkg/ htop-0.9.tar.gz;http://downloads.sourceforge.net/project/htop/htop/0.9/ netio131.zip;http://www.ars.de/ars/ars.nsf/f24a6a0b94c22d82862566960071bf5a/aa577bc4be573b05c125706d004c75b5/\$$FILE -inadyn-mt.v.02.24.36.tar.gz;http://prdownloads.sourceforge.net/sourceforge/inadyn-mt +inadyn-mt.v.02.24.38.tar.gz;http://prdownloads.sourceforge.net/sourceforge/inadyn-mt # # ide apps diff --git a/rules-make b/rules-make index 732783a..434bdc9 100644 --- a/rules-make +++ b/rules-make @@ -137,7 +137,7 @@ ipkg;0.99.163;ipkg-0.99.163;ipkg-0.99.163.tar.gz;extract:ipkg-0.99.163.tar.gz;pa htop;0.9;htop-0.9;htop-0.9.tar.gz;extract:htop-0.9.tar.gz netio;1.3.1;netio-1.3.1;netio131.zip;extract:netio131.zip:netio-1.3.1 netio_host;1.3.1;netio-1.3.1;netio131.zip;extract:netio131.zip:netio-1.3.1 -inadyn_mt;02.24.36;inadyn-mt.v.02.24.36;inadyn-mt.v.02.24.36.tar.gz;extract:inadyn-mt.v.02.24.36.tar.gz +inadyn_mt;02.24.38;inadyn-mt.v.02.24.38;inadyn-mt.v.02.24.38.tar.gz;extract:inadyn-mt.v.02.24.38.tar.gz # # ide/hdd apps ----------------------------------------------------------------------- Summary of changes: rules-archive | 2 +- rules-make | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- Tuxbox-GIT: cdk |
From: Thilo G. <tux...@ne...> - 2013-06-03 18:44:28
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 2577990c6e8effa45d04738e87c8082cf3ffe52d (commit) from e70a0996a1231a870579c2a3278c494e2e9d84c1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2577990c6e8effa45d04738e87c8082cf3ffe52d Author: Thilo Graf <db...@no...> Date: Mon Jun 3 20:43:21 2013 +0200 neutrino: add Liberation Fonts diff --git a/tuxbox/neutrino/data/fonts/LiberationSans-Bold.ttf b/tuxbox/neutrino/data/fonts/LiberationSans-Bold.ttf new file mode 100644 index 0000000..2d7addc Binary files /dev/null and b/tuxbox/neutrino/data/fonts/LiberationSans-Bold.ttf differ diff --git a/tuxbox/neutrino/data/fonts/LiberationSans-BoldItalic.ttf b/tuxbox/neutrino/data/fonts/LiberationSans-BoldItalic.ttf new file mode 100644 index 0000000..d78e96d Binary files /dev/null and b/tuxbox/neutrino/data/fonts/LiberationSans-BoldItalic.ttf differ diff --git a/tuxbox/neutrino/data/fonts/LiberationSans-Italic.ttf b/tuxbox/neutrino/data/fonts/LiberationSans-Italic.ttf new file mode 100644 index 0000000..d139478 Binary files /dev/null and b/tuxbox/neutrino/data/fonts/LiberationSans-Italic.ttf differ diff --git a/tuxbox/neutrino/data/fonts/LiberationSans-Regular.ttf b/tuxbox/neutrino/data/fonts/LiberationSans-Regular.ttf new file mode 100644 index 0000000..59d2e25 Binary files /dev/null and b/tuxbox/neutrino/data/fonts/LiberationSans-Regular.ttf differ diff --git a/tuxbox/neutrino/data/fonts/liberation_sans/AUTHORS b/tuxbox/neutrino/data/fonts/liberation_sans/AUTHORS new file mode 100644 index 0000000..e201c6e --- /dev/null +++ b/tuxbox/neutrino/data/fonts/liberation_sans/AUTHORS @@ -0,0 +1,10 @@ +Font Designer: + Ascender Corporation. + http://www.ascendercorp.com/ + +Original Designer: + Steve Matteson + http://www.ascendercorp.com/typedesigners.html + +Current Maintainer: + Caius Chance <cc...@re...> diff --git a/tuxbox/neutrino/data/fonts/liberation_sans/COPYING b/tuxbox/neutrino/data/fonts/liberation_sans/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/tuxbox/neutrino/data/fonts/liberation_sans/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/tuxbox/neutrino/data/fonts/liberation_sans/ChangeLog b/tuxbox/neutrino/data/fonts/liberation_sans/ChangeLog new file mode 100644 index 0000000..20390f8 --- /dev/null +++ b/tuxbox/neutrino/data/fonts/liberation_sans/ChangeLog @@ -0,0 +1,151 @@ +* Mon 12 Jan 2009 Caius Chance <cc...@re...> +- Fixed copyright holder name typo for Sans Regular font (rhbz#479521). + +* Tue 09 Dec 2008 Caius Chance <cc...@re...> +- Changed cent sign glyph (U+00A2) to be coressed in Sans and Mono + (rhbz#474522). + +* Wed 03 Dec 2008 Caius Chance <cc...@re...> +- Started 1.04.93.devel. +- Fixed blurriness of U+03BC for Sans Regular font (rhbz#473481). +- Fixed src tarball mis-inclusion of dist files in Makefile. + +* Fri 28 Nov 2008 Caius Chance <cc...@re...> +- Corrected version number in Makefile. +- Fixed make target of source tarball. +- Uploaded 1.04.92 source tarball to release area. + +* Wed 15 Oct 2008 Caius Chance <cc...@re...> +- Fixed blurred 'u' and 'W' for Sans Bold font (rhbz#463036). +- Released as version 1.04.92 + +* Wed 17 Sep 2008 Caius Chance <cc...@re...> +- Fixed missing hinting instructions for all Mono fonts (rhbz#460090). +- Fixed missing hinting instructions for all Sans fonts (rhbz#460090). +- Fixed missing hinting instructions for all Serif fonts (rhbz#460090). +- Released as version 1.04.91 + +* Tue 09 Sep 2008 Caius Chance <cc...@re...> +- Backed up all released files in ./dist directory. + +* Fri 05 Sep 2008 Caius Chance <cc...@re...> +- Fixed incorrect glyph points and missing hinting instructions for: + Mono Bold Italic (up to U+2012) (rhbz#460090). + +* Mon 25 Aug 2008 Caius Chance <cc...@re...> +- Fixed incorrect glyph points and missing hinting instructions for: + U+0079, U+03BC, U+0431, U+2010..2012, U+1114117 (rhbz#458592). +- Released as version 1.04.90. + +* Thu 13 Jul 2008 Caius Chance <cc...@re...> +- Released as version 1.04. + +* Thu 12 Jun 2008 Caius Chance <cc...@re...> +- Released as version 1.04.beta2 (1.03.99). +- Added ZIP package building for non-tar users. +- rhbz#440992: + - Created Romanian "T/t/S/s with comma below" (U+0218..021B) on all fonts. + - Fixed "T/s with cedilla below" (U+0162/0163) on all fonts. + - Created "Hyphen" and "Non-Breaking Hyphen" (U+2010..2011) on all fonts. + +* Wed 11 Jun 2008 Caius Chance <cc...@re...> +- Added last Version 1.03 from original manufacturer. +- Renamed directory 'archive' to 'sandbox'. +- Added directory description in hosting home directory. +- Created ZIP packages for Version 1.03 and 1.04.beta. + +* Tue 04 Jun 2008 Caius Chance <cc...@re...> +- rhbz#440992: + - Created "Hyphen" and "Non-Breaking Hyphen" (U+2010..2011) on Sans Regular. + +* Mon 03 Jun 2008 Caius Chance <cc...@re...> +- rhbz#440992: + - Created Romanian "T/t/S/s with comma below" (U+0218..021B) on Sans Regular. + - Fixed "T/s with cedilla below" (U+0162/0163) on Sans Regular. + +* Fri 30 May 2008 Caius Chance <cc...@re...> +- Release Version 1.04.beta (liberation-fonts-1_04_beta). + +* Thu 29 May 2008 Caius Chance <cc...@re...> +- Correct SFD version numbers in "TTF Info" categor for correct version + number during export to TTFs. + +* Wed 28 May 2008 Caius Chance <cc...@re...> +- Reencoded with "Glyph Order" by FontForge. +- Corrected font name for all Regular fonts. +- Generated TTFs (experimantal, in "archive") with old stle kern and dummy + DSIG table. +- Updated README in 1.04b TTFs (experimental, in "archive"). + +* Tue 27 May 2008 Caius Chance <cc...@re...> +- Fixed Unicode name mis-mapping of Sans and Serif TTF files. +- Regenerate SFD files from Unicode name mis-mapping fixed Sans and Serif TTF + files. + +* Mon 26 May 2008 Caius Chance <cc...@re...> +- Fixed Unicode name mis-mapping of Mono TTF files. +- Regenerate SFD files from Unicode name mis-mapping fixed Mono TTF files. +========== +- Applied following patches submitted by Nicolas Spalinger + <nicolas_spalinger sil org>: + - We-need-versioned-tarballs. + - Add-ignore-file-so-the-VCS-does-not-track-the-folder. + - Adjust-path-for-various-Makefile-targets-subfolders. + - Fix-versionning-mismatch-in-the-binary-font-metadata. + - Add-some-description-and-extra-lines-to-the-build-ta. + - Reword-and-restructure-maintainers-recommendations. + - Some-rewording-of-the-readme-file. +========== + +* Thu May 22 2008 Caius Chance <cc...@re...> +- Added latest (1.03) TTF files from Ascender. (in 'archive') + +* Fri May 16 2008 Caius Chance <cc...@re...> +- Change source tree as 'trunk', 'tags', 'branches'. +========== +- Applied following patches submitted by Nicolas Spalinger + <nicolas_spalinger sil org>: + - Add-more-information-about-the-upstream-designer. + - Minor-typo-and-layout-fixes. + - Adjust-fontforge-path-with-env-as-a-source-build. +========== + +* Wed May 14 2008 Caius Chance <cc...@re...> +- Renamed target 'ttf' to 'build'. +- Removed 'Re-Package' chapter from README and refine contents. +- Changed AUTHORS contents. +- Created maintainer documentation MAINTAINER. + +* Tue May 06 2008 Caius Chance <cc...@re...> +- Refined clean target. +- Removed TTFs from git. + +* Fri May 02 2008 Caius Chance <cc...@re...> +- Imported into fedorahosted.org repository and be hosted. + https://fedorahosted.org/liberation-fonts/ +- Modified source root directory name definition in Makefile. +- Created 'dist' target for binary TTF tarball and 'src' for source tarball. +- Corrected Regular fonts filenames. +- Added TTF -> SFD make target. + +* Thu May 01 2008 Caius Chance <cc...@re...> +- Converted previous TTF files into SFD files to be open source. +- Created fontforge SFD -> TTF scripts. +- Created Makefile. +- Added documentations: AUTHORS, ChangeLog, README. + +* Thu Apr 10 2008 Caius Chance <cc...@re...> +- Fixed exchanged and incomplete glyphs (from Ascender). +- Repacked source tarball. +- Released version 1.03. + +* Tue Mar 25 2008 Caius Chance <cc...@re...> +- Fixed alignment mismatch of dot accents (from Ascender). +- Released version 1.02. + +* Mon Jan 14 2008 Caius Chance <cc...@re...> +- Updated new source tarball from Ascender. +- Released version 1.0. + +* Thu Jun 14 2007 Caius Chance <cc...@re...> +- Updated new source tarball from Ascender. diff --git a/tuxbox/neutrino/data/fonts/liberation_sans/License.txt b/tuxbox/neutrino/data/fonts/liberation_sans/License.txt new file mode 100644 index 0000000..f178728 --- /dev/null +++ b/tuxbox/neutrino/data/fonts/liberation_sans/License.txt @@ -0,0 +1,19 @@ +LICENSE AGREEMENT AND LIMITED PRODUCT WARRANTY +LIBERATION FONT SOFTWARE + +This agreement governs the use of the Software and any updates to the Software, regardless of the delivery mechanism. Subject to the following terms, Red Hat, Inc. ("Red Hat") grants to the user ("Client") a license to this work pursuant to the GNU General Public License v.2 with the exceptions set forth below and such other terms as are set forth in this End User License Agreement. + + 1. The Software and License Exception. LIBERATION font software (the "Software") consists of TrueType-OpenType formatted font software for rendering LIBERATION typefaces in sans-serif, serif, and monospaced character styles. You are licensed to use, modify, copy, and distribute the Software pursuant to the GNU General Public License v.2 with the following exceptions: + + (a) As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. + + (b) As a further exception, any distribution of the object code of the Software in a physical product must provide you the right to access and modify the source code for the Software and to reinstall that modified version of the Software in object code form on the same physical product on which you received it. + + 2. Intellectual Property Rights. The Software and each of its components, including the source code, documentation, appearance, structure and organization are owned by Red Hat and others and are protected under copyright and other laws. Title to the Software and any component, or to any copy, modification, or merged portion shall remain with the aforementioned, subject to the applicable license. The "LIBERATION" trademark is a trademark of Red Hat, Inc. in the U.S. and other countries. This agreement does not permit Client to distribute modified versions of the Software using Red Hat's trademarks. If Client makes a redistribution of a modified version of the Software, then Client must modify the files names to remove any reference to the Red Hat trademarks and must not use the Red Hat trademarks in any way to reference or promote the modified Software. + + 3. Limited Warranty. To the maximum extent permitted under applicable law, the Software is provided and licensed "as is" without warranty of any kind, expressed or implied, including the implied warranties of merchantability, non-infringement or fitness for a particular purpose. Red Hat does not warrant that the functions contained in the Software will meet Client's requirements or that the operation of the Software will be entirely error free or appear precisely as described in the accompanying documentation. + + 4. Limitation of Remedies and Liability. To the maximum extent permitted by applicable law, Red Hat or any Red Hat authorized dealer will not be liable to Client for any incidental or consequential damages, including lost profits or lost savings arising out of the use or inability to use the Software, even if Red Hat or such dealer has been advised of the possibility of such damages. + + 5. General. If any provision of this agreement is held to be unenforceable, that shall not affect the enforceability of the remaining provisions. This agreement shall be governed by the laws of the State of North Carolina and of the United States, without regard to any conflict of laws provisions, except that the United Nations Convention on the International Sale of Goods shall not apply. +Copyright é 2007 Red Hat, Inc. All rights reserved. LIBERATION is a trademark of Red Hat, Inc. diff --git a/tuxbox/neutrino/data/fonts/liberation_sans/README b/tuxbox/neutrino/data/fonts/liberation_sans/README new file mode 100644 index 0000000..51a5329 --- /dev/null +++ b/tuxbox/neutrino/data/fonts/liberation_sans/README @@ -0,0 +1,68 @@ +1. What's this? +=============== + +The Liberation Fonts are intended to be open font replacements for the three +most commonly used fonts on Microsoft systems: Times New Roman, Arial, and +Courier New. + + +2. Requirements +=============== + + * fontforge. + - http://fontforge.sourceforge.net + + +3. Install +========== + +3.1 Decompress tarball + + You can extract the files by following command: + + $ tar zxvf liberation-fonts-[VERSION].tar.gz + +3.2 Build from the source + + Change into directory liberation-fonts-[VERSION]/ and build from sources by + following commands: + + $ cd liberation-fonts-[VERSION] + $ make + + The built font files will be available in 'build' directory. + +3.3 Install to system + + You can manually install the fonts by copying them to ~/.fonts for a + particular user, or to /usr/share/fonts/truetype/liberation for system-wide + availability + + +4. Usage +======== + +The fonts should be installed and detected by the system after installation. + + +5. License +========== + +Read the GPL v2 file 'COPYING' and the Liberation Fonts EULA file 'License.txt' +for more information. + +6. Credits +========== + +Special thanks to all liberation-fonts developers and users! + + * Caius Chance <cchance at redhat.com> + - Current project maintainer. + + * Mark Webbink <mwebbink at redhat.com> + - Coordinator. + + * Steve Matteson + - Ascender Corporation <http://www.ascendercorp.com> + + * And, all other contributors. ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/data/fonts/LiberationSans-Bold.ttf | Bin 0 -> 133488 bytes .../data/fonts/LiberationSans-BoldItalic.ttf | Bin 0 -> 128968 bytes .../neutrino/data/fonts/LiberationSans-Italic.ttf | Bin 0 -> 155452 bytes .../neutrino/data/fonts/LiberationSans-Regular.ttf | Bin 0 -> 133828 bytes tuxbox/neutrino/data/fonts/liberation_sans/AUTHORS | 10 ++ .../neutrino/data/fonts/liberation_sans}/COPYING | 0 .../neutrino/data/fonts/liberation_sans/ChangeLog | 151 ++++++++++++++++++++ .../data/fonts/liberation_sans/License.txt | 19 +++ tuxbox/neutrino/data/fonts/liberation_sans/README | 68 +++++++++ 9 files changed, 248 insertions(+), 0 deletions(-) create mode 100644 tuxbox/neutrino/data/fonts/LiberationSans-Bold.ttf create mode 100644 tuxbox/neutrino/data/fonts/LiberationSans-BoldItalic.ttf create mode 100644 tuxbox/neutrino/data/fonts/LiberationSans-Italic.ttf create mode 100644 tuxbox/neutrino/data/fonts/LiberationSans-Regular.ttf create mode 100644 tuxbox/neutrino/data/fonts/liberation_sans/AUTHORS copy {dvb/dvbsnoop => tuxbox/neutrino/data/fonts/liberation_sans}/COPYING (100%) create mode 100644 tuxbox/neutrino/data/fonts/liberation_sans/ChangeLog create mode 100644 tuxbox/neutrino/data/fonts/liberation_sans/License.txt create mode 100644 tuxbox/neutrino/data/fonts/liberation_sans/README -- Tuxbox-GIT: apps |
From: Thilo G. <tux...@ne...> - 2013-06-03 18:36:31
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via e70a0996a1231a870579c2a3278c494e2e9d84c1 (commit) via 4a2dfcf1b109e5b5053470be8cf42cdc951012c0 (commit) via ea6d7b00a6c2da2fbed517b3943453e8b8f1bd0f (commit) via d2e38e6015aba76d533e01b18532cf86c98cf4ef (commit) from 4321a0a23cc7315cf644759bbf9e7a917d367e97 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e70a0996a1231a870579c2a3278c494e2e9d84c1 Author: Stefan Seyfried <se...@tu...> Date: Tue May 28 20:41:22 2013 +0200 Neutrino audioplayer: avoid out-of-bounds access Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/audioplayer.cpp b/tuxbox/neutrino/src/gui/audioplayer.cpp index a517a42..0a524a3 100644 --- a/tuxbox/neutrino/src/gui/audioplayer.cpp +++ b/tuxbox/neutrino/src/gui/audioplayer.cpp @@ -1297,13 +1297,13 @@ bool CAudioPlayerGui::openFilebrowser(void) while (infile.good()) { infile.getline(cLine, 255); - // remove CR - if(cLine[strlen(cLine)-1]=='\r') - cLine[strlen(cLine)-1]=0; int duration; sscanf(cLine, "#EXTINF:%d,%[^\n]\n", &duration, name); if(strlen(cLine) > 0 && cLine[0]!='#') { + // remove CR + if(cLine[strlen(cLine)-1]=='\r') + cLine[strlen(cLine)-1]=0; char *url = strstr(cLine, "http://"); if (url != NULL) { if (strstr(url, ".m3u") || strstr(url, ".pls")) commit 4a2dfcf1b109e5b5053470be8cf42cdc951012c0 Author: Jacek Jendrzej <cra...@go...> Date: Tue May 28 20:37:25 2013 +0200 Neutrino: fix comma at end of enumerator list Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp index cb5ccc3..2eb90ff 100644 --- a/tuxbox/neutrino/src/gui/filebrowser.cpp +++ b/tuxbox/neutrino/src/gui/filebrowser.cpp @@ -257,12 +257,11 @@ void SMSKeyInput::setTimeout(int timeout) //------------------------------------------------------------------------ -//------------------------------------------------------------------------ bool comparetolower(const char a, const char b) { return tolower(a) < tolower(b); -}; +} // sort operators bool sortByName (const CFile& a, const CFile& b) diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp index f928638..0aa319e 100644 --- a/tuxbox/neutrino/src/gui/moviebrowser.cpp +++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp @@ -242,7 +242,7 @@ bool sortDirection = 0; bool compare_to_lower(const char a, const char b) { return tolower(a) < tolower(b); -}; +} // sort operators bool sortByTitle (const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b) @@ -440,7 +440,7 @@ void CMovieBrowser::fileInfoStale(void) m_FilterLines.lineArray[i].clear(); } -}; +} /************************************************************************ @@ -3685,7 +3685,7 @@ CMenuSelector::CMenuSelector(const char * OptionName, const bool Active , char * active = Active; returnIntValue = ReturnIntValue; returnInt = ReturnInt; -}; +} CMenuSelector::CMenuSelector(const char * OptionName, const bool Active , std::string& OptionValue, int* ReturnInt ,int ReturnIntValue ) : CMenuItem() { @@ -3697,7 +3697,7 @@ CMenuSelector::CMenuSelector(const char * OptionName, const bool Active , std::s active = Active; returnIntValue = ReturnIntValue; returnInt = ReturnInt; -}; +} int CMenuSelector::getHeight(void) const { @@ -3717,7 +3717,7 @@ int CMenuSelector::exec(CMenuTarget* /*parent*/) *optionValueString = optionName; } return menu_return::RETURN_EXIT; -}; +} int CMenuSelector::paint(bool selected) { @@ -3802,7 +3802,7 @@ CDirMenu::CDirMenu(std::vector<MB_DIR>* dir_list) } } } -}; +} /************************************************************************/ int CDirMenu::exec(CMenuTarget* parent, const std::string & actionKey) diff --git a/tuxbox/neutrino/src/gui/network_setup.h b/tuxbox/neutrino/src/gui/network_setup.h index 615188d..cb0fc24 100644 --- a/tuxbox/neutrino/src/gui/network_setup.h +++ b/tuxbox/neutrino/src/gui/network_setup.h @@ -76,19 +76,19 @@ class CNetworkSetup : public CMenuTarget, CChangeObserver enum NETWORK_DHCP_MODE { NETWORK_DHCP_OFF = 0, //static - NETWORK_DHCP_ON = 1, + NETWORK_DHCP_ON = 1 }; enum NETWORK_START_MODE { NETWORK_AUTOSTART_OFF = 0, - NETWORK_AUTOSTART_ON = 1, + NETWORK_AUTOSTART_ON = 1 }; enum NETWORK_NTP_MODE { NETWORK_NTP_OFF = 0, - NETWORK_NTP_ON = 1, + NETWORK_NTP_ON = 1 }; CNetworkSetup(); diff --git a/tuxbox/neutrino/src/system/fsmounter.cpp b/tuxbox/neutrino/src/system/fsmounter.cpp index 22aab90..334d492 100644 --- a/tuxbox/neutrino/src/system/fsmounter.cpp +++ b/tuxbox/neutrino/src/system/fsmounter.cpp @@ -169,15 +169,11 @@ bool CFSMounter::isMounted(const char * const local_dir) if (local_dir == NULL) return false; - // according to the man page realpath() sucks, but there's nothing better :( - int path_max = 0; - #ifdef PATH_MAX - path_max = PATH_MAX; + char mount_point[PATH_MAX]; #else - path_max = 4096; + char mount_point[4096]; #endif - char mount_point[path_max]; if (realpath(local_dir, mount_point) == NULL) { printf("[CFSMounter] could not resolve dir: %s: %s\n",local_dir, strerror(errno)); return false; commit ea6d7b00a6c2da2fbed517b3943453e8b8f1bd0f Author: Jacek Jendrzej <cra...@go...> Date: Fri May 17 23:23:04 2013 +0200 Neutrino event search: add search all epg option Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp index bb6f958..03a7886 100644 --- a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp @@ -2410,27 +2410,26 @@ static void sendAllEvents(int connfd, t_channel_id serviceUniqueKey, bool oldFor serviceIDfound = 1; bool copy = true; - if(search == 0); // nothing to do here - else if(search == 1) + if (search) { - std::string eName = (*e)->getName(); - std::transform(eName.begin(), eName.end(), eName.begin(), tolower); - if(eName.find(search_text) == std::string::npos) - copy = false; - } - else if(search == 2) - { - std::string eText = (*e)->getText(); - std::transform(eText.begin(), eText.end(), eText.begin(), tolower); - if(eText.find(search_text) == std::string::npos) - copy = false; - } - else if(search == 3) - { - std::string eExtendedText = (*e)->getExtendedText(); - std::transform(eExtendedText.begin(), eExtendedText.end(), eExtendedText.begin(), tolower); - if(eExtendedText.find(search_text) == std::string::npos) - copy = false; + if ((search == 1 /*EventList::SEARCH_EPG_TITLE*/) || (search == 5 /*EventList::SEARCH_EPG_ALL*/)) + { + std::string eName = (*e)->getName(); + std::transform(eName.begin(), eName.end(), eName.begin(), tolower); + copy = (eName.find(search_text) != std::string::npos); + } + if ((search == 2 /*EventList::SEARCH_EPG_INFO1*/) || (!copy && (search == 5 /*EventList::SEARCH_EPG_ALL*/))) + { + std::string eText = (*e)->getText(); + std::transform(eText.begin(), eText.end(), eText.begin(), tolower); + copy = (eText.find(search_text) != std::string::npos); + } + if ((search == 3 /*EventList::SEARCH_EPG_INFO2*/) || (!copy && (search == 5 /*EventList::SEARCH_EPG_ALL*/))) + { + std::string eExtendedText = (*e)->getExtendedText(); + std::transform(eExtendedText.begin(), eExtendedText.end(), eExtendedText.begin(), tolower); + copy = (eExtendedText.find(search_text) != std::string::npos); + } } if(copy) diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale index 7e39eb3..71246d0 100644 --- a/tuxbox/neutrino/data/locale/deutsch.locale +++ b/tuxbox/neutrino/data/locale/deutsch.locale @@ -425,6 +425,7 @@ esound.port Esound Port eventfinder.head Stichwortsuche im EPG eventfinder.keyword Suchbegriff eventfinder.search Suche +eventfinder.search_all_epg Alle EPG-Daten eventfinder.search_within_epg Suche in eventfinder.search_within_list Suche in eventfinder.searching Suche Stichwort in EPG ... diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale index c3077fc..1c5bda4 100644 --- a/tuxbox/neutrino/data/locale/english.locale +++ b/tuxbox/neutrino/data/locale/english.locale @@ -425,6 +425,7 @@ esound.port Esound Port eventfinder.head Search in EPG eventfinder.keyword Keyword eventfinder.search Search +eventfinder.search_all_epg All EPG data eventfinder.search_within_epg Search within eventfinder.search_within_list Search within eventfinder.searching Search for keyword in EPG... diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index a42a273..bf94337 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -1061,14 +1061,15 @@ int CEventListHandler::exec(CMenuTarget* parent, const std::string &/*actionkey* /************************************************************************************************ * class CEventFinderMenu ************************************************************************************************/ -#define SEARCH_EPG_OPTION_COUNT 3 +#define SEARCH_EPG_OPTION_COUNT 4 const CMenuOptionChooser::keyval SEARCH_EPG_OPTIONS[SEARCH_EPG_OPTION_COUNT] = { // { EventList::SEARCH_EPG_NONE, LOCALE_PICTUREVIEWER_RESIZE_NONE }, { EventList::SEARCH_EPG_TITLE, LOCALE_FONTSIZE_EPG_TITLE }, { EventList::SEARCH_EPG_INFO1, LOCALE_FONTSIZE_EPG_INFO1 }, - { EventList::SEARCH_EPG_INFO2, LOCALE_FONTSIZE_EPG_INFO2 } -// ,{ EventList::SEARCH_EPG_GENRE, LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR } + { EventList::SEARCH_EPG_INFO2, LOCALE_FONTSIZE_EPG_INFO2 }, +// { EventList::SEARCH_EPG_GENRE, LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR }, + { EventList::SEARCH_EPG_ALL, LOCALE_EVENTFINDER_SEARCH_ALL_EPG } }; #define SEARCH_LIST_OPTION_COUNT 3 diff --git a/tuxbox/neutrino/src/system/locals.h b/tuxbox/neutrino/src/system/locals.h index 38d5980..2e09f3e 100644 --- a/tuxbox/neutrino/src/system/locals.h +++ b/tuxbox/neutrino/src/system/locals.h @@ -452,6 +452,7 @@ typedef enum LOCALE_EVENTFINDER_HEAD, LOCALE_EVENTFINDER_KEYWORD, LOCALE_EVENTFINDER_SEARCH, + LOCALE_EVENTFINDER_SEARCH_ALL_EPG, LOCALE_EVENTFINDER_SEARCH_WITHIN_EPG, LOCALE_EVENTFINDER_SEARCH_WITHIN_LIST, LOCALE_EVENTFINDER_SEARCHING, diff --git a/tuxbox/neutrino/src/system/locals_intern.h b/tuxbox/neutrino/src/system/locals_intern.h index 878f988..828bb62 100644 --- a/tuxbox/neutrino/src/system/locals_intern.h +++ b/tuxbox/neutrino/src/system/locals_intern.h @@ -452,6 +452,7 @@ const char * locale_real_names[] = "eventfinder.head", "eventfinder.keyword", "eventfinder.search", + "eventfinder.search_all_epg", "eventfinder.search_within_epg", "eventfinder.search_within_list", "eventfinder.searching", commit d2e38e6015aba76d533e01b18532cf86c98cf4ef Author: Christian Schuett <Gau...@ho...> Date: Wed May 15 19:25:20 2013 +0200 Neutrino event list: disable removal of duplicates from search results removal of duplicates is not needed anymore because we are now searching in a unique channel list, where duplicates are impossible Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index 28d0dd6..a42a273 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -82,10 +82,12 @@ static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b) } // unique operators +#if 0 bool uniqueByIdAndDateTime (const CChannelEvent& a, const CChannelEvent& b) { return (a.eventID == b.eventID && a.startTime == b.startTime); } +#endif EventList::EventList() { @@ -981,6 +983,7 @@ int EventList::findEvents(void) v.push_back(channel_id); } } + // search in unique channel list => duplicate events impossible sort(v.begin(), v.end()); std::vector<t_channel_id>::iterator last_it = unique(v.begin(), v.end()); std::vector<t_channel_id>::iterator it; @@ -990,7 +993,10 @@ int EventList::findEvents(void) } sort_mode = 0; sort(evtlist.begin(),evtlist.end(),sortByDateTime); +#if 0 + // remove duplicates evtlist.resize(unique(evtlist.begin(), evtlist.end(), uniqueByIdAndDateTime) - evtlist.begin()); +#endif current_event = (unsigned int)-1; time_t azeit=time(NULL); ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp | 39 +++++++++++------------ tuxbox/neutrino/data/locale/deutsch.locale | 1 + tuxbox/neutrino/data/locale/english.locale | 1 + tuxbox/neutrino/src/gui/audioplayer.cpp | 6 ++-- tuxbox/neutrino/src/gui/eventlist.cpp | 13 ++++++-- tuxbox/neutrino/src/gui/filebrowser.cpp | 3 +- tuxbox/neutrino/src/gui/moviebrowser.cpp | 12 +++--- tuxbox/neutrino/src/gui/network_setup.h | 6 ++-- tuxbox/neutrino/src/system/fsmounter.cpp | 8 +--- tuxbox/neutrino/src/system/locals.h | 1 + tuxbox/neutrino/src/system/locals_intern.h | 1 + 11 files changed, 48 insertions(+), 43 deletions(-) -- Tuxbox-GIT: apps |
From: Thilo G. <tux...@ne...> - 2013-06-03 18:32:10
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 4321a0a23cc7315cf644759bbf9e7a917d367e97 (commit) from fd6d7dc6a37543156212f4f0caa97b8d977b9be7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4321a0a23cc7315cf644759bbf9e7a917d367e97 Author: Christian Schuett <Gau...@ho...> Date: Sat May 11 22:46:49 2013 +0200 Neutrino: consider icon height when calculating head height head icon could overflow the window at very small font height Signed-off-by: Christian Schuett <Gau...@ho...> diff --git a/tuxbox/neutrino/src/gui/audioplayer.cpp b/tuxbox/neutrino/src/gui/audioplayer.cpp index 66ffe51..a517a42 100644 --- a/tuxbox/neutrino/src/gui/audioplayer.cpp +++ b/tuxbox/neutrino/src/gui/audioplayer.cpp @@ -254,7 +254,8 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &) m_height = h_max(570, 0); m_sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); m_buttonHeight = std::min(25, m_sheight); - m_theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); + m_frameBuffer->getIconSize(NEUTRINO_ICON_MP3, &m_ticonwidth, &m_ticonheight); + m_theight = std::max(m_ticonheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); m_fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); m_title_height = m_fheight*2 + 20 + m_sheight + 4; m_info_height = m_fheight*2; @@ -1596,7 +1597,6 @@ void CAudioPlayerGui::paintHead() if (!m_show_playlist) return; - int iconw = 0, iconh = 0; int c_rad_mid = RADIUS_MID; std::string strCaption; if (m_inetmode) @@ -1605,15 +1605,15 @@ void CAudioPlayerGui::paintHead() strCaption = g_Locale->getText(LOCALE_AUDIOPLAYER_HEAD); m_frameBuffer->paintBoxRel(m_x, m_y + m_title_height, m_width, m_theight, COL_MENUHEAD_PLUS_0, c_rad_mid, CORNER_TOP); - m_frameBuffer->getIconSize(NEUTRINO_ICON_MP3, &iconw, &iconh); - int ypos = m_y + m_title_height + (m_theight / 2) - (iconh / 2); + int ypos = m_y + m_title_height + (m_theight / 2) - (m_ticonheight / 2); m_frameBuffer->paintIcon(NEUTRINO_ICON_MP3, m_x + 7, ypos); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(m_x + 7 + iconw + 10, m_y + m_title_height + m_theight + 2, - m_width - 7 - iconw - 10, strCaption, COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(m_x + 7 + m_ticonwidth + 10, m_y + m_title_height + m_theight + 2, + m_width - 7 - m_ticonwidth - 10, strCaption, COL_MENUHEAD, 0, true); // UTF-8 #ifdef ENABLE_GUI_MOUNT if (!m_inetmode) { + int iconw, iconh; m_frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_DBOX, &iconw, &iconh); ypos = m_y + m_title_height + (m_theight / 2) - (iconh / 2); m_frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_DBOX, m_x + m_width - iconw - 8, ypos); diff --git a/tuxbox/neutrino/src/gui/audioplayer.h b/tuxbox/neutrino/src/gui/audioplayer.h index f288e97..19d04b1 100644 --- a/tuxbox/neutrino/src/gui/audioplayer.h +++ b/tuxbox/neutrino/src/gui/audioplayer.h @@ -106,6 +106,8 @@ class CAudioPlayerGui : public CMenuTarget unsigned int m_listmaxshow; int m_fheight; // Fonthoehe Playlist-Inhalt int m_theight; // Fonthoehe Playlist-Titel + int m_ticonwidth; + int m_ticonheight; int m_sheight; // Fonthoehe MP Info int m_buttonHeight; int m_title_height; diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp index 66b2ef0..4b5e41c 100644 --- a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp +++ b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp @@ -230,8 +230,8 @@ const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent) width = w_max (720, 30); int iconw = 0, iconh = 0; - frameBuffer->getIconSize(NEUTRINO_ICON_BOOKMARKMANAGER, &iconw, &iconh); - theight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); + frameBuffer->getIconSize(NEUTRINO_ICON_BOOKMARKMANAGER, &ticonwidth, &ticonheight); + theight = std::max(ticonheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_OKAY, &iconw, &iconh); footHeight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()); @@ -414,14 +414,12 @@ void CBookmarkManager::paintHead() frameBuffer->paintBoxRel(x, y, width, theight, COL_MENUHEAD_PLUS_0, RADIUS_MID, CORNER_TOP); int theight_mid = theight / 2; - int iconw = 0, iconh = 0; - frameBuffer->getIconSize(NEUTRINO_ICON_BOOKMARKMANAGER, &iconw, &iconh); - - int ypos = y + theight_mid - (iconh / 2); + int ypos = y + theight_mid - (ticonheight / 2); frameBuffer->paintIcon(NEUTRINO_ICON_BOOKMARKMANAGER, x + 5, ypos); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + 5 + iconw + 10, y + theight + 2, width - 5 - iconw - 10, g_Locale->getText(LOCALE_BOOKMARKMANAGER_NAME), COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + 5 + ticonwidth + 10, y + theight + 2, width - 5 - ticonwidth - 10, g_Locale->getText(LOCALE_BOOKMARKMANAGER_NAME), COL_MENUHEAD, 0, true); // UTF-8 #if 0 + int iconw, iconh; frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_HELP, &iconw, &iconh); ypos = y + theight_mid - (iconh / 2); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HELP, x + width - iconw - 8, ypos); diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.h b/tuxbox/neutrino/src/gui/bookmarkmanager.h index 5a13144..fcff725 100644 --- a/tuxbox/neutrino/src/gui/bookmarkmanager.h +++ b/tuxbox/neutrino/src/gui/bookmarkmanager.h @@ -74,6 +74,8 @@ class CBookmarkManager unsigned int listmaxshow; int fheight; //fontheight timerlist-content (text) int theight; //fontheight timerlist-title + int ticonwidth; + int ticonheight; int footHeight; bool visible; int width; diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp index 60ad352..bb3c215 100644 --- a/tuxbox/neutrino/src/gui/channellist.cpp +++ b/tuxbox/neutrino/src/gui/channellist.cpp @@ -145,16 +145,8 @@ void CChannelList::calcSize() else width = full_width; - /* assuming all color icons must have same size */ - int icol_w, icol_h; - frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_RED, &icol_w, &icol_h); - footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; //initial height value for buttonbar theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); - - frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_HELP, &icol_w, &icol_h); - theight = std::max(theight, icol_h); - fheight = std::max(g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(), std::max(g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getHeight(), std::max(g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getHeight(), diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp index 16713ee..f928638 100644 --- a/tuxbox/neutrino/src/gui/moviebrowser.cpp +++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp @@ -626,10 +626,12 @@ void CMovieBrowser::initFrames(void) m_cBoxFrame.iX = getScreenStartX(m_cBoxFrame.iWidth); m_cBoxFrame.iY = getScreenStartY(m_cBoxFrame.iHeight); + CFrameBuffer::getInstance()->getIconSize(NEUTRINO_ICON_EPGINFO, &m_iconWidthTitle, &m_iconHeightTitle); + m_cBoxFrameTitleRel.iX = 0; m_cBoxFrameTitleRel.iY = 0; m_cBoxFrameTitleRel.iWidth = m_cBoxFrame.iWidth; - m_cBoxFrameTitleRel.iHeight = m_pcFontTitle->getHeight(); + m_cBoxFrameTitleRel.iHeight = std::max(m_iconHeightTitle, m_pcFontTitle->getHeight()); m_cBoxFrameBrowserList.iX = m_cBoxFrame.iX; m_cBoxFrameBrowserList.iY = m_cBoxFrame.iY + m_cBoxFrameTitleRel.iHeight; @@ -1656,21 +1658,20 @@ void CMovieBrowser::refreshTitle(void) RADIUS_MID, CORNER_TOP); - int iconw = 0, iconh = 0; - CFrameBuffer::getInstance()->getIconSize(NEUTRINO_ICON_EPGINFO, &iconw, &iconh); m_pcWindow->paintIcon(NEUTRINO_ICON_EPGINFO, m_cBoxFrameTitleRel.iX + 6, - m_cBoxFrameTitleRel.iY + m_cBoxFrameTitleRel.iHeight / 2 - iconh / 2); + m_cBoxFrameTitleRel.iY + m_cBoxFrameTitleRel.iHeight / 2 - m_iconHeightTitle / 2); m_pcWindow->RenderString( m_pcFontTitle, - m_cBoxFrameTitleRel.iX + 6 + iconw + TEXT_BORDER_WIDTH, + m_cBoxFrameTitleRel.iX + 6 + m_iconWidthTitle + TEXT_BORDER_WIDTH, m_cBoxFrameTitleRel.iY + m_cBoxFrameTitleRel.iHeight + 2, - m_cBoxFrameTitleRel.iWidth - 6 - iconw - TEXT_BORDER_WIDTH, + m_cBoxFrameTitleRel.iWidth - 6 - m_iconWidthTitle - TEXT_BORDER_WIDTH, m_textTitle.c_str(), TITLE_FONT_COLOR, 0, true); // UTF-8 + int iconw, iconh; CFrameBuffer::getInstance()->getIconSize(NEUTRINO_ICON_BUTTON_DBOX, &iconw, &iconh); m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_DBOX, m_cBoxFrameTitleRel.iX + m_cBoxFrameTitleRel.iWidth - iconw - 12, diff --git a/tuxbox/neutrino/src/gui/moviebrowser.h b/tuxbox/neutrino/src/gui/moviebrowser.h index 9065a47..44e9893 100644 --- a/tuxbox/neutrino/src/gui/moviebrowser.h +++ b/tuxbox/neutrino/src/gui/moviebrowser.h @@ -261,6 +261,8 @@ class CMovieBrowser : public CMenuTarget Font* m_pcFontFoot; Font* m_pcFontTitle; std::string m_textTitle; + int m_iconWidthTitle; + int m_iconHeightTitle; MB_PARENTAL_LOCK m_parentalLock; MB_STORAGE_TYPE m_storageType; diff --git a/tuxbox/neutrino/src/gui/pictureviewer.cpp b/tuxbox/neutrino/src/gui/pictureviewer.cpp index dd371ad..01802ca 100644 --- a/tuxbox/neutrino/src/gui/pictureviewer.cpp +++ b/tuxbox/neutrino/src/gui/pictureviewer.cpp @@ -125,10 +125,8 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & /*actionKey height = h_max (570, 0); sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); buttonHeight = std::min(25, sheight); - - int iconh = 0, dummy = 0; - frameBuffer->getIconSize(NEUTRINO_ICON_MP3, &dummy, &iconh); - theight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); + frameBuffer->getIconSize(NEUTRINO_ICON_MP3, &ticonwidth, &ticonheight); + theight = std::max(ticonheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); listmaxshow = (height-theight-2*buttonHeight)/(fheight); height = theight+2*buttonHeight+listmaxshow*fheight; // recalc height @@ -597,15 +595,14 @@ void CPictureViewerGui::paintItem(int pos) void CPictureViewerGui::paintHead() { // printf("paintHead{\n"); - int iconw = 0, iconh = 0; int theight_mid = theight / 2; - frameBuffer->getIconSize(NEUTRINO_ICON_MP3, &iconw, &iconh); - int ypos = y + theight_mid - (iconh / 2); + int ypos = y + theight_mid - (ticonheight / 2); frameBuffer->paintBoxRel(x, y, width, theight, COL_MENUHEAD_PLUS_0, RADIUS_MID, CORNER_TOP); frameBuffer->paintIcon(NEUTRINO_ICON_MP3, x + 7, ypos); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + 7 + iconw + 10, y + theight + 2, width - 7 - iconw - 10, g_Locale->getText(LOCALE_PICTUREVIEWER_HEAD), COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + 7 + ticonwidth + 10, y + theight + 2, width - 7 - ticonwidth - 10, g_Locale->getText(LOCALE_PICTUREVIEWER_HEAD), COL_MENUHEAD, 0, true); // UTF-8 + int iconw, iconh; frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_HELP, &iconw, &iconh); int xpos = x + width - iconw - 6; ypos = y + theight_mid - (iconh / 2); diff --git a/tuxbox/neutrino/src/gui/pictureviewer.h b/tuxbox/neutrino/src/gui/pictureviewer.h index 5d43e04..f2c8a6a 100644 --- a/tuxbox/neutrino/src/gui/pictureviewer.h +++ b/tuxbox/neutrino/src/gui/pictureviewer.h @@ -76,6 +76,8 @@ class CPictureViewerGui : public CMenuTarget int fheight; // Fonthoehe Playlist-Inhalt int theight; // Fonthoehe Playlist-Titel int sheight; // Fonthoehe MP Info + int ticonwidth; + int ticonheight; int buttonHeight; bool visible; State m_state; diff --git a/tuxbox/neutrino/src/gui/pluginlist.cpp b/tuxbox/neutrino/src/gui/pluginlist.cpp index 7de8ddf..1cadfca 100644 --- a/tuxbox/neutrino/src/gui/pluginlist.cpp +++ b/tuxbox/neutrino/src/gui/pluginlist.cpp @@ -77,6 +77,14 @@ CPluginList::CPluginList(const neutrino_locale_t Name, const uint listtype) buttonname = LOCALE_MENU_BACK; selected = 0; liststart = 0; + if (listtype == CPlugins::P_TYPE_GAME) + iconfile = NEUTRINO_ICON_GAMES; + else if (listtype == CPlugins::P_TYPE_SCRIPT) + iconfile = NEUTRINO_ICON_SHELL; + else + iconfile = ""; + ticonwidth = 0; + ticonheight = 0; } CPluginList::~CPluginList() @@ -261,18 +269,10 @@ void CPluginList::paintHead() frameBuffer->paintBoxRel(x, y, width + sb_width, theight, COL_MENUHEAD_PLUS_0, RADIUS_MID, CORNER_TOP); int iconoffset = 0; - if(pluginlisttype == CPlugins::P_TYPE_GAME) + if (!iconfile.empty()) { - int iconw, iconh; - frameBuffer->getIconSize(NEUTRINO_ICON_GAMES, &iconw, &iconh); - frameBuffer->paintIcon(NEUTRINO_ICON_GAMES, x + 8, y + theight / 2 - iconh / 2); - iconoffset = 8 + iconw; - } else if (pluginlisttype == CPlugins::P_TYPE_SCRIPT) - { - int iconw, iconh; - frameBuffer->getIconSize(NEUTRINO_ICON_SHELL, &iconw, &iconh); - frameBuffer->paintIcon(NEUTRINO_ICON_SHELL, x + 8, y + theight / 2 - iconh / 2); - iconoffset = 8 + iconw; + frameBuffer->paintIcon(iconfile, x + 8, y + theight / 2 - ticonheight / 2); + iconoffset = 8 + ticonwidth; } g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + iconoffset + 10, y + theight + 2, width - iconoffset - 10, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 } @@ -283,7 +283,9 @@ void CPluginList::paint() width = w_max (500, 100); height = h_max (526, 50); - theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); + if (!iconfile.empty()) + frameBuffer->getIconSize(iconfile.c_str(), &ticonwidth, &ticonheight); + theight = std::max(ticonheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); // fheight1 = g_Font[SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMLARGE]->getHeight(); fheight2 = g_Font[SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMSMALL]->getHeight(); @@ -294,7 +296,6 @@ void CPluginList::paint() sb_width = (pluginlist.size() > listmaxshow) ? 15 : 0; x = getScreenStartX(width + sb_width); y = getScreenStartY(height + (c_rad_mid / 3 * 2)); - liststart = (selected/listmaxshow)*listmaxshow; CLCD::getInstance()->setMode(CLCD::MODE_MENU_UTF8, g_Locale->getText(name)); diff --git a/tuxbox/neutrino/src/gui/pluginlist.h b/tuxbox/neutrino/src/gui/pluginlist.h index 1c8ec4a..a7eeaf0 100644 --- a/tuxbox/neutrino/src/gui/pluginlist.h +++ b/tuxbox/neutrino/src/gui/pluginlist.h @@ -65,9 +65,12 @@ class CPluginList : public CMenuTarget unsigned int listmaxshow; neutrino_locale_t name; uint pluginlisttype; + std::string iconfile; int fheight; // Fonthoehe Channellist-Inhalt int theight; // Fonthoehe Channellist-Titel + int ticonwidth; + int ticonheight; int fheight1,fheight2; diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp index 2826a23..b2e18bb 100644 --- a/tuxbox/neutrino/src/gui/timerlist.cpp +++ b/tuxbox/neutrino/src/gui/timerlist.cpp @@ -434,8 +434,8 @@ void CTimerList::updateEvents(void) int CTimerList::show() { int iconw = 0, iconh = 0; - frameBuffer->getIconSize(NEUTRINO_ICON_TIMER, &iconw, &iconh); - theight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); + frameBuffer->getIconSize(NEUTRINO_ICON_TIMER, &ticonwidth, &ticonheight); + theight = std::max(ticonheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_OKAY, &iconw, &iconh); footHeight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()); @@ -749,12 +749,11 @@ void CTimerList::paintHead() frameBuffer->paintBoxRel(x, y, width, theight, COL_MENUHEAD_PLUS_0, RADIUS_MID, CORNER_TOP); int theight_mid = theight / 2; - int iconw = 0, iconh = 0; - frameBuffer->getIconSize(NEUTRINO_ICON_TIMER, &iconw, &iconh); - int ypos = y + theight_mid - (iconh / 2); + int ypos = y + theight_mid - (ticonheight / 2); frameBuffer->paintIcon(NEUTRINO_ICON_TIMER, x + 5, ypos); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + 5 + iconw + 10, y + theight + 2, width - 5 - iconw - 10, g_Locale->getText(LOCALE_TIMERLIST_NAME), COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + 5 + ticonwidth + 10, y + theight + 2, width - 5 - ticonwidth - 10, g_Locale->getText(LOCALE_TIMERLIST_NAME), COL_MENUHEAD, 0, true); // UTF-8 + int iconw, iconh; frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_HELP, &iconw, &iconh); ypos = y + theight_mid - (iconh / 2); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HELP, x + width - iconw - 8, ypos); diff --git a/tuxbox/neutrino/src/gui/timerlist.h b/tuxbox/neutrino/src/gui/timerlist.h index 1cc5b91..6317150 100644 --- a/tuxbox/neutrino/src/gui/timerlist.h +++ b/tuxbox/neutrino/src/gui/timerlist.h @@ -51,6 +51,8 @@ class CTimerList : public CMenuTarget unsigned int listmaxshow; int fheight; //fontheight timerlist-content (text) int theight; //fontheight timerlist-title + int ticonwidth; + int ticonheight; int footHeight; int time_width; bool visible; diff --git a/tuxbox/neutrino/src/gui/upnpbrowser.cpp b/tuxbox/neutrino/src/gui/upnpbrowser.cpp index 27a8b61..cb4e0aa 100644 --- a/tuxbox/neutrino/src/gui/upnpbrowser.cpp +++ b/tuxbox/neutrino/src/gui/upnpbrowser.cpp @@ -138,7 +138,8 @@ int CUpnpBrowserGui::exec(CMenuTarget* parent, const std::string & /*actionKey*/ m_height = h_max(570, 0); m_sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); m_buttonHeight = std::min(25, m_sheight); - m_theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); + m_frameBuffer->getIconSize(NEUTRINO_ICON_UPNP, &m_ticonwidth, &m_ticonheight); + m_theight = std::max(m_ticonheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); m_mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); m_fheight = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->getHeight(); m_title_height = m_mheight*2 + 20 + m_sheight + 4; @@ -1034,11 +1035,10 @@ void CUpnpBrowserGui::paintDevice() // Head tmp = g_Locale->getText(LOCALE_UPNPBROWSER_HEAD); m_frameBuffer->paintBoxRel(m_x, m_y + m_title_height, m_width, m_theight, COL_MENUHEAD_PLUS_0, c_rad_mid, CORNER_TOP); - m_frameBuffer->getIconSize(NEUTRINO_ICON_UPNP, &iconw, &iconh); - ypos = m_y + m_title_height + m_theight / 2 - iconh / 2; + ypos = m_y + m_title_height + m_theight / 2 - m_ticonheight / 2; m_frameBuffer->paintIcon(NEUTRINO_ICON_UPNP, m_x + 7, ypos); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(m_x + 7 + iconw + 10, m_y + m_title_height + m_theight + 2, - m_width - 7 - iconw - 10, tmp, COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(m_x + 7 + m_ticonwidth + 10, m_y + m_title_height + m_theight + 2, + m_width - 7 - m_ticonwidth - 10, tmp, COL_MENUHEAD, 0, true); // UTF-8 m_frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_DBOX, &iconw, &iconh); ypos = m_y + m_title_height + m_theight / 2 - iconh / 2; m_frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_DBOX, m_x + m_width - iconw - 8, ypos); @@ -1148,11 +1148,10 @@ void CUpnpBrowserGui::paintItem(std::vector<UPnPEntry> *entry, unsigned int sele // Head tmp = g_Locale->getText(LOCALE_UPNPBROWSER_HEAD); m_frameBuffer->paintBoxRel(m_x, m_y + m_title_height, m_width, m_theight, COL_MENUHEAD_PLUS_0); - m_frameBuffer->getIconSize(NEUTRINO_ICON_UPNP, &iconw, &iconh); - ypos = m_y + m_title_height + m_theight / 2 - iconh / 2; + ypos = m_y + m_title_height + m_theight / 2 - m_ticonheight / 2; m_frameBuffer->paintIcon(NEUTRINO_ICON_UPNP, m_x + 7, ypos); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(m_x + 7 + iconw + 10, m_y + m_title_height + m_theight + 2, - m_width - 7 - iconw - 10, tmp, COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(m_x + 7 + m_ticonwidth + 10, m_y + m_title_height + m_theight + 2, + m_width - 7 - m_ticonwidth - 10, tmp, COL_MENUHEAD, 0, true); // UTF-8 m_frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_DBOX, &iconw, &iconh); ypos = m_y + m_title_height + m_theight / 2 - iconh / 2; m_frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_DBOX, m_x + m_width - iconw - 8, ypos); diff --git a/tuxbox/neutrino/src/gui/upnpbrowser.h b/tuxbox/neutrino/src/gui/upnpbrowser.h index 03b6cc7..de1702a 100644 --- a/tuxbox/neutrino/src/gui/upnpbrowser.h +++ b/tuxbox/neutrino/src/gui/upnpbrowser.h @@ -85,6 +85,8 @@ class CUpnpBrowserGui : public CMenuTarget unsigned int m_selecteddevice; int m_fheight; // Fonthoehe Inhalt int m_theight; // Fonthoehe Titel + int m_ticonwidth; + int m_ticonheight; int m_mheight; // Fonthoehe Info int m_sheight; // Fonthoehe Status int m_buttonHeight; diff --git a/tuxbox/neutrino/src/gui/widget/hintbox.cpp b/tuxbox/neutrino/src/gui/widget/hintbox.cpp index a53ff9b..48f7324 100644 --- a/tuxbox/neutrino/src/gui/widget/hintbox.cpp +++ b/tuxbox/neutrino/src/gui/widget/hintbox.cpp @@ -53,7 +53,21 @@ CHintBox::CHintBox(const neutrino_locale_t Caption, const char * const Text, con width = Width; - theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); + if (Icon != NULL) + { + iconfile = Icon; + int iconw; + CFrameBuffer::getInstance()->getIconSize(Icon, &iconw, &ticonheight); + ticonoffset = 8 + iconw; + } + else + { + iconfile = ""; + ticonheight = 0; + ticonoffset = 0; + } + + theight = std::max(ticonheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); height = theight + fheight; @@ -87,13 +101,7 @@ CHintBox::CHintBox(const neutrino_locale_t Caption, const char * const Text, con else additional_width = 20 + 0; - if (Icon != NULL) - { - iconfile = Icon; - additional_width += 30; - } - else - iconfile = ""; + additional_width += ticonoffset; nw = additional_width + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(caption), true); // UTF-8 @@ -156,16 +164,9 @@ void CHintBox::refresh(void) // title window->paintBoxRel(0, 0, width, theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, c_rad_mid , CORNER_TOP); - - int iconoffset = 0; if (!iconfile.empty()) - { - int iconw, iconh; - CFrameBuffer::getInstance()->getIconSize(iconfile.c_str(), &iconw, &iconh); - window->paintIcon(iconfile.c_str(), 8, theight / 2 - iconh / 2); - iconoffset = 8 + iconw; - } - window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], iconoffset + 10, theight + 2, width - iconoffset - 10, g_Locale->getText(caption), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8 + window->paintIcon(iconfile.c_str(), 8, theight / 2 - ticonheight / 2); + window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], ticonoffset + 10, theight + 2, width - ticonoffset - 10, g_Locale->getText(caption), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8 // background of text panel window->paintBoxRel(0, theight, width, (entries_per_page + 1) * fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0, c_rad_mid , CORNER_BOTTOM); diff --git a/tuxbox/neutrino/src/gui/widget/hintbox.h b/tuxbox/neutrino/src/gui/widget/hintbox.h index e647b5e..4c7e67c 100644 --- a/tuxbox/neutrino/src/gui/widget/hintbox.h +++ b/tuxbox/neutrino/src/gui/widget/hintbox.h @@ -54,6 +54,8 @@ class CHintBox int fheight; int theight; + int ticonheight; + int ticonoffset; neutrino_locale_t caption; char * message; std::vector<char *> line; diff --git a/tuxbox/neutrino/src/gui/widget/hintboxext.cpp b/tuxbox/neutrino/src/gui/widget/hintboxext.cpp index 1799d09..66ee7e0 100644 --- a/tuxbox/neutrino/src/gui/widget/hintboxext.cpp +++ b/tuxbox/neutrino/src/gui/widget/hintboxext.cpp @@ -101,7 +101,22 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const int Width, const c { m_width = Width; int nw = 0; - m_theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); + + if (Icon != NULL) + { + m_iconfile = Icon; + int iconw; + CFrameBuffer::getInstance()->getIconSize(Icon, &iconw, &m_ticonheight); + m_ticonoffset = 8 + iconw; + } + else + { + m_iconfile = ""; + m_ticonheight = 0; + m_ticonoffset = 0; + } + + m_theight = std::max(m_ticonheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); m_fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); m_height = m_theight + m_fheight; m_maxEntriesPerPage = 0; @@ -178,13 +193,7 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const int Width, const c else additional_width = 20 + 0; - if (Icon != NULL) - { - m_iconfile = Icon; - additional_width += 30; - } - else - m_iconfile = ""; + additional_width += m_ticonoffset; nw = additional_width + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(m_caption), true); // UTF-8 @@ -230,16 +239,9 @@ void CHintBoxExt::refresh(void) // title m_window->paintBoxRel(0, 0, m_width, m_theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, c_rad_mid, CORNER_TOP); - - int iconoffset = 0; if (!m_iconfile.empty()) - { - int iconw, iconh; - CFrameBuffer::getInstance()->getIconSize(m_iconfile.c_str(), &iconw, &iconh); - m_window->paintIcon(m_iconfile.c_str(), 8, m_theight / 2 - iconh / 2); - iconoffset = 8 + iconw; - } - m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], iconoffset + 10, m_theight + 2, m_width - iconoffset - 10, g_Locale->getText(m_caption), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8 + m_window->paintIcon(m_iconfile.c_str(), 8, m_theight / 2 - m_ticonheight / 2); + m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], m_ticonoffset + 10, m_theight + 2, m_width - m_ticonoffset - 10, g_Locale->getText(m_caption), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8 // background of text panel m_window->paintBoxRel(0, m_theight, m_width, (m_maxEntriesPerPage + 1) * m_fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0); diff --git a/tuxbox/neutrino/src/gui/widget/hintboxext.h b/tuxbox/neutrino/src/gui/widget/hintboxext.h index 05f9c3a..63fd68c 100644 --- a/tuxbox/neutrino/src/gui/widget/hintboxext.h +++ b/tuxbox/neutrino/src/gui/widget/hintboxext.h @@ -58,6 +58,8 @@ class CHintBoxExt int m_fheight; int m_theight; + int m_ticonheight; + int m_ticonoffset; neutrino_locale_t m_caption; char * m_message; ContentLines m_lines; diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp index a39fd47..bd4db51 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.cpp +++ b/tuxbox/neutrino/src/gui/widget/menue.cpp @@ -626,7 +626,15 @@ void CMenuWidget::paint() if (neededWidth > width - 48) width = w_max(neededWidth + 49, 0); - int hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); + int hiconheight = 0, hiconoffset = 0; + if (!iconfile.empty()) + { + int iconw; + frameBuffer->getIconSize(iconfile.c_str(), &iconw, &hiconheight); + hiconoffset = 8 + iconw; + } + + int hheight = std::max(hiconheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); int itemHeightTotal=0; int heightCurrPage=0; @@ -680,15 +688,9 @@ void CMenuWidget::paint() frameBuffer->paintBoxRel(x, y + height - ((c_rad_mid * 2) + 1) + (c_rad_mid / 3 * 2), width + sb_width, ((c_rad_mid * 2) + 1), COL_MENUCONTENT_PLUS_0, c_rad_mid, CORNER_BOTTOM); frameBuffer->paintBoxRel(x, y, width + sb_width, hheight, COL_MENUHEAD_PLUS_0, c_rad_mid, CORNER_TOP); - int head_iconoffset = 0; if (!iconfile.empty()) - { - int iconw, iconh; - frameBuffer->getIconSize(iconfile.c_str(), &iconw, &iconh); - frameBuffer->paintIcon(iconfile, x + 8, y + hheight / 2 - iconh / 2); - head_iconoffset = 8 + iconw; - } - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + head_iconoffset + 10, y + hheight + 2, width - head_iconoffset - 10, nameString.c_str(), COL_MENUHEAD, 0, true); // UTF-8 + frameBuffer->paintIcon(iconfile, x + 8, y + hheight / 2 - hiconheight / 2); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + hiconoffset + 10, y + hheight + 2, width - hiconoffset - 10, nameString.c_str(), COL_MENUHEAD, 0, true); // UTF-8 item_start_y = y+hheight; paintItems(); diff --git a/tuxbox/neutrino/src/gui/widget/msgbox.cpp b/tuxbox/neutrino/src/gui/widget/msgbox.cpp index 8b76a5d..0a2b1ba 100644 --- a/tuxbox/neutrino/src/gui/widget/msgbox.cpp +++ b/tuxbox/neutrino/src/gui/widget/msgbox.cpp @@ -98,10 +98,21 @@ CMsgBox::CMsgBox(const char *text, //TRACE("->CMsgBox::CMsgBox\r\n"); initVar(); - if(title != NULL) m_cTitle = title; - if(fontTitle != NULL) m_pcFontTitle = fontTitle; - if(icon != NULL) m_cIcon = icon; - if(position != NULL) m_cBoxFrame = *position; + if(title != NULL) + m_cTitle = title; + if(fontTitle != NULL) + { + m_pcFontTitle = fontTitle; + m_nFontTitleHeight = fontTitle->getHeight(); + } + if(icon != NULL) + { + m_cIcon = icon; + frameBuffer->getIconSize(icon, &m_nTitleIconWidth, &m_nTitleIconHeight); + m_nFontTitleHeight = std::max(m_nTitleIconHeight, m_nFontTitleHeight); + } + if(position != NULL) + m_cBoxFrame = *position; m_nMode = _mode; //TRACE(" CMsgBox::cText: %d ,m_cTitle %d,m_nMode %d\t\r\n",strlen(text),m_cTitle.size(),m_nMode); @@ -445,13 +456,11 @@ void CMsgBox::refreshTitle(void) if (!m_cIcon.empty()) { // draw icon and title text - int iconw, iconh; - CFrameBuffer::getInstance()->getIconSize(m_cIcon.c_str(), &iconw, &iconh); - m_pcWindow->paintIcon(m_cIcon.c_str(), m_cBoxFrameTitleRel.iX + 8, m_cBoxFrameTitleRel.iY + m_cBoxFrameTitleRel.iHeight / 2 - iconh / 2); + m_pcWindow->paintIcon(m_cIcon.c_str(), m_cBoxFrameTitleRel.iX + 8, m_cBoxFrameTitleRel.iY + m_cBoxFrameTitleRel.iHeight / 2 - m_nTitleIconHeight / 2); m_pcWindow->RenderString( m_pcFontTitle, - m_cBoxFrameTitleRel.iX + 8 + iconw + TEXT_BORDER_WIDTH, + m_cBoxFrameTitleRel.iX + 8 + m_nTitleIconWidth + TEXT_BORDER_WIDTH, m_cBoxFrameTitleRel.iHeight + 2, - m_cBoxFrameTitleRel.iWidth - 8 - iconw - TEXT_BORDER_WIDTH, + m_cBoxFrameTitleRel.iWidth - 8 - m_nTitleIconWidth - TEXT_BORDER_WIDTH, m_cTitle.c_str(), (CFBWindow::color_t)COL_MENUHEAD, 0, diff --git a/tuxbox/neutrino/src/gui/widget/msgbox.h b/tuxbox/neutrino/src/gui/widget/msgbox.h index 7307ed9..0bb11fb 100644 --- a/tuxbox/neutrino/src/gui/widget/msgbox.h +++ b/tuxbox/neutrino/src/gui/widget/msgbox.h @@ -116,6 +116,8 @@ class CMsgBox Font* m_pcFontTitle; int m_nFontTitleHeight; + int m_nTitleIconWidth; + int m_nTitleIconHeight; Font* m_pcFontFoot; int m_nFontFootHeight; diff --git a/tuxbox/neutrino/src/gui/widget/stringinput.cpp b/tuxbox/neutrino/src/gui/widget/stringinput.cpp index 886b2b1..a2fd32f 100644 --- a/tuxbox/neutrino/src/gui/widget/stringinput.cpp +++ b/tuxbox/neutrino/src/gui/widget/stringinput.cpp @@ -64,7 +64,10 @@ CStringInput::CStringInput(const neutrino_locale_t Name, char* Value, int Size, hint_1 = Hint_1; hint_2 = Hint_2; validchars = Valid_Chars; + iconfile = Icon ? Icon : ""; + hiconheight = 0; + hiconoffset = 0; observ = Observ; } @@ -87,7 +90,10 @@ CStringInput::CStringInput(const neutrino_locale_t Name, std::string* Value, int hint_1 = Hint_1; hint_2 = Hint_2; validchars = Valid_Chars; + iconfile = Icon ? Icon : ""; + hiconheight = 0; + hiconoffset = 0; observ = Observ; } @@ -108,12 +114,17 @@ void CStringInput::init() width = 420; int neededWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(name), true); // UTF-8 - if (!(iconfile.empty())) - neededWidth += 28; + if (!iconfile.empty()) + { + int iconw; + frameBuffer->getIconSize(iconfile.c_str(), &iconw, &hiconheight); + hiconoffset = 8 + iconw; + neededWidth += hiconoffset; + } if (neededWidth+20> width) width = neededWidth+20; - hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); + hheight = std::max(hiconheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); iheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getHeight(); @@ -456,22 +467,14 @@ const char * CStringInput::getHint1(void) void CStringInput::paint() { - int iconoffset, c_rad_mid = RADIUS_MID; + int c_rad_mid = RADIUS_MID; frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, c_rad_mid, CORNER_TOP); frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, c_rad_mid, CORNER_BOTTOM); - if (!(iconfile.empty())) - { - int iconw, iconh; - frameBuffer->getIconSize(iconfile.c_str(), &iconw, &iconh); - frameBuffer->paintIcon(iconfile, x + 8, y + hheight / 2 - iconh / 2); - iconoffset = 8 + iconw; - } - else - iconoffset = 0; - - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + iconoffset + 10, y + hheight + 2, width - iconoffset - 10, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 + if (!iconfile.empty()) + frameBuffer->paintIcon(iconfile, x + 8, y + hheight / 2 - hiconheight / 2); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + hiconoffset + 10, y + hheight + 2, width - hiconoffset - 10, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 if (hint_1 != NONEXISTANT_LOCALE) { diff --git a/tuxbox/neutrino/src/gui/widget/stringinput.h b/tuxbox/neutrino/src/gui/widget/stringinput.h index 403cab4..16c5665 100644 --- a/tuxbox/neutrino/src/gui/widget/stringinput.h +++ b/tuxbox/neutrino/src/gui/widget/stringinput.h @@ -50,6 +50,8 @@ class CStringInput : public CMenuTarget int width; int height; int hheight; // head font height + int hiconheight; + int hiconoffset; int mheight; // menu font height int iheight; ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/gui/audioplayer.cpp | 12 ++++---- tuxbox/neutrino/src/gui/audioplayer.h | 2 + tuxbox/neutrino/src/gui/bookmarkmanager.cpp | 12 +++---- tuxbox/neutrino/src/gui/bookmarkmanager.h | 2 + tuxbox/neutrino/src/gui/channellist.cpp | 8 ----- tuxbox/neutrino/src/gui/moviebrowser.cpp | 13 ++++---- tuxbox/neutrino/src/gui/moviebrowser.h | 2 + tuxbox/neutrino/src/gui/pictureviewer.cpp | 13 +++----- tuxbox/neutrino/src/gui/pictureviewer.h | 2 + tuxbox/neutrino/src/gui/pluginlist.cpp | 27 +++++++++-------- tuxbox/neutrino/src/gui/pluginlist.h | 3 ++ tuxbox/neutrino/src/gui/timerlist.cpp | 11 +++---- tuxbox/neutrino/src/gui/timerlist.h | 2 + tuxbox/neutrino/src/gui/upnpbrowser.cpp | 17 +++++------ tuxbox/neutrino/src/gui/upnpbrowser.h | 2 + tuxbox/neutrino/src/gui/widget/hintbox.cpp | 35 ++++++++++++----------- tuxbox/neutrino/src/gui/widget/hintbox.h | 2 + tuxbox/neutrino/src/gui/widget/hintboxext.cpp | 36 ++++++++++++----------- tuxbox/neutrino/src/gui/widget/hintboxext.h | 2 + tuxbox/neutrino/src/gui/widget/menue.cpp | 20 +++++++------ tuxbox/neutrino/src/gui/widget/msgbox.cpp | 27 ++++++++++++------ tuxbox/neutrino/src/gui/widget/msgbox.h | 2 + tuxbox/neutrino/src/gui/widget/stringinput.cpp | 33 ++++++++++++---------- tuxbox/neutrino/src/gui/widget/stringinput.h | 2 + 24 files changed, 157 insertions(+), 130 deletions(-) -- Tuxbox-GIT: apps |
From: Thilo G. <tux...@ne...> - 2013-05-09 19:13:55
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via d6bcf33965d34cb70960f271e687ce87541fa6e4 (commit) from 76fec7853d6086cbcca771c9f11e6d6259db6523 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d6bcf33965d34cb70960f271e687ce87541fa6e4 Author: Christian Schuett <Gau...@ho...> Date: Thu May 9 21:04:24 2013 +0200 Neutrino: add shadow to games and scripts menu and ... ... fix scrollbar visibility Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/pluginlist.cpp b/tuxbox/neutrino/src/gui/pluginlist.cpp index cc46e71..90373ed 100644 --- a/tuxbox/neutrino/src/gui/pluginlist.cpp +++ b/tuxbox/neutrino/src/gui/pluginlist.cpp @@ -203,7 +203,7 @@ int CPluginList::exec(CMenuTarget* parent, const std::string & /*actionKey*/) void CPluginList::hide() { int c_rad_mid = RADIUS_MID; - frameBuffer->paintBackgroundBoxRel(x, y, width + 15, height + ((c_rad_mid * 2) + 1)); + frameBuffer->paintBackgroundBoxRel(x, y, width + sb_width + SHADOW_OFFSET, height + (c_rad_mid / 3 * 2) + SHADOW_OFFSET); } void CPluginList::paintItem(int pos) @@ -255,15 +255,7 @@ void CPluginList::paintItem(int pos) void CPluginList::paintHead() { - int sb_width = 0; - if(listmaxshow <= pluginlist.size()+1) - sb_width=15; - - int c_rad_mid = RADIUS_MID; - - frameBuffer->paintBoxRel(x, y + height - ((c_rad_mid * 2) + 1) + (c_rad_mid / 3 * 2), width + sb_width, ((c_rad_mid * 2) + 1), COL_MENUCONTENT_PLUS_0, c_rad_mid, CORNER_BOTTOM); - frameBuffer->paintBoxRel(x, y, width + sb_width, theight, COL_MENUHEAD_PLUS_0, c_rad_mid, CORNER_TOP); - frameBuffer->paintBoxRel(x, y + theight, width, height- theight - ((c_rad_mid * 2) + 1) + (c_rad_mid / 3 * 2), COL_MENUCONTENT_PLUS_0); + frameBuffer->paintBoxRel(x, y, width + sb_width, theight, COL_MENUHEAD_PLUS_0, RADIUS_MID, CORNER_TOP); int iconoffset = 0; if(pluginlisttype == CPlugins::P_TYPE_GAME) @@ -284,7 +276,8 @@ void CPluginList::paintHead() void CPluginList::paint() { - hide(); + int c_rad_mid = RADIUS_MID; + width = w_max (500, 100); height = h_max (526, 50); theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); @@ -295,20 +288,24 @@ void CPluginList::paint() // listmaxshow = (height-theight-0)/fheight; height = theight+0+listmaxshow*fheight; // recalc height - x = getScreenStartX (width); - y = getScreenStartY (height); - - liststart = (selected/listmaxshow)*listmaxshow; + sb_width = (pluginlist.size() > listmaxshow) ? 15 : 0; + x = getScreenStartX(width + sb_width); + y = getScreenStartY(height + (c_rad_mid / 3 * 2)); + + liststart = (selected/listmaxshow)*listmaxshow; CLCD::getInstance()->setMode(CLCD::MODE_MENU_UTF8, g_Locale->getText(name)); + frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width + sb_width, height + (c_rad_mid / 3 * 2), COL_MENUCONTENTDARK_PLUS_0, c_rad_mid); + frameBuffer->paintBoxRel(x, y + height - ((c_rad_mid * 2) + 1) + (c_rad_mid / 3 * 2), width + sb_width, ((c_rad_mid * 2) + 1), COL_MENUCONTENT_PLUS_0, c_rad_mid, CORNER_BOTTOM); + paintHead(); paintItems(); } void CPluginList::paintItems() { - if(listmaxshow <= pluginlist.size()+1) + if(pluginlist.size() > listmaxshow) { // Scrollbar int nrOfPages = ((pluginlist.size()-1) / listmaxshow)+1; @@ -345,9 +342,9 @@ void CPluginList::updateSelection(unsigned int newpos) CPluginList::result_ CPluginList::pluginSelected() { g_PluginList->startPlugin(pluginlist[selected]->number); + hide(); if (!g_PluginList->getScriptOutput().empty()) { - hide(); ShowMsgUTF(LOCALE_PLUGINS_RESULT, Latin1_to_UTF8(g_PluginList->getScriptOutput()), CMessageBox::mbrBack,CMessageBox::mbBack,NEUTRINO_ICON_SHELL); } diff --git a/tuxbox/neutrino/src/gui/pluginlist.h b/tuxbox/neutrino/src/gui/pluginlist.h index 23eeab7..c721108 100644 --- a/tuxbox/neutrino/src/gui/pluginlist.h +++ b/tuxbox/neutrino/src/gui/pluginlist.h @@ -73,6 +73,7 @@ class CPluginList : public CMenuTarget int fheight1,fheight2; int width; + int sb_width; int height; int x; int y; ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/gui/pluginlist.cpp | 31 ++++++++++++++----------------- tuxbox/neutrino/src/gui/pluginlist.h | 1 + 2 files changed, 15 insertions(+), 17 deletions(-) -- Tuxbox-GIT: apps |
From: Thilo G. <tux...@ne...> - 2013-05-09 18:06:21
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 76fec7853d6086cbcca771c9f11e6d6259db6523 (commit) via 4f495f8890d473467c0ca82a93feefc4a6619f5f (commit) via 6fdce193e126b597d767c9147b4766e9612a2bb2 (commit) from 3883256691d2c786e72622a986a6aa57a78c5e28 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 76fec7853d6086cbcca771c9f11e6d6259db6523 Author: GetAway <get...@t-...> Date: Thu May 9 17:56:26 2013 +0200 menu.cpp: clean only the width that has been drawn Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp index d73152c..a39fd47 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.cpp +++ b/tuxbox/neutrino/src/gui/widget/menue.cpp @@ -606,7 +606,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) void CMenuWidget::hide() { - frameBuffer->paintBackgroundBoxRel(x, y, width + 15 + SHADOW_OFFSET, height + (CORNER_RADIUS_MID / 3 * 2) + SHADOW_OFFSET); + frameBuffer->paintBackgroundBoxRel(x, y, width + sb_width + SHADOW_OFFSET, height + (CORNER_RADIUS_MID / 3 * 2) + SHADOW_OFFSET); /* x = -1 is a marker which prevents the item from being painted on setActive changes */ for (unsigned int count = 0; count < items.size(); count++) @@ -669,11 +669,7 @@ void CMenuWidget::paint() if(hheight+itemHeightTotal < height) height=hheight+itemHeightTotal; - int sb_width; - if(total_pages > 1) - sb_width=15; - else - sb_width=0; + sb_width = (total_pages > 1) ? 15 : 0; int c_rad_mid = RADIUS_MID; diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h index be6de3d..1a0de0a 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.h +++ b/tuxbox/neutrino/src/gui/widget/menue.h @@ -307,6 +307,7 @@ class CMenuWidget : public CMenuTarget std::string iconfile; int width; + int sb_width; int height; int wanted_height; int x; commit 4f495f8890d473467c0ca82a93feefc4a6619f5f Author: Christian Schuett <Gau...@ho...> Date: Thu May 9 15:10:39 2013 +0200 Neutrino: always calculate button bar height and ... ... consider it when calculating start pos Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_bouquets.cpp b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_bouquets.cpp index 428c217..cfabcf4 100644 --- a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -144,9 +144,10 @@ struct button_label CBEBouquetWidgetButtons1[5] = void CBEBouquetWidget::paintFoot() { - frameBuffer->paintBoxRel(x,y+height, width,ButtonHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); + int fy = y + height - ButtonHeight; + int ButtonWidth = (width - 10) / 5; + frameBuffer->paintBoxRel(x, fy, width, ButtonHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); // frameBuffer->paintHLine(x, x+width, y, COL_INFOBAR_SHADOW_PLUS_0); - switch( blueFunction) { case beRename: @@ -159,12 +160,12 @@ void CBEBouquetWidget::paintFoot() CBEBouquetWidgetButtons1[4].locale = LOCALE_BOUQUETEDITOR_LOCK; break; } - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 5, y + height + 2, (width - 10) / 5, 5, CBEBouquetWidgetButtons1); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 5, fy + 2, ButtonWidth, 5, CBEBouquetWidgetButtons1); } void CBEBouquetWidget::hide() { - frameBuffer->paintBackgroundBoxRel(x,y, width,height+ButtonHeight); + frameBuffer->paintBackgroundBoxRel(x, y, width, height); } void CBEBouquetWidget::updateSelection(unsigned int newpos) @@ -201,13 +202,13 @@ int CBEBouquetWidget::exec(CMenuTarget* parent, const std::string&) int res = menu_return::RETURN_REPAINT; width = w_max (550, 0); - height = h_max (440, 50); + height = h_max (465, 50); - ButtonHeight = 25; + ButtonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 6; theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); - listmaxshow = (height-theight-0)/fheight; - height = theight+0+listmaxshow*fheight; // recalc height + listmaxshow = (height - theight - ButtonHeight - 0) / fheight; + height = theight + ButtonHeight + 0 + listmaxshow * fheight; // recalc height x = getScreenStartX (width); y = getScreenStartY (height); diff --git a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_channels.cpp b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_channels.cpp index 29200b8..4430bb5 100644 --- a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_channels.cpp +++ b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_channels.cpp @@ -141,13 +141,15 @@ const struct button_label CBEChannelWidgetButtons[4] = void CBEChannelWidget::paintFoot() { - frameBuffer->paintBoxRel(x,y+height, width,ButtonHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height, (width - 20) / 4, 4, CBEChannelWidgetButtons); + int fy = y + height - ButtonHeight; + int ButtonWidth = (width - 20) / 4; + frameBuffer->paintBoxRel(x, fy, width, ButtonHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, fy + 2, ButtonWidth, 4, CBEChannelWidgetButtons); } void CBEChannelWidget::hide() { - frameBuffer->paintBackgroundBoxRel(x,y, width,height+ButtonHeight); + frameBuffer->paintBackgroundBoxRel(x, y, width, height); } void CBEChannelWidget::updateSelection(unsigned int newpos) @@ -184,12 +186,12 @@ int CBEChannelWidget::exec(CMenuTarget* parent, const std::string &) int res = menu_return::RETURN_REPAINT; width = w_max (550, 0); - height = h_max (440, 50); - ButtonHeight = 25; + height = h_max (465, 50); + ButtonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 6; theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); - listmaxshow = (height-theight-0)/fheight; - height = theight + 0 + listmaxshow * fheight; // recalc height + listmaxshow = (height - theight - ButtonHeight - 0) / fheight; + height = theight + ButtonHeight + 0 + listmaxshow * fheight; // recalc height x = getScreenStartX (width); y = getScreenStartY (height); diff --git a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_chanselect.cpp b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_chanselect.cpp index ac13741..739d641 100644 --- a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -54,14 +54,13 @@ CBEChannelSelectWidget::CBEChannelSelectWidget(const std::string & Caption, unsi bouquet = Bouquet; mode = Mode; - width = w_max (550, 0); - height = h_max (440, 50); - ButtonHeight = 25; - + width = w_max (550, 0); + height = h_max (465, 50); + ButtonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 6; theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); - listmaxshow = (height-theight-0)/fheight; - height = theight+0+listmaxshow*fheight; // recalc height + listmaxshow = (height - theight - ButtonHeight - 0) / fheight; + height = theight + ButtonHeight + 0 + listmaxshow * fheight; // recalc height x = getScreenStartX (width); y = getScreenStartY (height); liststart = 0; @@ -168,8 +167,8 @@ const struct button_label CBEBouquetSelectWidgetButtons[2] = void CBEChannelSelectWidget::paintFoot() { - int y_foot = y + height; + int y_foot = y + height - ButtonHeight; + int ButtonWidth = (width - 10) / 2; frameBuffer->paintBoxRel(x, y_foot, width, ButtonHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); - - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 5, y_foot, (width - 10) / 2, 2, CBEBouquetSelectWidgetButtons); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 5, y_foot + 2, ButtonWidth, 2, CBEBouquetSelectWidgetButtons); } diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp index 8bd46ff..66b2ef0 100644 --- a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp +++ b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp @@ -442,15 +442,12 @@ const struct button_label BookmarkmanagerButtonOK[1] = //------------------------------------------------------------------------ void CBookmarkManager::paintFoot() { + int y_foot = y + height - footHeight; int ButtonWidth = (width - 20) / 4; - - frameBuffer->paintBoxRel(x, y + height - footHeight, width, footHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + width - 1 * ButtonWidth, y + height - footHeight, ButtonWidth, 1, BookmarkmanagerButtonOK); - + frameBuffer->paintBoxRel(x, y_foot, width, footHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + width - 1 * ButtonWidth, y_foot, ButtonWidth, 1, BookmarkmanagerButtonOK); if (!bookmarks.empty()) - { - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height - footHeight, ButtonWidth, 2, BookmarkmanagerButtons); - } + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y_foot, ButtonWidth, 2, BookmarkmanagerButtons); } //------------------------------------------------------------------------ diff --git a/tuxbox/neutrino/src/gui/bouquetlist.cpp b/tuxbox/neutrino/src/gui/bouquetlist.cpp index 9f0a62e..3a28a1f 100644 --- a/tuxbox/neutrino/src/gui/bouquetlist.cpp +++ b/tuxbox/neutrino/src/gui/bouquetlist.cpp @@ -168,14 +168,15 @@ int CBouquetList::show() int res = -1; width = w_max (500, 0); - height = h_max (440, 40); + height = h_max (465, 40); theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); - listmaxshow = (height-theight-0)/fheight; - height = theight + listmaxshow * fheight; // recalc height + footHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 6; + listmaxshow = (height - theight - footHeight - 0) / fheight; + height = theight + footHeight + listmaxshow * fheight; // recalc height x = getScreenStartX (width); - y = getScreenStartY (height) - theight/2; + y = getScreenStartY (height); if (Bouquets.empty()) { @@ -305,7 +306,7 @@ int CBouquetList::show() void CBouquetList::hide() { - frameBuffer->paintBackgroundBoxRel(x, y, width, height + theight); + frameBuffer->paintBackgroundBoxRel(x, y, width, height); } void CBouquetList::paintItem(int pos) @@ -394,11 +395,10 @@ void CBouquetList::paint() frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); //footbar - int fy = y + theight + listmaxshow * fheight ; + int fy = y + height - footHeight; int ButtonWith = (width - 8) / 3; - int icony = fy + theight / 2 - 12; - frameBuffer->paintBoxRel(x, fy, width, theight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 4, icony, ButtonWith, 6, CBouquetListButtons); + frameBuffer->paintBoxRel(x, fy, width, footHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 4, fy + 2, ButtonWith, 6, CBouquetListButtons); } void CBouquetList::updateSelection(unsigned int newpos) diff --git a/tuxbox/neutrino/src/gui/bouquetlist.h b/tuxbox/neutrino/src/gui/bouquetlist.h index 468ccba..a541c3c 100644 --- a/tuxbox/neutrino/src/gui/bouquetlist.h +++ b/tuxbox/neutrino/src/gui/bouquetlist.h @@ -83,6 +83,7 @@ class CBouquetList unsigned int maxpos; int fheight; // Fonthoehe Bouquetlist-Inhalt int theight; // Fonthoehe Bouquetlist-Titel + int footHeight; int width; int height; diff --git a/tuxbox/neutrino/src/gui/epgview.cpp b/tuxbox/neutrino/src/gui/epgview.cpp index 1d9f964..96ed31f 100644 --- a/tuxbox/neutrino/src/gui/epgview.cpp +++ b/tuxbox/neutrino/src/gui/epgview.cpp @@ -125,16 +125,18 @@ void CEpgData::start() /* This defines the size of the EPG window. We leave 35 pixels left and right, * 25 pixels top and bottom. It adjusts itself to the "visible screen" settings */ - ox = w_max (768, 70); - oy = h_max (576, 50 + 30); // 30 for the bottom button box. + ox = w_max (720, 70); + oy = h_max (576, 50); topheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->getHeight(); topboxheight = topheight + 6; botheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight(); botboxheight = botheight + 6; + buttonheight = std::max(16, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()) + BUTTONBAR_FONT_OFFSET; sx = getScreenStartX (ox); - sy = getScreenStartY (oy) - 30/2; + sy = getScreenStartY (oy); + oy -= buttonheight; /* this is the text box height - and the height of the scroll bar */ sb = oy - topboxheight - botboxheight; medlineheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight(); @@ -457,9 +459,6 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_ startzeit=*a_startzeit; id=a_id; - int height = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight(); - int fheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + BUTTONBAR_FONT_OFFSET; - GetEPGData(channel_id, id, &startzeit ); if (doLoop) { @@ -636,11 +635,11 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_ { if( tags[i].streamContent == 1 && (tags[i].componentType == 2 || tags[i].componentType == 3) ) { - frameBuffer->paintIcon(NEUTRINO_ICON_16_9, ox + sx - (ICON_LARGE_WIDTH + 2 ) - (ICON_LARGE_WIDTH + 2) - 4, sy + oy + (fheight >> 1) - (ICON_HEIGHT >> 1)); + frameBuffer->paintIcon(NEUTRINO_ICON_16_9, ox + sx - (ICON_LARGE_WIDTH + 2 ) - (ICON_LARGE_WIDTH + 2) - 4, sy + oy + (buttonheight >> 1) - (ICON_HEIGHT >> 1)); } else if( tags[i].streamContent == 2 && tags[i].componentType == 5 ) { - frameBuffer->paintIcon(NEUTRINO_ICON_DD, ox + sx - (ICON_LARGE_WIDTH + 2) - 4, sy + oy + (fheight >> 1) - (ICON_HEIGHT >> 1)); + frameBuffer->paintIcon(NEUTRINO_ICON_DD, ox + sx - (ICON_LARGE_WIDTH + 2) - 4, sy + oy + (buttonheight >> 1) - (ICON_HEIGHT >> 1)); } } } @@ -648,7 +647,7 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_ if ( epg_done!= -1 ) //show event progressbar { CProgressBar pb(true, -1, -1, 100, 0, 0, true); //only green color - pb.paintProgressBarDefault (sx + 10 + widthl + 10 + ((ox-104-widthr-widthl-10-10-20)>>1), sy+oy-height, 104, height-6, epg_done, 100); + pb.paintProgressBarDefault (sx + 10 + widthl + 10 + ((ox-104-widthr-widthl-10-10-20)>>1), sy+oy-botheight, 104, botheight-6, epg_done, 100); } GetPrevNextEPGData( epgData.eventID, &epgData.epg_times.startzeit ); @@ -874,7 +873,7 @@ void CEpgData::hide() } frameBuffer->paintBackgroundBoxRel(sx, sy, ox, oy); - showTimerEventBar (false); + showTimerEventBar(false); } void CEpgData::GetEPGData(const t_channel_id channel_id, unsigned long long id, time_t* startzeit ) @@ -1009,17 +1008,16 @@ const struct button_label epgviewButtons[3] = void CEpgData::showTimerEventBar(bool _show) { int ButtonWidth = (ox - 16) / 4; // 4 cells - int fheight = std::max(16, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()) + BUTTONBAR_FONT_OFFSET; - int by = sy + oy + (fheight >> 3) - 1; + int by = sy + oy + 2; // hide only? if (! _show) { - frameBuffer->paintBackgroundBoxRel(sx, sy + oy, ox, fheight); + frameBuffer->paintBackgroundBoxRel(sx, sy + oy, ox, buttonheight); return; } - frameBuffer->paintBoxRel(sx, sy + oy, ox, fheight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); + frameBuffer->paintBoxRel(sx, sy + oy, ox, buttonheight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); // Button: Timer Record & Channelswitch if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) diff --git a/tuxbox/neutrino/src/gui/epgview.h b/tuxbox/neutrino/src/gui/epgview.h index 5d8872e..43356f2 100644 --- a/tuxbox/neutrino/src/gui/epgview.h +++ b/tuxbox/neutrino/src/gui/epgview.h @@ -75,6 +75,7 @@ class CEpgData std::vector<epg_pair> epgText; int topheight,topboxheight; int botheight,botboxheight; + int buttonheight; int medlineheight,medlinecount; bool bigFonts; diff --git a/tuxbox/neutrino/src/gui/imageinfo.cpp b/tuxbox/neutrino/src/gui/imageinfo.cpp index 177a9f9..e44739d 100644 --- a/tuxbox/neutrino/src/gui/imageinfo.cpp +++ b/tuxbox/neutrino/src/gui/imageinfo.cpp @@ -534,8 +534,9 @@ const struct button_label CImageInfoButtons[5] = void CImageInfo::paintFoot(int xf, int yf) { + int ButtonWidth = (width - 10) / 5; frameBuffer->paintBoxRel(xf, yf, width, ssheight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, xf + 5, yf, (width - 10) / 5, 5, CImageInfoButtons); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, xf + 5, yf, ButtonWidth, 5, CImageInfoButtons); } void CImageInfo::paint() diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp index 32821f4..698a675 100644 --- a/tuxbox/neutrino/src/gui/timerlist.cpp +++ b/tuxbox/neutrino/src/gui/timerlist.cpp @@ -768,14 +768,13 @@ const struct button_label TimerListButtons[5] = void CTimerList::paintFoot() { + int y_foot = y + height - footHeight; int ButtonWidth = (width - 20) / 5; - - frameBuffer->paintBoxRel(x, y + height - footHeight, width, footHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); - + frameBuffer->paintBoxRel(x, y_foot, width, footHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); if (timerlist.empty()) - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10 + ButtonWidth, y + height - footHeight, ButtonWidth, 3, &(TimerListButtons[1])); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10 + ButtonWidth, y_foot, ButtonWidth, 3, &(TimerListButtons[1])); else - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height - footHeight, ButtonWidth, 5, TimerListButtons); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y_foot, ButtonWidth, 5, TimerListButtons); } void CTimerList::paint() diff --git a/tuxbox/neutrino/src/gui/widget/listbox.cpp b/tuxbox/neutrino/src/gui/widget/listbox.cpp index 8111d98..79ad79f 100644 --- a/tuxbox/neutrino/src/gui/widget/listbox.cpp +++ b/tuxbox/neutrino/src/gui/widget/listbox.cpp @@ -40,13 +40,13 @@ CListBox::CListBox(const char * const Caption) liststart = 0; selected = 0; width = w_max (400, 100); - height = h_max (420, 0); - ButtonHeight = 25; + height = h_max (445, 0); + ButtonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 6; modified = false; theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); - listmaxshow = (height-theight-0)/fheight; - height = theight+0+listmaxshow*fheight; // recalc height + listmaxshow = (height - theight - ButtonHeight - 0) / fheight; + height = theight + ButtonHeight + 0 + listmaxshow * fheight; // recalc height x = getScreenStartX (width); y = getScreenStartY (height); } @@ -58,7 +58,7 @@ void CListBox::setModified(void) void CListBox::paint() { - int c_rad_small = RADIUS_SMALL;; + int c_rad_small = RADIUS_SMALL; liststart = (selected/listmaxshow)*listmaxshow; int ypos = y+ theight; int sb = fheight* listmaxshow; @@ -85,21 +85,23 @@ void CListBox::paintHead() void CListBox::paintFoot() { + int y_foot = y + height - ButtonHeight; + int y_text = y + height - 2; int ButtonWidth = width / 4; - frameBuffer->paintBoxRel(x,y+height, width,ButtonHeight, COL_MENUHEAD_PLUS_0); + frameBuffer->paintBoxRel(x, y_foot, width, ButtonHeight, COL_MENUHEAD_PLUS_0); frameBuffer->paintHLine(x, x+width, y, COL_INFOBAR_SHADOW_PLUS_0); - frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x+width- 4* ButtonWidth+ 8, y+height+1); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width- 4* ButtonWidth+ 38, y+height+24 - 2, width, "edit", COL_INFOBAR); + frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x + width - 4 * ButtonWidth + 8, y_foot + 1); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + width - 4 * ButtonWidth + 38, y_text, width, "edit", COL_INFOBAR); - frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, x+width- 3* ButtonWidth+ 8, y+height+4); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width- 3* ButtonWidth+ 29, y+height+24 - 2, width- 26, "add", COL_INFOBAR); + frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, x + width - 3 * ButtonWidth + 8, y_foot + 4); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + width - 3 * ButtonWidth + 29, y_text, width - 26, "add", COL_INFOBAR); - frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RED, x+width- 2* ButtonWidth+ 8, y+height+4); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width- 2* ButtonWidth+ 29, y+height+24 - 2, width- 26, "remove", COL_INFOBAR); + frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RED, x + width - 2 * ButtonWidth + 8, y_foot + 4); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + width - 2 * ButtonWidth + 29, y_text, width - 26, "remove", COL_INFOBAR); - frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HOME, x+width - ButtonWidth+ 8, y+height+1); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width - ButtonWidth+ 38, y+height+24 - 2, width, "ready", COL_INFOBAR); + frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HOME, x + width - ButtonWidth + 8, y_foot + 1); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x + width - ButtonWidth + 38, y_text, width, "ready", COL_INFOBAR); } void CListBox::paintItem(int pos) @@ -109,7 +111,7 @@ void CListBox::paintItem(int pos) void CListBox::hide() { - frameBuffer->paintBackgroundBoxRel(x,y, width,height+ButtonHeight); + frameBuffer->paintBackgroundBoxRel(x, y, width, height); } void CListBox::updateSelection(unsigned int newpos) diff --git a/tuxbox/neutrino/src/gui/widget/stringinput.cpp b/tuxbox/neutrino/src/gui/widget/stringinput.cpp index 1adff4b..886b2b1 100644 --- a/tuxbox/neutrino/src/gui/widget/stringinput.cpp +++ b/tuxbox/neutrino/src/gui/widget/stringinput.cpp @@ -671,19 +671,20 @@ const struct button_label CStringInputSMSButtons[2] = void CStringInputSMS::paint() { - height+=260; - y = ((500-height)>>1); + int iconw, iconh; + frameBuffer->getIconSize(NEUTRINO_ICON_NUMERIC_PAD, &iconw, &iconh); + int ButtonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 6; + height += iheight + 30 + iconh + 25 + ButtonHeight; + y = getScreenStartY(height); CStringInput::paint(); - int iconw, iconh; - frameBuffer->getIconSize(NEUTRINO_ICON_NUMERIC_PAD, &iconw, &iconh); frameBuffer->paintIcon(NEUTRINO_ICON_NUMERIC_PAD, x + width / 2 - iconw / 2, y + hheight + mheight + iheight * 3 + 30, COL_MENUCONTENT); - int c_rad_mid = RADIUS_MID; - frameBuffer->paintBoxRel(x, y + height - 25, width, 25, COL_INFOBAR_SHADOW_PLUS_1, c_rad_mid, CORNER_BOTTOM); - - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 8, y + height - 25, (width - 16) / 2, 2, CStringInputSMSButtons); + int y_foot = y + height - ButtonHeight; + int ButtonWidth = (width - 16) / 2; + frameBuffer->paintBoxRel(x, y_foot, width, ButtonHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 8, y_foot + 2, ButtonWidth, 2, CStringInputSMSButtons); } void CPINInput::paintChar(int pos) commit 6fdce193e126b597d767c9147b4766e9612a2bb2 Author: Christian Schuett <Gau...@ho...> Date: Sun May 5 19:40:08 2013 +0200 Neutrino: fix height calculation in bookmark manager and timer list Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp index 30da28a..8bd46ff 100644 --- a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp +++ b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp @@ -53,8 +53,6 @@ #include <sys/types.h> #include <unistd.h> -#define info_height 60 - #include <driver/screen_max.h> CBookmark::CBookmark(const std::string & inName, const std::string & inUrl, const std::string & inTime) @@ -235,15 +233,17 @@ const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent) frameBuffer->getIconSize(NEUTRINO_ICON_BOOKMARKMANAGER, &iconw, &iconh); theight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); + frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_OKAY, &iconw, &iconh); + footHeight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()); liststart = 0; - height = h_max(576, info_height+50); - listmaxshow = (height-theight-0)/(fheight*2); - height = theight+0+listmaxshow*fheight*2; // recalc height + height = h_max(576, 50); + listmaxshow = (height-theight-footHeight-0)/(fheight*2); + height = theight+footHeight+0+listmaxshow*fheight*2; // recalc height if(bookmarks.size() < listmaxshow) { listmaxshow=bookmarks.size(); - height = theight+0+listmaxshow*fheight*2; // recalc height + height = theight+footHeight+0+listmaxshow*fheight*2; // recalc height } if (!bookmarks.empty() && selected==bookmarks.size()) { @@ -251,7 +251,7 @@ const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent) liststart = (selected/listmaxshow)*listmaxshow; } x = getScreenStartX (width); - y = getScreenStartY (height + info_height); + y = getScreenStartY (height); int res = -1; @@ -403,7 +403,7 @@ void CBookmarkManager::hide() { if(visible) { - frameBuffer->paintBackgroundBoxRel(x, y, width, height+ info_height+ 5); + frameBuffer->paintBackgroundBoxRel(x, y, width, height); visible = false; } } @@ -443,16 +443,13 @@ const struct button_label BookmarkmanagerButtonOK[1] = void CBookmarkManager::paintFoot() { int ButtonWidth = (width - 20) / 4; - int iconw = 0, iconh = 0; - frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_OKAY, &iconw, &iconh); - int footHeight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()); - frameBuffer->paintBoxRel(x, y + height, width, footHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + width - 1 * ButtonWidth, y + height, ButtonWidth, 1, BookmarkmanagerButtonOK); + frameBuffer->paintBoxRel(x, y + height - footHeight, width, footHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + width - 1 * ButtonWidth, y + height - footHeight, ButtonWidth, 1, BookmarkmanagerButtonOK); if (!bookmarks.empty()) { - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height, ButtonWidth, 2, BookmarkmanagerButtons); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height - footHeight, ButtonWidth, 2, BookmarkmanagerButtons); } } diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.h b/tuxbox/neutrino/src/gui/bookmarkmanager.h index 1e351fd..5a13144 100644 --- a/tuxbox/neutrino/src/gui/bookmarkmanager.h +++ b/tuxbox/neutrino/src/gui/bookmarkmanager.h @@ -74,6 +74,7 @@ class CBookmarkManager unsigned int listmaxshow; int fheight; //fontheight timerlist-content (text) int theight; //fontheight timerlist-title + int footHeight; bool visible; int width; int height; diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp index c5b86bb..32821f4 100644 --- a/tuxbox/neutrino/src/gui/timerlist.cpp +++ b/tuxbox/neutrino/src/gui/timerlist.cpp @@ -76,8 +76,6 @@ #include <string.h> #include <algorithm> -#define INFO_HEIGHT 60 - class CTimerListNewNotifier : public CChangeObserver { @@ -414,13 +412,13 @@ void CTimerList::updateEvents(void) sort(timerlist.begin(), timerlist.end()); width = w_max(600, 50); - height = h_max(576, INFO_HEIGHT+50); - listmaxshow = (height-theight-0)/(fheight*2); - height = theight+0+listmaxshow*fheight*2; // recalc height + height = h_max(576, 50); + listmaxshow = (height-theight-footHeight-0)/(fheight*2); + height = theight+footHeight+0+listmaxshow*fheight*2; // recalc height if(timerlist.size() < listmaxshow) { listmaxshow=timerlist.size(); - height = theight+0+listmaxshow*fheight*2; // recalc height + height = theight+footHeight+0+listmaxshow*fheight*2; // recalc height } if (!timerlist.empty() && selected==timerlist.size()) { @@ -429,7 +427,7 @@ void CTimerList::updateEvents(void) } x = getScreenStartX (width); - y = getScreenStartY (height+INFO_HEIGHT); + y = getScreenStartY (height); } @@ -439,6 +437,8 @@ int CTimerList::show() frameBuffer->getIconSize(NEUTRINO_ICON_TIMER, &iconw, &iconh); theight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); + frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_OKAY, &iconw, &iconh); + footHeight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()); time_width = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("00.00. 00:00 "); neutrino_msg_t msg; @@ -572,7 +572,7 @@ void CTimerList::hide() { if(visible) { - frameBuffer->paintBackgroundBoxRel(x, y, width, height+ INFO_HEIGHT+ 5); + frameBuffer->paintBackgroundBoxRel(x, y, width, height); visible = false; } } @@ -769,16 +769,13 @@ const struct button_label TimerListButtons[5] = void CTimerList::paintFoot() { int ButtonWidth = (width - 20) / 5; - int iconw = 0, iconh = 0; - frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_OKAY, &iconw, &iconh); - int footHeight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()); - frameBuffer->paintBoxRel(x, y + height, width, footHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); + frameBuffer->paintBoxRel(x, y + height - footHeight, width, footHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM); if (timerlist.empty()) - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10 + ButtonWidth, y + height, ButtonWidth, 3, &(TimerListButtons[1])); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10 + ButtonWidth, y + height - footHeight, ButtonWidth, 3, &(TimerListButtons[1])); else - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height, ButtonWidth, 5, TimerListButtons); + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height - footHeight, ButtonWidth, 5, TimerListButtons); } void CTimerList::paint() diff --git a/tuxbox/neutrino/src/gui/timerlist.h b/tuxbox/neutrino/src/gui/timerlist.h index 716d613..1cc5b91 100644 --- a/tuxbox/neutrino/src/gui/timerlist.h +++ b/tuxbox/neutrino/src/gui/timerlist.h @@ -51,6 +51,7 @@ class CTimerList : public CMenuTarget unsigned int listmaxshow; int fheight; //fontheight timerlist-content (text) int theight; //fontheight timerlist-title + int footHeight; int time_width; bool visible; ----------------------------------------------------------------------- Summary of changes: .../src/gui/bedit/bouqueteditor_bouquets.cpp | 17 +++++----- .../src/gui/bedit/bouqueteditor_channels.cpp | 16 +++++---- .../src/gui/bedit/bouqueteditor_chanselect.cpp | 17 +++++----- tuxbox/neutrino/src/gui/bookmarkmanager.cpp | 30 +++++++----------- tuxbox/neutrino/src/gui/bookmarkmanager.h | 1 + tuxbox/neutrino/src/gui/bouquetlist.cpp | 18 +++++----- tuxbox/neutrino/src/gui/bouquetlist.h | 1 + tuxbox/neutrino/src/gui/epgview.cpp | 26 +++++++-------- tuxbox/neutrino/src/gui/epgview.h | 1 + tuxbox/neutrino/src/gui/imageinfo.cpp | 3 +- tuxbox/neutrino/src/gui/timerlist.cpp | 28 +++++++---------- tuxbox/neutrino/src/gui/timerlist.h | 1 + tuxbox/neutrino/src/gui/widget/listbox.cpp | 32 ++++++++++--------- tuxbox/neutrino/src/gui/widget/menue.cpp | 8 +---- tuxbox/neutrino/src/gui/widget/menue.h | 1 + tuxbox/neutrino/src/gui/widget/stringinput.cpp | 17 +++++----- 16 files changed, 106 insertions(+), 111 deletions(-) -- Tuxbox-GIT: apps |
From: Thilo G. <tux...@ne...> - 2013-05-09 15:11:32
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 3883256691d2c786e72622a986a6aa57a78c5e28 (commit) via 52d953a06edb764f8a73329b3bc9a0beb0fd0e6d (commit) via 3e53f31c031481add67f8484f6704a75a5f19ae7 (commit) via 12a97d0bcdfd9b4703d2a7f17d47cef199ba6898 (commit) via 4300b7db6bf17a10230723c7cb277896f7f5b863 (commit) via 95bf7f7b7f3dc8054165ee345c92d4a6d95ec2f7 (commit) via e961d3770e829b666d94cd4e7dc3e56137b7400c (commit) via f7903e090f5743c927be0c54cef1a1a21ecaab77 (commit) via 8905942068fdf9645fb7b8d0bd563730c2fb0b8b (commit) via e37333358a0b7bd82a1f56c8e72c79be89917992 (commit) via 0017cdab90a45255cd02ef18baff2c8a40463d20 (commit) via 30f87328e9058060139c4951c07516278f5ccd41 (commit) from 51c9a02e9630fb0744eea7664b6772aca8b6d7f3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3883256691d2c786e72622a986a6aa57a78c5e28 Author: Christian Schuett <Gau...@ho...> Date: Wed May 8 18:23:58 2013 +0200 Neutrino filebrowser: calculate start pos after height recalculation Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp index 2f9ab35..cb5ccc3 100644 --- a/tuxbox/neutrino/src/gui/filebrowser.cpp +++ b/tuxbox/neutrino/src/gui/filebrowser.cpp @@ -384,9 +384,6 @@ void CFileBrowser::commonInit() width = w_max(720, 40); height = h_max(576, 40); - x = getScreenStartX(width); - y = getScreenStartY(height); - theight = fnt_title->getHeight(); fheight = fnt_item->getHeight(); foheight = fnt_small->getHeight()+6; //initial height value for buttonbar; TODO get value from buttonbar @@ -397,6 +394,9 @@ void CFileBrowser::commonInit() //recalc height height = theight + listmaxshow * fheight + 2 * foheight; + x = getScreenStartX(width); + y = getScreenStartY(height); + m_SMSKeyInput.setTimeout(SMSKEY_TIMEOUT); } commit 52d953a06edb764f8a73329b3bc9a0beb0fd0e6d Author: Michael Liebmann <tux...@gm...> Date: Sat May 4 21:53:05 2013 +0200 Neutrino: paint event list alone after the list was sorted Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index 91edf50..148089d 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -355,7 +355,6 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam sort_mode=0; sort(evtlist.begin(),evtlist.end(),sortByDateTime); } - // find selected for ( selected=0 ; selected < evtlist.size(); selected++ ) { @@ -367,10 +366,7 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam liststart=0; else liststart=(selected/listmaxshow)*listmaxshow; - hide(); - paintHead(); paint(); - showFunctionBar(true); } // -- I commented out the following part (code is working) @@ -626,7 +622,6 @@ void EventList::paintItem(unsigned int pos) uint8_t color; fb_pixel_t bgcolor; int ypos = y+ theight+0 + pos*fheight; - std::string datetime1_str, datetime2_str, duration_str; unsigned int curpos = liststart + pos; int c_rad_mid; @@ -653,6 +648,8 @@ void EventList::paintItem(unsigned int pos) if (curpos < evtlist.size()) { + std::string datetime1_str, datetime2_str, duration_str; + if (evtlist[curpos].eventID != 0) { char tmpstr[256]; commit 3e53f31c031481add67f8484f6704a75a5f19ae7 Author: Christian Schuett <Gau...@ho...> Date: Sat May 4 20:50:50 2013 +0200 Neutrino CMenuWidget: consider rounded corners when calculating start pos Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp index bc30353..d73152c 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.cpp +++ b/tuxbox/neutrino/src/gui/widget/menue.cpp @@ -606,7 +606,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) void CMenuWidget::hide() { - frameBuffer->paintBackgroundBoxRel(x, y, width + 15 + SHADOW_OFFSET, height + CORNER_RADIUS_MID * 2 + 1 + SHADOW_OFFSET); + frameBuffer->paintBackgroundBoxRel(x, y, width + 15 + SHADOW_OFFSET, height + (CORNER_RADIUS_MID / 3 * 2) + SHADOW_OFFSET); /* x = -1 is a marker which prevents the item from being painted on setActive changes */ for (unsigned int count = 0; count < items.size(); count++) @@ -675,11 +675,11 @@ void CMenuWidget::paint() else sb_width=0; + int c_rad_mid = RADIUS_MID; + x = getScreenStartX(width + sb_width); - y = getScreenStartY(height); + y = getScreenStartY(height + (c_rad_mid / 3 * 2)); - int c_rad_mid = RADIUS_MID; - frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width + sb_width, height + (c_rad_mid / 3 * 2), COL_MENUCONTENTDARK_PLUS_0, c_rad_mid); frameBuffer->paintBoxRel(x, y + height - ((c_rad_mid * 2) + 1) + (c_rad_mid / 3 * 2), width + sb_width, ((c_rad_mid * 2) + 1), COL_MENUCONTENT_PLUS_0, c_rad_mid, CORNER_BOTTOM); frameBuffer->paintBoxRel(x, y, width + sb_width, hheight, COL_MENUHEAD_PLUS_0, c_rad_mid, CORNER_TOP); commit 12a97d0bcdfd9b4703d2a7f17d47cef199ba6898 Author: Christian Schuett <Gau...@ho...> Date: Sat May 4 20:46:55 2013 +0200 Neutrino OSD setup: repaint window if shape of corners changed Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/osd_setup.cpp b/tuxbox/neutrino/src/gui/osd_setup.cpp index 70b1bf8..62d966e 100644 --- a/tuxbox/neutrino/src/gui/osd_setup.cpp +++ b/tuxbox/neutrino/src/gui/osd_setup.cpp @@ -122,6 +122,8 @@ COsdSetup::COsdSetup(const neutrino_locale_t title, const char * const IconName) fontsizenotifier = new CFontSizeNotifier; + osd_setup = NULL; + menue_title = title; menue_icon = IconName; @@ -242,7 +244,7 @@ const CMenuOptionChooser::keyval SHOW_MUTE_ICON_OPTIONS[SHOW_MUTE_ICON_OPTIONS_ int COsdSetup::showOsdSetup() { //osd main settings - CMenuWidget *osd_setup = new CMenuWidget(menue_title, menue_icon, width); + osd_setup = new CMenuWidget(menue_title, menue_icon, width); osd_setup->setPreselected(selected); //osd settings color sbubmenue @@ -282,7 +284,7 @@ int COsdSetup::showOsdSetup() //osd mute icon options CMenuOptionChooser* osd_mute_icon_ch = new CMenuOptionChooser(LOCALE_OSDSETTINGS_SHOW_MUTE_ICON, &g_settings.show_mute_icon, SHOW_MUTE_ICON_OPTIONS, SHOW_MUTE_ICON_OPTIONS_COUNT, true); //osd corner chooser - CMenuOptionChooser* osd_corners_ch = new CMenuOptionChooser(LOCALE_OSDSETTINGS_ROUNDED_CORNERS, &g_settings.rounded_corners, COLORMENU_CORNERSETTINGS_TYPE_OPTIONS, COLORMENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true ); + CMenuOptionChooser* osd_corners_ch = new CMenuOptionChooser(LOCALE_OSDSETTINGS_ROUNDED_CORNERS, &g_settings.rounded_corners, COLORMENU_CORNERSETTINGS_TYPE_OPTIONS, COLORMENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true, this); //osd main settings, intros osd_setup->addIntroItems(menue_title != LOCALE_MAINSETTINGS_OSD ? LOCALE_MAINSETTINGS_OSD : NONEXISTANT_LOCALE); @@ -738,8 +740,13 @@ bool CFontSizeNotifier::changeNotify(const neutrino_locale_t OptionName, void * bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void *) { + if (ARE_LOCALES_EQUAL(OptionName, LOCALE_OSDSETTINGS_ROUNDED_CORNERS)) + { + osd_setup->hide(); + return true; + } #ifdef ENABLE_RADIOTEXT - if (ARE_LOCALES_EQUAL(OptionName, LOCALE_OSDSETTINGS_INFOVIEWER_RADIOTEXT)) + else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_OSDSETTINGS_INFOVIEWER_RADIOTEXT)) { if (g_settings.radiotext_enable) { diff --git a/tuxbox/neutrino/src/gui/osd_setup.h b/tuxbox/neutrino/src/gui/osd_setup.h index 2e49dcd..ece029a 100644 --- a/tuxbox/neutrino/src/gui/osd_setup.h +++ b/tuxbox/neutrino/src/gui/osd_setup.h @@ -51,6 +51,8 @@ class COsdSetup : public CMenuTarget, CChangeObserver CColorSetupNotifier *colorSetupNotifier; CFontSizeNotifier *fontsizenotifier; + CMenuWidget *osd_setup; + int width, selected; neutrino_locale_t menue_title; commit 4300b7db6bf17a10230723c7cb277896f7f5b863 Author: Christian Schuett <Gau...@ho...> Date: Fri May 3 22:57:29 2013 +0200 Neutrino: fix width of menu item captions Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp index 71477c2..bc30353 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.cpp +++ b/tuxbox/neutrino/src/gui/widget/menue.cpp @@ -138,7 +138,7 @@ void CMenuItem::paintItemCaption(const bool select_mode, const int &item_height, //left text int stringstartposName = x + offx + 10; - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposName, y + item_height, dx - (stringstartposName - x), left_text, item_color, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposName, y + item_height, dx - (stringstartposName - x) - 10, left_text, item_color, 0, true); // UTF-8 //right text if (right_text != NULL) @@ -146,7 +146,7 @@ void CMenuItem::paintItemCaption(const bool select_mode, const int &item_height, int stringwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(right_text, right_text_is_utf8); int stringstartposOption = std::max(stringstartposName + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(left_text, true) + 10, x + dx - stringwidth - 10); //+ offx - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposOption, y + item_height, dx - (stringstartposOption - x), right_text, item_color, 0, right_text_is_utf8); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposOption, y + item_height, dx - (stringstartposOption - x) - 10, right_text, item_color, 0, right_text_is_utf8); } } @@ -1277,7 +1277,7 @@ int CMenuSeparator::paint(bool /*selected*/) if (type & LINE) frameBuffer->paintBoxRel(stringstartposX - 5, y, stringwidth + 10, height, item_bgcolor); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposX, y + height, dx - (stringstartposX - x), l_text, item_color, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposX, y + height, dx - (stringstartposX - x) - 10, l_text, item_color, 0, true); // UTF-8 if (type & SUB_HEAD) CLCD::getInstance()->setMode(CLCD::MODE_MENU_UTF8, l_text); commit 95bf7f7b7f3dc8054165ee345c92d4a6d95ec2f7 Author: GetAway <get...@t-...> Date: Thu May 2 20:46:20 2013 +0200 plugins.cpp removed a variable that was never used Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/plugins.cpp b/tuxbox/neutrino/src/gui/plugins.cpp index 6d26494..14a0e46 100644 --- a/tuxbox/neutrino/src/gui/plugins.cpp +++ b/tuxbox/neutrino/src/gui/plugins.cpp @@ -201,11 +201,7 @@ bool CPlugins::parseCfg(plugin *plugin_data) getline(iss, cmd, '='); getline(iss, parm, '='); - if (cmd == "pluginversion") - { - plugin_data->version = atoi(parm.c_str()); - } - else if (cmd == "index") + if (cmd == "index") { plugin_data->index = atoi(parm.c_str()); } diff --git a/tuxbox/neutrino/src/gui/plugins.h b/tuxbox/neutrino/src/gui/plugins.h index 4c394f4..0cb6461 100644 --- a/tuxbox/neutrino/src/gui/plugins.h +++ b/tuxbox/neutrino/src/gui/plugins.h @@ -66,7 +66,6 @@ class CPlugins std::string filename; std::string cfgfile; std::string pluginfile; - int version; std::string name; // UTF-8 encoded std::string description; // UTF-8 encoded std::string depend; commit e961d3770e829b666d94cd4e7dc3e56137b7400c Author: Thilo Graf <db...@no...> Date: Thu May 2 20:33:54 2013 +0200 CPlugins: add config parameter 'index' for plugins This allows (optional) to config an user definied sort for plugin via plugin.cfg. TODO: configuration via gui diff --git a/tuxbox/neutrino/src/gui/plugins.cpp b/tuxbox/neutrino/src/gui/plugins.cpp index 4f9e853..6d26494 100644 --- a/tuxbox/neutrino/src/gui/plugins.cpp +++ b/tuxbox/neutrino/src/gui/plugins.cpp @@ -156,6 +156,7 @@ void CPlugins::loadPlugins() number_of_plugins = 0; plugin_list.clear(); + sindex = 100; scanDir(PLUGINDIR_MNT); scanDir(PLUGINDIR_VAR); scanDir(PLUGINDIR); @@ -180,6 +181,7 @@ bool CPlugins::parseCfg(plugin *plugin_data) while(linecount < 20 && getline(inFile, line[linecount++])){}; + plugin_data->index = sindex++; plugin_data->fb = false; plugin_data->rc = false; plugin_data->lcd = false; @@ -203,6 +205,10 @@ bool CPlugins::parseCfg(plugin *plugin_data) { plugin_data->version = atoi(parm.c_str()); } + else if (cmd == "index") + { + plugin_data->index = atoi(parm.c_str()); + } else if (cmd == "name") { plugin_data->name = parm; diff --git a/tuxbox/neutrino/src/gui/plugins.h b/tuxbox/neutrino/src/gui/plugins.h index a82a025..4c394f4 100644 --- a/tuxbox/neutrino/src/gui/plugins.h +++ b/tuxbox/neutrino/src/gui/plugins.h @@ -62,6 +62,7 @@ class CPlugins struct plugin { + int index; std::string filename; std::string cfgfile; std::string pluginfile; @@ -82,13 +83,14 @@ class CPlugins bool hide; bool operator< (const plugin& a) const { - return this->filename < a.filename ; + return this->index < a.index ; } }; int fb, rc, lcd, pid; int number_of_plugins; + int sindex; std::vector<plugin> plugin_list; std::string plugin_dir; std::string scriptOutput; @@ -117,6 +119,8 @@ class CPlugins inline const std::string & getDescription (const int number) const { return plugin_list[number].description ; } inline int getType (const int number) const { return plugin_list[number].type ; } inline bool isHidden (const int number) const { return plugin_list[number].hide ; } + inline int getIndex (const int number) const { return plugin_list[number].index ; } + inline bool isUsingLcd (const int number) const { return plugin_list[number].lcd ; } void startPlugin(int number, int param = 0, int param2 = 0); commit f7903e090f5743c927be0c54cef1a1a21ecaab77 Author: Christian Schuett <Gau...@ho...> Date: Thu May 2 20:03:40 2013 +0200 Neutrino: update some german locales in service scan menu Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale index 217ee0e..a4c2fe3 100644 --- a/tuxbox/neutrino/data/locale/deutsch.locale +++ b/tuxbox/neutrino/data/locale/deutsch.locale @@ -1290,13 +1290,13 @@ scantp.mod_qpsk QPSK scantp.pol Polarisation scantp.pol_h H scantp.pol_v V -scantp.rate Symbol rate -scantp.scan Scan Mode +scantp.rate Symbolrate +scantp.scan Scan-Modus scantp.scan_all_sats Alle Sats scantp.scan_complete Komplett scantp.scan_one_sat Einen Sat scantp.scan_one_tp Einen Transponder -scantp.scanmode Schnell Scan +scantp.scanmode Schnell-Scan scants.abort_body Soll die Suche wirklich abgebrochen werden? scants.abort_header Abbruch der Kanalsuche scants.actcable Kabel: @@ -1335,7 +1335,7 @@ servicemenu.restart Neutrino neu starten servicemenu.restart_failed Neustart von Neutrino schlug fehl. servicemenu.restart_hint Neutrino wird neu gestartet... servicemenu.restart_refused_recording Aufnahme läuft. Restart nicht möglich. -servicemenu.scanmodes Scan Modi +servicemenu.scanmodes Scan-Modi servicemenu.scants Kanalsuche servicemenu.ucodecheck UCodes überprüfen servicemenu.update Software-Aktualisierung commit 8905942068fdf9645fb7b8d0bd563730c2fb0b8b Author: Christian Schuett <Gau...@ho...> Date: Wed May 1 21:37:55 2013 +0200 Neutrino scan setup: fix showing current scan mode on cable boxes Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/scan_setup.cpp b/tuxbox/neutrino/src/gui/scan_setup.cpp index ca73633..8f47229 100644 --- a/tuxbox/neutrino/src/gui/scan_setup.cpp +++ b/tuxbox/neutrino/src/gui/scan_setup.cpp @@ -565,24 +565,13 @@ void CScanSetup::initScanSettings() } -typedef struct scan_mode_t -{ - const int scan_type; - const neutrino_locale_t locale; -} scan_mode_struct_t; - -const scan_mode_struct_t scan_mode[SCANTS_SCAN_OPTION_COUNT] = -{ - {CScanTs::SCAN_COMPLETE , LOCALE_SCANTP_SCAN_ALL_SATS}, - {CScanTs::SCAN_ONE_TP , LOCALE_SCANTP_SCAN_ONE_TP}, - {CScanTs::SCAN_ONE_SAT , LOCALE_SCANTP_SCAN_ONE_SAT}, -}; - std::string CScanSetup::getScanModeString(const int& scan_type) { int st = scan_type; - return g_Locale->getText(scan_mode[st].locale); - + if (g_info.delivery_system == DVB_S) + return g_Locale->getText(SCANTS_SCAN_OPTIONS[st].value); + else + return g_Locale->getText(SCANTS_CABLESCAN_OPTIONS[st].value); } bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * Data) @@ -666,7 +655,10 @@ bool CTP_scanNotifier::changeNotify(const neutrino_locale_t, void *Data) toDisable3[0]->setActive(true); } - *scan_mode_string = g_Locale->getText(scan_mode[tp_scan_mode].locale); + if (g_info.delivery_system == DVB_S) + *scan_mode_string = g_Locale->getText(SCANTS_SCAN_OPTIONS[tp_scan_mode].value); + else + *scan_mode_string = g_Locale->getText(SCANTS_CABLESCAN_OPTIONS[tp_scan_mode].value); return false; } commit e37333358a0b7bd82a1f56c8e72c79be89917992 Author: Christian Schuett <Gau...@ho...> Date: Tue Apr 30 20:03:02 2013 +0200 Neutrino CMenuOption*Chooser: only notify observer if value changed Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp index 484efdf..71477c2 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.cpp +++ b/tuxbox/neutrino/src/gui/widget/menue.cpp @@ -886,6 +886,7 @@ int CMenuOptionChooser::getOptionValue(void) const int CMenuOptionChooser::exec(CMenuTarget* parent) { + bool optionValueChanged = true; bool wantsRepaint = false; int ret = menu_return::RETURN_NONE; @@ -909,6 +910,8 @@ int CMenuOptionChooser::exec(CMenuTarget* parent) ret = menu->exec(parent, ""); if (select >= 0) *optionValue = options[select].key; + else + optionValueChanged = false; delete menu; delete selector; } @@ -930,7 +933,7 @@ int CMenuOptionChooser::exec(CMenuTarget* parent) paint(true); } - if (observ) + if (observ && optionValueChanged) wantsRepaint = observ->changeNotify(optionName, optionValue); if (wantsRepaint) @@ -1002,6 +1005,7 @@ void CMenuOptionStringChooser::addOption(const char * const value) int CMenuOptionStringChooser::exec(CMenuTarget* parent) { + bool optionValueChanged = true; bool wantsRepaint = false; int ret = menu_return::RETURN_NONE; @@ -1025,6 +1029,8 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent) ret = menu->exec(parent, ""); if (select >= 0) strcpy(optionValue, options[select].c_str()); + else + optionValueChanged = false; delete menu; delete selector; } @@ -1046,7 +1052,7 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent) paint(true); } - if (observ) + if (observ && optionValueChanged) wantsRepaint = observ->changeNotify(optionName, optionValue); if (wantsRepaint) commit 0017cdab90a45255cd02ef18baff2c8a40463d20 Author: Christian Schuett <Gau...@ho...> Date: Tue Apr 30 19:48:22 2013 +0200 Neutrino CMenuOptionStringChooser: use 1st option if options removed if options are removed 'optionValue' may not exist anymore, then use 1st available option Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp index db5eb73..484efdf 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.cpp +++ b/tuxbox/neutrino/src/gui/widget/menue.cpp @@ -914,6 +914,7 @@ int CMenuOptionChooser::exec(CMenuTarget* parent) } else { + //select next value unsigned int count; for(count = 0; count < number_of_options; count++) { @@ -1030,7 +1031,8 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent) else { //select next value - for(unsigned int count = 0; count < options.size(); count++) + unsigned int count; + for(count = 0; count < options.size(); count++) { if ((strcmp(options[count].c_str(), optionValue) == 0) || (optionValue[0] == '\0')) { @@ -1038,6 +1040,9 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent) break; } } + // if options are removed optionValue may not exist anymore -> use 1st available option + if ((count == options.size()) && !options.empty()) + strcpy(optionValue, options[0].c_str()); paint(true); } commit 30f87328e9058060139c4951c07516278f5ccd41 Author: Christian Schuett <Gau...@ho...> Date: Tue Apr 30 17:29:03 2013 +0200 Neutrino CMenuOption*Chooser: simplify pulldown list code Signed-off-by: Christian Schuett <Gau...@ho...> Signed-off-by: Thilo Graf <db...@no...> diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp index 7c98c5c..db5eb73 100644 --- a/tuxbox/neutrino/src/gui/widget/menue.cpp +++ b/tuxbox/neutrino/src/gui/widget/menue.cpp @@ -891,14 +891,9 @@ int CMenuOptionChooser::exec(CMenuTarget* parent) if (pulldown) { - int menu_width = dx; int select = -1; char cnt[5]; - - if (parent) - parent->hide(); - - CMenuWidget* menu = new CMenuWidget(optionNameString.c_str(), "", menu_width); + CMenuWidget* menu = new CMenuWidget(optionNameString.c_str(), "", dx); menu->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); CMenuSelectorTarget * selector = new CMenuSelectorTarget(&select); for(unsigned int count = 0; count < number_of_options; count++) @@ -911,8 +906,7 @@ int CMenuOptionChooser::exec(CMenuTarget* parent) mn_option->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true /*for selected item*/); menu->addItem(mn_option, selected); } - menu->exec(NULL, ""); - ret = menu_return::RETURN_REPAINT; + ret = menu->exec(parent, ""); if (select >= 0) *optionValue = options[select].key; delete menu; @@ -1012,14 +1006,9 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent) if (pulldown) { - int menu_width = dx; int select = -1; char cnt[5]; - - if (parent) - parent->hide(); - - CMenuWidget* menu = new CMenuWidget(optionName, "", menu_width); + CMenuWidget* menu = new CMenuWidget(optionName, "", dx); menu->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL); CMenuSelectorTarget * selector = new CMenuSelectorTarget(&select); for (unsigned int count = 0; count < options.size(); count++) @@ -1032,8 +1021,7 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent) mn_option->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true /*for selected item*/); menu->addItem(mn_option, selected); } - menu->exec(NULL, ""); - ret = menu_return::RETURN_REPAINT; + ret = menu->exec(parent, ""); if (select >= 0) strcpy(optionValue, options[select].c_str()); delete menu; ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/data/locale/deutsch.locale | 8 ++-- tuxbox/neutrino/src/gui/eventlist.cpp | 7 +--- tuxbox/neutrino/src/gui/filebrowser.cpp | 6 ++-- tuxbox/neutrino/src/gui/osd_setup.cpp | 13 +++++-- tuxbox/neutrino/src/gui/osd_setup.h | 2 + tuxbox/neutrino/src/gui/plugins.cpp | 6 ++- tuxbox/neutrino/src/gui/plugins.h | 7 +++- tuxbox/neutrino/src/gui/scan_setup.cpp | 24 ++++--------- tuxbox/neutrino/src/gui/widget/menue.cpp | 51 +++++++++++++-------------- 9 files changed, 63 insertions(+), 61 deletions(-) -- Tuxbox-GIT: apps |