diff --git a/acinclude.m4 b/acinclude.m4 index 4eea0e04a..a6f459856 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -137,43 +137,67 @@ else fi TUXBOX_APPS_DIRECTORY_ONE(configdir,CONFIGDIR,localstatedir,/var,/tuxbox/config, - [--with-configdir=PATH ],[where to find the config files]) + [--with-configdir=PATH ],[where to find the config files]) TUXBOX_APPS_DIRECTORY_ONE(datadir,DATADIR,datadir,/share,/tuxbox, - [--with-datadir=PATH ],[where to find data]) + [--with-datadir=PATH ],[where to find data]) TUXBOX_APPS_DIRECTORY_ONE(fontdir,FONTDIR,datadir,/share,/fonts, - [--with-fontdir=PATH ],[where to find the fonts]) + [--with-fontdir=PATH ],[where to find the fonts]) + +TUXBOX_APPS_DIRECTORY_ONE(fontdir_var,FONTDIR_VAR,localstatedir,/var,/tuxbox/fonts, + [--with-fontdir_var=PATH ],[where to find the fonts in /var]) + +TUXBOX_APPS_DIRECTORY_ONE(webtvdir,WEBTVDIR,datadir,/share,/neutrino/webtv, + [--with-webtvdir=PATH ],[where to find the webtv content]) + +TUXBOX_APPS_DIRECTORY_ONE(webtvdir_var,WEBTVDIR_VAR,localstatedir,/var,/tuxbox/webtv, + [--with-webtvdir_var=PATH ],[where to find the webtv content /var]) TUXBOX_APPS_DIRECTORY_ONE(gamesdir,GAMESDIR,localstatedir,/var,/tuxbox/games, - [--with-gamesdir=PATH ],[where games data is stored]) + [--with-gamesdir=PATH ],[where games data is stored]) TUXBOX_APPS_DIRECTORY_ONE(libdir,LIBDIR,libdir,/lib,/tuxbox, - [--with-libdir=PATH ],[where to find the internal libs]) + [--with-libdir=PATH ],[where to find the internal libs]) TUXBOX_APPS_DIRECTORY_ONE(plugindir,PLUGINDIR,libdir,/lib,/tuxbox/plugins, - [--with-plugindir=PATH ],[where to find the plugins]) + [--with-plugindir=PATH ],[where to find the plugins]) + +TUXBOX_APPS_DIRECTORY_ONE(plugindir_var,PLUGINDIR_VAR,localstatedir,/var,/tuxbox/plugins, + [--with-plugindir_var=PATH ],[where to find the plugins in /var]) + +TUXBOX_APPS_DIRECTORY_ONE(plugindir_mnt,PLUGINDIR_MNT,mntdir,/mnt,/plugins, + [--with-plugindir_mnt=PATH ],[where to find the the extern plugins]) TUXBOX_APPS_DIRECTORY_ONE(luaplugindir,LUAPLUGINDIR,libdir,/lib,/tuxbox/luaplugins, - [--with-luaplugindir=PATH ],[where to find Lua plugins]) + [--with-luaplugindir=PATH ],[where to find Lua plugins]) TUXBOX_APPS_DIRECTORY_ONE(localedir,LOCALEDIR,datadir,/share, /tuxbox/neutrino/locale, - [--with-localedir=PATH ],[where to find the locale]) + [--with-localedir=PATH ],[where to find the locale]) -TUXBOX_APPS_DIRECTORY_ONE(themesdir,THEMESDIR,datadir,/share,/tuxbox/neutrino/themes, - [--with-themesdir=PATH ],[where to find the themes]) +TUXBOX_APPS_DIRECTORY_ONE(localedir_var,LOCALEDIR_VAR,localstatedir,/var,/tuxbox/locale, + [--with-localedir_var=PATH ],[where to find the locale in /var]) -TUXBOX_APPS_DIRECTORY_ONE(iconsdir,ICONSDIR,datadir,/share,/tuxbox/neutrino/icons, - [--with-iconsdir=PATH ],[where to find the icons]) +TUXBOX_APPS_DIRECTORY_ONE(themesdir,THEMESDIR,datadir,/share, /tuxbox/neutrino/themes, + [--with-themesdir=PATH ],[where to find the themes]) + +TUXBOX_APPS_DIRECTORY_ONE(themesdir_var,THEMESDIR_VAR,localstatedir,/var,/tuxbox/themes, + [--with-themesdir_var=PATH ],[where to find the themes in /var]) + +TUXBOX_APPS_DIRECTORY_ONE(iconsdir,ICONSDIR,datadir,/share, /tuxbox/neutrino/icons, + [--with-iconsdir=PATH ],[where to find the icons]) + +TUXBOX_APPS_DIRECTORY_ONE(iconsdir_var,ICONSDIR_VAR,localstatedir,/var,/tuxbox/icons, + [--with-iconsdir_var=PATH ],[where to find the icons in /var]) TUXBOX_APPS_DIRECTORY_ONE(private_httpddir,PRIVATE_HTTPDDIR,datadir,/share,/tuxbox/neutrino/httpd, - [--with-private_httpddir=PATH ],[where to find the the private httpd files]) + [--with-private_httpddir=PATH ],[where to find the the private httpd files]) TUXBOX_APPS_DIRECTORY_ONE(public_httpddir,PUBLIC_HTTPDDIR,localstatedir,/var,/httpd, - [--with-public_httpddir=PATH ],[where to find the the public httpd files]) + [--with-public_httpddir=PATH ],[where to find the the public httpd files]) TUXBOX_APPS_DIRECTORY_ONE(hosted_httpddir,HOSTED_HTTPDDIR,mntdir,/mnt,/hosted, - [--with-hosted_httpddir=PATH ],[where to find the the hosted files]) + [--with-hosted_httpddir=PATH ],[where to find the the hosted files]) ]) dnl automake <= 1.6 needs this specifications diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 6b9c890a5..dd3a7dfe0 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -309,6 +309,9 @@ ci.ignore_msg CA Meldungen ignorieren ci.init_failed CAM-Init fehlgeschlagen ci.init_ok CAM-Init beendet ci.inserted CAM im Slot +ci.mode CI Kanäle während einer Aufnahme +ci.mode_0 alle Kanäle +ci.mode_1 gleicher Transponder ci.rec_zapto Umschalten bei Aufnahmen mit CAM ci.removed CAM entfernt -> Slot ci.reset Reset @@ -838,6 +841,7 @@ hdd_umounted Datenträger entfernt hdd_wakeup Interne Aufweckfunktion hdd_wakeup_msg Aufweckfunktion mit Nachricht hdd_wakeup_start Aufweckfunktion wird gestartet +imageinfo.api API: imageinfo.creator Ersteller: imageinfo.date Datum: imageinfo.dokumentation Dokus: @@ -1117,6 +1121,7 @@ menu.hint_channellist_show_empty_favs Zeigt oder versteckt leere Bouquets in den menu.hint_channellist_show_infobox Zeigt oder versteckt das untere Sendungsfenster menu.hint_channels Kanalliste öffnen menu.hint_ci Conditional-Access-Menü zum Einrichten Ihres CI-Moduls oder der eingebetteten Conax-Karte +menu.hint_ci_mode Zu diesen Kanälen kann bei einer laufenden CI-Aufnahme gewechselt werden. menu.hint_clock_background Lassen Sie die Uhr mit Hintergrund anzeigen menu.hint_clock_mode Schalten Sie die Uhr ein oder aus menu.hint_clock_seconds Legen Sie fest, ob die Sekunden angezeigt werden sollen diff --git a/data/locale/english.locale b/data/locale/english.locale index e52f6baa2..21090c2e0 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -309,6 +309,9 @@ ci.ignore_msg Ignore CA messages ci.init_failed CAM init failed ci.init_ok CAM init complete ci.inserted CAM inserted in slot +ci.mode Usable CI channel while recording +ci.mode_0 all channels +ci.mode_1 same transponder ci.rec_zapto Zap when recording needs CAM ci.removed CAM removed from slot ci.reset Reset @@ -838,6 +841,7 @@ hdd_umounted Device removed hdd_wakeup Internal wakeup function hdd_wakeup_msg wakeup function with message hdd_wakeup_start wakeup starting +imageinfo.api API: imageinfo.creator Creator: imageinfo.date Date: imageinfo.dokumentation Docs: @@ -1117,6 +1121,7 @@ menu.hint_channellist_show_empty_favs Show / hide empty bouquets in favorites menu.hint_channellist_show_infobox Show or hide bottom infobox of channellist menu.hint_channels Open channel list menu.hint_ci Conditional access menu\nto setup your CI CAM or embeded Conax card +menu.hint_ci_mode Allow switching to these channels while CI recording menu.hint_clock_background Show clock with theme's background color menu.hint_clock_mode Switch clock on or off menu.hint_clock_seconds Show time format with seconds diff --git a/data/locale/nederlands.locale b/data/locale/nederlands.locale index ec6dd12e7..b9ffb8d1c 100644 --- a/data/locale/nederlands.locale +++ b/data/locale/nederlands.locale @@ -725,6 +725,7 @@ hdd_statfs_recording alleen tijdens opname hdd_umount Unmount hdd_umount_warn Apparaat ontkoppelen hdd_umounted Device verwijderd +imageinfo.api API: imageinfo.creator Ontwikkelaar: imageinfo.date Datum: imageinfo.dokumentation Documentatie: diff --git a/data/locale/slovak.locale b/data/locale/slovak.locale index a4138edb1..9088325c2 100644 --- a/data/locale/slovak.locale +++ b/data/locale/slovak.locale @@ -775,6 +775,7 @@ hdd_statfs_recording len pri nahrávaní hdd_umount Odpojenie hdd_umount_warn Chyba odpájania disku! hdd_umounted Zariadenie odstránené +imageinfo.api API: imageinfo.creator Vytvoril: imageinfo.date Dátum: imageinfo.dokumentation Dokumentácia: diff --git a/src/driver/fade.cpp b/src/driver/fade.cpp index ae0fffd58..a0c2f45f7 100644 --- a/src/driver/fade.cpp +++ b/src/driver/fade.cpp @@ -96,9 +96,9 @@ void COSDFader::StopFade() frameBuffer->setBlendMode(CNXTFB_BLEND_MODE_PER_PIXEL); // Global alpha multiplied with pixel alpha #else frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha +#endif #if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_APOLLO)) usleep(60000); -#endif #endif fadeIn = fadeOut = false; } @@ -127,9 +127,9 @@ bool COSDFader::FadeDone() frameBuffer->setBlendMode(CNXTFB_BLEND_MODE_PER_PIXEL); // Global alpha multiplied with pixel alpha #else frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha +#endif #if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_APOLLO)) usleep(60000); -#endif #endif } else frameBuffer->setBlendLevel(fadeValue); diff --git a/src/global.h b/src/global.h index 25d973756..7c77611e9 100644 --- a/src/global.h +++ b/src/global.h @@ -48,13 +48,6 @@ #define NEUTRINO_SCAN_SETTINGS_FILE CONFIGDIR "/scan.conf" #define NEUTRINO_PARENTALLOCKED_FILE DATADIR "/neutrino/.plocked" -#define FONTDIR_VAR "/var/tuxbox/fonts/" //NI -#define ICONSDIR_VAR "/var/tuxbox/icons/" -#define LOCALEDIR_VAR "/var/tuxbox/locale" -#define THEMESDIR_VAR "/var/tuxbox/themes" -#define PLUGINDIR_VAR "/var/tuxbox/plugins" -#define PLUGINDIR_MNT "/mnt/plugins" - #define LOGODIR ICONSDIR "/logo" #define LOGODIR_VAR ICONSDIR_VAR "/logo" @@ -103,4 +96,8 @@ NEUTRINO_CPP CRadioText *g_Radiotext; #define ENABLE_GUI_MOUNT #endif +#ifndef TARGET_PREFIX +#define TARGET_PREFIX "" +#endif + #endif /* __neutrino_global_h__ */ diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 83e253291..c25d9cc86 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -805,8 +805,8 @@ int CAudioPlayerGui::show() int y1=(g_settings.screen_EndY- g_settings.screen_StartY)/2 + g_settings.screen_StartY; int h = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight(); w = std::max(w, g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(selectedKey)); - m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_MENUCONTENT_PLUS_6, RADIUS_SMALL); - m_frameBuffer->paintBoxRel(x1 - 4, y1 - h - 3, w + 8, h + 6, COL_MENUCONTENTSELECTED_PLUS_0, RADIUS_SMALL); + m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_FRAME_PLUS_0, RADIUS_SMALL); //NI + m_frameBuffer->paintBoxRel(x1 - 6, y1 - h - 4, w + 12, h + 8, COL_MENUCONTENTSELECTED_PLUS_0, RADIUS_SMALL); //NI g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP] ->RenderString(x1,y1,w+1,selectedKey,COL_MENUCONTENTSELECTED_TEXT); @@ -1543,6 +1543,8 @@ void CAudioPlayerGui::paintItem(int pos) } else { +//NI - don't darken every second entry +#if 0 if (((pos + m_liststart) < m_playlist.size()) && (pos & 1)) { if ((pos + m_liststart) == (unsigned)m_current) @@ -1557,6 +1559,7 @@ void CAudioPlayerGui::paintItem(int pos) } } else +#endif { if ((pos + m_liststart) == (unsigned)m_current) { @@ -1766,8 +1769,8 @@ void CAudioPlayerGui::paintInfo() if (!m_show_playlist) // no playlist -> smaller Info-Box title_height -= m_fheight; - m_frameBuffer->paintBoxRel(m_x, m_y, m_width, title_height - 10, COL_MENUCONTENTSELECTED_PLUS_0, c_rad_mid); //NI - m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, title_height - 10, 1, COL_MENUCONTENT_PLUS_6, c_rad_mid); //NI + m_frameBuffer->paintBoxRel(m_x, m_y, m_width, title_height - 10, COL_MENUHEAD_PLUS_0, c_rad_mid); //NI + m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, title_height - 10, 1, COL_FRAME_PLUS_0, c_rad_mid); //NI paintCover(); @@ -1838,14 +1841,14 @@ void CAudioPlayerGui::paint() int ypos = m_y + m_title_height + m_theight; int sb = m_fheight * m_listmaxshow; - m_frameBuffer->paintBoxRel(m_x + m_width - 15, ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + m_frameBuffer->paintBoxRel(m_x + m_width - 15, ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int sbc = ((m_playlist.size() - 1) / tmp_max) + 1; int sbs = (m_selected / tmp_max); if (sbc < 1) sbc = 1; - m_frameBuffer->paintBoxRel(m_x + m_width - 13, ypos + 2 + sbs*(sb-4)/sbc , 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); + m_frameBuffer->paintBoxRel(m_x + m_width - 13, ypos + 2 + sbs*(sb-4)/sbc , 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_SMALL); } paintInfo(); @@ -1861,30 +1864,32 @@ void CAudioPlayerGui::clearItemID3DetailsLine () void CAudioPlayerGui::paintItemID3DetailsLine (int pos) { int xpos = m_x - ConnectLineBox_Width; - int ypos1 = m_y + m_title_height + m_theight+ 0 + pos*m_fheight + INFO_BOX_Y_OFFSET; - int ypos2 = m_y + (m_height - m_info_height) + INFO_BOX_Y_OFFSET; + int ypos1 = m_y + m_title_height + m_theight + pos*m_fheight; + int ypos2 = m_y + (m_height - m_info_height) + OFFSET_INTER; int ypos1a = ypos1 + (m_fheight / 2); int ypos2a = ypos2 + (m_info_height / 2); // clear details line if (dline != NULL) + { dline->kill(); + dline = NULL; + } // paint Line if detail info (and not valid list pos) and info box if (!m_playlist.empty() && (pos >= 0)) { //details line if (dline == NULL) - dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, m_fheight/2, m_fheight); - dline->setYPos(ypos1a); + dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, m_fheight/2, m_info_height-RADIUS_LARGE*2); dline->paint(false); // paint id3 infobox if (ibox == NULL){ ibox = new CComponentsInfoBox(m_x, ypos2, m_width, m_info_height); - ibox->setFrameThickness(2); + ibox->setFrameThickness(1); //NI ibox->setCorner(RADIUS_LARGE); - ibox->setYPos(ypos2); + ibox->setColorFrame(COL_FRAME_PLUS_0); ibox->setColorBody(COL_MENUCONTENTDARK_PLUS_0); ibox->forceTextPaint(false); } @@ -2144,7 +2149,7 @@ void CAudioPlayerGui::updateMetaData() if (updateMeta || updateScreen) { - m_frameBuffer->paintBoxRel(m_x + 10 + m_title_height, m_y + 4 + 2*m_fheight, m_width - 20 - m_title_height, m_sheight, COL_MENUCONTENTSELECTED_PLUS_0); + m_frameBuffer->paintBoxRel(m_x + 10 + m_title_height, m_y + 4 + 2*m_fheight, m_width - 20 - m_title_height, m_sheight, COL_MENUHEAD_PLUS_0); //NI int xstart = ((m_width - 20 - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(m_metainfo))/2)+10; g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL] ->RenderString(m_x + xstart, m_y + 4 + 2*m_fheight + m_sheight, @@ -2190,7 +2195,7 @@ void CAudioPlayerGui::updateTimes(const bool force) if (updateTotal) { m_frameBuffer->paintBoxRel(m_x + m_width - w1 - 10, m_y + 4, w1 + 4, - m_fheight, COL_MENUCONTENTSELECTED_PLUS_0); + m_fheight, COL_MENUHEAD_PLUS_0); //NI if (m_time_total > 0) g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + m_width - w1 - 10, m_y + 4 + m_fheight, w1, tot_time, COL_MENUCONTENTSELECTED_TEXT); @@ -2199,7 +2204,7 @@ void CAudioPlayerGui::updateTimes(const bool force) { //m_frameBuffer->paintBoxRel(m_x + m_width - w1 - w2 - 15, m_y + 4, w2 + 4, m_fheight, m_frameBuffer->paintBoxRel(m_x + m_width - w1 - w2 - 16, m_y + 4, w2 + 5, m_fheight, - COL_MENUCONTENTSELECTED_PLUS_0); + COL_MENUHEAD_PLUS_0); //NI struct timeval tv; gettimeofday(&tv, NULL); if ((m_state != CAudioPlayerGui::PAUSE) || (tv.tv_sec & 1)) @@ -2311,8 +2316,8 @@ bool CAudioPlayerGui::getNumericInput(neutrino_msg_t& msg, int& val) { sprintf(str, "%d", val); int w = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(str); int h = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight(); - m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_MENUCONTENT_PLUS_6); - m_frameBuffer->paintBoxRel(x1 - 4, y1 - h - 3, w + 8, h + 6, COL_MENUCONTENTSELECTED_PLUS_0); + m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_FRAME_PLUS_0); //NI + m_frameBuffer->paintBoxRel(x1 - 6, y1 - h - 4, w + 12, h + 8, COL_MENUCONTENTSELECTED_PLUS_0); //NI g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(x1, y1, w + 1, str, COL_MENUCONTENTSELECTED_TEXT); while (true) { diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 821c1ae3a..8d5f5f64c 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -117,7 +117,7 @@ void CBEBouquetWidget::paint() int ypos = y+ theight; int sb = iheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int sbc= ((Bouquets->size()- 1)/ listmaxshow)+ 1; int sbs= (selected/listmaxshow); @@ -125,7 +125,7 @@ void CBEBouquetWidget::paint() sbc = 1; //scrollbar - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); } void CBEBouquetWidget::paintHead() diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 672c8c661..cc326390e 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -157,7 +157,7 @@ void CBEChannelWidget::paint() int ypos = y+ theight; int sb = iheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int sbc= ((Channels->size()- 1)/ listmaxshow)+ 1; int sbs= (selected/listmaxshow); @@ -165,9 +165,8 @@ void CBEChannelWidget::paint() sbc = 1; int sbh= (sb- 4)/ sbc; - if (sbh == 0) - return; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * sbh, 11, sbh, COL_MENUCONTENT_PLUS_3); + if (sbh) + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * sbh, 11, sbh, COL_MENUCONTENT_PLUS_3); } void CBEChannelWidget::paintHead() @@ -228,7 +227,7 @@ void CBEChannelWidget::initItem2DetailsLine (int pos, int /*ch_index*/) { int xpos = x - ConnectLineBox_Width; int ypos1 = y + theight+0 + pos*iheight; - int ypos2 = y + height + INFO_BOX_Y_OFFSET; + int ypos2 = y + height + OFFSET_INTER; int ypos1a = ypos1 + (fheight/2); int ypos2a = ypos2 + (info_height/2); diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index 4ba413d75..4ec7621fc 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -290,7 +290,7 @@ void CBEChannelSelectWidget::initItem2DetailsLine (int pos, int /*ch_index*/) { int xpos = x - ConnectLineBox_Width; int ypos1 = y + theight+0 + pos*iheight; - int ypos2 = y + height + INFO_BOX_Y_OFFSET; + int ypos2 = y + height + OFFSET_INTER; int ypos1a = ypos1 + (fheight/2); int ypos2a = ypos2 + (info_height/2); diff --git a/src/gui/bookmarkmanager.cpp b/src/gui/bookmarkmanager.cpp index 93f7abbc8..999fa59fb 100644 --- a/src/gui/bookmarkmanager.cpp +++ b/src/gui/bookmarkmanager.cpp @@ -468,7 +468,7 @@ void CBookmarkManager::paint() { int ypos = y+ theight; int sb = 2*fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int tmp_max = listmaxshow; if(!tmp_max) tmp_max = 1; @@ -476,7 +476,7 @@ void CBookmarkManager::paint() if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ page_nr * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ page_nr * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); } paintFoot(); diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index d49efbd89..0e4cb6ce7 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -727,10 +727,10 @@ void CBouquetList::paint() int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int listmaxshow_tmp = listmaxshow ? listmaxshow : 1;//avoid division by zero int sbc= ((bsize - 1)/ listmaxshow_tmp)+ 1; /* bsize is > 0, so sbc is also > 0 */ int sbs= (selected/listmaxshow_tmp); - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); } diff --git a/src/gui/buildinfo.cpp b/src/gui/buildinfo.cpp index 7c08c2e40..392f526f8 100644 --- a/src/gui/buildinfo.cpp +++ b/src/gui/buildinfo.cpp @@ -147,7 +147,7 @@ bool CBuildInfo::HasData() #if 0 CConfigFile data ('\t'); - data.loadConfig("/.version"); + data.loadConfig(TARGET_PREFIX "/.version"); build_info_t creator = {BI_TYPE_ID_CREATOR, LOCALE_BUILDINFO_CREATOR, data.getString("creator", "n/a")}; v_info.push_back(creator); #endif @@ -176,7 +176,7 @@ void CBuildInfo::InitInfoItems() //init info texts for(size_t i=0; igetText(v_info[i].caption), v_info[i].info_text, ccw_body); + CComponentsExtTextForm *info = new CComponentsExtTextForm(10, CC_APPEND, w_info, h_info, g_Locale->getText(v_info[i].caption), v_info[i].info_text, NULL, ccw_body); info->setLabelAndTextFont(font); info->setTextModes(CTextBox::TOP , CTextBox::AUTO_HIGH | CTextBox::TOP | CTextBox::AUTO_LINEBREAK_NO_BREAKCHARS); info->doPaintBg(false); diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index ad93c60ba..6bc95a3bc 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -65,6 +65,12 @@ const CMenuOptionChooser::keyval OPTIONS_CA_INIT_OPTIONS[] = { 2, LOCALE_CA_INIT_2 } }; #define OPTIONS_CA_INIT_OPTION_COUNT (sizeof(OPTIONS_CA_INIT_OPTIONS)/sizeof(CMenuOptionChooser::keyval)) +const CMenuOptionChooser::keyval OPTIONS_CI_MODE_OPTIONS[] = +{ + { 0, LOCALE_CI_MODE_0 }, + { 1, LOCALE_CI_MODE_1 } +}; +#define OPTIONS_CI_MODE_OPTION_COUNT (sizeof(OPTIONS_CI_MODE_OPTIONS)/sizeof(CMenuOptionChooser::keyval)) void CCAMMenuHandler::init(void) { @@ -141,6 +147,9 @@ int CCAMMenuHandler::doMainMenu() cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_SAVE_PINCODE, &g_settings.ci_save_pincode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this)); //NI cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_REC_ZAPTO, &g_settings.ci_rec_zapto, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this)); + CMenuOptionChooser *ci_mode = new CMenuOptionChooser(LOCALE_CI_MODE, &g_settings.ci_mode, OPTIONS_CI_MODE_OPTIONS, OPTIONS_CI_MODE_OPTION_COUNT, true, NULL); + ci_mode->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_CI_MODE); + cammenu->addItem(ci_mode); #ifdef BOXMODEL_APOLLO CMenuOptionChooser::keyval_ext feselect[fecount+1]; diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index aea3b78ac..2f0e6352b 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -49,6 +49,7 @@ #include #include +#include #include #include #include @@ -64,7 +65,6 @@ #include #include #include -#include #include #include @@ -869,6 +869,7 @@ int CChannelList::show() displayList = !displayList; if (displayList) displayNext = !displayNext; +//NI #if 0 if (g_settings.channellist_additional) displayList = !displayList; @@ -1558,7 +1559,7 @@ void CChannelList::paintDetails(int index) bool colored_event_N = (g_settings.theme.colored_events_channellist == 2); frameBuffer->paintBoxRel(x, y + height, full_width, info_height, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE);//round //NI - frameBuffer->paintBoxFrame(x, y + height, full_width, info_height, 1, COL_MENUCONTENT_PLUS_1, RADIUS_LARGE); //NI + frameBuffer->paintBoxFrame(x, y + height, full_width, info_height, 1, COL_FRAME_PLUS_0, RADIUS_LARGE); //NI if ((*chanlist).empty()) return; @@ -1872,42 +1873,65 @@ void CChannelList::paintItem(int pos, const bool firstpaint) int ypos = y+ theight + pos*fheight; fb_pixel_t color; fb_pixel_t bgcolor; - bool iscurrent = true; + bool is_available = true; bool paintbuttons = false; unsigned int curr = liststart + pos; - fb_pixel_t c_rad_small = 0; + fb_pixel_t c_radius = 0; - if(curr < (*chanlist).size()) { + if (curr < (*chanlist).size()) + { if (edit_state) - iscurrent = !((*chanlist)[curr]->flags & CZapitChannel::NOT_PRESENT); + is_available = !((*chanlist)[curr]->flags & CZapitChannel::NOT_PRESENT); else - iscurrent = SameTP((*chanlist)[curr]); + is_available = SameTP((*chanlist)[curr]); } - if(selected >= (*chanlist).size()) + if (selected >= (*chanlist).size()) selected = (*chanlist).size()-1; - if (curr == selected) { - color = COL_MENUCONTENTSELECTED_TEXT; - bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; + unsigned int is_tuned = (getKey(curr) == CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber() && new_zap_mode != 2 /*active*/); + + if (curr == selected) + { + if (is_tuned) + { + color = COL_MENUCONTENTSELECTED_TEXT_PLUS_2; + bgcolor = COL_MENUCONTENTSELECTED_PLUS_2; + } + else + { + color = COL_MENUCONTENTSELECTED_TEXT; + bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; + } paintItem2DetailsLine (pos); paintDetails(curr); paintAdditionals(curr); - c_rad_small = RADIUS_LARGE; + c_radius = RADIUS_LARGE; paintbuttons = true; } - else if (getKey(curr) == CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber() && new_zap_mode != 2/*active*/) + else { - color = COL_MENUCONTENT_TEXT; //NI - bgcolor = COL_MENUCONTENT_PLUS_1; //NI - c_rad_small = RADIUS_LARGE; - } else { - color = iscurrent ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT; - bgcolor = iscurrent ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0; + if (is_tuned) + { + //NI + color = COL_MENUCONTENT_TEXT; + bgcolor = COL_MENUCONTENT_PLUS_1; +//NI +#if 0 + color = !displayNext ? COL_MENUCONTENT_TEXT_PLUS_2 : COL_MENUCONTENTINACTIVE_TEXT; + bgcolor = !displayNext ? COL_MENUCONTENT_PLUS_2 : COL_MENUCONTENTINACTIVE_PLUS_0; +#endif + c_radius = RADIUS_LARGE; + } + else + { + color = is_available ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT; + bgcolor = is_available ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0; + } } if(!firstpaint || (curr == selected) || getKey(curr) == CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber()) - frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, c_rad_small); + frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, c_radius); if(curr < (*chanlist).size()) { char nameAndDescription[255]; @@ -1965,7 +1989,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint) //paint buttons if (paintbuttons) - paintButtonBar(iscurrent); + paintButtonBar(is_available); int icon_space = r_icon_w+s_icon_w; @@ -1990,32 +2014,21 @@ void CChannelList::paintItem(int pos, const bool firstpaint) l = snprintf(nameAndDescription, sizeof(nameAndDescription), "%s", chan->getName().c_str()); int pb_space = prg_offset - title_offset; - CProgressBar pb(x+5+numwidth + title_offset, ypos + fheight/4 + 2, pb_space + 2, fheight/2 - 4, - 0, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0, COL_INFOBAR_PLUS_7, COL_INFOBAR_PLUS_3); + int pb_height = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getDigitHeight(); + CProgressBar pb(x+5+numwidth + title_offset, ypos + (fheight-pb_height)/2, pb_space + 2, pb_height, COL_MENUCONTENT_PLUS_0); pb.setType(CProgressBar::PB_TIMESCALE); pb.setDesign(g_settings.channellist_progressbar_design); pb.setCornerType(0); - pb.setFrameThickness(0); // no frame - pb.doPaintBg(false); // no background - int pb_max = pb_space - 4; - if (g_settings.progressbar_design != CProgressBar::PB_MONO) { - if (liststart + pos != selected) { - fb_pixel_t pbgcol = COL_MENUCONTENT_PLUS_2; //NI - if (pbgcol == bgcolor) - pbgcol = COL_MENUCONTENT_PLUS_0; - pb.setStatusColors(COL_MENUCONTENT_PLUS_3, pbgcol); - } else { - fb_pixel_t pbgcol = COL_MENUCONTENTSELECTED_PLUS_1; //NI - if (pbgcol == bgcolor) - pbgcol = COL_MENUCONTENT_PLUS_0; - pb.setStatusColors(COL_MENUCONTENTSELECTED_PLUS_2, pbgcol); - } - } else { - if (liststart + pos != selected) - pb.setStatusColors(COL_MENUCONTENT_PLUS_3, COL_MENUCONTENT_PLUS_2); //NI - else - pb.setStatusColors(COL_MENUCONTENTSELECTED_PLUS_2, COL_MENUCONTENTSELECTED_PLUS_1); //NI + pb.setStatusColors(COL_MENUCONTENT_PLUS_3, COL_MENUCONTENT_PLUS_1); + int pb_frame = 0; + if (g_settings.channellist_progressbar_design == CProgressBar::PB_MONO && !g_settings.progressbar_gradient) + { + // add small frame to mono progressbars w/o gradient for a better visibility + pb_frame = 1; } + pb.setFrameThickness(pb_frame); + pb.doPaintBg(false); + int pb_max = pb_space - 4; if (!(p_event->description.empty())) { snprintf(nameAndDescription+l, sizeof(nameAndDescription)-l,g_settings.channellist_epgtext_align_right ? " ":" - "); @@ -2228,14 +2241,14 @@ void CChannelList::paintBody() const int ypos = y+ theight; const int sb = height - theight - footerHeight; // paint scrollbar over full height of main box - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int listmaxshow_tmp = listmaxshow ? listmaxshow : 1;//avoid division by zero int sbc= (((*chanlist).size()- 1)/ listmaxshow_tmp)+ 1; const int sbs= (selected/listmaxshow_tmp); if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); showChannelLogo(); if ((*chanlist).empty()) paintButtonBar(false); @@ -2285,8 +2298,10 @@ bool CChannelList::SameTP(CZapitChannel * channel) return true; //NI - if(channel->bUseCI && CRecordManager::getInstance()->getUseCI()) - return false; + if(g_settings.ci_mode == 1) { + if(channel->bUseCI && CRecordManager::getInstance()->getUseCI()) + return (CRecordManager::getInstance()->SameTransponder(channel->getChannelID())); + } iscurrent = CFEManager::getInstance()->canTune(channel); } diff --git a/src/gui/color.h b/src/gui/color.h index 29b8a4077..8d7d09a36 100644 --- a/src/gui/color.h +++ b/src/gui/color.h @@ -121,6 +121,19 @@ #define COL_INFOCLOCK_TEXT (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 15)]) #endif +// some wrappers to get more readability +#define COL_FRAME COL_MENUCONTENT_PLUS_1 //NI +#define COL_FRAME_PLUS_0 COL_FRAME + +#define COL_SCROLLBAR_ACTIVE COL_MENUCONTENT_PLUS_3 +#define COL_SCROLLBAR_ACTIVE_PLUS_0 COL_SCROLLBAR_ACTIVE +#define COL_SCROLLBAR_PASSIVE COL_MENUCONTENT_PLUS_1 +#define COL_SCROLLBAR_PASSIVE_PLUS_0 COL_SCROLLBAR_PASSIVE + +#define COL_PROGRESSBAR_ACTIVE COL_MENUCONTENT_PLUS_7 +#define COL_PROGRESSBAR_ACTIVE_PLUS_0 COL_PROGRESSBAR_ACTIVE +#define COL_PROGRESSBAR_PASSIVE COL_MENUCONTENT_PLUS_1 +#define COL_PROGRESSBAR_PASSIVE_PLUS_0 COL_PROGRESSBAR_PASSIVE int convertSetupColor2RGB(unsigned char r, unsigned char g, unsigned char b); int convertSetupAlpha2Alpha(unsigned char alpha); diff --git a/src/gui/color_custom.h b/src/gui/color_custom.h new file mode 100644 index 000000000..2b3ccc800 --- /dev/null +++ b/src/gui/color_custom.h @@ -0,0 +1,60 @@ +#ifndef __color_custom__ +#define __color_custom__ + +#define COLOR_CUSTOM 0x0 +#ifdef FB_USE_PALETTE +/* +#define COL_WHITE (COLOR_CUSTOM + 0) +#define COL_RED (COLOR_CUSTOM + 1) +#define COL_GREEN (COLOR_CUSTOM + 2) +#define COL_BLUE (COLOR_CUSTOM + 3) +#define COL_YELLOW (COLOR_CUSTOM + 4) +#define COL_BLACK (COLOR_CUSTOM + 5) +*/ +#define COL_DARK_RED 0x02 +#define COL_DARK_GREEN 0x03 +#define COL_OLIVE 0x04 +#define COL_DARK_BLUE 0x05 +#define COL_LIGHT_GRAY 0x08 +#define COL_DARK_GRAY 0x09 +#define COL_RED 0x0A +#define COL_GREEN 0x0B +#define COL_YELLOW 0x0C +#define COL_BLUE 0x0D +#define COL_PURP 0x0E +#define COL_LIGHT_BLUE 0x0F +#define COL_WHITE 0x10 +#define COL_BLACK 0x11 +#else +#define COL_DARK_RED0 0x02 +#define COL_DARK_GREEN0 0x03 +#define COL_OLIVE0 0x04 +#define COL_DARK_BLUE0 0x05 +#define COL_LIGHT_GRAY0 0x08 +#define COL_DARK_GRAY0 0x09 +#define COL_RED0 0x0A +#define COL_GREEN0 0x0B +#define COL_YELLOW0 0x0C +#define COL_BLUE0 0x0D +#define COL_PURP0 0x0E +#define COL_LIGHT_BLUE0 0x0F +#define COL_WHITE0 0x10 +#define COL_BLACK0 0x11 + +#define COL_DARK_RED (CFrameBuffer::getInstance()->realcolor[0x02]) +#define COL_DARK_GREEN (CFrameBuffer::getInstance()->realcolor[0x03]) +#define COL_OLIVE (CFrameBuffer::getInstance()->realcolor[0x04]) +#define COL_DARK_BLUE (CFrameBuffer::getInstance()->realcolor[0x05]) +#define COL_LIGHT_GRAY (CFrameBuffer::getInstance()->realcolor[0x08]) +#define COL_DARK_GRAY (CFrameBuffer::getInstance()->realcolor[0x09]) +#define COL_RED (CFrameBuffer::getInstance()->realcolor[0x0A]) +#define COL_GREEN (CFrameBuffer::getInstance()->realcolor[0x0B]) +#define COL_YELLOW (CFrameBuffer::getInstance()->realcolor[0x0C]) +#define COL_BLUE (CFrameBuffer::getInstance()->realcolor[0x0D]) +#define COL_PURP (CFrameBuffer::getInstance()->realcolor[0x0E]) +#define COL_LIGHT_BLUE (CFrameBuffer::getInstance()->realcolor[0x0F]) +#define COL_WHITE (CFrameBuffer::getInstance()->realcolor[0x10]) +#define COL_BLACK (CFrameBuffer::getInstance()->realcolor[0x11]) +#endif + +#endif diff --git a/src/gui/components/cc_detailsline.cpp b/src/gui/components/cc_detailsline.cpp index 95cf9cc47..5047247e2 100644 --- a/src/gui/components/cc_detailsline.cpp +++ b/src/gui/components/cc_detailsline.cpp @@ -146,6 +146,6 @@ void CComponentsDetailLine::paint(bool do_save_bg) //so you can ensure correct applied system colors in relevant objects with unchanged instances. void CComponentsDetailLine::syncSysColors() { - col_body = COL_MENUCONTENT_PLUS_1; //NI + col_body = COL_FRAME_PLUS_0; col_shadow = COL_SHADOW_PLUS_0; } diff --git a/src/gui/components/cc_detailsline.h b/src/gui/components/cc_detailsline.h index 3228b72b2..dfea467bd 100644 --- a/src/gui/components/cc_detailsline.h +++ b/src/gui/components/cc_detailsline.h @@ -57,7 +57,7 @@ class CComponentsDetailLine : public CComponents public: CComponentsDetailLine( const int& x_pos = 1,const int& y_pos_top = 1, const int& y_pos_down = 1, const int& h_mark_top_ = CC_HEIGHT_MIN , const int& h_mark_down_ = CC_HEIGHT_MIN, - fb_pixel_t color_line = COL_MENUCONTENT_PLUS_1, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); //NI + fb_pixel_t color_line = COL_FRAME_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); ~CComponentsDetailLine(); ///set colors diff --git a/src/gui/components/cc_draw.cpp b/src/gui/components/cc_draw.cpp index 8893cc73c..1296e19d7 100644 --- a/src/gui/components/cc_draw.cpp +++ b/src/gui/components/cc_draw.cpp @@ -39,7 +39,7 @@ CCDraw::CCDraw() : COSDFader(g_settings.theme.menu_Content_alpha) col_body = col_body_old = COL_MENUCONTENT_PLUS_0; col_shadow = col_shadow_old = COL_SHADOW_PLUS_0; - col_frame = col_frame_old = COL_MENUCONTENT_PLUS_6; + col_frame = col_frame_old = COL_FRAME_PLUS_0; col_frame_sel = col_frame_sel_old = COL_MENUCONTENTSELECTED_PLUS_0; fr_thickness = fr_thickness_old = 0; @@ -49,7 +49,7 @@ CCDraw::CCDraw() : COSDFader(g_settings.theme.menu_Content_alpha) corner_rad = corner_rad_old = 0; shadow = CC_SHADOW_OFF; - shadow_w = shadow_w_old = SHADOW_OFFSET; + shadow_w = shadow_w_old = OFFSET_SHADOW; shadow_force = false; cc_paint_cache = false; diff --git a/src/gui/components/cc_draw.h b/src/gui/components/cc_draw.h index ae5557d42..92178deb6 100644 --- a/src/gui/components/cc_draw.h +++ b/src/gui/components/cc_draw.h @@ -231,7 +231,7 @@ class CCDraw : public COSDFader, public CComponentsSignals ///set shadow color virtual void setColorShadow(fb_pixel_t color){col_shadow = color;} ///set all basic framebuffer element colors at once - ///Note: Possible color values are defined in "gui/color.h" and "gui/customcolor.h" + ///Note: Possible color values are defined in "gui/color.h" and "gui/color_custom.h" virtual void setColorAll(fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow){col_frame = color_frame; col_body = color_body; col_shadow = color_shadow;}; ///set corner types diff --git a/src/gui/components/cc_extra.h b/src/gui/components/cc_extra.h index d8311e67f..68147e1b0 100644 --- a/src/gui/components/cc_extra.h +++ b/src/gui/components/cc_extra.h @@ -61,7 +61,7 @@ * @li ColorGradient::light * @li ColorGradient::normal (default) * @li CFrameBuffer::advanced -* @param[in] color_frame color of frame around box, default = COL_MENUCONTENT_PLUS_6 +* @param[in] color_frame color of frame around box, default = COL_FRAME_PLUS_0 * @param[in] shadow_mode enable/disable shadow behind box, default = CC_SHADOW_OFF * @param[in] color_shadow color of shadow, default = COL_SHADOW_PLUS_0 * @@ -86,7 +86,7 @@ bool paintBoxRel( const int& x, const int& gradient_direction = CFrameBuffer::gradientVertical, const int& gradient_intensity = CColorGradient::normal, const int& w_frame = 0, - const fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6, + const fb_pixel_t& color_frame = COL_FRAME_PLUS_0, int shadow_mode = CC_SHADOW_OFF, const fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); @@ -108,7 +108,7 @@ bool paintBoxRel( const int& x, * @li CORNER_LEFT * @li CORNER_BOTTOM * @li CORNER_ALL -* @param[in] color_frame color of frame around box, default = COL_MENUCONTENT_PLUS_6 +* @param[in] color_frame color of frame around box, default = COL_FRAME_PLUS_0 * @param[in] shadow_mode enable/disable shadow behind box, default = CC_SHADOW_OFF * @param[in] color_shadow color of shadow, default = COL_SHADOW_PLUS_0 * @@ -129,7 +129,7 @@ bool paintBoxRel0( const int& x, const int& radius = 0, const int& corner_type = CORNER_NONE, const int& w_frame = 0, - const fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6, + const fb_pixel_t& color_frame = COL_FRAME_PLUS_0, int shadow_mode = CC_SHADOW_OFF, const fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); @@ -173,7 +173,7 @@ bool paintBoxRel0( const int& x, * @li ColorGradient::light * @li ColorGradient::normal (default) * @li CFrameBuffer::advanced -* @param[in] color_frame color of frame around box, default = COL_MENUCONTENT_PLUS_6 +* @param[in] color_frame color of frame around box, default = COL_FRAME_PLUS_0 * @param[in] shadow_mode enable/disable shadow behind box, default = CC_SHADOW_OFF * @param[in] color_shadow color of shadow, default = COL_SHADOW_PLUS_0 * @@ -204,7 +204,7 @@ bool paintTextBoxRel( const std::string& text, const int& gradient_sec_col = COL_MENUCONTENT_PLUS_0, const int& gradient_direction = CFrameBuffer::gradientVertical, const int& gradient_intensity = CColorGradient::normal, - const fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6, + const fb_pixel_t& color_frame = COL_FRAME_PLUS_0, int shadow_mode = CC_SHADOW_OFF, const fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); @@ -248,7 +248,7 @@ bool paintTextBoxRel( const std::string& text, * @li ColorGradient::light * @li ColorGradient::normal (default) * @li CFrameBuffer::advanced -* @param[in] color_frame color of frame around box, default = COL_MENUCONTENT_PLUS_6 +* @param[in] color_frame color of frame around box, default = COL_FRAME_PLUS_0 * @param[in] shadow_mode enable/disable shadow behind box, default = CC_SHADOW_OFF * @param[in] color_shadow color of shadow, default = COL_SHADOW_PLUS_0 * @@ -270,7 +270,7 @@ bool paintImage( const std::string& image_name, const fb_pixel_t& color_body = 0, const int& radius = 0, const int& corner_type = CORNER_NONE, - const fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6, + const fb_pixel_t& color_frame = COL_FRAME_PLUS_0, int shadow_mode = CC_SHADOW_OFF, const fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); #endif diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 82b214568..6b6dabf6a 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -52,7 +52,7 @@ CComponentsForm::CComponentsForm( const int x_pos, const int y_pos, const int w, cc_yr = y; shadow = shadow_mode; - shadow_w = SHADOW_OFFSET; + shadow_w = OFFSET_SHADOW; corner_rad = RADIUS_LARGE; corner_type = CORNER_ALL; cc_item_index = 0; diff --git a/src/gui/components/cc_frm.h b/src/gui/components/cc_frm.h index 3e678bfa7..2efc89bf5 100644 --- a/src/gui/components/cc_frm.h +++ b/src/gui/components/cc_frm.h @@ -66,7 +66,7 @@ class CComponentsForm : public CComponentsItem CComponentsForm( const int x_pos = 0, const int y_pos = 0, const int w = 800, const int h = 600, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); virtual ~CComponentsForm(); diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index e67bd73b6..b5fd5ddef 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include "cc_frm_button.h" @@ -100,7 +101,7 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const width = w; height = h; shadow = shadow_mode; - shadow_w = shadow ? SHADOW_OFFSET/2 : 0; //buttons are mostly small elements, so these elements should have a reasonable shadow width + shadow_w = shadow ? OFFSET_SHADOW/2 : 0; //buttons are mostly small elements, so these elements should have a reasonable shadow width cc_body_gradient_enable = CC_COLGRAD_OFF/*g_settings.gradiant*/; //TODO: gradient is prepared for use but disabled at the moment till some other parts of gui parts are provide gradient setColBodyGradient(cc_body_gradient_enable/*CColorGradient::gradientLight2Dark*/, CFrameBuffer::gradientVertical, CColorGradient::light); diff --git a/src/gui/components/cc_frm_button.h b/src/gui/components/cc_frm_button.h index eb754eef1..1b9123b41 100644 --- a/src/gui/components/cc_frm_button.h +++ b/src/gui/components/cc_frm_button.h @@ -103,7 +103,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_DARK_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h, const neutrino_locale_t& caption_locale, @@ -112,7 +112,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_DARK_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h, const neutrino_locale_t& caption_locale, @@ -121,7 +121,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_DARK_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& caption, @@ -130,7 +130,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_DARK_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); ///set text color virtual void setButtonTextColor(fb_pixel_t text_color, fb_pixel_t text_color_disabled = COL_MENUCONTENTINACTIVE_TEXT){cc_btn_capt_col = text_color; cc_btn_capt_disable_col = text_color_disabled;} @@ -204,7 +204,7 @@ class CComponentsButtonRed : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_RED, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_RED; @@ -215,7 +215,7 @@ class CComponentsButtonRed : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_RED, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_RED; @@ -235,7 +235,7 @@ class CComponentsButtonGreen : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_GREEN, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_GREEN; @@ -246,7 +246,7 @@ class CComponentsButtonGreen : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_GREEN, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_GREEN; @@ -266,7 +266,7 @@ class CComponentsButtonYellow : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_YELLOW, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_YELLOW; @@ -277,7 +277,7 @@ class CComponentsButtonYellow : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_YELLOW, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_YELLOW; @@ -297,7 +297,7 @@ class CComponentsButtonBlue : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_BLUE, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_BLUE; @@ -308,7 +308,7 @@ class CComponentsButtonBlue : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_BLUE, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_BLUE; diff --git a/src/gui/components/cc_frm_chain.h b/src/gui/components/cc_frm_chain.h index 6b6e7b5c2..a33f63ed8 100644 --- a/src/gui/components/cc_frm_chain.h +++ b/src/gui/components/cc_frm_chain.h @@ -67,7 +67,7 @@ class CComponentsFrmChain : public CComponentsForm int direction = CC_DIR_X, CComponentsForm* parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t& color_frame = COL_FRAME_PLUS_0, fb_pixel_t& color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); // ~CComponentsFrmChain(); //inherited from CComponentsForm diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index a6e0b773b..82c048943 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -61,7 +61,7 @@ CComponentsFrmClock::CComponentsFrmClock( const int& x_pos, y = y_pos; shadow = shadow_mode; - shadow_w = SHADOW_OFFSET; + shadow_w = OFFSET_SHADOW; col_frame = color_frame; col_body = color_body; col_shadow = color_shadow; diff --git a/src/gui/components/cc_frm_clock.h b/src/gui/components/cc_frm_clock.h index 74e859df9..c46dc0bad 100644 --- a/src/gui/components/cc_frm_clock.h +++ b/src/gui/components/cc_frm_clock.h @@ -102,7 +102,7 @@ class CComponentsFrmClock : public CComponentsForm, public CCTextScreen const int& interval_seconds = 1, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int font_style = CNeutrinoFonts::FONT_STYLE_BOLD diff --git a/src/gui/components/cc_frm_ext_text.cpp b/src/gui/components/cc_frm_ext_text.cpp index 97b798795..81354cc6c 100644 --- a/src/gui/components/cc_frm_ext_text.cpp +++ b/src/gui/components/cc_frm_ext_text.cpp @@ -36,18 +36,20 @@ using namespace std; CComponentsExtTextForm::CComponentsExtTextForm( const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& label_text, const std::string& text, + Font* font_text, CComponentsForm* parent, int shadow_mode, fb_pixel_t label_color, fb_pixel_t text_color, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) { - initVarExtTextForm(x_pos, y_pos, w, h, label_text, text, parent, shadow_mode, label_color, text_color, color_frame, color_body, color_shadow); + initVarExtTextForm(x_pos, y_pos, w, h, label_text, text, font_text, parent, shadow_mode, label_color, text_color, color_frame, color_body, color_shadow); initCCTextItems(); } CComponentsExtTextFormLocalized::CComponentsExtTextFormLocalized(const int& x_pos, const int& y_pos, const int& w, const int& h, const neutrino_locale_t& locale_label_text, const neutrino_locale_t& locale_text, + Font* font_text, CComponentsForm* parent, int shadow_mode, fb_pixel_t label_color, @@ -55,12 +57,14 @@ CComponentsExtTextFormLocalized::CComponentsExtTextFormLocalized(const int& x_po fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) : CComponentsExtTextForm( x_pos, y_pos, w, h, g_Locale->getText(locale_label_text), g_Locale->getText(locale_text), + font_text, parent, shadow_mode, label_color, text_color, color_frame, color_body, color_shadow){}; void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& label_text, const std::string& text, + Font* font_text, CComponentsForm* parent, int shadow_mode, fb_pixel_t label_color, @@ -92,7 +96,7 @@ void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_p ccx_text_obj = NULL; corner_type = 0; int dx = 0, dy = DEF_HEIGHT; - ccx_font = *(CNeutrinoFonts::getInstance()->getDynFont(dx, dy)); + ccx_font = font_text == NULL ? *(CNeutrinoFonts::getInstance()->getDynFont(dx, dy)) : g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]; ccx_label_align = ccx_text_align = CTextBox::NO_AUTO_LINEBREAK; initParent(parent); diff --git a/src/gui/components/cc_frm_ext_text.h b/src/gui/components/cc_frm_ext_text.h index 6bf1a23db..aa148599f 100644 --- a/src/gui/components/cc_frm_ext_text.h +++ b/src/gui/components/cc_frm_ext_text.h @@ -68,21 +68,25 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen ///initialize basic variables void initVarExtTextForm(const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& label_text, const std::string& text, + Font* font_text, CComponentsForm* parent, int shadow_mode, fb_pixel_t label_color, fb_pixel_t text_color, - fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow); + fb_pixel_t color_frame, + fb_pixel_t color_body, + fb_pixel_t color_shadow); public: ///advanced constructor for CComponentsExtTextForm, provides parameters for the most required properties, and caption as string CComponentsExtTextForm( const int& x_pos = 1, const int& y_pos = 1, const int& w = 300, const int& h = 48, const std::string& label_text = "", const std::string& text = "", + Font* font_text = NULL, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, fb_pixel_t label_color = COL_MENUCONTENTINACTIVE_TEXT, fb_pixel_t text_color = COL_MENUCONTENT_TEXT, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); // ~CComponentsExtTextForm(); //inherited from CComponentsForm @@ -131,6 +135,9 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen ///sets the text modes (mainly text alignment) to the label and text object, see /gui/widget/textbox.h for possible modes void setTextModes(const int& label_mode, const int& text_mode); + ///return current font + Font* getFont(){return ccx_font;} + ///paint this item/form void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); }; @@ -141,11 +148,14 @@ class CComponentsExtTextFormLocalized : public CComponentsExtTextForm ///advanced constructor for CComponentsExtTextForm, provides parameters for the most required properties, and caption as locales CComponentsExtTextFormLocalized(const int& x_pos = 1, const int& y_pos = 1, const int& w = 300, const int& h = 48, const neutrino_locale_t& locale_label_text = NONEXISTANT_LOCALE, const neutrino_locale_t& locale_text = NONEXISTANT_LOCALE, + Font* font_text = NULL, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, fb_pixel_t label_color = COL_MENUCONTENTINACTIVE_TEXT, fb_pixel_t text_color = COL_MENUCONTENT_TEXT, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_FRAME_PLUS_0, + fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, + fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); }; #endif diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index bd483f9fd..d823ba3f3 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -26,6 +26,7 @@ #endif #include +#include #include "cc_frm_footer.h" #include @@ -36,7 +37,7 @@ using namespace std; CComponentsFooter::CComponentsFooter(CComponentsForm* parent) { //CComponentsFooter - initVarFooter(1, 1, 0, 0, 0, parent, CC_SHADOW_OFF, COL_MENUCONTENT_PLUS_6, COL_MENUFOOT_PLUS_0, COL_SHADOW_PLUS_0); + initVarFooter(1, 1, 0, 0, 0, parent, CC_SHADOW_OFF, COL_FRAME_PLUS_0, COL_MENUFOOT_PLUS_0, COL_SHADOW_PLUS_0); } CComponentsFooter::CComponentsFooter( const int& x_pos, const int& y_pos, const int& w, const int& h, @@ -116,7 +117,7 @@ void CComponentsFooter::setButtonLabels(const struct button_label_s * const cont //footer as primary container (in this context '=this') and the parent for the button label container (chain object), //button label container (chain object) itself is concurrent the parent object for button objects. if (chain == NULL){ - chain = new CComponentsFrmChain(x_chain, CC_CENTERED, w_chain, height, 0, CC_DIR_X, this, CC_SHADOW_OFF, COL_MENUCONTENT_PLUS_6, col_body); + chain = new CComponentsFrmChain(x_chain, CC_CENTERED, w_chain, height, 0, CC_DIR_X, this, CC_SHADOW_OFF, COL_FRAME_PLUS_0, col_body); chain->setCorner(this->corner_rad, this->corner_type); chain->doPaintBg(false); } diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index b10ac8c8d..bf9a16e2a 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -85,7 +85,7 @@ class CComponentsFooter : public CComponentsHeader const int& buttons = 0, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUFOOT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 00a9eab22..8312042d4 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -43,7 +43,7 @@ using namespace std; CComponentsHeader::CComponentsHeader(CComponentsForm* parent) { //CComponentsHeader - initVarHeader(1, 1, 0, 0, "", "", 0, parent, CC_SHADOW_OFF, COL_MENUCONTENT_PLUS_6, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0); + initVarHeader(1, 1, 0, 0, "", "", 0, parent, CC_SHADOW_OFF, COL_FRAME_PLUS_0, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0); } CComponentsHeader::CComponentsHeader( const int& x_pos, const int& y_pos, const int& w, const int& h, diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index 178520b42..d30280da8 100644 --- a/src/gui/components/cc_frm_header.h +++ b/src/gui/components/cc_frm_header.h @@ -124,7 +124,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen const int& buttons = 0, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); @@ -262,7 +262,7 @@ class CComponentsHeaderLocalized : public CComponentsHeader const int& buttons = 0, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); }; diff --git a/src/gui/components/cc_frm_icons.h b/src/gui/components/cc_frm_icons.h index 16f162345..5a32f62c0 100644 --- a/src/gui/components/cc_frm_icons.h +++ b/src/gui/components/cc_frm_icons.h @@ -37,7 +37,7 @@ class CComponentsIconForm : public CComponentsFrmChain const std::vector &v_icon_names, CComponentsForm* parent, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); @@ -47,8 +47,9 @@ class CComponentsIconForm : public CComponentsFrmChain const std::vector &v_icon_names, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, - fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_FRAME_PLUS_0, + fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, + fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); // ~CComponentsIconForm(); //inherited from CComponentsForm void addIcon(const std::string& icon_name); diff --git a/src/gui/components/cc_frm_scrollbar.cpp b/src/gui/components/cc_frm_scrollbar.cpp index 37a29c84d..a73cca5ca 100644 --- a/src/gui/components/cc_frm_scrollbar.cpp +++ b/src/gui/components/cc_frm_scrollbar.cpp @@ -63,7 +63,9 @@ CComponentsScrollBar::CComponentsScrollBar( const int &x_pos, const int &y_pos, const int& count, CComponentsForm* parent, int shadow_mode, - fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) + fb_pixel_t color_frame, + fb_pixel_t color_body, + fb_pixel_t color_shadow) :CComponentsFrmChain(x_pos, y_pos, w, h, NULL, CC_DIR_Y, parent, shadow_mode, color_frame, color_body, color_shadow) { initVarSbForm(count); @@ -168,7 +170,7 @@ void CComponentsScrollBar::initSegments() item->setColBodyGradient(CColorGradient::gradientDark2Light2Dark, CFrameBuffer::gradientHorizontal); } else{ - item->setColorBody(COL_MENUCONTENT_PLUS_1); + item->setColorBody(COL_SCROLLBAR_PASSIVE_PLUS_0); item->disableColBodyGradient(); } } diff --git a/src/gui/components/cc_frm_scrollbar.h b/src/gui/components/cc_frm_scrollbar.h index 068b78e58..731e83df5 100644 --- a/src/gui/components/cc_frm_scrollbar.h +++ b/src/gui/components/cc_frm_scrollbar.h @@ -64,8 +64,9 @@ class CComponentsScrollBar : public CComponentsFrmChain const int& count = 1, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_3, - fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_SCROLLBAR_ACTIVE_PLUS_0, + fb_pixel_t color_body = COL_SCROLLBAR_PASSIVE_PLUS_0, + fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); // ~CComponentsScrollBar(); //inherited from CComponentsForm ///set marked segment, 1st = 0, 2nd = 1 ... diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index 4dc677e93..8677bf3e3 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -59,7 +59,9 @@ void CSignalBar::initVarSigBar(const int& xpos, const int& ypos, const int& w, c sb_scale_height = -1; dy_font = CNeutrinoFonts::getInstance(); - sb_caption_color= COL_INFOBAR_TEXT; + sb_caption_color= COL_MENUCONTENT_TEXT; + sb_active_color = COL_PROGRESSBAR_ACTIVE_PLUS_0; + sb_passive_color= COL_PROGRESSBAR_PASSIVE_PLUS_0; sb_val_mode = CTextBox::NO_AUTO_LINEBREAK | CTextBox::RIGHT; sb_lastsig = 0; @@ -109,6 +111,8 @@ void CSignalBar::initSBItems() //and set required color for text to name label CSignalBox *sbx = static_cast(cc_parent); sb_caption_color = sbx->getTextColor(); + sb_active_color = sbx->getActiveColor(); + sb_passive_color = sbx->getPassiveColor(); } //init items scale, value and name @@ -127,11 +131,11 @@ void CSignalBar::initSBarScale() int scale_y = (sb_item_height/2 - sb_scale_height/2); sb_scale->setDimensionsAll(fr_thickness, scale_y, sb_scale_width, sb_scale_height); sb_scale->setColorBody(col_body); - + sb_scale->setActiveColor(sb_active_color); + sb_scale->setPassiveColor(sb_passive_color); //add scale object to container if(!sb_scale->isAdded()) addCCItem(sb_scale); - } void CSignalBar::initSBarValue() @@ -182,7 +186,6 @@ void CSignalBar::initSBarName() sb_lbl->setTextColor(sb_caption_color); sb_lbl->setColorBody(col_body); - //add name label object to container if (!sb_lbl->isAdded()) addCCItem(sb_lbl); @@ -295,7 +298,9 @@ void CSignalBox::initVarSigBox() height = 3* SB_MIN_HEIGHT; sbx_bar_height = height/2; sbx_bar_x = corner_rad; - sbx_caption_color = COL_INFOBAR_TEXT; + sbx_caption_color = COL_MENUCONTENT_TEXT; + sbx_active_color = COL_PROGRESSBAR_ACTIVE_PLUS_0; + sbx_passive_color = COL_PROGRESSBAR_PASSIVE_PLUS_0; vertical = true; } @@ -316,12 +321,18 @@ void CSignalBox::initSignalItems() sbar->setDimensionsAll(sbar_x, 1, sbar_w, sbar_h); sbar->setFrontEnd(sbx_frontend); + sbar->setTextColor(sbx_caption_color); + sbar->setActiveColor(sbx_active_color); + sbar->setPassiveColor(sbx_passive_color); sbar->setCorner(0); sbar->setScaleHeight(scale_h); sbar->enableTboxSaveScreen(cc_txt_save_screen); snrbar->setDimensionsAll(vertical ? sbar_x : CC_APPEND, vertical ? CC_APPEND : 1, sbar_w, sbar_h); snrbar->setFrontEnd(sbx_frontend); + snrbar->setTextColor(sbx_caption_color); + snrbar->setActiveColor(sbx_active_color); + snrbar->setPassiveColor(sbx_passive_color); snrbar->setCorner(0); snrbar->setScaleHeight(scale_h); snrbar->enableTboxSaveScreen(cc_txt_save_screen); diff --git a/src/gui/components/cc_frm_signalbars.h b/src/gui/components/cc_frm_signalbars.h index b69516a6c..69ce46e09 100644 --- a/src/gui/components/cc_frm_signalbars.h +++ b/src/gui/components/cc_frm_signalbars.h @@ -69,6 +69,10 @@ class CSignalBar : public CComponentsForm, public CCTextScreen CNeutrinoFonts *dy_font; ///property: text color, see also setTextColor() fb_pixel_t sb_caption_color; + ///property: active color, see also setActiveColor() + fb_pixel_t sb_active_color; + ///property: passive color, see also setPassiveColor() + fb_pixel_t sb_passive_color; ///property: item top position int sb_item_top; @@ -121,6 +125,10 @@ class CSignalBar : public CComponentsForm, public CCTextScreen virtual void setTextFont(Font* font_text){sb_font = font_text;}; ///sets the caption color, see also property 'sb_caption_color' virtual void setTextColor(const fb_pixel_t& caption_color){ sb_caption_color = caption_color;}; + ///set active color, see also property 'sb_active_color' + virtual void setActiveColor(const fb_pixel_t& active_color){ sb_active_color = active_color;}; + ///set passive color, see also property 'sb_passive_color' + virtual void setPassiveColor(const fb_pixel_t& passive_color){ sb_passive_color = passive_color;}; ///assigns the height of scale virtual void setScaleHeight(const int& scale_height){sb_scale_height = scale_height;}; ///assigns the width of scale @@ -277,6 +285,10 @@ class CSignalBox : public CComponentsForm, public CCTextScreen int sbx_bar_x; ///property: text color, see also setTextColor() fb_pixel_t sbx_caption_color; + ///property: active color, see also setActiveColor() + fb_pixel_t sbx_active_color; + ///property: passive color, see also setPassiveColor() + fb_pixel_t sbx_passive_color; // true if vertical arrangement, false if horizontal bool vertical; @@ -306,6 +318,16 @@ class CSignalBox : public CComponentsForm, public CCTextScreen ///get caption color of signalbars, see also property 'sbx_caption_color' fb_pixel_t getTextColor(){return sbx_caption_color;}; + ///set active color of signalbars, see also property 'sbx_active_color' + void setActiveColor(const fb_pixel_t& active_color){ sbx_active_color = active_color;}; + ///get active color of signalbars, see also property 'sbx_active_color' + fb_pixel_t getActiveColor(){return sbx_active_color;}; + + ///set passive color of signalbars, see also property 'sbx_passive_color' + void setPassiveColor(const fb_pixel_t& passive_color){ sbx_passive_color = passive_color;}; + ///get passive color of signalbars, see also property 'sbx_passive_color' + fb_pixel_t getPassiveColor(){return sbx_passive_color;}; + ///paint items void paint(bool do_save_bg); diff --git a/src/gui/components/cc_frm_slider.h b/src/gui/components/cc_frm_slider.h index a5e06dcd9..afa7a13bf 100644 --- a/src/gui/components/cc_frm_slider.h +++ b/src/gui/components/cc_frm_slider.h @@ -67,7 +67,7 @@ class CComponentsSlider : public CComponentsForm const int& max_value = 100, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t& color_frame = COL_FRAME_PLUS_0, fb_pixel_t& color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); // ~CComponentsSlider(); //inherited from CComponentsForm diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index 682236278..6d52dd36f 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -300,9 +300,6 @@ void CComponentsWindow::initBody() ccw_body->setCornerType(CORNER_TOP); if (!ccw_show_footer) ccw_body->setCornerType(ccw_body->getCornerType() | CORNER_BOTTOM); - if (!ccw_show_header) - ccw_body->setCornerType(CORNER_TOP); - } } diff --git a/src/gui/components/cc_frm_window.h b/src/gui/components/cc_frm_window.h index fe031b2d7..212db8ef7 100644 --- a/src/gui/components/cc_frm_window.h +++ b/src/gui/components/cc_frm_window.h @@ -110,7 +110,7 @@ class CComponentsWindow : public CComponentsForm const std::string& iconname = "", CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); ///initialize width and height @@ -135,7 +135,7 @@ class CComponentsWindow : public CComponentsForm const std::string& iconname = "", CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); @@ -145,7 +145,7 @@ class CComponentsWindow : public CComponentsForm const std::string& iconname = "", CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); @@ -231,7 +231,7 @@ class CComponentsWindowMax : public CComponentsWindow CComponentsWindowMax( const std::string& caption, const std::string& iconname = "", CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); @@ -239,7 +239,7 @@ class CComponentsWindowMax : public CComponentsWindow CComponentsWindowMax( neutrino_locale_t locale_caption, const std::string& iconname = "", CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); }; diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 4b6e56e9c..2e2f10891 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -148,7 +148,7 @@ void CComponentsItem::syncSysColors() { col_body = COL_MENUCONTENT_PLUS_0; col_shadow = COL_SHADOW_PLUS_0; - col_frame = COL_MENUCONTENT_PLUS_6; + col_frame = COL_FRAME_PLUS_0; } //returns current item element type, if no available, return -1 as unknown type diff --git a/src/gui/components/cc_item_infobox.h b/src/gui/components/cc_item_infobox.h index 98f0f4999..d8f2345c5 100644 --- a/src/gui/components/cc_item_infobox.h +++ b/src/gui/components/cc_item_infobox.h @@ -41,7 +41,6 @@ InfoBox has been originally intended for displaying text information or menue hi but is also usable like each other CCItems. */ -#define INFO_BOX_Y_OFFSET SHADOW_OFFSET //NI class CComponentsInfoBox : public CComponentsText { private: @@ -72,7 +71,7 @@ class CComponentsInfoBox : public CComponentsText CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, fb_pixel_t color_text = COL_MENUCONTENT_TEXT, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index ba35b446b..1fd538ac5 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -78,7 +78,7 @@ void CComponentsPicture::init( const int &x_pos, const int &y_pos, const int &w, height = dy = dyc = h; pic_name = pic_name_old = image_name; shadow = shadow_mode; - shadow_w = SHADOW_OFFSET; + shadow_w = OFFSET_SHADOW; col_frame = color_frame; col_body = color_background; col_shadow = color_shadow; diff --git a/src/gui/components/cc_item_picture.h b/src/gui/components/cc_item_picture.h index 72605f058..3aab7e11b 100644 --- a/src/gui/components/cc_item_picture.h +++ b/src/gui/components/cc_item_picture.h @@ -112,7 +112,7 @@ class CComponentsPicture : public CComponentsItem const std::string& image_name, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_background = 0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_NONE); @@ -128,7 +128,7 @@ class CComponentsPicture : public CComponentsItem const std::string& image_name, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_background = 0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_NONE); @@ -196,7 +196,7 @@ class CComponentsPictureScalable : public CComponentsPicture const std::string& image_name, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_background = 0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_NONE) @@ -231,7 +231,7 @@ class CComponentsChannelLogo : public CComponentsPicture const uint64_t& channelId =0, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_background = 0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_BLACK); @@ -247,7 +247,7 @@ class CComponentsChannelLogo : public CComponentsPicture const uint64_t& channelId =0, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_background = 0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_BLACK); @@ -280,7 +280,7 @@ class CComponentsChannelLogoScalable : public CComponentsChannelLogo const uint64_t& channelId =0, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_background = 0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_BLACK) diff --git a/src/gui/components/cc_item_progressbar.h b/src/gui/components/cc_item_progressbar.h index f5b03d164..6812c2aa4 100644 --- a/src/gui/components/cc_item_progressbar.h +++ b/src/gui/components/cc_item_progressbar.h @@ -105,8 +105,8 @@ class CProgressBar : public CComponentsItem fb_pixel_t color_frame = 0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, - const fb_pixel_t active_col = COL_INFOBAR_PLUS_7, - const fb_pixel_t passive_col = COL_INFOBAR_PLUS_3, + const fb_pixel_t active_col = COL_PROGRESSBAR_ACTIVE_PLUS_0, + const fb_pixel_t passive_col = COL_PROGRESSBAR_PASSIVE_PLUS_0, const int R = 40, const int G = 100, const int Y = 70, diff --git a/src/gui/components/cc_item_shapes.cpp b/src/gui/components/cc_item_shapes.cpp index d6c623b29..dffaca928 100644 --- a/src/gui/components/cc_item_shapes.cpp +++ b/src/gui/components/cc_item_shapes.cpp @@ -48,7 +48,7 @@ CComponentsShapeSquare::CComponentsShapeSquare( const int x_pos, const int y_pos width = width_old = w; height = height_old = h; shadow = shadow_mode; - shadow_w = SHADOW_OFFSET; + shadow_w = OFFSET_SHADOW; col_frame = color_frame; col_body = color_body; col_shadow = color_shadow; @@ -76,7 +76,7 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam, y = y_pos; //width = height = d = diam; shadow = shadow_mode; - shadow_w = SHADOW_OFFSET; + shadow_w = OFFSET_SHADOW; col_frame = color_frame; col_body = color_body; col_shadow = color_shadow; diff --git a/src/gui/components/cc_item_shapes.h b/src/gui/components/cc_item_shapes.h index 9b4c26df4..a1a48d97c 100644 --- a/src/gui/components/cc_item_shapes.h +++ b/src/gui/components/cc_item_shapes.h @@ -47,7 +47,9 @@ class CComponentsShapeCircle : public CComponentsItem CComponentsShapeCircle( const int x_pos, const int y_pos, const int diam, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_FRAME_PLUS_0, + fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, + fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); ///set property: diam inline void setDiam(const int& diam){d=width=height=diam, corner_rad=d/2;}; @@ -64,7 +66,9 @@ class CComponentsShapeSquare : public CComponentsItem CComponentsShapeSquare( const int x_pos, const int y_pos, const int w, const int h, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_FRAME_PLUS_0, + fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, + fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); }; diff --git a/src/gui/components/cc_item_text.h b/src/gui/components/cc_item_text.h index 344f99b2a..c29e3a9ae 100644 --- a/src/gui/components/cc_item_text.h +++ b/src/gui/components/cc_item_text.h @@ -86,7 +86,10 @@ class CComponentsText : public CCTextScreen, public CComponentsItem, public CBox const int& font_style, CComponentsForm *parent, int shadow_mode, - fb_pixel_t color_text, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow); + fb_pixel_t color_text, + fb_pixel_t color_frame, + fb_pixel_t color_body, + fb_pixel_t color_shadow); ///destroy current CTextBox and CBox objects void clearCCText(); @@ -109,7 +112,10 @@ class CComponentsText : public CCTextScreen, public CComponentsItem, public CBox const int& font_style = CComponentsText::FONT_STYLE_REGULAR, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_text = COL_MENUCONTENT_TEXT, fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_text = COL_MENUCONTENT_TEXT, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, + fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, + fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); CComponentsText( CComponentsForm *parent, const int x_pos = 10, const int y_pos = 10, const int w = 150, const int h = 50, @@ -118,7 +124,10 @@ class CComponentsText : public CCTextScreen, public CComponentsItem, public CBox Font* font_text = NULL, const int& font_style = CComponentsText::FONT_STYLE_REGULAR, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_text = COL_MENUCONTENT_TEXT, fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_text = COL_MENUCONTENT_TEXT, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, + fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, + fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); virtual ~CComponentsText(); @@ -133,7 +142,7 @@ class CComponentsText : public CCTextScreen, public CComponentsItem, public CBox ///set text color virtual void setTextColor(const fb_pixel_t& color_text); ///set all basic framebuffer element colors at once - ///Note: Possible color values are defined in "gui/color.h" and "gui/customcolor.h" + ///Note: Possible color values are defined in "gui/color.h" and "gui/color_custom.h" virtual void setColorAll(fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, fb_pixel_t color_text = COL_MENUCONTENT_TEXT) { CCDraw::setColorAll(color_frame, color_body, color_shadow); @@ -254,7 +263,7 @@ class CComponentsLabel : public CComponentsText CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, fb_pixel_t color_text = COL_MENUCONTENTINACTIVE_TEXT, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsText(x_pos, y_pos, w, h, text, mode, font_text, font_style, parent, shadow_mode, color_text, color_frame, color_body, color_shadow) diff --git a/src/gui/components/cc_item_tvpic.cpp b/src/gui/components/cc_item_tvpic.cpp index 4d038d897..e3cd41da8 100644 --- a/src/gui/components/cc_item_tvpic.cpp +++ b/src/gui/components/cc_item_tvpic.cpp @@ -60,7 +60,7 @@ CComponentsPIP::CComponentsPIP( const int x_pos, const int y_pos, const int perc width = percent*screen_w/100; height = percent*screen_h/100; shadow = shadow_mode; - shadow_w = SHADOW_OFFSET; + shadow_w = OFFSET_SHADOW; col_frame = color_frame; col_body = color_body; col_shadow = color_shadow; diff --git a/src/gui/components/cc_item_tvpic.h b/src/gui/components/cc_item_tvpic.h index 4f1e22e8b..373a88490 100644 --- a/src/gui/components/cc_item_tvpic.h +++ b/src/gui/components/cc_item_tvpic.h @@ -54,7 +54,7 @@ class CComponentsPIP : public CComponentsItem CComponentsPIP( const int x_pos = 0, const int y_pos = 0, const int percent = 30, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_BLACK, fb_pixel_t color_body = COL_BACKGROUND_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BACKGROUND_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); ~CComponentsPIP(); ///set property: width of tv box in pixel diff --git a/src/gui/customcolor.h b/src/gui/customcolor.h deleted file mode 100644 index 8d5be708a..000000000 --- a/src/gui/customcolor.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef __custom_color__ -#define __custom_color__ - -#define COLOR_CUSTOM 0x0 -#ifdef FB_USE_PALETTE -/* -#define COL_WHITE (COLOR_CUSTOM + 0) -#define COL_RED (COLOR_CUSTOM + 1) -#define COL_GREEN (COLOR_CUSTOM + 2) -#define COL_BLUE (COLOR_CUSTOM + 3) -#define COL_YELLOW (COLOR_CUSTOM + 4) -#define COL_BLACK (COLOR_CUSTOM + 5) -*/ -#define COL_DARK_RED 0x02 -#define COL_DARK_GREEN 0x03 -#define COL_OLIVE 0x04 -#define COL_DARK_BLUE 0x05 -#define COL_LIGHT_GRAY 0x08 -#define COL_DARK_GRAY 0x09 -#define COL_RED 0x0A -#define COL_GREEN 0x0B -#define COL_YELLOW 0x0C -#define COL_BLUE 0x0D -#define COL_PURP 0x0E -#define COL_LIGHT_BLUE 0x0F -#define COL_WHITE 0x10 -#define COL_BLACK 0x11 -#else -#define COL_DARK_RED0 0x02 -#define COL_DARK_GREEN0 0x03 -#define COL_OLIVE0 0x04 -#define COL_DARK_BLUE0 0x05 -#define COL_LIGHT_GRAY0 0x08 -#define COL_DARK_GRAY0 0x09 -#define COL_RED0 0x0A -#define COL_GREEN0 0x0B -#define COL_YELLOW0 0x0C -#define COL_BLUE0 0x0D -#define COL_PURP0 0x0E -#define COL_LIGHT_BLUE0 0x0F -#define COL_WHITE0 0x10 -#define COL_BLACK0 0x11 - -#define COL_DARK_RED (CFrameBuffer::getInstance()->realcolor[0x02]) -#define COL_DARK_GREEN (CFrameBuffer::getInstance()->realcolor[0x03]) -#define COL_OLIVE (CFrameBuffer::getInstance()->realcolor[0x04]) -#define COL_DARK_BLUE (CFrameBuffer::getInstance()->realcolor[0x05]) -#define COL_LIGHT_GRAY (CFrameBuffer::getInstance()->realcolor[0x08]) -#define COL_DARK_GRAY (CFrameBuffer::getInstance()->realcolor[0x09]) -#define COL_RED (CFrameBuffer::getInstance()->realcolor[0x0A]) -#define COL_GREEN (CFrameBuffer::getInstance()->realcolor[0x0B]) -#define COL_YELLOW (CFrameBuffer::getInstance()->realcolor[0x0C]) -#define COL_BLUE (CFrameBuffer::getInstance()->realcolor[0x0D]) -#define COL_PURP (CFrameBuffer::getInstance()->realcolor[0x0E]) -#define COL_LIGHT_BLUE (CFrameBuffer::getInstance()->realcolor[0x0F]) -#define COL_WHITE (CFrameBuffer::getInstance()->realcolor[0x10]) -#define COL_BLACK (CFrameBuffer::getInstance()->realcolor[0x11]) -#endif - -#endif diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 03ba3f1e9..4cd2ef8a3 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -1239,10 +1239,11 @@ void EpgPlus::paint() this->frameBuffer->paintBoxRel (this->sliderX, this->sliderY, this->sliderWidth, this->sliderHeight, COL_MENUCONTENT_PLUS_0); int tmp = ((this->channelList->getSize() - 1) / this->maxNumberOfDisplayableEntries) + 1; + float sliderKnobHeight = float((sliderHeight - 4) / tmp); int sliderKnobPosition = this->selectedChannelEntry == NULL ? 0 : (this->selectedChannelEntry->index / this->maxNumberOfDisplayableEntries); - this->frameBuffer->paintBoxRel(this->sliderX + 2, this->sliderY + sliderKnobPosition * (sliderHeight-4)/tmp - , this->sliderWidth - 4, (sliderHeight-4)/tmp, COL_MENUCONTENT_PLUS_3); + this->frameBuffer->paintBoxRel (this->sliderX + 2, this->sliderY + (int(sliderKnobPosition * sliderKnobHeight)) + , this->sliderWidth - 4, int (sliderKnobHeight) , COL_SCROLLBAR_ACTIVE_PLUS_0); } // -- EPG+ Menue Handler Class diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index f1e5f5058..d08bb7335 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include @@ -367,8 +366,8 @@ void CEpgData::showText(int startPos, int ypos, bool has_cover, bool fullClear) int sbs= (startPos+ 1)/ medlinecount; if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(sx+ ox- 15, ypos, 15, sb, COL_MENUCONTENT_PLUS_1); // scrollbar bg - frameBuffer->paintBoxRel(sx+ ox- 13, ypos+ 2+ sbs*(sb-4)/sbc , 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); // scrollbar + frameBuffer->paintBoxRel(sx+ ox- 15, ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); // scrollbar bg + frameBuffer->paintBoxRel(sx+ ox- 13, ypos+ 2+ sbs*(sb-4)/sbc , 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); // scrollbar } #define GENRE_MOVIE_COUNT 9 diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 5a977953a..3db3638d9 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -942,14 +942,14 @@ void CEventList::paint(t_channel_id channel_id) int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int sbc= ((evtlist.size()- 1)/ listmaxshow)+ 1; int sbs= (selected/listmaxshow); if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); } diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 8742295ff..2d0a59565 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -1184,7 +1184,7 @@ void CFileBrowser::paintItem(unsigned int pos) actual_file = &filelist[curr]; if (curr == selected) { - color = actual_file->Marked ? COL_MENUCONTENTINACTIVE_TEXT : COL_MENUCONTENTSELECTED_TEXT; + color = COL_MENUCONTENTSELECTED_TEXT; //NI bgcolor = actual_file->Marked ? COL_MENUCONTENTSELECTED_PLUS_2 : COL_MENUCONTENTSELECTED_PLUS_0; c_rad_small = RADIUS_SMALL; } @@ -1456,14 +1456,14 @@ void CFileBrowser::paint() //scrollbar int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int sbc= ((filelist.size()- 1)/ listmaxshow)+ 1; int sbs= (selected/listmaxshow); if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_SMALL); } void CFileBrowser::SMSInput(const neutrino_msg_t msg) diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index a5637052c..c3de0d622 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -38,9 +38,17 @@ #include #include #include +#include #include "version.h" #include #define LICENSEDIR DATADIR "/neutrino/license/" +#ifdef ENABLE_LUA +#include +#endif +#include + +#define VERSION_FILE TARGET_PREFIX "/.version" +#define Y_VERSION_FILE DATADIR "/neutrino/httpd/Y_Version.txt" using namespace std; @@ -62,12 +70,12 @@ void CImageInfo::Init(void) b_info = NULL; btn_red = NULL; item_offset = 10; - item_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]; - item_height = item_font->getHeight(); + item_font = NULL; + item_height = 0; license_txt = ""; v_info.clear(); - config.loadConfig("/.version"); + config.loadConfig(VERSION_FILE); } CImageInfo::~CImageInfo() @@ -105,7 +113,8 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &) //init window object, add cc-items and paint all ShowWindow(); - + bool fadeout = false; + neutrino_msg_t postmsg = 0; neutrino_msg_t msg; while (1) { @@ -113,9 +122,23 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &) uint64_t timeoutEnd = CRCInput::calcTimeoutEnd_MS(100); g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd ); + if ((msg == NeutrinoMessages::EVT_TIMER) && (data ==cc_win->GetFadeTimer())){ + if (cc_win->FadeDone()) + break; + continue; + } + if (fadeout && msg == CRCInput::RC_timeout){ + if (cc_win->StartFadeOut()){ + msg = menu_return::RETURN_EXIT_ALL; + continue; + } + else + break; + } + if(msg == CRCInput::RC_setup) { res = menu_return::RETURN_EXIT_ALL; - break; + fadeout = true; } else if (msg == CRCInput::RC_red){ // init temporarly vars @@ -152,9 +175,9 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &) btn_red->paint(false); } else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { - g_RCInput->postMsg (msg, 0); + postmsg = msg; res = menu_return::RETURN_EXIT_ALL; - break; + fadeout = true; } else if ((msg == CRCInput::RC_up) || (msg == CRCInput::RC_page_up)) { ScrollLic(false); @@ -163,7 +186,7 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &) ScrollLic(true); } else if (msg <= CRCInput::RC_MaxRC){ - break; + fadeout = true; } if ( msg > CRCInput::RC_MaxRC && msg != CRCInput::RC_timeout){ @@ -172,8 +195,10 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &) } + if (postmsg) + g_RCInput->postMsg(postmsg, 0); + hide(); - return res; } @@ -206,6 +231,7 @@ void CImageInfo::ShowWindow() InitInfoText(getLicenseText()); //paint window + cc_win->StartFadeIn(); cc_win->paint(CC_SAVE_SCREEN_NO); } @@ -276,6 +302,23 @@ void CImageInfo::InitInfoData() #endif image_info_t date = {LOCALE_IMAGEINFO_DATE, builddate}; v_info.push_back(date); + string s_api; +#ifdef ENABLE_LUA + s_api += "LUA " + to_string(LUA_API_VERSION_MAJOR) + "." + to_string(LUA_API_VERSION_MINOR); + s_api += ", "; +#endif + s_api += "yWeb "; + s_api += getYApi(); + s_api += ", "; + s_api += HTTPD_NAME; + s_api += + " "; + s_api += HTTPD_VERSION; + s_api += + ", "; + s_api += YHTTPD_NAME; + s_api += + " "; + s_api += YHTTPD_VERSION; + image_info_t api = {LOCALE_IMAGEINFO_API, s_api}; + v_info.push_back(api); if (uname(&uts_info) == 0) { image_info_t kernel = {LOCALE_IMAGEINFO_KERNEL, uts_info.release}; v_info.push_back(kernel); @@ -307,15 +350,19 @@ void CImageInfo::InitInfos() //set width, use size between left border and minitv cc_info->setWidth(cc_win->getWidth() - cc_tv->getWidth() - 2*item_offset); - //calculate initial height for info form - cc_info->setHeight(v_info.size()*item_height); - //create label and text items for (size_t i=0; igetWidth(), item_height, g_Locale->getText(v_info[i].caption), v_info[i].info_text); - item->setLabelAndTextFont(item_font); + CComponentsExtTextForm *item = new CComponentsExtTextForm(1, CC_APPEND, cc_info->getWidth(), 0, g_Locale->getText(v_info[i].caption), v_info[i].info_text); item->setLabelWidthPercent(20); + if (!item_font){ + item_font = item->getFont(); + //calculate initial height for info form + item_height = item_font->getHeight(); + } + item->setHeight(item_height); + cc_info->setHeight(v_info.size()*item_height); + if ((i == 0) && (item->getYPos() == CC_APPEND)) item->setYPos(1); @@ -408,6 +455,17 @@ void CImageInfo::hide() printf("[CImageInfo] [%s - %d] hide...\n", __FUNCTION__, __LINE__); if (cc_win){ cc_win->kill(); + cc_win->StopFade(); Clean(); } } + +string CImageInfo::getYApi() +{ + string ret; + config.loadConfig(Y_VERSION_FILE); + ret = config.getString("version", "n/a"); + config.loadConfig(VERSION_FILE); + return ret; +} + diff --git a/src/gui/imageinfo.h b/src/gui/imageinfo.h index 150c6dc9e..a243866b4 100644 --- a/src/gui/imageinfo.h +++ b/src/gui/imageinfo.h @@ -63,6 +63,7 @@ class CImageInfo : public CMenuTarget std::string getLicenseText(); void ShowWindow(); void ScrollLic(bool scrollDown); + std::string getYApi(); CComponentsWindowMax *cc_win; CComponentsForm *cc_info; diff --git a/src/gui/imageinfo_ni.cpp b/src/gui/imageinfo_ni.cpp index 808ad7420..4078efcfd 100644 --- a/src/gui/imageinfo_ni.cpp +++ b/src/gui/imageinfo_ni.cpp @@ -47,7 +47,7 @@ #include #include -#include +#include #include #include #include @@ -176,8 +176,22 @@ int CImageInfoNI::exec(CMenuTarget* parent, const std::string &) { break; } + continue; } - else if (msg == CRCInput::RC_setup) + if (fadeout && msg == CRCInput::RC_timeout) + { + if (fader.StartFadeOut()) + { + msg = 0; + continue; + } + else + { + break; + } + } + + if (msg == CRCInput::RC_setup) { res = menu_return::RETURN_EXIT_ALL; fadeout = true; @@ -203,18 +217,6 @@ int CImageInfoNI::exec(CMenuTarget* parent, const std::string &) CNeutrinoApp::getInstance()->handleMsg(msg, data); } - if (fadeout && msg == CRCInput::RC_timeout) - { - if (fader.StartFadeOut()) - { - msg = 0; - } - else - { - break; - } - } - Stat_Info(&cpu); paint_CPU_Percent(CPU_Percent(&cpu)); } @@ -274,7 +276,7 @@ void CImageInfoNI::paint() ypos += iheight/2; CConfigFile config('\t'); - config.loadConfig("/.version"); + config.loadConfig(TARGET_PREFIX "/.version"); std::string imagename = config.getString("imagename", "NI-Neutrino-HD"); std::string homepage = config.getString("homepage", "www.neutrino-images.de"); diff --git a/src/gui/infoclock.cpp b/src/gui/infoclock.cpp index bd28a7f21..0971e2401 100644 --- a/src/gui/infoclock.cpp +++ b/src/gui/infoclock.cpp @@ -36,7 +36,7 @@ -CInfoClock::CInfoClock():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON, COL_LIGHT_GRAY, COL_MENUCONTENT_PLUS_0,COL_MENUCONTENTDARK_PLUS_0) +CInfoClock::CInfoClock():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON) { initCCLockItems(); } @@ -54,13 +54,13 @@ void CInfoClock::initCCLockItems() paint_bg = g_settings.infoClockBackground; //use current theme colors - setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); + setColorAll(COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_SHADOW_PLUS_0); //set text color if (paint_bg){ cl_col_text = COL_MENUCONTENT_TEXT; setColorBody(COL_MENUCONTENT_PLUS_0); - enableShadow(CC_SHADOW_ON, 3); + enableShadow(CC_SHADOW_ON, OFFSET_SHADOW/2); }else{ cl_col_text = COL_INFOCLOCK_TEXT; setColorBody(COL_BACKGROUND_PLUS_0); diff --git a/src/gui/infoicons.cpp b/src/gui/infoicons.cpp index b380cb97f..046cc8e3b 100644 --- a/src/gui/infoicons.cpp +++ b/src/gui/infoicons.cpp @@ -148,7 +148,7 @@ void CInfoIcons::paintBackground() { if (g_settings.mode_icons_background) { - frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width, height, COL_SHADOW_PLUS_0, RADIUS_SMALL); + frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + OFFSET_SHADOW, width, height, COL_SHADOW_PLUS_0, RADIUS_SMALL); frameBuffer->paintBoxRel(x, y, width, height, COL_MENUCONTENT_PLUS_0, RADIUS_SMALL); } else @@ -250,7 +250,7 @@ void CInfoIcons::paintIcons(bool first) void CInfoIcons::hideIcons() { - frameBuffer->paintBackgroundBoxRel(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET); + frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW); } void* CInfoIcons::TimerProc(void *arg) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 0a5930ccb..e5b984d31 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -56,9 +56,9 @@ #include #include +#include #include #include -#include #include #include #include @@ -233,7 +233,7 @@ void CInfoViewer::start () BoxEndY = g_settings.screen_EndY - 10 - infoViewerBB->InfoHeightY_Info - infoViewerBB->bottom_bar_offset; BoxStartY = BoxEndY - InfoHeightY - ChanHeight / 2; - ChanNameY = BoxStartY + (ChanHeight / 2) + SHADOW_OFFSET; + ChanNameY = BoxStartY + (ChanHeight / 2) + OFFSET_SHADOW; ChanInfoX = BoxStartX + (ChanWidth / 3); initClock(); @@ -319,12 +319,12 @@ void CInfoViewer::showRecordIcon (const bool show) int txt_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); int txt_w = 0; - int box_x = BoxStartX + ChanWidth + 2*SHADOW_OFFSET; - int box_y = BoxStartY + SHADOW_OFFSET; + int box_x = BoxStartX + ChanWidth + 2*OFFSET_SHADOW; + int box_y = BoxStartY + OFFSET_SHADOW; int box_w = 0; int box_h = txt_h; - int icon_space = SHADOW_OFFSET/2; + int icon_space = OFFSET_SHADOW/2; int rec_icon_x = 0, rec_icon_w = 0, rec_icon_h = 0; int ts_icon_x = 0, ts_icon_w = 0, ts_icon_h = 0; @@ -370,7 +370,7 @@ void CInfoViewer::showRecordIcon (const bool show) if (rec == NULL){ //TODO: full refactoring of this icon handler rec = new CComponentsShapeSquare(box_x, box_y , box_w, box_h, NULL, CC_SHADOW_ON, COL_RED, COL_INFOBAR_PLUS_0); rec->setFrameThickness(0); //NI - rec->setShadowWidth(SHADOW_OFFSET/2); + rec->setShadowWidth(OFFSET_SHADOW/2); rec->setCorner(RADIUS_MIN, CORNER_ALL); } if (rec->getWidth() != box_w) @@ -419,17 +419,17 @@ void CInfoViewer::paintBackground(int col_NumBox) frameBuffer->paintBackgroundBox(BoxStartX, BoxStartY + ChanHeight - 6, BoxStartX + ChanWidth / 3, - BoxEndInfoY + SHADOW_OFFSET); + BoxEndInfoY + OFFSET_SHADOW); // kill progressbar + info-line frameBuffer->paintBackgroundBox(BoxStartX + ChanWidth + 40, // 40 for the recording icon! BoxStartY, BoxEndX, BoxStartY + ChanHeight); // shadow for channel name, epg data... - frameBuffer->paintBox(BoxEndX - c_shadow_width, ChanNameY + SHADOW_OFFSET, - BoxEndX + SHADOW_OFFSET, BoxEndInfoY + SHADOW_OFFSET, + frameBuffer->paintBox(BoxEndX - c_shadow_width, ChanNameY + OFFSET_SHADOW, + BoxEndX + OFFSET_SHADOW, BoxEndInfoY + OFFSET_SHADOW, COL_SHADOW_PLUS_0, c_rad_large, CORNER_RIGHT); - frameBuffer->paintBox(ChanInfoX + SHADOW_OFFSET, BoxEndInfoY - c_shadow_width, - BoxEndX - c_shadow_width, BoxEndInfoY + SHADOW_OFFSET, + frameBuffer->paintBox(ChanInfoX + OFFSET_SHADOW, BoxEndInfoY - c_shadow_width, + BoxEndX - c_shadow_width, BoxEndInfoY + OFFSET_SHADOW, COL_SHADOW_PLUS_0, c_rad_large, CORNER_BOTTOM_LEFT); #endif // background for channel name/logo and clock @@ -439,10 +439,10 @@ void CInfoViewer::paintBackground(int col_NumBox) paintBody(); // number box - int y_numbox = body->getYPos()-ChanHeight-SHADOW_OFFSET; + int y_numbox = body->getYPos()-ChanHeight-OFFSET_SHADOW; if (numbox == NULL){ //TODO: move into an own member, paintNumBox() or so... numbox = new CComponentsShapeSquare(BoxStartX, y_numbox, ChanWidth, ChanHeight); - numbox->enableShadow(CC_SHADOW_ON, SHADOW_OFFSET, true); + numbox->enableShadow(CC_SHADOW_ON, OFFSET_SHADOW, true); }else numbox->setDimensionsAll(BoxStartX, y_numbox, ChanWidth, ChanHeight); numbox->setColorBody(g_settings.theme.infobar_gradient_top ? COL_MENUHEAD_PLUS_0 : col_NumBox); @@ -471,7 +471,7 @@ void CInfoViewer::paintHead() void CInfoViewer::paintBody() { - int h_body = InfoHeightY - header_height - SHADOW_OFFSET; + int h_body = InfoHeightY - header_height - OFFSET_SHADOW; infoViewerBB->initBBOffset(); if (!zap_mode) h_body += infoViewerBB->bottom_bar_offset; @@ -611,7 +611,7 @@ void CInfoViewer::showMovieTitle(const int playState, const t_channel_id &Channe current_channel_id = Channel_Id; /* showChannelLogo() changes this, so better reset it every time... */ - ChanNameX = BoxStartX + ChanWidth + SHADOW_OFFSET; + ChanNameX = BoxStartX + ChanWidth + OFFSET_SHADOW; paintBackground(COL_INFOBAR_PLUS_0); @@ -794,7 +794,7 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap } /* showChannelLogo() changes this, so better reset it every time... */ - ChanNameX = BoxStartX + ChanWidth + SHADOW_OFFSET; + ChanNameX = BoxStartX + ChanWidth + OFFSET_SHADOW; paintBackground(col_NumBox); @@ -1398,8 +1398,8 @@ void CInfoViewer::showRadiotext() rt_dy = 25; rt_x = BoxStartX; rt_y = g_settings.screen_StartY + 10; - rt_h = rt_y + 7 + rt_dy*(g_Radiotext->S_RtOsdRows+1)+SHADOW_OFFSET; - rt_w = rt_x+rt_dx+SHADOW_OFFSET; + rt_h = rt_y + 7 + rt_dy*(g_Radiotext->S_RtOsdRows+1)+OFFSET_SHADOW; + rt_w = rt_x+rt_dx+OFFSET_SHADOW; int lines = 0; for (int i = 0; i < g_Radiotext->S_RtOsdRows; i++) { @@ -1423,7 +1423,7 @@ void CInfoViewer::showRadiotext() InfoIcons->hideIcons(); // shadow - frameBuffer->paintBoxRel(rt_x+SHADOW_OFFSET, rt_y+SHADOW_OFFSET, rt_dx, rt_dy, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_TOP); + frameBuffer->paintBoxRel(rt_x+OFFSET_SHADOW, rt_y+OFFSET_SHADOW, rt_dx, rt_dy, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_TOP); frameBuffer->paintBoxRel(rt_x, rt_y, rt_dx, rt_dy, COL_INFOBAR_PLUS_0, RADIUS_LARGE, CORNER_TOP); g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rt_x+10, rt_y+ 30, rt_dx-20, stext[0], COL_INFOBAR_TEXT, 0, RTisIsUTF); } @@ -1452,7 +1452,7 @@ void CInfoViewer::showRadiotext() } // Body if (lines) { - frameBuffer->paintBoxRel(rt_x+SHADOW_OFFSET, rt_y+rt_dy+SHADOW_OFFSET, rt_dx, 7+rt_dy* g_Radiotext->S_RtOsdRows, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); + frameBuffer->paintBoxRel(rt_x+OFFSET_SHADOW, rt_y+rt_dy+OFFSET_SHADOW, rt_dx, 7+rt_dy* g_Radiotext->S_RtOsdRows, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); frameBuffer->paintBoxRel(rt_x, rt_y+rt_dy, rt_dx, 7+rt_dy* g_Radiotext->S_RtOsdRows, COL_INFOBAR_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); // RT-Text roundloop @@ -1744,6 +1744,8 @@ void CInfoViewer::showSNR () int sigbox_offset = ChanWidth *10/100; sigbox = new CSignalBox(BoxStartX + sigbox_offset, y_numbox+ChanHeight/2, ChanWidth - 2*sigbox_offset, ChanHeight/2, NULL, true, NULL, "S", "Q"); sigbox->setTextColor(COL_INFOBAR_TEXT); + sigbox->setActiveColor(COL_INFOBAR_PLUS_7); + sigbox->setPassiveColor(COL_INFOBAR_PLUS_3); sigbox->setColorBody(numbox->getColorBody()); sigbox->doPaintBg(false); sigbox->enableTboxSaveScreen(numbox->getColBodyGradientMode()); @@ -1803,17 +1805,14 @@ void CInfoViewer::display_Info(const char *current, const char *next, int pb_w = 112; int pb_startx = BoxEndX - pb_w; //NI int pb_starty = ChanNameY - (pb_h + 10); - int pb_shadow = COL_SHADOW_PLUS_0; - timescale->enableShadow(!g_settings.infobar_progressbar); - int pb_color = (g_settings.progressbar_design == CProgressBar::PB_MONO) ? COL_INFOBAR_PLUS_0 : COL_SHADOW_PLUS_0; - if(g_settings.infobar_progressbar){ + if (g_settings.infobar_progressbar) + { pb_startx = xStart; pb_w = BoxEndX - 10 - xStart; pb_w -= analogclock_size + analogclock_offset; //NI - pb_shadow = 0; } int tmpY = CurrInfoY - height - ChanNameY + header_height - - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitOffset()/3+SHADOW_OFFSET; + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitOffset()/3+OFFSET_SHADOW; switch(g_settings.infobar_progressbar){ //set progressbar position case SNeutrinoSettings::INFOBAR_PROGRESSBAR_ARRANGEMENT_BELOW_CH_NAME: pb_h = (pb_h/3); @@ -1836,10 +1835,12 @@ void CInfoViewer::display_Info(const char *current, const char *next, pb_p = pb_w; timescale->setDimensionsAll(pb_startx, pb_starty, pb_w, pb_h); - timescale->setColorAll(pb_color, pb_color, pb_shadow); + timescale->setActiveColor(COL_INFOBAR_PLUS_7); + timescale->setPassiveColor(g_settings.infobar_progressbar ? COL_INFOBAR_PLUS_1 : COL_INFOBAR_PLUS_0); + timescale->enableShadow(!g_settings.infobar_progressbar); timescale->setValues(pb_p, pb_w); - //printf("paintProgressBar(%d, %d, %d, %d)\n", BoxEndX - pb_w - SHADOW_OFFSET, ChanNameY - (pb_h + 10) , pb_w, pb_h); + //printf("paintProgressBar(%d, %d, %d, %d)\n", BoxEndX - pb_w - OFFSET_SHADOW, ChanNameY - (pb_h + 10) , pb_w, pb_h); }else{ if (g_settings.infobar_progressbar == SNeutrinoSettings::INFOBAR_PROGRESSBAR_ARRANGEMENT_DEFAULT) timescale->kill(); @@ -2190,7 +2191,7 @@ void CInfoViewer::showInfoFile() infobar_txt = new CComponentsInfoBox(); //set some properties for info object infobar_txt->setCorner(RADIUS_SMALL); - infobar_txt->enableShadow(CC_SHADOW_ON, SHADOW_OFFSET/2); + infobar_txt->enableShadow(CC_SHADOW_ON, OFFSET_SHADOW/2); infobar_txt->setTextColor(COL_INFOBAR_TEXT); infobar_txt->setColorBody(COL_INFOBAR_PLUS_0); infobar_txt->doPaintTextBoxBg(false); @@ -2227,7 +2228,7 @@ void CInfoViewer::killTitle() is_visible = false; infoViewerBB->is_visible = false; #if 0 //unused - int bottom = BoxEndY + SHADOW_OFFSET + infoViewerBB->bottom_bar_offset; + int bottom = BoxEndY + OFFSET_SHADOW + infoViewerBB->bottom_bar_offset; if (showButtonBar) bottom += infoViewerBB->InfoHeightY_Info; #endif @@ -2237,8 +2238,8 @@ void CInfoViewer::killTitle() infoViewerBB->getCABar()->kill(); if (rec) rec->kill(); - //printf("killTitle(%d, %d, %d, %d)\n", BoxStartX, BoxStartY, BoxEndX+ SHADOW_OFFSET-BoxStartX, bottom-BoxStartY); - //frameBuffer->paintBackgroundBox(BoxStartX, BoxStartY, BoxEndX+ SHADOW_OFFSET, bottom); + //printf("killTitle(%d, %d, %d, %d)\n", BoxStartX, BoxStartY, BoxEndX+ OFFSET_SHADOW-BoxStartX, bottom-BoxStartY); + //frameBuffer->paintBackgroundBox(BoxStartX, BoxStartY, BoxEndX+ OFFSET_SHADOW, bottom); if (!(zap_mode & IV_MODE_VIRTUAL_ZAP)){ if (infobar_txt) infobar_txt->kill(); @@ -2599,7 +2600,7 @@ void CInfoViewer::ecmInfoBox_show(const char * txt, int w, int h, Font * font) //calc available width (width of Infobar) int max_w = BoxEndX - BoxStartX; //calc available height (space between Top and Infobar) - int max_h = BoxStartY - frameBuffer->getScreenY() - 2*SHADOW_OFFSET; + int max_h = BoxStartY - frameBuffer->getScreenY() - 2*OFFSET_SHADOW; //get window header object CComponentsHeader* winheader = ecmInfoBox->getHeaderObject(); diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index f6a04825b..c5c4e5a18 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -48,7 +48,6 @@ #include "gui/keybind_setup.h" #include #include -#include #include #include #include diff --git a/src/gui/lua/lua_api_version.h b/src/gui/lua/lua_api_version.h index 642456596..9c36a6594 100644 --- a/src/gui/lua/lua_api_version.h +++ b/src/gui/lua/lua_api_version.h @@ -4,4 +4,4 @@ * to luainstance.h changes */ #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 60 +#define LUA_API_VERSION_MINOR 65 diff --git a/src/gui/lua/lua_cc_header.cpp b/src/gui/lua/lua_cc_header.cpp index fa68852ee..d75ef646e 100644 --- a/src/gui/lua/lua_cc_header.cpp +++ b/src/gui/lua/lua_cc_header.cpp @@ -74,7 +74,7 @@ int CLuaInstCCHeader::CCHeaderNew(lua_State *L) lua_Integer shadow_mode = CC_SHADOW_OFF; std::string caption, icon; - lua_Unsigned color_frame = (lua_Unsigned)COL_MENUCONTENT_PLUS_6; + lua_Unsigned color_frame = (lua_Unsigned)COL_FRAME_PLUS_0; lua_Unsigned color_body = (lua_Unsigned)COL_MENUCONTENT_PLUS_0; lua_Unsigned color_shadow = (lua_Unsigned)COL_SHADOW_PLUS_0; diff --git a/src/gui/lua/lua_cc_picture.cpp b/src/gui/lua/lua_cc_picture.cpp index b383bd79b..52e99c701 100644 --- a/src/gui/lua/lua_cc_picture.cpp +++ b/src/gui/lua/lua_cc_picture.cpp @@ -78,7 +78,7 @@ int CLuaInstCCPicture::CCPictureNew(lua_State *L) lua_Integer x=10, y=10, dx=100, dy=100; std::string image_name = ""; lua_Integer alignment = 0; - lua_Unsigned color_frame = (lua_Unsigned)COL_MENUCONTENT_PLUS_6; + lua_Unsigned color_frame = (lua_Unsigned)COL_FRAME_PLUS_0; lua_Unsigned color_background = (lua_Unsigned)COL_MENUCONTENT_PLUS_0; lua_Unsigned color_shadow = (lua_Unsigned)COL_SHADOW_PLUS_0; diff --git a/src/gui/lua/lua_cc_signalbox.cpp b/src/gui/lua/lua_cc_signalbox.cpp index 6f9253f13..ac8a2ac17 100644 --- a/src/gui/lua/lua_cc_signalbox.cpp +++ b/src/gui/lua/lua_cc_signalbox.cpp @@ -34,6 +34,8 @@ #include "lua_cc_window.h" #include "lua_cc_signalbox.h" +#include + CLuaInstCCSignalbox* CLuaInstCCSignalbox::getInstance() { static CLuaInstCCSignalbox* LuaInstCCSignalbox = NULL; @@ -82,7 +84,7 @@ int CLuaInstCCSignalbox::CCSignalBoxNew(lua_State *L) CComponentsForm* pw = (parent && parent->w) ? parent->w->getBodyObject() : NULL; CLuaCCSignalBox **udata = (CLuaCCSignalBox **) lua_newuserdata(L, sizeof(CLuaCCSignalBox *)); *udata = new CLuaCCSignalBox(); - (*udata)->s = new CSignalBox(x, y, dx, dy, NULL, (vertical!=0)?true:false, pw); + (*udata)->s = new CSignalBox(x, y, dx, dy, CFEManager::getInstance()->getLiveFE(), (vertical!=0)?true:false, pw); (*udata)->parent = pw; luaL_getmetatable(L, "signalbox"); lua_setmetatable(L, -2); diff --git a/src/gui/lua/lua_cc_text.cpp b/src/gui/lua/lua_cc_text.cpp index 60f23f78c..7e1ea5d36 100644 --- a/src/gui/lua/lua_cc_text.cpp +++ b/src/gui/lua/lua_cc_text.cpp @@ -83,7 +83,7 @@ int CLuaInstCCText::CCTextNew(lua_State *L) lua_Integer mode = CTextBox::AUTO_WIDTH; lua_Integer font_text = SNeutrinoSettings::FONT_TYPE_MENU; lua_Unsigned color_text = (lua_Unsigned)COL_MENUCONTENT_TEXT; - lua_Unsigned color_frame = (lua_Unsigned)COL_MENUCONTENT_PLUS_6; + lua_Unsigned color_frame = (lua_Unsigned)COL_FRAME_PLUS_0; lua_Unsigned color_body = (lua_Unsigned)COL_MENUCONTENT_PLUS_0; lua_Unsigned color_shadow = (lua_Unsigned)COL_SHADOW_PLUS_0; diff --git a/src/gui/lua/lua_cc_window.cpp b/src/gui/lua/lua_cc_window.cpp index df87bb815..7dc5e77bd 100644 --- a/src/gui/lua/lua_cc_window.cpp +++ b/src/gui/lua/lua_cc_window.cpp @@ -73,7 +73,7 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L) lua_assert(lua_istable(L,1)); std::string name, icon = std::string(NEUTRINO_ICON_INFO); - lua_Unsigned color_frame = (lua_Unsigned)COL_MENUCONTENT_PLUS_6; + lua_Unsigned color_frame = (lua_Unsigned)COL_FRAME_PLUS_0; lua_Unsigned color_body = (lua_Unsigned)COL_MENUCONTENT_PLUS_0; lua_Unsigned color_shadow = (lua_Unsigned)COL_SHADOW_PLUS_0; std::string tmp1 = "false"; diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index 203ef7d95..e7e0b80bc 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -171,6 +172,11 @@ static void set_lua_variables(lua_State *L) { "MENUCONTENTSELECTED", MAGIC_COLOR | (COL_MENUCONTENTSELECTED) }, { "MENUCONTENTINACTIVE", MAGIC_COLOR | (COL_MENUCONTENTINACTIVE) }, { "MENUFOOT", MAGIC_COLOR | (COL_MENUFOOT) }, + { "FRAME", MAGIC_COLOR | (COL_FRAME) }, + { "SCROLLBAR_ACTIVE", MAGIC_COLOR | (COL_SCROLLBAR_ACTIVE) }, + { "SCROLLBAR_PASSIVE", MAGIC_COLOR | (COL_SCROLLBAR_PASSIVE) }, + { "PROGRESSBAR_ACTIVE", MAGIC_COLOR | (COL_PROGRESSBAR_ACTIVE) }, + { "PROGRESSBAR_PASSIVE", MAGIC_COLOR | (COL_PROGRESSBAR_PASSIVE) }, { "BACKGROUND", MAGIC_COLOR | (COL_BACKGROUND) }, { "DARK_RED", MAGIC_COLOR | (COL_DARK_RED0) }, { "DARK_GREEN", MAGIC_COLOR | (COL_DARK_GREEN0) }, @@ -217,6 +223,11 @@ static void set_lua_variables(lua_State *L) { "MENUCONTENTSELECTED_PLUS_2", (lua_Unsigned) (COL_MENUCONTENTSELECTED_PLUS_2) }, { "MENUCONTENTINACTIVE_PLUS_0", (lua_Unsigned) (COL_MENUCONTENTINACTIVE_PLUS_0) }, { "MENUFOOT_PLUS_0", (lua_Unsigned) (COL_MENUFOOT_PLUS_0) }, + { "FRAME_PLUS_0", (lua_Unsigned) (COL_FRAME_PLUS_0) }, + { "SCROLLBAR_ACTIVE_PLUS_0", (lua_Unsigned) (COL_SCROLLBAR_ACTIVE_PLUS_0) }, + { "SCROLLBAR_PASSIVE_PLUS_0", (lua_Unsigned) (COL_SCROLLBAR_PASSIVE_PLUS_0) }, + { "PROGRESSBAR_ACTIVE_PLUS_0", (lua_Unsigned) (COL_PROGRESSBAR_ACTIVE_PLUS_0) }, + { "PROGRESSBAR_PASSIVE_PLUS_0", (lua_Unsigned) (COL_PROGRESSBAR_PASSIVE_PLUS_0) }, { NULL, 0 } }; diff --git a/src/gui/motorcontrol.cpp b/src/gui/motorcontrol.cpp index d10cdfbb5..50a5ed1f8 100644 --- a/src/gui/motorcontrol.cpp +++ b/src/gui/motorcontrol.cpp @@ -33,7 +33,6 @@ #include #include -#include #include #include #include diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 4c7af09a4..a53d81571 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -1,25 +1,25 @@ -/*************************************************************************** - Neutrino-GUI - DBoxII-Project +/* + Based up Neutrino-GUI - Tuxbox-Project + Copyright (C) 2001 by Steffen Hehn 'McClean' License: GPL - 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 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. + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . *********************************************************** - Module Name: moviebrowser.cpp . + Module Name: mb.cpp Description: Implementation of the CMovieBrowser class This class provides a filebrowser window to view, select and start a movies from HD. @@ -27,12 +27,14 @@ Date: Nov 2005 - Author: Günther@tuxbox.berlios.org + Author: Guenther@tuxbox.berlios.org based on code of Steffen Hehn 'McClean' (C) 2009-2015 Stefan Seyfried -****************************************************************************/ + outsourced: + (C) 2016, Thilo Graf 'dbt' +*/ #ifdef HAVE_CONFIG_H #include @@ -45,11 +47,11 @@ //#include #include "mb.h" #include "mb_functions.h" +#include "mb_help.h" #include #include #include #include -#include #include #include #include @@ -65,7 +67,6 @@ #include //#include #include -#include #include #include //#include @@ -153,8 +154,6 @@ const CMenuOptionChooser::keyval MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS[MESSAGEBOX_ #define TITLE_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE] #define FOOT_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT] -#define INTER_FRAME_SPACE 4 // space between e.g. upper and lower window - const neutrino_locale_t m_localizedItemName[MB_INFO_MAX_NUMBER+1] = { LOCALE_MOVIEBROWSER_SHORT_FILENAME, @@ -518,18 +517,18 @@ void CMovieBrowser::initFrames(void) m_cBoxFrameLastPlayList.iX = m_cBoxFrameBrowserList.iX; m_cBoxFrameLastPlayList.iY = m_cBoxFrameBrowserList.iY ; - m_cBoxFrameLastPlayList.iWidth = (m_cBoxFrameBrowserList.iWidth>>1) - (INTER_FRAME_SPACE>>1); + m_cBoxFrameLastPlayList.iWidth = (m_cBoxFrameBrowserList.iWidth>>1) - (OFFSET_INTER>>1); m_cBoxFrameLastPlayList.iHeight = m_cBoxFrameBrowserList.iHeight; - m_cBoxFrameLastRecordList.iX = m_cBoxFrameLastPlayList.iX + m_cBoxFrameLastPlayList.iWidth + INTER_FRAME_SPACE; + m_cBoxFrameLastRecordList.iX = m_cBoxFrameLastPlayList.iX + m_cBoxFrameLastPlayList.iWidth + OFFSET_INTER; m_cBoxFrameLastRecordList.iY = m_cBoxFrameLastPlayList.iY; - m_cBoxFrameLastRecordList.iWidth = m_cBoxFrame.iWidth - m_cBoxFrameLastPlayList.iWidth - INTER_FRAME_SPACE; + m_cBoxFrameLastRecordList.iWidth = m_cBoxFrame.iWidth - m_cBoxFrameLastPlayList.iWidth - OFFSET_INTER; m_cBoxFrameLastRecordList.iHeight = m_cBoxFrameLastPlayList.iHeight; m_cBoxFrameInfo.iX = m_cBoxFrameBrowserList.iX; - m_cBoxFrameInfo.iY = m_cBoxFrameBrowserList.iY + m_cBoxFrameBrowserList.iHeight + INTER_FRAME_SPACE; + m_cBoxFrameInfo.iY = m_cBoxFrameBrowserList.iY + m_cBoxFrameBrowserList.iHeight + OFFSET_INTER; m_cBoxFrameInfo.iWidth = m_cBoxFrameBrowserList.iWidth; - m_cBoxFrameInfo.iHeight = m_cBoxFrame.iHeight - m_cBoxFrameBrowserList.iHeight - INTER_FRAME_SPACE - m_cBoxFrameFootRel.iHeight - m_cBoxFrameTitleRel.iHeight; + m_cBoxFrameInfo.iHeight = m_cBoxFrame.iHeight - m_cBoxFrameBrowserList.iHeight - OFFSET_INTER - m_cBoxFrameFootRel.iHeight - m_cBoxFrameTitleRel.iHeight; m_cBoxFrameFilter.iX = m_cBoxFrameInfo.iX; m_cBoxFrameFilter.iY = m_cBoxFrameInfo.iY; @@ -1361,7 +1360,7 @@ void CMovieBrowser::refreshMovieInfo(void) //printf("refreshMovieInfo: EpgId %llx id %llx y %d\n", m_movieSelectionHandler->epgId, m_movieSelectionHandler->channelId, m_cBoxFrameTitleRel.iY); int lx = 0;//never read m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX+m_cBoxFrameTitleRel.iWidth-logo_w-10; int ly = 0;//never read m_cBoxFrameTitleRel.iY+m_cBoxFrame.iY+ (m_cBoxFrameTitleRel.iHeight-logo_h)/2; - short pb_hdd_offset = g_settings.infobar_show_sysfs_hdd ? 104 : 0; + short pb_hdd_offset = 104; if (show_mode == MB_SHOW_YT) pb_hdd_offset = 0; @@ -1439,7 +1438,7 @@ void CMovieBrowser::refreshMovieInfo(void) void CMovieBrowser::info_hdd_level(bool paint_hdd) { - if (show_mode == MB_SHOW_YT || !g_settings.infobar_show_sysfs_hdd) + if (show_mode == MB_SHOW_YT) return; struct statfs s; @@ -4082,24 +4081,7 @@ int CMenuSelector::paint(bool selected) return y+height; } -int CMovieHelp::exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/) -{ - Helpbox helpbox; - helpbox.addLine(NEUTRINO_ICON_BUTTON_RED, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RED)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_GREEN, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_GREEN)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_YELLOW, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_YELLOW)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_BLUE)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_MENU_SMALL,g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MENU)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_PLAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_PLAY)); - helpbox.addLine(""); - helpbox.addLine(NEUTRINO_ICON_BUTTON_OKAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_OKAY)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_MUTE_SMALL,g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MUTE)); - helpbox.addLine(""); - helpbox.addLine(NEUTRINO_ICON_BUTTON_LEFT, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_LEFT)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_RIGHT, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RIGHT)); - helpbox.show(LOCALE_MESSAGEBOX_INFO); - return(0); -} + ///////////////////////////////////////////////// // MenuTargets //////////////////////////////////////////////// diff --git a/src/gui/moviebrowser/mb.h b/src/gui/moviebrowser/mb.h index 4c751361b..844f5910f 100644 --- a/src/gui/moviebrowser/mb.h +++ b/src/gui/moviebrowser/mb.h @@ -1,67 +1,41 @@ -/*************************************************************************** - Neutrino-GUI - DBoxII-Project - - Homepage: http://dbox.cyberphoria.org/ - - $Id: moviebrowser.h,v 1.5 2006/09/11 21:11:35 guenther Exp $ - - Kommentar: - - Diese GUI wurde von Grund auf neu programmiert und sollte nun vom - Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert - auf der Client-Server Idee, diese GUI ist also von der direkten DBox- - Steuerung getrennt. Diese wird dann von Daemons uebernommen. - +/* + Based up Neutrino-GUI - Tuxbox-Project + Copyright (C) 2001 by Steffen Hehn 'McClean' License: GPL - 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 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. + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . *********************************************************** - Module Name: moviebrowser.h . + Module Name: mb.h - Description: implementation of the CMovieBrowser class + Description: Implementation of the CMovieBrowser class + This class provides a filebrowser window to view, select and start a movies from HD. + This class does replace the Filebrowser Date: Nov 2005 - Author: Günther@tuxbox.berlios.org + Author: Guenther@tuxbox.berlios.org based on code of Steffen Hehn 'McClean' - $Log: moviebrowser.h,v $ - Revision 1.5 2006/09/11 21:11:35 guenther - General menu clean up - Dir menu updated - Add options menu - In movie info menu "update all" added - Serie option added (hide serie, auto serie) - Update movie info on delete movie - Delete Background when menu is entered - Timeout updated (MB does not exit after options menu is left) + (C) 2009-2014 Stefan Seyfried - Revision 1.4 2006/02/20 01:10:34 guenther - - temporary parental lock updated - remove 1s debug prints in movieplayer- Delete file without rescan of movies- Crash if try to scroll in list with 2 movies only- UTF8XML to UTF8 conversion in preview- Last file selection recovered- use of standard folders adjustable in config- reload and remount option in config + outsourced: + (C) 2016, Thilo Graf 'dbt' +*/ - Revision 1.3 2005/12/18 09:23:53 metallica - fix compil warnings - - Revision 1.2 2005/12/12 07:58:02 guenther - - fix bug on deleting CMovieBrowser - speed up parse time (20 ms per .ts file now)- update stale function- refresh directories on reload- print scan time in debug console - - -****************************************************************************/ #ifndef MOVIEBROWSER_H_ #define MOVIEBROWSER_H_ @@ -383,16 +357,6 @@ class CMovieBrowser : public CMenuTarget bool addFile(CFile &file, int dirItNr); }; -// Class to show Moviebrowser Information, to be used by menu -class CMovieHelp : public CMenuTarget -{ - private: - - public: - CMovieHelp(){}; - ~CMovieHelp(){}; - int exec( CMenuTarget* parent, const std::string & actionKey ); -}; // I tried a lot to use the menu.cpp as ListBox selection, and I got three solution which are all garbage. //Might be replaced by somebody who is familiar with this stuff . diff --git a/src/gui/moviebrowser/mb_functions.h b/src/gui/moviebrowser/mb_functions.h index ddea6d9fc..4c0ce19b1 100644 --- a/src/gui/moviebrowser/mb_functions.h +++ b/src/gui/moviebrowser/mb_functions.h @@ -1,3 +1,40 @@ +/* + Based up Neutrino-GUI - Tuxbox-Project + Copyright (C) 2001 by Steffen Hehn 'McClean' + + License: GPL + + 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, see . + + *********************************************************** + + Module Name: mb_functions.h + + Description: Implementation of the CMovieBrowser class + This class provides a filebrowser window to view, select and start a movies from HD. + This class does replace the Filebrowser + + Date: Nov 2005 + + Author: Guenther@tuxbox.berlios.org + based on code of Steffen Hehn 'McClean' + + (C) 2009-2014 Stefan Seyfried + + outsourced: + (C) 2016, Thilo Graf 'dbt' +*/ #ifndef __MB_FUNCTIONS__ #define __MB_FUNCTIONS__ diff --git a/src/gui/moviebrowser/mb_help.h b/src/gui/moviebrowser/mb_help.h new file mode 100644 index 000000000..dc77e86d1 --- /dev/null +++ b/src/gui/moviebrowser/mb_help.h @@ -0,0 +1,72 @@ +/* + Based up Neutrino-GUI - Tuxbox-Project + Copyright (C) 2001 by Steffen Hehn 'McClean' + + License: GPL + + 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, see . + + *********************************************************** + + Module Name: mb_help.h + + Description: Implementation of the CMovieBrowser class + This class provides a filebrowser window to view, select and start a movies from HD. + This class does replace the Filebrowser + + Date: Nov 2005 + + Author: Guenther@tuxbox.berlios.org + based on code of Steffen Hehn 'McClean' + + outsourced: + (C) 2016, Thilo Graf 'dbt' +*/ + +#ifndef MOVIEBROWSER_HELP_H_ +#define MOVIEBROWSER_HELP_H_ + + +#include + +// Class to show Moviebrowser Information, to be used by menu +class CMovieHelp : public CMenuTarget +{ + private: + + public: + CMovieHelp(){}; + ~CMovieHelp(){}; + + int exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/) + { + Helpbox helpbox; + helpbox.addLine(NEUTRINO_ICON_BUTTON_RED, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RED)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_GREEN, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_GREEN)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_YELLOW, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_YELLOW)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_BLUE)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_MENU_SMALL,g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MENU)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_PLAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_PLAY)); + helpbox.addLine(""); + helpbox.addLine(NEUTRINO_ICON_BUTTON_OKAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_OKAY)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_MUTE_SMALL,g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MUTE)); + helpbox.addLine(""); + helpbox.addLine(NEUTRINO_ICON_BUTTON_LEFT, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_LEFT)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_RIGHT, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RIGHT)); + helpbox.show(LOCALE_MESSAGEBOX_INFO); + return(0); + } +}; + +#endif /*MOVIEBROWSER_HELP_H_*/ diff --git a/src/gui/moviebrowser/mb_types.h b/src/gui/moviebrowser/mb_types.h index 82a36e385..e8c62c087 100644 --- a/src/gui/moviebrowser/mb_types.h +++ b/src/gui/moviebrowser/mb_types.h @@ -1,3 +1,42 @@ +/* + Based up Neutrino-GUI - Tuxbox-Project + Copyright (C) 2001 by Steffen Hehn 'McClean' + + License: GPL + + 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, see . + + *********************************************************** + + Module Name: mb_types.h + + Description: Implementation of the CMovieBrowser class + This class provides a filebrowser window to view, select and start a movies from HD. + This class does replace the Filebrowser + + Date: Nov 2005 + + Author: Guenther@tuxbox.berlios.org + based on code of Steffen Hehn 'McClean' + + (C) 2009-2014 Stefan Seyfried + + outsourced: + (C) 2016, Thilo Graf 'dbt' +*/ + + #include #ifndef __MB_TYPES__ diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index afc2653fc..14bfe94bc 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -799,11 +799,11 @@ bool CMoviePlayerGui::luaGetUrl(const std::string &script, const std::string &fi std::vector args; args.push_back(file); - +#ifdef ENABLE_LUA CLuaInstance *lua = new CLuaInstance(); lua->runScript(script.c_str(), &args, &result_code, &result_string); delete lua; - +#endif if ((result_code != "0") || result_string.empty()) { if (box != NULL) { box->hide(); @@ -2224,7 +2224,9 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/) yres = 1080; aspectRatio = videoDecoder->getAspectRatio(); } +#ifdef ENABLE_LUA CLuaInstVideo::getInstance()->execLuaInfoFunc(luaState, xres, yres, aspectRatio, framerate); +#endif } else if (p_movie_info) g_EpgData->show_mp(p_movie_info, position, duration); diff --git a/src/gui/network_setup.cpp b/src/gui/network_setup.cpp index 519a90e13..6cb5068e7 100644 --- a/src/gui/network_setup.cpp +++ b/src/gui/network_setup.cpp @@ -731,7 +731,7 @@ void CNetworkSetup::testNetworkSettings() //get www-domain testsite from /.version CConfigFile config('\t'); - config.loadConfig("/.version"); + config.loadConfig(TARGET_PREFIX "/.version"); testsite = config.getString("homepage",defaultsite); testsite.replace( 0, testsite.find("www",0), "" ); diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 37da5fe37..7bd71f3d6 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -47,6 +47,7 @@ #include "osd_progressbar_setup.h" #include +#include #include #include //NI #include //NI diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index 9b95f4247..9e4a99087 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -683,12 +683,15 @@ void CPictureViewerGui::paintItem(int pos) fb_pixel_t color; fb_pixel_t bgcolor; +//NI - don't darken every second entry +#if 0 if ((liststart+pos < playlist.size()) && (pos & 1) ) { color = COL_MENUCONTENTDARK_TEXT; bgcolor = COL_MENUCONTENTDARK_PLUS_0; } else +#endif { color = COL_MENUCONTENT_TEXT; bgcolor = COL_MENUCONTENT_PLUS_0; @@ -771,7 +774,7 @@ void CPictureViewerGui::paint() int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int tmp_max = listmaxshow; if(!tmp_max) @@ -781,7 +784,7 @@ void CPictureViewerGui::paint() if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); paintFoot(); paintInfo(); diff --git a/src/gui/plugins.cpp b/src/gui/plugins.cpp index 2b7e4f4d4..039ed8468 100644 --- a/src/gui/plugins.cpp +++ b/src/gui/plugins.cpp @@ -420,10 +420,12 @@ void CPlugins::startLuaPlugin(int number) script, plugin_list[number].cfgfile.c_str()); return; } +#ifdef ENABLE_LUA CLuaInstance *lua = new CLuaInstance(); lua->runScript(script); delete lua; -#if 0 +#endif +#if HAVE_SPARK_HARDWARE frameBuffer->ClearFB(); #endif videoDecoder->Pig(-1, -1, -1, -1); diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 574a91100..daf43cb2d 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -50,8 +50,6 @@ #include #include -#include - #include #include #include diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index d3d1f31d6..0814aacb3 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -40,6 +40,7 @@ #include "audiomute.h" #include "screensaver.h" #include +#include #include #include diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index 3a9abbfc3..a36f5f5e0 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -43,8 +43,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index 2ff3dde74..39cd78338 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -40,7 +40,7 @@ extern CInfoIcons *InfoIcons; -CTimeOSD::CTimeOSD():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON, COL_LIGHT_GRAY, COL_MENUCONTENT_PLUS_0,COL_MENUCONTENTDARK_PLUS_0) +CTimeOSD::CTimeOSD():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON) { Init(); } @@ -52,7 +52,7 @@ void CTimeOSD::Init() m_mode = MODE_HIDE; //use current theme colors - setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); + setColorAll(COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_SHADOW_PLUS_0); //set text color if (paint_bg){ @@ -104,7 +104,7 @@ void CTimeOSD::show(time_t time_show, bool force) return; m_time_show = time_show; - setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); //use current theme colors + setColorAll(COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_SHADOW_PLUS_0); //use current theme colors paint_bg = true; if (g_settings.infoClockBackground) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index d954370fb..93042de3d 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -650,7 +650,7 @@ void CTimerList::hide() { if (visible) { - frameBuffer->paintBackgroundBoxRel(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET); + frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW); visible = false; } } @@ -674,7 +674,7 @@ void CTimerList::paintItem(int pos) else bgcolor = COL_MENUCONTENT_PLUS_0; //shadow - frameBuffer->paintBoxRel(x + width, ypos, SHADOW_OFFSET, 2*fheight, COL_MENUCONTENTDARK_PLUS_0); + frameBuffer->paintBoxRel(x + width, ypos, OFFSET_SHADOW, 2*fheight, COL_SHADOW_PLUS_0); //item frameBuffer->paintBoxRel(x, ypos, real_width, 2*fheight, bgcolor); @@ -856,7 +856,7 @@ void CTimerList::paintFoot() } //shadow - frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + height - footerHeight, width, footerHeight + SHADOW_OFFSET, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); + frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + height - footerHeight, width, footerHeight + OFFSET_SHADOW, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); if (timerlist.empty()) ::paintButtons(x, y + height - footerHeight, width, 2, &(TimerListButtons[1]), width); @@ -882,13 +882,13 @@ void CTimerList::paint() { int ypos = y+ theight; int sb = 2*fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int tmp_max = listmaxshow; if(!tmp_max) tmp_max = 1; int sbc= ((timerlist.size()- 1)/ tmp_max)+ 1; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ page_nr * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ page_nr * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_SMALL); } paintFoot(); diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 0c55442ad..a7812acd1 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -161,7 +161,7 @@ bool CFlashUpdate::checkOnlineVersion() std::vector update_t_list; CConfigFile _configfile('\t'); - const char * versionString = (_configfile.loadConfig("/.version")) ? (_configfile.getString( "version", "????????????????").c_str()) : "????????????????"; + const char * versionString = (_configfile.loadConfig(TARGET_PREFIX "/.version")) ? (_configfile.getString( "version", "????????????????").c_str()) : "????????????????"; #ifdef DEBUG printf("[update] file %s\n", g_settings.softupdate_url_file.c_str()); #endif @@ -218,7 +218,7 @@ bool CFlashUpdate::selectHttpImage(void) int curVer, newVer, newfound = 0; CConfigFile _configfile('\t'); - const char * versionString = (_configfile.loadConfig("/.version")) ? (_configfile.getString( "version", "????????????????").c_str()) : "????????????????"; + const char * versionString = (_configfile.loadConfig(TARGET_PREFIX "/.version")) ? (_configfile.getString( "version", "????????????????").c_str()) : "????????????????"; CFlashVersionInfo curInfo(versionString); printf("current flash-version: %s (%d) date %s (%ld)\n", versionString, curInfo.getVersion(), curInfo.getDate(), curInfo.getDateTime()); diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index cf4c679b4..0464ed971 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -85,15 +85,13 @@ CUpnpBrowserGui::CUpnpBrowserGui() CFrameBuffer::getInstance()->OnAfterSetPallette.connect(reinit); } -#define INNER_OFFSET SHADOW_OFFSET - void CUpnpBrowserGui::Init() { font_item = SNeutrinoSettings::FONT_TYPE_MENU; topbox.enableFrame(true, 1); //NI topbox.setCorner(RADIUS_LARGE); - topbox.setColorAll(COL_MENUCONTENT_PLUS_1, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0, COL_MENUHEAD_TEXT); + topbox.setColorAll(COL_FRAME_PLUS_0, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0, COL_MENUHEAD_TEXT); topbox.setTextFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]); topbox.enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_SHADOW_PLUS_0, g_settings.theme.menu_Head_gradient_direction); topbox.enableShadow(CC_SHADOW_ON, -1, true); @@ -129,19 +127,19 @@ void CUpnpBrowserGui::Init() /* From top to bottom we have: * * topbox (with shadow) - * INNER_OFFSET + * OFFSET_INTER * mainwindow (with shadow) * - header * - body (items*listshowmax) * - footer - * INNER_OFFSET + * OFFSET_INTER * infobox/timebox (with shadow) */ - m_listmaxshow = (m_height - m_topbox_height - SHADOW_OFFSET - INNER_OFFSET - m_header_height - m_footer_height - SHADOW_OFFSET - INNER_OFFSET - m_infobox_height - SHADOW_OFFSET) / (m_item_height); + m_listmaxshow = (m_height - m_topbox_height - OFFSET_SHADOW - OFFSET_INTER - m_header_height - m_footer_height - OFFSET_SHADOW - OFFSET_INTER - m_infobox_height - OFFSET_SHADOW) / (m_item_height); // recalc height - m_height = m_topbox_height + SHADOW_OFFSET + INNER_OFFSET + m_header_height + (m_listmaxshow * m_item_height) + m_footer_height + SHADOW_OFFSET + INNER_OFFSET + m_infobox_height + SHADOW_OFFSET; + m_height = m_topbox_height + OFFSET_SHADOW + OFFSET_INTER + m_header_height + (m_listmaxshow * m_item_height) + m_footer_height + OFFSET_SHADOW + OFFSET_INTER + m_infobox_height + OFFSET_SHADOW; footer.setHeight(m_footer_height); footer.enableShadow(CC_SHADOW_ON, -1, true); @@ -152,10 +150,10 @@ void CUpnpBrowserGui::Init() m_y=getScreenStartY(m_height); // calc positions - m_header_y = m_y + m_topbox_height + SHADOW_OFFSET + INNER_OFFSET; + m_header_y = m_y + m_topbox_height + OFFSET_SHADOW + OFFSET_INTER; m_item_y = m_header_y + m_header_height; m_footer_y = m_item_y + (m_listmaxshow * m_item_height); - m_infobox_y = m_footer_y + m_footer_height + SHADOW_OFFSET + INNER_OFFSET; + m_infobox_y = m_footer_y + m_footer_height + OFFSET_SHADOW + OFFSET_INTER; } CUpnpBrowserGui::~CUpnpBrowserGui() @@ -1000,17 +998,17 @@ void CUpnpBrowserGui::paintDevices() paintDevice(count); int sb = m_item_height * m_listmaxshow; - m_frameBuffer->paintBoxRel(m_x + m_width - 15, m_item_y, 15, sb, COL_MENUCONTENT_PLUS_1); + m_frameBuffer->paintBoxRel(m_x + m_width - 15, m_item_y, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int tmp_max = m_listmaxshow; if(!tmp_max) tmp_max = 1; int sbc = ((m_devices.size() - 1) / tmp_max) + 1; int sbs = ((m_selecteddevice) / tmp_max); - m_frameBuffer->paintBoxRel(m_x + m_width - 13, m_item_y + 2 + sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + m_frameBuffer->paintBoxRel(m_x + m_width - 13, m_item_y + 2 + sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); //shadow - m_frameBuffer->paintBoxRel(m_x + m_width, m_item_y + SHADOW_OFFSET, SHADOW_OFFSET, sb, COL_SHADOW_PLUS_0); + m_frameBuffer->paintBoxRel(m_x + m_width, m_item_y + OFFSET_SHADOW, OFFSET_SHADOW, sb, COL_SHADOW_PLUS_0); // Foot footer.paintButtons(m_x, m_footer_y, m_width, m_footer_height, 1, &RescanButton, m_width/2); @@ -1130,7 +1128,7 @@ void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry) if(lastname != entry->albumArtURI){ tmpname = lastname = entry->albumArtURI.c_str(); tmpname = g_PicViewer->DownloadImage(tmpname); - int h_image = infobox.getHeight() - INNER_OFFSET - infobox.getCornerRadius(); + int h_image = infobox.getHeight() - OFFSET_INTER - infobox.getCornerRadius(); int y_image = infobox.getYPos() + infobox.getHeight()/2 - h_image/2; if (!image){ image = new CComponentsPicture(100, y_image, tmpname, NULL, CC_SHADOW_OFF, COL_MENUCONTENTDARK_PLUS_0); @@ -1139,7 +1137,7 @@ void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry) } image->setPicture(tmpname); image->setHeight(h_image, true); - int x_image = infobox.getXPos() + infobox.getWidth() - image->getWidth() - INNER_OFFSET - infobox.getCornerRadius(); + int x_image = infobox.getXPos() + infobox.getWidth() - image->getWidth() - OFFSET_INTER - infobox.getCornerRadius(); image->setXPos(x_image); } }else{ @@ -1177,7 +1175,7 @@ void CUpnpBrowserGui::paintItems(std::vector *entry, unsigned int sel paintItem(entry, count, selected); int sb = m_item_height * m_listmaxshow; - m_frameBuffer->paintBoxRel(m_x + m_width - 15, m_item_y, 15, sb, COL_MENUCONTENT_PLUS_1); + m_frameBuffer->paintBoxRel(m_x + m_width - 15, m_item_y, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int tmp = m_listmaxshow ? m_listmaxshow : 1;//avoid division by zero int sbc = ((max + offset - 1) / tmp) + 1; int sbs = ((selected + offset) / tmp); @@ -1185,10 +1183,10 @@ void CUpnpBrowserGui::paintItems(std::vector *entry, unsigned int sel int sbh = 0; if ((sbc > 0) && (sbc > sb-4)) sbh = 2; - m_frameBuffer->paintBoxRel(m_x + m_width - 13, m_item_y + 2 + sbs*((sb-4)/sbc+sbh), 11, (sb-4)/sbc + sbh, COL_MENUCONTENT_PLUS_3); + m_frameBuffer->paintBoxRel(m_x + m_width - 13, m_item_y + 2 + sbs*((sb-4)/sbc+sbh), 11, (sb-4)/sbc + sbh, COL_SCROLLBAR_ACTIVE_PLUS_0); //shadow - //m_frameBuffer->paintBoxRel(m_x + m_width, m_item_y + SHADOW_OFFSET, SHADOW_OFFSET, sb, COL_SHADOW_PLUS_0); + //m_frameBuffer->paintBoxRel(m_x + m_width, m_item_y + OFFSET_SHADOW, OFFSET_SHADOW, sb, COL_SHADOW_PLUS_0); // Foot buttons size_t numbuttons = sizeof(BrowseButtons)/sizeof(BrowseButtons[0]); @@ -1200,7 +1198,7 @@ void CUpnpBrowserGui::paintDetails(UPnPEntry *entry, bool use_playing) { // Foot info int timebox_width = m_infobox_height; // maybe not enough - infobox.setDimensionsAll(m_x, m_infobox_y, m_width - SHADOW_OFFSET - INNER_OFFSET - timebox_width, m_infobox_height); + infobox.setDimensionsAll(m_x, m_infobox_y, m_width - OFFSET_SHADOW - OFFSET_INTER - timebox_width, m_infobox_height); timebox.setDimensionsAll(m_x + m_width - timebox_width, infobox.getYPos(), m_infobox_height, timebox_width); printf("paintDetails: use_playing %d shown %d\n", use_playing, m_playing_entry_is_shown); diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 8e22faff8..1586946c1 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -127,14 +127,14 @@ void CVolumeBar::initVolumeBarPosition() if (CNeutrinoApp::getInstance()->getChannellistIsVisible() == true) y += std::max(39, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()) + v_spacer; else if (g_settings.mode_clock) - y = clock_y + clock_height + v_spacer + SHADOW_OFFSET; + y = clock_y + clock_height + v_spacer + OFFSET_SHADOW; } x = sw - width - x_corr; break; } case VOLUMEBAR_POS_TOP_LEFT: if (CMoviePlayerGui::getInstance().osdTimeVisible()) - y = clock_y + clock_height + v_spacer + SHADOW_OFFSET; + y = clock_y + clock_height + v_spacer + OFFSET_SHADOW; break; case VOLUMEBAR_POS_BOTTOM_LEFT: y = (sh + frameBuffer->getScreenY()) - height - v_spacer; diff --git a/src/gui/widget/buttons.cpp b/src/gui/widget/buttons.cpp index f85af5a52..f94cfc237 100644 --- a/src/gui/widget/buttons.cpp +++ b/src/gui/widget/buttons.cpp @@ -28,7 +28,6 @@ #include #include -#include #include #include diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 355efb877..febb0f5fa 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -210,9 +210,9 @@ void CHintBox::refresh(void) if (entries_per_page < line.size()) { ypos = theight + (fheight >> 1); - window->paintBoxRel(width - 15, ypos , 15, entries_per_page * fheight, COL_MENUCONTENT_PLUS_1); + window->paintBoxRel(width - 15, ypos, 15, entries_per_page * fheight, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int marker_size = (entries_per_page * fheight) / ((line.size() + entries_per_page - 1) / entries_per_page); - window->paintBoxRel(width - 13, ypos + current_page * marker_size, 11, marker_size , COL_MENUCONTENT_PLUS_3); + window->paintBoxRel(width - 13, ypos + current_page * marker_size, 11, marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0); } } diff --git a/src/gui/widget/hintboxext.cpp b/src/gui/widget/hintboxext.cpp index dfc89946d..ea89a0f1b 100644 --- a/src/gui/widget/hintboxext.cpp +++ b/src/gui/widget/hintboxext.cpp @@ -199,7 +199,7 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const std::string &Capti // printf("pages: %d, startEntryVec: %d\n",page+1,m_startEntryOfPage.size()-1); // printf("maxEntries: %d\n", m_maxEntriesPerPage); - m_width = w_max(maxWidth,SHADOW_OFFSET); + m_width = w_max(maxWidth,OFFSET_SHADOW); m_currentPage = 0; m_pages = page + 1; unsigned int additional_width; @@ -227,7 +227,7 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const std::string &Capti /* if the output does not fit, make sure we at least * stay inside the screen... */ - m_width = w_max(m_width ,SHADOW_OFFSET); + m_width = w_max(m_width ,OFFSET_SHADOW); if (maxLineWidth + scrollWidth > m_width) maxLineWidth = m_width - scrollWidth; @@ -250,10 +250,10 @@ void CHintBoxExt::paint(bool toround) } bgPainted = false; - m_window = new CFBWindow(getScreenStartX(m_width + SHADOW_OFFSET), - getScreenStartY(m_height + SHADOW_OFFSET), - m_width + SHADOW_OFFSET, - m_height + SHADOW_OFFSET); + m_window = new CFBWindow(getScreenStartX(m_width + OFFSET_SHADOW), + getScreenStartY(m_height + OFFSET_SHADOW), + m_width + OFFSET_SHADOW, + m_height + OFFSET_SHADOW); refresh(toround); } @@ -267,7 +267,7 @@ void CHintBoxExt::refresh(bool toround) if (!bgPainted) { // bottom, right shadow - m_window->paintBoxRel(SHADOW_OFFSET, SHADOW_OFFSET, m_width, m_height, COL_SHADOW_PLUS_0, RADIUS_LARGE, toround ? CORNER_ALL : CORNER_BOTTOM | CORNER_TOP_RIGHT); + m_window->paintBoxRel(OFFSET_SHADOW, OFFSET_SHADOW, m_width, m_height, COL_SHADOW_PLUS_0, RADIUS_LARGE, toround ? CORNER_ALL : CORNER_BOTTOM | CORNER_TOP_RIGHT); bgPainted = true; } @@ -339,9 +339,9 @@ void CHintBoxExt::refresh(bool toround) { // yPos = m_theight + (m_fheight >> 1); yPos = m_theight; - m_window->paintBoxRel(m_width - 15, yPos, 15, m_maxEntriesPerPage * m_fheight, COL_MENUCONTENT_PLUS_1); + m_window->paintBoxRel(m_width - 15, yPos, 15, m_maxEntriesPerPage * m_fheight, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int marker_size = (m_maxEntriesPerPage * m_fheight) / m_pages; - m_window->paintBoxRel(m_width - 13, yPos + m_currentPage * marker_size, 11, marker_size, COL_MENUCONTENT_PLUS_3); + m_window->paintBoxRel(m_width - 13, yPos + m_currentPage * marker_size, 11, marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0); } } diff --git a/src/gui/widget/keyboard_input.cpp b/src/gui/widget/keyboard_input.cpp index 377be76ae..02b1706c2 100644 --- a/src/gui/widget/keyboard_input.cpp +++ b/src/gui/widget/keyboard_input.cpp @@ -530,9 +530,9 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &) fb_pixel_t * pixbuf = NULL; if (!parent) { - pixbuf = new fb_pixel_t[(width + SHADOW_OFFSET) * (height + SHADOW_OFFSET)]; + pixbuf = new fb_pixel_t[(width + OFFSET_SHADOW) * (height + OFFSET_SHADOW)]; if (pixbuf) - frameBuffer->SaveScreen(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET, pixbuf); + frameBuffer->SaveScreen(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW, pixbuf); } paint(); @@ -626,7 +626,7 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &) if (pixbuf) { - frameBuffer->RestoreScreen(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET, pixbuf); + frameBuffer->RestoreScreen(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW, pixbuf); delete[] pixbuf; } else hide(); @@ -644,7 +644,7 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &) void CKeyboardInput::hide() { - frameBuffer->paintBackgroundBoxRel(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET); + frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW); } int CKeyboardInput::paintFooter(bool show) @@ -668,7 +668,7 @@ int CKeyboardInput::paintFooter(bool show) void CKeyboardInput::paint() { - frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width, height, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round + frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + OFFSET_SHADOW, width, height, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0); CComponentsHeader header(x, y, width, hheight, head, iconfile); @@ -761,7 +761,7 @@ void CKeyboardInput::paintKey(int row, int column) int radius = CORNER_RADIUS_SMALL; frameBuffer->paintBoxRel(xpos, ypos, key_w, key_h, bgcolor, radius); - frameBuffer->paintBoxFrame(xpos, ypos, key_w, key_h, KEY_FRAME_WIDTH, COL_MENUCONTENT_PLUS_1, radius); //NI + frameBuffer->paintBoxFrame(xpos, ypos, key_w, key_h, KEY_FRAME_WIDTH, COL_FRAME_PLUS_0, radius); if (keyboard[row][column].empty()) return; diff --git a/src/gui/widget/listbox.cpp b/src/gui/widget/listbox.cpp index 3b11bd14a..4c722aaf3 100644 --- a/src/gui/widget/listbox.cpp +++ b/src/gui/widget/listbox.cpp @@ -68,14 +68,15 @@ void CListBox::paint() int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int sbc= ((getItemCount()- 1)/ listmaxshow)+ 1; int sbs= (selected/listmaxshow); if (sbc < 1) sbc = 1; + int sbh= (sb- 4)/ sbc; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs* sbh , 11, sbh, COL_SCROLLBAR_ACTIVE_PLUS_0); } void CListBox::paintHead() diff --git a/src/gui/widget/listframe.cpp b/src/gui/widget/listframe.cpp index bc0659004..2e2d168bf 100644 --- a/src/gui/widget/listframe.cpp +++ b/src/gui/widget/listframe.cpp @@ -377,12 +377,12 @@ void CListFrame::refreshScroll(void) if (m_nNrOfPages > 1) { frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, - m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, COL_MENUCONTENT_PLUS_1); + m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int marker_size = m_cFrameScrollRel.iHeight / m_nNrOfPages; frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + SCROLL_MARKER_BORDER+m_cFrame.iX, m_cFrameScrollRel.iY + m_nCurrentPage * marker_size +m_cFrame.iY, m_cFrameScrollRel.iWidth - (2*SCROLL_MARKER_BORDER), - marker_size, COL_MENUCONTENT_PLUS_3); + marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0); } else { diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index d9e97b9a5..1468f1913 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -265,7 +265,7 @@ void CMenuItem::paintItemCaption(const bool select_mode, const char * right_text fb_pixel_t right_frame_col, right_bg_col; if (active) { right_bg_col = right_bgcol; - right_frame_col = COL_MENUCONTENT_PLUS_1; //NI + right_frame_col = COL_FRAME_PLUS_0; } else { right_bg_col = COL_MENUCONTENTINACTIVE_TEXT; @@ -1207,8 +1207,8 @@ void CMenuWidget::calcSize() if(total_pages > 1) sb_width=15; - full_width = /*ConnectLineBox_Width+*/width+sb_width+SHADOW_OFFSET; - full_height = height+RADIUS_LARGE+SHADOW_OFFSET*2 /*+hint_height+INFO_BOX_Y_OFFSET*/; + full_width = /*ConnectLineBox_Width+*/width+sb_width+OFFSET_SHADOW; + full_height = height+RADIUS_LARGE+OFFSET_SHADOW*2 /*+hint_height+OFFSET_INTER*/; /* + ConnectLineBox_Width for the hintbox connection line * + center_offset for symmetry * + 20 for setMenuPos calculates 10 pixels border left and right */ @@ -1216,7 +1216,7 @@ void CMenuWidget::calcSize() int max_possible = (int)frameBuffer->getScreenWidth() - ConnectLineBox_Width - center_offset - 20; if (full_width > max_possible) { - width = max_possible - sb_width - SHADOW_OFFSET; + width = max_possible - sb_width - OFFSET_SHADOW; full_width = max_possible + center_offset; /* symmetry in MENU_POS_CENTER case */ } @@ -1258,14 +1258,14 @@ void CMenuWidget::paint() header->enableShadow(CC_SHADOW_RIGHT); header->setOffset(10); } - header->setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0); + header->setColorAll(COL_FRAME_PLUS_0, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0); header->setCaptionColor(COL_MENUHEAD_TEXT); header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0); header->enableGradientBgCleanUp(savescreen); header->paint(CC_SAVE_SCREEN_NO); // paint body shadow - frameBuffer->paintBoxRel(x+SHADOW_OFFSET, y + hheight + SHADOW_OFFSET, width + sb_width, height - hheight + RADIUS_LARGE + (fbutton_count ? fbutton_height : 0), COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); + frameBuffer->paintBoxRel(x+OFFSET_SHADOW, y + hheight + OFFSET_SHADOW, width + sb_width, height - hheight + RADIUS_LARGE + (fbutton_count ? fbutton_height : 0), COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); // paint body background frameBuffer->paintBoxRel(x, y+hheight, width + sb_width, height-hheight + RADIUS_LARGE, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, (fbutton_count ? CORNER_NONE : CORNER_BOTTOM)); @@ -1335,8 +1335,8 @@ void CMenuWidget::paintItems() if(total_pages>1) { int item_height=height-(item_start_y-y); - frameBuffer->paintBoxRel(x+ width,item_start_y, 15, item_height, COL_MENUCONTENT_PLUS_1, RADIUS_MIN); - frameBuffer->paintBoxRel(x+ width +2, item_start_y+ 2+ current_page*(item_height-4)/total_pages, 11, (item_height-4)/total_pages, COL_MENUCONTENT_PLUS_3, RADIUS_MIN); + frameBuffer->paintBoxRel(x+ width,item_start_y, 15, item_height, COL_SCROLLBAR_PASSIVE_PLUS_0, RADIUS_MIN); + frameBuffer->paintBoxRel(x+ width +2, item_start_y+ 2+ current_page*(item_height-4)/total_pages, 11, (item_height-4)/total_pages, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_MIN); /* background of menu items, paint every time because different items can have * different height and this might leave artifacts otherwise after changing pages */ frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0); @@ -1465,7 +1465,7 @@ void CMenuWidget::paintHint(int pos) int iheight = item->getHeight(); int rad = RADIUS_LARGE; int xpos = x - ConnectLineBox_Width; - int ypos2 = y + height + fbutton_height + rad + SHADOW_OFFSET + INFO_BOX_Y_OFFSET; + int ypos2 = y + height + fbutton_height + rad + OFFSET_SHADOW + OFFSET_INTER; int iwidth = width+sb_width; //init details line and infobox dimensions @@ -1496,7 +1496,7 @@ void CMenuWidget::paintHint(int pos) //NI info_box->removeLineBreaks(str); info_box->setText(str, CTextBox::AUTO_WIDTH, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT], COL_MENUCONTENT_TEXT); info_box->setCorner(RADIUS_LARGE); - info_box->setColorAll(COL_MENUCONTENT_PLUS_1, COL_MENUCONTENT_PLUS_0); //NI + info_box->setColorAll(COL_FRAME_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); info_box->enableShadow(); info_box->setPicture(item->hintIcon ? item->hintIcon : ""); info_box->enableColBodyGradient(g_settings.theme.menu_Hint_gradient, COL_MENUFOOT_PLUS_0, g_settings.theme.menu_Hint_gradient_direction);// COL_MENUFOOT_PLUS_0 is default footer color diff --git a/src/gui/widget/messagebox.cpp b/src/gui/widget/messagebox.cpp index 791bde242..bf6d22730 100644 --- a/src/gui/widget/messagebox.cpp +++ b/src/gui/widget/messagebox.cpp @@ -75,7 +75,7 @@ void CMessageBox::Init(const CMessageBox::result_ &Default, const uint32_t ShowB } fh = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight(); b_height = std::max(fh, ih) + 8 + (RADIUS_MID / 2); - m_bbheight = b_height + fh/2 + ButtonSpacing + SHADOW_OFFSET; + m_bbheight = b_height + fh/2 + ButtonSpacing + OFFSET_SHADOW; result = Default; b_width = getButtonWidth(); if (ShowButtons & CMessageBox::mbBtnAlignCenter1) @@ -176,7 +176,7 @@ void CMessageBox::paintButtons() bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0; } CFrameBuffer::getInstance()->getIconSize(Buttons[i].icon, &iw, &ih); - m_window->paintBoxRel(xpos + SHADOW_OFFSET, ypos + SHADOW_OFFSET, b_width, b_height, COL_SHADOW_PLUS_0, RADIUS_MID); + m_window->paintBoxRel(xpos + OFFSET_SHADOW, ypos + OFFSET_SHADOW, b_width, b_height, COL_SHADOW_PLUS_0, RADIUS_MID); m_window->paintBoxRel(xpos, ypos, b_width, b_height, (CFBWindow::color_t)bgcolor, RADIUS_MID); m_window->paintBoxFrame(xpos, ypos, b_width, b_height, 1, COL_SHADOW_PLUS_0, RADIUS_MID); m_window->paintIcon(Buttons[i].icon, xpos + ((b_height - ih) / 2), ypos + ((b_height - ih) / 2), ih); diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 69c94d38a..978b8401b 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -359,7 +359,7 @@ void CMsgBox::refreshFoot(void) color = COL_MENUCONTENTINACTIVE_TEXT; bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0; } - m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX + SHADOW_OFFSET, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY + SHADOW_OFFSET, ButtonWidth, m_nFontFootHeight + 4, COL_SHADOW_PLUS_0, RADIUS_MID); + m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX + OFFSET_SHADOW, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY + OFFSET_SHADOW, ButtonWidth, m_nFontFootHeight + 4, COL_SHADOW_PLUS_0, RADIUS_MID); m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth, m_nFontFootHeight + 4, (CFBWindow::color_t)bgcolor, RADIUS_MID); m_pcWindow->paintBoxFrame(xpos+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth, m_nFontFootHeight + 4, 1, COL_SHADOW_PLUS_0, RADIUS_MID); m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_RED, xpos + 14+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY); @@ -382,7 +382,7 @@ void CMsgBox::refreshFoot(void) color = COL_MENUCONTENTINACTIVE_TEXT; bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0; } - m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX + SHADOW_OFFSET, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY + SHADOW_OFFSET, ButtonWidth, m_nFontFootHeight + 4, COL_SHADOW_PLUS_0, RADIUS_MID); + m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX + OFFSET_SHADOW, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY + OFFSET_SHADOW, ButtonWidth, m_nFontFootHeight + 4, COL_SHADOW_PLUS_0, RADIUS_MID); m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth, m_nFontFootHeight + 4, (CFBWindow::color_t)bgcolor, RADIUS_MID); m_pcWindow->paintBoxFrame(xpos+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth, m_nFontFootHeight + 4, 1, COL_SHADOW_PLUS_0, RADIUS_MID); m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, xpos + 14+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY); @@ -405,7 +405,7 @@ void CMsgBox::refreshFoot(void) color = COL_MENUCONTENTINACTIVE_TEXT; bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0; } - m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX + SHADOW_OFFSET, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY + SHADOW_OFFSET, ButtonWidth, m_nFontFootHeight + 4, COL_SHADOW_PLUS_0, RADIUS_MID); + m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX + OFFSET_SHADOW, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY + OFFSET_SHADOW, ButtonWidth, m_nFontFootHeight + 4, COL_SHADOW_PLUS_0, RADIUS_MID); m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth, m_nFontFootHeight + 4, (CFBWindow::color_t)bgcolor, RADIUS_MID); m_pcWindow->paintBoxFrame(xpos+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth, m_nFontFootHeight + 4, 1, COL_SHADOW_PLUS_0, RADIUS_MID); m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_HOME, xpos+10+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY); diff --git a/src/gui/widget/progresswindow.cpp b/src/gui/widget/progresswindow.cpp index 905778d67..852b3b5f2 100644 --- a/src/gui/widget/progresswindow.cpp +++ b/src/gui/widget/progresswindow.cpp @@ -69,9 +69,9 @@ void CProgressWindow::Init() local_bar->allowPaint(false); local_bar->setDimensionsAll(x_item, y_item, w_item, h_pbar); local_bar->setColorBody(col_body); - local_bar->setActiveColor(COL_MENUCONTENT_PLUS_7); + local_bar->setActiveColor(COL_PROGRESSBAR_ACTIVE_PLUS_0); local_bar->setFrameThickness(w_bar_frame); - local_bar->setColorFrame(COL_MENUCONTENT_PLUS_7); + local_bar->setColorFrame(COL_PROGRESSBAR_ACTIVE_PLUS_0); addWindowItem(local_bar); y_item += 2*h_pbar; @@ -80,9 +80,9 @@ void CProgressWindow::Init() global_bar->allowPaint(false); global_bar->setDimensionsAll(x_item, y_item, w_item, h_pbar); global_bar->setColorBody(col_body); - global_bar->setActiveColor(COL_MENUCONTENT_PLUS_7); + global_bar->setActiveColor(COL_PROGRESSBAR_ACTIVE_PLUS_0); global_bar->setFrameThickness(w_bar_frame); - global_bar->setColorFrame(COL_MENUCONTENT_PLUS_7); + global_bar->setColorFrame(COL_PROGRESSBAR_ACTIVE_PLUS_0); addWindowItem(global_bar); y_item += 2*h_pbar; diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index aba428bd2..79b10c6c9 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -394,9 +394,9 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) fb_pixel_t * pixbuf = NULL; if (!parent) { - pixbuf = new fb_pixel_t[(width + SHADOW_OFFSET) * (height + SHADOW_OFFSET)]; + pixbuf = new fb_pixel_t[(width + OFFSET_SHADOW) * (height + OFFSET_SHADOW)]; if (pixbuf) - frameBuffer->SaveScreen(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET, pixbuf); + frameBuffer->SaveScreen(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW, pixbuf); } paint(); @@ -519,7 +519,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) if (pixbuf) { - frameBuffer->RestoreScreen(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET, pixbuf); + frameBuffer->RestoreScreen(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW, pixbuf); delete[] pixbuf;//Mismatching allocation and deallocation: pixbuf frameBuffer->blit(); } else @@ -541,13 +541,13 @@ int CStringInput::handleOthers(const neutrino_msg_t /*msg*/, const neutrino_msg_ void CStringInput::hide() { - frameBuffer->paintBackgroundBoxRel(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET); + frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW); frameBuffer->blit(); } void CStringInput::paint(bool sms) { - frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width, height, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round + frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + OFFSET_SHADOW, width, height, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0, sms ? 0 : RADIUS_LARGE, CORNER_BOTTOM); CComponentsHeader header(x, y, width, hheight, head, iconfile); @@ -901,7 +901,7 @@ const char * CPLPINInput::getHint1(void) } } -#define borderwidth SHADOW_OFFSET // FIXME: do we need border around ?? +#define borderwidth OFFSET_SHADOW // FIXME: do we need border around ?? int CPLPINInput::exec( CMenuTarget* parent, const std::string & ) { diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 1be42973e..362ab79e7 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -494,12 +494,12 @@ void CTextBox::refreshScroll(void) { frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, - COL_MENUCONTENT_PLUS_1); + COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int marker_size = m_cFrameScrollRel.iHeight / m_nNrOfPages; frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + SCROLL_MARKER_BORDER+m_cFrame.iX, m_cFrameScrollRel.iY + m_nCurrentPage * marker_size+m_cFrame.iY, m_cFrameScrollRel.iWidth - 2*SCROLL_MARKER_BORDER, - marker_size, COL_MENUCONTENT_PLUS_3); + marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0); m_has_scrolled = true; } else diff --git a/src/gui/widget/textbox.h b/src/gui/widget/textbox.h index e895ece0e..cb5f26a24 100644 --- a/src/gui/widget/textbox.h +++ b/src/gui/widget/textbox.h @@ -61,7 +61,6 @@ #include #include -#include #include #define TRACE printf #define TRACE_1 printf diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 9a2fd4b17..76c9e90e8 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -140,9 +140,9 @@ #include #include #include - +#ifdef ENABLE_LUA #include - +#endif int old_b_id = -1; CInfoClock *InfoClock; @@ -479,6 +479,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.ci_pincode = configfile.getString("ci_pincode", ""); g_settings.ci_tuner = configfile.getInt32("ci_tuner", -1); g_settings.ci_rec_zapto = configfile.getInt32("ci_rec_zapto", 0); //NI + g_settings.ci_mode = configfile.getInt32("ci_mode", 0); //NI #ifndef CPU_FREQ g_settings.cpufreq = 0; @@ -1136,6 +1137,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setString("ci_pincode", g_settings.ci_pincode); configfile.setInt32("ci_tuner", g_settings.ci_tuner); configfile.setInt32("ci_rec_zapto", g_settings.ci_rec_zapto); //NI + configfile.setInt32("ci_mode", g_settings.ci_mode); //NI configfile.setInt32( "make_hd_list", g_settings.make_hd_list); configfile.setInt32( "make_webtv_list", g_settings.make_webtv_list); @@ -2493,9 +2495,9 @@ void CNeutrinoApp::RealRun() standbyMode(true, true); //cCA::GetInstance()->Ready(true); - +#ifdef ENABLE_LUA CLuaServer *luaServer = CLuaServer::getInstance(); - +#endif g_PluginList->startPlugin("startup"); if (!g_PluginList->getScriptOutput().empty()) { ShowMsg(LOCALE_PLUGINS_RESULT, g_PluginList->getScriptOutput(), CMessageBox::mbrBack,CMessageBox::mbBack,NEUTRINO_ICON_SHELL); @@ -2506,10 +2508,14 @@ void CNeutrinoApp::RealRun() m_screensaver = false; while( true ) { +#ifdef ENABLE_LUA luaServer->UnBlock(); +#endif g_RCInput->getMsg(&msg, &data, 100, ((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME) && (g_RemoteControl->subChannels.size() < 1)) ? true : false); // 10 secs.. +#ifdef ENABLE_LUA if (luaServer->Block(msg, data)) continue; +#endif if (mode == mode_radio) { bool ignored_msg = ( diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index bacbb2909..7b990a5b2 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -761,7 +761,7 @@ void CControlAPI::InfoCGI(CyhookHandler *hh) if (hh->ParamList["1"] == "streaminfo") // print streaminfo SendStreamInfo(hh); else if (hh->ParamList["1"] == "version") // send version file - hh->SendFile("/.version"); + hh->SendFile(TARGET_PREFIX "/.version"); else if (hh->ParamList["1"] == "httpdversion") // print httpd version typ (only ffor comptibility) hh->Write("3"); else if (hh->ParamList["1"] == "nhttpd_version")// print nhttpd version @@ -1947,7 +1947,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) //----------------------------------------------------------------------------- void CControlAPI::VersionCGI(CyhookHandler *hh) { - hh->SendFile("/.version"); + hh->SendFile(TARGET_PREFIX "/.version"); } //----------------------------------------------------------------------------- void CControlAPI::ReloadNeutrinoSetupCGI(CyhookHandler *hh) diff --git a/src/nhttpd/tuxboxapi/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/neutrinoapi.cpp index f6be5186f..4ec8ca05b 100644 --- a/src/nhttpd/tuxboxapi/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoapi.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/nhttpd/web/Makefile.am b/src/nhttpd/web/Makefile.am index 17f337e2e..24bba6cf7 100644 --- a/src/nhttpd/web/Makefile.am +++ b/src/nhttpd/web/Makefile.am @@ -121,7 +121,18 @@ install_DATA += Y_NIlib.js \ Y_NI_Plugin-control.yhtm \ Y_NI_PZapit-control.yhtm -# NI-yWeb install-data-hook: + @# Badass hack, I know. If anyone knows a better way -- please send patch! + find $(DESTDIR)$(PRIVATE_HTTPDDIR)/ -type f -print0 | xargs --no-run-if-empty -0 \ + sed -i \ + -e 's|%(CONFIGDIR)|$(CONFIGDIR)|g' \ + -e 's|%(ICONSDIR)|$(ICONSDIR)|g' \ + -e 's|%(PLUGINDIR)|$(PLUGINDIR)|g' \ + -e 's|%(PLUGINDIR_VAR)|$(PLUGINDIR_VAR)|g' \ + -e 's|%(PLUGINDIR_MNT)|$(PLUGINDIR_MNT)|g' \ + -e 's|%(PRIVATE_HTTPDDIR)|$(PRIVATE_HTTPDDIR)|g' \ + -e 's|%(PUBLIC_HTTPDDIR)|$(PUBLIC_HTTPDDIR)|g' \ + ; + @# NI-yWeb cp $(DESTDIR)$(PRIVATE_HTTPDDIR)/styles/Y_Dist-NI_dark.css $(DESTDIR)$(PRIVATE_HTTPDDIR)/Y_Dist.css sed -i 's|version=\(.*\)|version=\1 by NI|' $(DESTDIR)$(PRIVATE_HTTPDDIR)/Y_Version.txt diff --git a/src/nhttpd/web/Y_About.yhtm b/src/nhttpd/web/Y_About.yhtm index ad022b42c..d001e174d 100644 --- a/src/nhttpd/web/Y_About.yhtm +++ b/src/nhttpd/web/Y_About.yhtm @@ -1,7 +1,7 @@ {=var-set:cancache=yPConf=} {=include-block:Y_Blocks.txt;head=} -{=var-set:alt_httpd={=ini-get:/var/tuxbox/config/nhttpd.conf;WebsiteMain.override_directory;/var/httpd=}=} +{=var-set:alt_httpd={=ini-get:%(CONFIGDIR)/nhttpd.conf;WebsiteMain.override_directory;%(PUBLIC_HTTPDDIR)=}=} {=var-set:vf={=if-file-exists:{=var-get:alt_httpd=}/Y_Version.txt~{=var-get:alt_httpd=}/Y_Version.txt~Y_Version.txt=}=}
diff --git a/src/nhttpd/web/Y_Blocks.txt b/src/nhttpd/web/Y_Blocks.txt index 7f08329f7..a07029d35 100644 --- a/src/nhttpd/web/Y_Blocks.txt +++ b/src/nhttpd/web/Y_Blocks.txt @@ -20,167 +20,167 @@ end-block~build_live_url # ------- yWeb save Settings start-block~yWeb_save_settings -{=ini-set:/var/tuxbox/config/Y-Web.conf;management_ip;{=managementIP=}~open=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;management_ip2;{=managementIP2=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;wol_mac_1;{=wol_mac_1=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;wol_mac_2;{=wol_mac_2=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;wol_mac_3;{=wol_mac_3=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;wol_desc_1;{=wol_desc_1=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;wol_desc_2;{=wol_desc_2=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;wol_desc_3;{=wol_desc_3=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;fb;{=fb=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;screenshot_rc;{=screenshot_rc=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;start_page;{=start_page=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;style;{=style=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;yweb_box_name;{=yweb_box_name=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;yweb_box_color;{=yweb_box_color=}~save=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;management_ip;{=managementIP=}~open=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;management_ip2;{=managementIP2=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;wol_mac_1;{=wol_mac_1=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;wol_mac_2;{=wol_mac_2=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;wol_mac_3;{=wol_mac_3=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;wol_desc_1;{=wol_desc_1=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;wol_desc_2;{=wol_desc_2=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;wol_desc_3;{=wol_desc_3=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;fb;{=fb=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;screenshot_rc;{=screenshot_rc=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;start_page;{=start_page=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;style;{=style=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;yweb_box_name;{=yweb_box_name=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;yweb_box_color;{=yweb_box_color=}~save=} end-block~yWeb_save_settings # ------- Live save Settings start-block~Live_save_settings -{=ini-set:/var/tuxbox/config/Y-Web.conf;slavebox;{=slavebox=}~open=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;vlc_record_path;{=vlc_record_path=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;deinterlace;{=deinterlace=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;deinterlace_filter;{=v=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;udp;{=udp=}~cache=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;http_caching;{=http_caching=}~save=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;slavebox;{=slavebox=}~open=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;vlc_record_path;{=vlc_record_path=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;deinterlace;{=deinterlace=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;deinterlace_filter;{=v=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;udp;{=udp=}~cache=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;http_caching;{=http_caching=}~save=} end-block~Live_save_settings # ------- nhttpd save Settings start-block~nhttpd_save_settings -{=ini-set:/var/tuxbox/config/nhttpd.conf;mod_auth.username;{=authuser=}~open=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;mod_auth.password;{=authpassword=}~cache=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;mod_auth.no_auth_client;{=noauthclient=}~cache=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;mod_auth.authenticate;{=authenticate=}~cache=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;WebsiteMain.port;{=port=}~cache=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;webserver.threading;{=threading=}~cache=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;server.no_keep-alive_ips;{=no_keep_alive_ips=}~cache=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;WebsiteMain.hosted_directory;{=hosted_directory=}~cache=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;WebsiteMain.override_directory;{=override_directory=}~cache=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;mod_sendfile.mime_types;{=mod_sendfile_mime_types=}~cache=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;mod_sendfile.sendAll;{=mod_sendfile_sendAll=}~cache=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;Language.selected;{=language=}~cache=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;Tuxbox.DisplayLogos;{=Tuxbox_DisplayLogos=}~cache=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;Tuxbox.LogosURL;{=Tuxbox_LogosURL=}~save=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;mod_auth.username;{=authuser=}~open=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;mod_auth.password;{=authpassword=}~cache=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;mod_auth.no_auth_client;{=noauthclient=}~cache=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;mod_auth.authenticate;{=authenticate=}~cache=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;WebsiteMain.port;{=port=}~cache=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;webserver.threading;{=threading=}~cache=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;server.no_keep-alive_ips;{=no_keep_alive_ips=}~cache=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;WebsiteMain.hosted_directory;{=hosted_directory=}~cache=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;WebsiteMain.override_directory;{=override_directory=}~cache=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;mod_sendfile.mime_types;{=mod_sendfile_mime_types=}~cache=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;mod_sendfile.sendAll;{=mod_sendfile_sendAll=}~cache=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;Language.selected;{=language=}~cache=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;Tuxbox.DisplayLogos;{=Tuxbox_DisplayLogos=}~cache=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;Tuxbox.LogosURL;{=Tuxbox_LogosURL=}~save=} {=func:do_reload_httpd_config=} end-block~nhttpd_save_settings # ------- Video / Audio save Settings start-block~video_audio_save_settings -{=ini-set:/var/tuxbox/config/neutrino.conf;video_Format;{=video_Format=}~open=} -{=ini-set:/var/tuxbox/config/neutrino.conf;video_backgroundFormat;{=video_backgroundFormat=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;video_csync;{=h_video_csync=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;vcr_AutoSwitch;{=vcr_AutoSwitch=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;audio_AnalogMode;{=audio_AnalogMode=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;audiochannel_up_down_enable;{=audiochannel_up_down_enable=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;audio_left_right_selectable;{=audio_left_right_selectable=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;audio_avs_Control;{=h_audio_avs_Control=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;audio_DolbyDigital;{=audio_DolbyDigital=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;audio_step;{=audio_step=}~save=} -{=ini-set:/var/tuxbox/config/controld.conf;vcroutput;{=h_vcroutput=}~open=} -{=ini-set:/var/tuxbox/config/controld.conf;videooutput;{=h_videooutput=}~save=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;video_Format;{=video_Format=}~open=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;video_backgroundFormat;{=video_backgroundFormat=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;video_csync;{=h_video_csync=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;vcr_AutoSwitch;{=vcr_AutoSwitch=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;audio_AnalogMode;{=audio_AnalogMode=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;audiochannel_up_down_enable;{=audiochannel_up_down_enable=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;audio_left_right_selectable;{=audio_left_right_selectable=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;audio_avs_Control;{=h_audio_avs_Control=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;audio_DolbyDigital;{=audio_DolbyDigital=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;audio_step;{=audio_step=}~save=} +{=ini-set:%(CONFIGDIR)/controld.conf;vcroutput;{=h_vcroutput=}~open=} +{=ini-set:%(CONFIGDIR)/controld.conf;videooutput;{=h_videooutput=}~save=} end-block~video_audio_save_settings # ------- LCD save Settings start-block~lcd_save_settings -{=ini-set:/var/tuxbox/config/neutrino.conf;lcd_power;{=lcd_power=}~open=} -{=ini-set:/var/tuxbox/config/neutrino.conf;lcd_inverse;{=lcd_inverse=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;lcd_dim_time;{=lcd_dim_time=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;lcd_dim_brightness;{=lcd_dim_brightness=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;lcd_epgmode;{=lcd_epgmode=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;lcd_show_volume;{=lcd_show_volume=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;lcd_contrast;{=lcd_contrast=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;lcd_brightness;{=lcd_brightness=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;lcd_standbybrightness;{=lcd_standbybrightness=}~save=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;lcd_power;{=lcd_power=}~open=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;lcd_inverse;{=lcd_inverse=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;lcd_dim_time;{=lcd_dim_time=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;lcd_dim_brightness;{=lcd_dim_brightness=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;lcd_epgmode;{=lcd_epgmode=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;lcd_show_volume;{=lcd_show_volume=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;lcd_contrast;{=lcd_contrast=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;lcd_brightness;{=lcd_brightness=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;lcd_standbybrightness;{=lcd_standbybrightness=}~save=} end-block~lcd_save_settings # ------- Buttons save Settings start-block~buttons_save_settings -{=ini-set:/var/tuxbox/config/neutrino.conf;bouquetlist_mode;{=bouquetlist_mode=}~open=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_bouquet_down;{=key_bouquet_down=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_bouquet_up;{=key_bouquet_up=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_channelList_addrecord;{=key_channelList_addrecord=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_channelList_addremind;{=key_channelList_addremind=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_channelList_cancel;{=key_channelList_cancel=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_channelList_pagedown;{=key_channelList_pagedown=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_channelList_pageup;{=key_channelList_pageup=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_channelList_reload;{=key_channelList_reload=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_channelList_search;{=key_channelList_search=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_channelList_sort;{=key_channelList_sort=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_lastchannel;{=key_lastchannel=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_quickzap_down;{=key_quickzap_down=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_quickzap_up;{=key_quickzap_up=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_subchannel_down;{=key_subchannel_down=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_subchannel_toggle;{=key_subchannel_toggle=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_subchannel_up;{=key_subchannel_up=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_tvradio_mode;{=key_tvradio_mode=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;key_zaphistory;{=key_zaphistory=}~save=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;bouquetlist_mode;{=bouquetlist_mode=}~open=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_bouquet_down;{=key_bouquet_down=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_bouquet_up;{=key_bouquet_up=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_channelList_addrecord;{=key_channelList_addrecord=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_channelList_addremind;{=key_channelList_addremind=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_channelList_cancel;{=key_channelList_cancel=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_channelList_pagedown;{=key_channelList_pagedown=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_channelList_pageup;{=key_channelList_pageup=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_channelList_reload;{=key_channelList_reload=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_channelList_search;{=key_channelList_search=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_channelList_sort;{=key_channelList_sort=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_lastchannel;{=key_lastchannel=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_quickzap_down;{=key_quickzap_down=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_quickzap_up;{=key_quickzap_up=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_subchannel_down;{=key_subchannel_down=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_subchannel_toggle;{=key_subchannel_toggle=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_subchannel_up;{=key_subchannel_up=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_tvradio_mode;{=key_tvradio_mode=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;key_zaphistory;{=key_zaphistory=}~save=} end-block~buttons_save_settings # ------- Personalize save Settings start-block~personalize_save_settings -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_tvmode;{=p_tv=}~open=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_radiomode;{=p_radio=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_scartmode;{=p_scart=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_games;{=p_games=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_audioplayer;{=p_audioplayer=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_inetradio;{=p_inetradio=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_movieplayer;{=p_movieplayer=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_pictureviewer;{=p_picviewer=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_pincode;{=p_pincode=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_upnpbrowser;{=p_upnp=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_sleeptimer;{=p_sleeptimer=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_reboot;{=p_reboot=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_shutdown;{=p_shutdown=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_settings;{=p_settings=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_video;{=p_video=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_audio;{=p_audio=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_youth;{=p_youth=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_network;{=p_network=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_recording;{=p_recording=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_language;{=p_language=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_colors;{=p_colors=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_lcd;{=p_lcd=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_keybinding;{=p_keybinding=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_mediaplayer;{=p_mediaplayer=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_driver;{=p_driver=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_misc;{=p_misc=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_service;{=p_service=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_bouqueteditor;{=p_bouqueteditor=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_scants;{=p_scants=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_reload;{=p_reload=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_getplugins;{=p_getplugins=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_restart;{=p_restart=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_epgrestart;{=p_epgrestart=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_chan_epg_stat;{=p_chan_epg_stat=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_imageinfo;{=p_imageinfo=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_update;{=p_update=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_bluebutton;{=p_bluebutton=}~cache=} -{=ini-set:/var/tuxbox/config/neutrino.conf;personalize_redbutton;{=p_redbutton=}~save=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_tvmode;{=p_tv=}~open=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_radiomode;{=p_radio=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_scartmode;{=p_scart=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_games;{=p_games=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_audioplayer;{=p_audioplayer=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_inetradio;{=p_inetradio=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_movieplayer;{=p_movieplayer=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_pictureviewer;{=p_picviewer=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_pincode;{=p_pincode=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_upnpbrowser;{=p_upnp=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_sleeptimer;{=p_sleeptimer=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_reboot;{=p_reboot=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_shutdown;{=p_shutdown=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_settings;{=p_settings=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_video;{=p_video=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_audio;{=p_audio=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_youth;{=p_youth=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_network;{=p_network=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_recording;{=p_recording=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_language;{=p_language=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_colors;{=p_colors=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_lcd;{=p_lcd=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_keybinding;{=p_keybinding=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_mediaplayer;{=p_mediaplayer=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_driver;{=p_driver=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_misc;{=p_misc=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_service;{=p_service=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_bouqueteditor;{=p_bouqueteditor=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_scants;{=p_scants=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_reload;{=p_reload=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_getplugins;{=p_getplugins=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_restart;{=p_restart=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_epgrestart;{=p_epgrestart=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_chan_epg_stat;{=p_chan_epg_stat=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_imageinfo;{=p_imageinfo=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_update;{=p_update=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_bluebutton;{=p_bluebutton=}~cache=} +{=ini-set:%(CONFIGDIR)/neutrino.conf;personalize_redbutton;{=p_redbutton=}~save=} end-block~personalize_save_settings # ------- VNC save Settings start-block~vnc_save_settings -{=ini-set:/var/tuxbox/config/vnc.conf;server;{=server=}~open=} -{=ini-set:/var/tuxbox/config/vnc.conf;port;{=port=}~cache=} -{=ini-set:/var/tuxbox/config/vnc.conf;passwd;{=password=}~cache=} -{=ini-set:/var/tuxbox/config/vnc.conf;scale;{=scale=}~save=} +{=ini-set:%(CONFIGDIR)/vnc.conf;server;{=server=}~open=} +{=ini-set:%(CONFIGDIR)/vnc.conf;port;{=port=}~cache=} +{=ini-set:%(CONFIGDIR)/vnc.conf;passwd;{=password=}~cache=} +{=ini-set:%(CONFIGDIR)/vnc.conf;scale;{=scale=}~save=} end-block~vnc_save_settings # ------- Timer save Settings start-block~timer_save_settings -{=ini-set:/var/tuxbox/config/Y-Web.conf;tvinfo_username;{=tvinfo_username=}=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;tvinfo_password;{=tvinfo_password=}=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;klack_url;{=klack_url=}=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;klack_securitycode;{=klack_securitycode=}=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;live_resolution_w;{=ini-get:/var/tuxbox/config/Y-Web.conf;live_resolution_w;384=}=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;live_resolution_h;{=ini-get:/var/tuxbox/config/Y-Web.conf;live_resolution_h;288=}=} -{=file-action:/var/tuxbox/config/channels.txt;add;{=channels=}=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;tvinfo_username;{=tvinfo_username=}=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;tvinfo_password;{=tvinfo_password=}=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;klack_url;{=klack_url=}=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;klack_securitycode;{=klack_securitycode=}=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;live_resolution_w;{=ini-get:%(CONFIGDIR)/Y-Web.conf;live_resolution_w;384=}=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;live_resolution_h;{=ini-get:%(CONFIGDIR)/Y-Web.conf;live_resolution_h;288=}=} +{=file-action:%(CONFIGDIR)/channels.txt;add;{=channels=}=} end-block~timer_save_settings # ------- Ext save Settings start-block~ext_save_settings -{=file-action:/var/tuxbox/config/extentions.txt;add;{=extentions=}=} +{=file-action:%(CONFIGDIR)/extentions.txt;add;{=extentions=}=} end-block~ext_save_settings # ------- No Managemant Error @@ -199,7 +199,7 @@ end-block~no_management # ------- Managemant Check : insert at Top of Page start-block~management_check_top -{=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip2=}~1~=}=} +{=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;management_ip2=}~1~=}=} {=if-empty:{=var-get:management=} ~ {=include-block:Y_Blocks.txt;no_management=} @@ -331,9 +331,9 @@ end-block~frame_iso_head # ------- nhttpd save Settings start-block~start_wizard_save_settings -{=ini-set:/var/tuxbox/config/Y-Web.conf;start_page;{=start_page=}~open=} -{=ini-set:/var/tuxbox/config/Y-Web.conf;startup;true~save=} -{=ini-set:/var/tuxbox/config/nhttpd.conf;Language.selected;{=language=}=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;start_page;{=start_page=}~open=} +{=ini-set:%(CONFIGDIR)/Y-Web.conf;startup;true~save=} +{=ini-set:%(CONFIGDIR)/nhttpd.conf;Language.selected;{=language=}=} {=func:do_reload_httpd_config=} end-block~start_wizard_save_settings @@ -393,7 +393,7 @@ end-block~start_wizard_page # ------- Lay-Frame MAIN start-block~frame_main -{=if-empty:{=ini-get:/var/tuxbox/config/Y-Web.conf;startup=}~ +{=if-empty:{=ini-get:%(CONFIGDIR)/Y-Web.conf;startup=}~ {=include-block:Y_Blocks.txt;start_wizard_page=} ~ {=include-block:Y_Blocks.txt;frame_head=} @@ -441,7 +441,7 @@ end-block~frame_secondary # ------- Lay-Frame Boxcontrol-Menu start-block~frame_boxcontrol {=var-set:sec_menu=Y_Boxcontrol_Menue.yhtm=} -{=var-set:startpage={=ini-get:/var/tuxbox/config/Y-Web.conf;start_page;none=}=} +{=var-set:startpage={=ini-get:%(CONFIGDIR)/Y-Web.conf;start_page;none=}=} {=var-set:work= {=if-equal:{=var-get:startpage=}~bouquets~Y_Boxcontrol_Bouquets.yhtm ~ @@ -521,8 +521,8 @@ end-block~frame_live_epg # ------- Remote start-block~remote -{=var-set:nfbtype={=ini-get:/var/tuxbox/config/neutrino.conf;remote_control_hardware=}=} -{=var-set:yfbtype={=ini-get:/var/tuxbox/config/Y-Web.conf;fb;0=}=} +{=var-set:nfbtype={=ini-get:%(CONFIGDIR)/neutrino.conf;remote_control_hardware=}=} +{=var-set:yfbtype={=ini-get:%(CONFIGDIR)/Y-Web.conf;fb;0=}=} {=var-set:boxtype={=func:get_boxtype=}=} {=if-equal:{=var-get:yfbtype=}~0~ {=if-equal:{=var-get:nfbtype=}~2~ {=include-block:Y_Blocks.txt;rc_dbox_philips=}~ diff --git a/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm b/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm index c108a83b2..e2d9a90ea 100644 --- a/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm +++ b/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm @@ -158,10 +158,10 @@ function get_data(){ ~=}
  • - OSD-{=L:bc.menue.screenshot=} + OSD-{=L:bc.menue.screenshot=}
  • - TV-{=L:bc.menue.screenshot=} + TV-{=L:bc.menue.screenshot=}
  • @@ -232,14 +232,14 @@ function get_data(){ -{=if-empty:{=ini-get:/var/tuxbox/config/Y-Web.conf;slavebox=}~~ +{=if-empty:{=ini-get:%(CONFIGDIR)/Y-Web.conf;slavebox=}~~

    Switch to

    diff --git a/src/nhttpd/web/Y_EPG_Plus.yhtm b/src/nhttpd/web/Y_EPG_Plus.yhtm index 6b72b9b10..fe0a7f624 100644 --- a/src/nhttpd/web/Y_EPG_Plus.yhtm +++ b/src/nhttpd/web/Y_EPG_Plus.yhtm @@ -68,7 +68,7 @@ function epg_imdb(){
    diff --git a/src/nhttpd/web/Y_Ext_Menue.yhtm b/src/nhttpd/web/Y_Ext_Menue.yhtm index 678e4ea5c..3a3226323 100644 --- a/src/nhttpd/web/Y_Ext_Menue.yhtm +++ b/src/nhttpd/web/Y_Ext_Menue.yhtm @@ -1,5 +1,5 @@ -{=var-set:extension={=if-file-exists:/var/tuxbox/config/extentions.txt~/var/tuxbox/config/extentions.txt~{=if-file-exists:/var/httpd/extentions.txt~/var/httpd/extentions.txt~/share/tuxbox/neutrino/httpd/extentions.txt=}=}=} -{=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip2=}~1~=}=} +{=var-set:extension={=if-file-exists:%(CONFIGDIR)/extentions.txt~%(CONFIGDIR)/extentions.txt~{=if-file-exists:%(PUBLIC_HTTPDDIR)/extentions.txt~%(PUBLIC_HTTPDDIR)/extentions.txt~%(PRIVATE_HTTPDDIR)/extentions.txt=}=}=} +{=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;management_ip2=}~1~=}=} {=include-block:Y_Blocks.txt;head=} diff --git a/src/nhttpd/web/Y_Ext_Settings.yhtm b/src/nhttpd/web/Y_Ext_Settings.yhtm index ae3d6a290..b09770673 100644 --- a/src/nhttpd/web/Y_Ext_Settings.yhtm +++ b/src/nhttpd/web/Y_Ext_Settings.yhtm @@ -23,7 +23,7 @@ function do_submit(){ - +
     

    diff --git a/src/nhttpd/web/Y_Ext_Update.js b/src/nhttpd/web/Y_Ext_Update.js index 0a212f0e3..7f4c6edf4 100644 --- a/src/nhttpd/web/Y_Ext_Update.js +++ b/src/nhttpd/web/Y_Ext_Update.js @@ -236,7 +236,7 @@ function uninstall_build_list2(){ /*build_list*/ i=0; ext.installed_extensions.sortBy(function(e){return e.get('tag');}).each(function(e){ - res=loadSyncURL("/y/cgi?execute=if-file-exists:/var/tuxbox/config/ext/"+e.get('tag')+"_uninstall.inc~1~0"); + res=loadSyncURL("/y/cgi?execute=if-file-exists:%(CONFIGDIR)/ext/"+e.get('tag')+"_uninstall.inc~1~0"); uninstall_list_addRow(update_body,++i,e,res=="1"); }); $('statusline').hide(); diff --git a/src/nhttpd/web/Y_Info_Menue.yhtm b/src/nhttpd/web/Y_Info_Menue.yhtm index 3ea5dab60..7a104ca8c 100644 --- a/src/nhttpd/web/Y_Info_Menue.yhtm +++ b/src/nhttpd/web/Y_Info_Menue.yhtm @@ -9,7 +9,7 @@ function init(){ } -{=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip2=}~1~=}=} +{=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;management_ip2=}~1~=}=}

    {=L:main.info=}

    diff --git a/src/nhttpd/web/Y_Live.yhtm b/src/nhttpd/web/Y_Live.yhtm index c258faf7b..bd06b4e13 100644 --- a/src/nhttpd/web/Y_Live.yhtm +++ b/src/nhttpd/web/Y_Live.yhtm @@ -1,4 +1,4 @@ -{=var-set:must_management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip2=}~1~=}=} +{=var-set:must_management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;management_ip=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;management_ip2=}~1~=}=} {=include-block:Y_Blocks.txt;head_no_charset=} @@ -151,13 +151,13 @@ function view_transcode_mode(){ -{=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip2=}~1~=}=} +{=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;management_ip2=}~1~=}=}

    {=L:live.heading=}

    @@ -71,9 +71,9 @@ function init(){ {=L:live.timer_sync=} - {=if-file-exists:/var/tuxbox/config/pr-auto-timer.rules~ + {=if-file-exists:%(CONFIGDIR)/pr-auto-timer.rules~
  • - Auto Timer + Auto Timer
  • ~=} diff --git a/src/nhttpd/web/Y_Live_Record.yhtm b/src/nhttpd/web/Y_Live_Record.yhtm index bbc3d837d..ee437b68b 100644 --- a/src/nhttpd/web/Y_Live_Record.yhtm +++ b/src/nhttpd/web/Y_Live_Record.yhtm @@ -156,7 +156,7 @@ function doRecord() {=L:live.rec.record_mode=} {=L:live.rec.filename=}: - + diff --git a/src/nhttpd/web/Y_Menue.yhtm b/src/nhttpd/web/Y_Menue.yhtm index 5909d55a4..57b8137c5 100644 --- a/src/nhttpd/web/Y_Menue.yhtm +++ b/src/nhttpd/web/Y_Menue.yhtm @@ -80,7 +80,7 @@ function vlc() { } -{=var-set:alt_httpd={=ini-get:/var/tuxbox/config/nhttpd.conf;WebsiteMain.override_directory;/var/httpd=}=} +{=var-set:alt_httpd={=ini-get:%(CONFIGDIR)/nhttpd.conf;WebsiteMain.override_directory;%(PUBLIC_HTTPDDIR)=}=} {=var-set:vf={=if-file-exists:{=var-get:alt_httpd=}/Y_Version.txt~{=var-get:alt_httpd=}/Y_Version.txt~Y_Version.txt=}=}
    @@ -122,9 +122,9 @@ function vlc() {   - + - {=if-equal:{=ini-get:/var/tuxbox/config/Y-Web.conf;yweb_box_name=}~${HOSTNAME}~{=script:Y_Tools get_hostname=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;yweb_box_name=}=} + {=if-equal:{=ini-get:%(CONFIGDIR)/Y-Web.conf;yweb_box_name=}~${HOSTNAME}~{=script:Y_Tools get_hostname=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;yweb_box_name=}=} 00:00 diff --git a/src/nhttpd/web/Y_NI_About.yhtm b/src/nhttpd/web/Y_NI_About.yhtm index 008820563..7a592aa8f 100644 --- a/src/nhttpd/web/Y_NI_About.yhtm +++ b/src/nhttpd/web/Y_NI_About.yhtm @@ -48,7 +48,7 @@ jQuery(document).ready(function(){ - + diff --git a/src/nhttpd/web/Y_NI_Blocks.txt b/src/nhttpd/web/Y_NI_Blocks.txt index 980a0c6e1..ff084a5e4 100644 --- a/src/nhttpd/web/Y_NI_Blocks.txt +++ b/src/nhttpd/web/Y_NI_Blocks.txt @@ -51,7 +51,7 @@ end-block~include_jquery # ------- NI NetFS start-block~netfs_local_dir -{=var-set:local_dir_{=var-get:nr=}={=ini-get:/var/tuxbox/config/neutrino.conf;netfs_{=mount_type_s=}_local_dir_{=var-get:nr=}~open=}=} +{=var-set:local_dir_{=var-get:nr=}={=ini-get:%(CONFIGDIR)/neutrino.conf;netfs_{=mount_type_s=}_local_dir_{=var-get:nr=}~open=}=} end-block~netfs_local_dir start-block~netfs_is_mount diff --git a/src/nhttpd/web/Y_NI_Camd-control.yhtm b/src/nhttpd/web/Y_NI_Camd-control.yhtm index 1b758ebef..5d22935c4 100644 --- a/src/nhttpd/web/Y_NI_Camd-control.yhtm +++ b/src/nhttpd/web/Y_NI_Camd-control.yhtm @@ -279,22 +279,22 @@ input[type="button"], .tools select { - - - - - - - - - {=if-equal:{=var-get:r_{=var-get:camd=}=}~true~ @@ -514,7 +514,7 @@ input[type="button"], .tools select { + {=L:set.timer.password=} - + @@ -50,7 +50,7 @@ function do_submit() {   - +
    diff --git a/src/nhttpd/web/Y_Settings_VNC.yhtm b/src/nhttpd/web/Y_Settings_VNC.yhtm index e99eaa92b..dc0d394d2 100644 --- a/src/nhttpd/web/Y_Settings_VNC.yhtm +++ b/src/nhttpd/web/Y_Settings_VNC.yhtm @@ -4,7 +4,7 @@ // Server - + Port - + Passwort - + Skalierung diff --git a/src/nhttpd/web/Y_Settings_buttons.yhtm b/src/nhttpd/web/Y_Settings_buttons.yhtm index 52c5bb55e..a9e0f8962 100644 --- a/src/nhttpd/web/Y_Settings_buttons.yhtm +++ b/src/nhttpd/web/Y_Settings_buttons.yhtm @@ -23,43 +23,43 @@ input[type="text"],select { function do_init() { var val = ""; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;bouquetlist_mode;0~open=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;bouquetlist_mode;0~open=}"; document.f.bouquetlist_mode.selectedIndex = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_bouquet_down;105~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_bouquet_down;105~cache=}"; document.f.key_bouquet_down.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_bouquet_up;106~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_bouquet_up;106~cache=}"; document.f.key_bouquet_up.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_channelList_addrecord;398~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_channelList_addrecord;398~cache=}"; document.f.key_channelList_addrecord.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_channelList_addremind;400~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_channelList_addremind;400~cache=}"; document.f.key_channelList_addremind.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_channelList_cancel;102~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_channelList_cancel;102~cache=}"; document.f.key_channelList_cancel.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_channelList_pagedown;115~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_channelList_pagedown;115~cache=}"; document.f.key_channelList_pagedown.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_channelList_pageup;114~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_channelList_pageup;114~cache=}"; document.f.key_channelList_pageup.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_channelList_reload;141~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_channelList_reload;141~cache=}"; document.f.key_channelList_reload.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_channelList_search;399~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_channelList_search;399~cache=}"; document.f.key_channelList_search.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_channelList_sort;401~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_channelList_sort;401~cache=}"; document.f.key_channelList_sort.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_lastchannel;11~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_lastchannel;11~cache=}"; document.f.key_lastchannel.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_quickzap_down;108~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_quickzap_down;108~cache=}"; document.f.key_quickzap_down.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_quickzap_up;103~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_quickzap_up;103~cache=}"; document.f.key_quickzap_up.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_subchannel_down;105~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_subchannel_down;105~cache=}"; document.f.key_subchannel_down.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_subchannel_toggle;11~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_subchannel_toggle;11~cache=}"; document.f.key_subchannel_toggle.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_subchannel_up;106~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_subchannel_up;106~cache=}"; document.f.key_subchannel_up.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_tvradio_mode;-2~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_tvradio_mode;-2~cache=}"; document.f.key_tvradio_mode.value = itoKey(val); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;key_zaphistory;102~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;key_zaphistory;102~cache=}"; document.f.key_zaphistory.value = itoKey(val); } function rcsim(_key) diff --git a/src/nhttpd/web/Y_Settings_lcd.yhtm b/src/nhttpd/web/Y_Settings_lcd.yhtm index 8d2ea3e3d..6a57e7a74 100644 --- a/src/nhttpd/web/Y_Settings_lcd.yhtm +++ b/src/nhttpd/web/Y_Settings_lcd.yhtm @@ -13,21 +13,21 @@ function do_init() { var val = ""; - obj_set_radio_value('lcd_power', "{=ini-get:/var/tuxbox/config/neutrino.conf;lcd_power;1~open=}"); - obj_set_radio_value('lcd_inverse', "{=ini-get:/var/tuxbox/config/neutrino.conf;lcd_inverse;0~cache=}"); + obj_set_radio_value('lcd_power', "{=ini-get:%(CONFIGDIR)/neutrino.conf;lcd_power;1~open=}"); + obj_set_radio_value('lcd_inverse', "{=ini-get:%(CONFIGDIR)/neutrino.conf;lcd_inverse;0~cache=}"); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;lcd_dim_time;0~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;lcd_dim_time;0~cache=}"; document.f.lcd_dim_time.value = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;lcd_dim_brightness;0~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;lcd_dim_brightness;0~cache=}"; document.f.lcd_dim_brightness.value = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;lcd_contrast;15~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;lcd_contrast;15~cache=}"; document.f.lcd_contrast.value = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;lcd_brightness;255~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;lcd_brightness;255~cache=}"; document.f.lcd_brightness.value = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;lcd_standbybrightness;170~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;lcd_standbybrightness;170~cache=}"; document.f.lcd_standbybrightness.value = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;lcd_epgmode;1~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;lcd_epgmode;1~cache=}"; var sel = 0; if(val=="2") sel=1; if(val=="3") sel=2; @@ -36,7 +36,7 @@ function do_init() if(val=="15") sel=5; document.f.lcd_epgmode.selectedIndex = sel; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;lcd_show_volume;0~cache=}" + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;lcd_show_volume;0~cache=}" document.f.lcd_show_volume.value = val; } diff --git a/src/nhttpd/web/Y_Settings_mount.yhtm b/src/nhttpd/web/Y_Settings_mount.yhtm index 47046bfac..11b8917e6 100644 --- a/src/nhttpd/web/Y_Settings_mount.yhtm +++ b/src/nhttpd/web/Y_Settings_mount.yhtm @@ -4,10 +4,10 @@ // IP - + Verzeichnis - + Lokales Verzeichnis - + MAC - + Optionen 1 - + Optionen 2 - + Automount @@ -67,11 +67,11 @@ function do_submit() Benutzername - + Passwort - +
    diff --git a/src/nhttpd/web/Y_Settings_nhttpd.yhtm b/src/nhttpd/web/Y_Settings_nhttpd.yhtm index f78f667b6..ffb48b292 100644 --- a/src/nhttpd/web/Y_Settings_nhttpd.yhtm +++ b/src/nhttpd/web/Y_Settings_nhttpd.yhtm @@ -5,10 +5,10 @@ //{=L:set.nhttpd.authentication=} {=L:user=} - + {=L:password=} - + {=L:set.nhttpd.client_without_authentication=} - + {=L:set.nhttpd.authentication=} @@ -72,7 +72,7 @@ function do_check_input_LogosURL() {=L:set.nhttpd.port=} -  {=L:set.nhttpd.active_after_boot=} +  {=L:set.nhttpd.active_after_boot=} @@ -85,18 +85,18 @@ function do_check_input_LogosURL() {=L:set.nhttpd.alternate_web_folder=} -  {=L:set.nhttpd.active_after_boot=} +  {=L:set.nhttpd.active_after_boot=} {=L:set.nhttpd.hosted_folder=} -  {=L:set.nhttpd.active_after_boot=} +  {=L:set.nhttpd.active_after_boot=} {=L:set.nhttpd.allowed_file_extensions=} - + {=L:set.nhttpd.allow_all_file_extensions=} @@ -115,13 +115,13 @@ function do_check_input_LogosURL() {=L:set.nhttpd.url_of_logos=} - + {=L:set.nhttpd.server=} {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ {=L:set.nhttpd.ips_without_keep_alive=}
    {=L:set.nhttpd.ips_without_keep_alive_desc=} - + =} diff --git a/src/nhttpd/web/Y_Settings_personalize.yhtm b/src/nhttpd/web/Y_Settings_personalize.yhtm index 58fd92d01..5321cb6c0 100644 --- a/src/nhttpd/web/Y_Settings_personalize.yhtm +++ b/src/nhttpd/web/Y_Settings_personalize.yhtm @@ -15,44 +15,44 @@ function do_submit() } function do_init() { - obj_set_radio_value('p_tv', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_tvmode;1~open=}"); - obj_set_radio_value('p_radio', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_radiomode;1~cache=}"); - obj_set_radio_value('p_scart', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_scartmode;1~cache=}"); - obj_set_radio_value('p_games', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_games;1~cache=}"); - obj_set_radio_value('p_audioplayer', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_audioplayer;1~cache=}"); - obj_set_radio_value('p_inetradio', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_inetradio;1~cache=}"); - obj_set_radio_value('p_movieplayer', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_movieplayer;1~cache=}"); - obj_set_radio_value('p_picviewer', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_pictureviewer;1~cache=}"); - obj_set_radio_value('p_pinstatus', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_pinstatus;0~cache=}"); - obj_set_radio_value('p_upnp', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_upnpbrowser;1~cache=}"); - obj_set_radio_value('p_sleeptimer', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_sleeptimer;1~cache=}"); - obj_set_radio_value('p_reboot', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_reboot;1~cache=}"); - obj_set_radio_value('p_shutdown', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_shutdown;1~cache=}"); - obj_set_radio_value('p_settings', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_settings;0~cache=}"); - obj_set_radio_value('p_video', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_video;1~cache=}"); - obj_set_radio_value('p_audio', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_audio;1~cache=}"); - obj_set_radio_value('p_youth', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_youth;1~cache=}"); - obj_set_radio_value('p_network', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_network;1~cache=}"); - obj_set_radio_value('p_recording', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_recording;1~cache=}"); - obj_set_radio_value('p_language', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_language;1~cache=}"); - obj_set_radio_value('p_colors', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_colors;1~cache=}"); - obj_set_radio_value('p_lcd', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_lcd;1~cache=}"); - obj_set_radio_value('p_keybinding', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_keybinding;1~cache=}"); - obj_set_radio_value('p_mediaplayer', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_mediaplayer;1~cache=}"); - obj_set_radio_value('p_driver', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_driver;1~cache=}"); - obj_set_radio_value('p_misc', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_misc;1~cache=}"); - obj_set_radio_value('p_service', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_service;0~cache=}"); - obj_set_radio_value('p_bouqueteditor', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_bouqueteditor;1~cache=}"); - obj_set_radio_value('p_scants', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_scants;1~cache=}"); - obj_set_radio_value('p_reload', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_reload;1~cache=}"); - obj_set_radio_value('p_getplugins', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_getplugins;1~cache=}"); - obj_set_radio_value('p_restart', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_restart;1~cache=}"); - obj_set_radio_value('p_epgrestart', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_epgrestart;1~cache=}"); - obj_set_radio_value('p_chan_epg_stat', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_chan_epg_stat;1~cache=}"); - obj_set_radio_value('p_imageinfo', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_imageinfo;1~cache=}"); - obj_set_radio_value('p_update', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_update;1~cache=}"); - obj_set_radio_value('p_bluebutton', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_bluebutton;1~cache=}"); - obj_set_radio_value('p_redbutton', "{=ini-get:/var/tuxbox/config/neutrino.conf;personalize_redbutton;1~cache=}"); + obj_set_radio_value('p_tv', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_tvmode;1~open=}"); + obj_set_radio_value('p_radio', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_radiomode;1~cache=}"); + obj_set_radio_value('p_scart', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_scartmode;1~cache=}"); + obj_set_radio_value('p_games', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_games;1~cache=}"); + obj_set_radio_value('p_audioplayer', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_audioplayer;1~cache=}"); + obj_set_radio_value('p_inetradio', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_inetradio;1~cache=}"); + obj_set_radio_value('p_movieplayer', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_movieplayer;1~cache=}"); + obj_set_radio_value('p_picviewer', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_pictureviewer;1~cache=}"); + obj_set_radio_value('p_pinstatus', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_pinstatus;0~cache=}"); + obj_set_radio_value('p_upnp', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_upnpbrowser;1~cache=}"); + obj_set_radio_value('p_sleeptimer', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_sleeptimer;1~cache=}"); + obj_set_radio_value('p_reboot', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_reboot;1~cache=}"); + obj_set_radio_value('p_shutdown', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_shutdown;1~cache=}"); + obj_set_radio_value('p_settings', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_settings;0~cache=}"); + obj_set_radio_value('p_video', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_video;1~cache=}"); + obj_set_radio_value('p_audio', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_audio;1~cache=}"); + obj_set_radio_value('p_youth', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_youth;1~cache=}"); + obj_set_radio_value('p_network', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_network;1~cache=}"); + obj_set_radio_value('p_recording', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_recording;1~cache=}"); + obj_set_radio_value('p_language', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_language;1~cache=}"); + obj_set_radio_value('p_colors', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_colors;1~cache=}"); + obj_set_radio_value('p_lcd', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_lcd;1~cache=}"); + obj_set_radio_value('p_keybinding', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_keybinding;1~cache=}"); + obj_set_radio_value('p_mediaplayer', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_mediaplayer;1~cache=}"); + obj_set_radio_value('p_driver', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_driver;1~cache=}"); + obj_set_radio_value('p_misc', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_misc;1~cache=}"); + obj_set_radio_value('p_service', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_service;0~cache=}"); + obj_set_radio_value('p_bouqueteditor', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_bouqueteditor;1~cache=}"); + obj_set_radio_value('p_scants', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_scants;1~cache=}"); + obj_set_radio_value('p_reload', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_reload;1~cache=}"); + obj_set_radio_value('p_getplugins', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_getplugins;1~cache=}"); + obj_set_radio_value('p_restart', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_restart;1~cache=}"); + obj_set_radio_value('p_epgrestart', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_epgrestart;1~cache=}"); + obj_set_radio_value('p_chan_epg_stat', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_chan_epg_stat;1~cache=}"); + obj_set_radio_value('p_imageinfo', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_imageinfo;1~cache=}"); + obj_set_radio_value('p_update', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_update;1~cache=}"); + obj_set_radio_value('p_bluebutton', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_bluebutton;1~cache=}"); + obj_set_radio_value('p_redbutton', "{=ini-get:%(CONFIGDIR)/neutrino.conf;personalize_redbutton;1~cache=}"); } //]]> @@ -75,7 +75,7 @@ function do_init() PIN Code -   +   Farbtasten Taste Blau (Features) diff --git a/src/nhttpd/web/Y_Settings_video_audio.yhtm b/src/nhttpd/web/Y_Settings_video_audio.yhtm index 0f7a6ee9a..5d6c14f9a 100644 --- a/src/nhttpd/web/Y_Settings_video_audio.yhtm +++ b/src/nhttpd/web/Y_Settings_video_audio.yhtm @@ -8,32 +8,32 @@ function do_init() { var val = ""; //video - val = "{=ini-get:/var/tuxbox/config/controld.conf;videooutput;1~open=}"; + val = "{=ini-get:%(CONFIGDIR)/controld.conf;videooutput;1~open=}"; document.f.videooutput.selectedIndex = val; - obj_set_radio_value('vcroutput', "{=ini-get:/var/tuxbox/config/controld.conf;vcroutput;0~cache=}"); + obj_set_radio_value('vcroutput', "{=ini-get:%(CONFIGDIR)/controld.conf;vcroutput;0~cache=}"); document.f.h_vcroutput.value = obj_get_radio_value("vcroutput"); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;video_Format;2~open=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;video_Format;2~open=}"; document.f.video_Format.selectedIndex = val; - val = "{=ini-get:/var/tuxbox/config/controld.conf;video_backgroundFormat;2~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/controld.conf;video_backgroundFormat;2~cache=}"; var sel = 0; if(val=="2") sel=1; if(val=="3") sel=2; document.f.video_backgroundFormat.selectedIndex = sel; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;video_csync;0~cache=}" + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;video_csync;0~cache=}" document.f.video_csync.value = val; - obj_set_radio_value('vcr_AutoSwitch', "{=ini-get:/var/tuxbox/config/neutrino.conf;vcr_AutoSwitch;true~cache=}"); + obj_set_radio_value('vcr_AutoSwitch', "{=ini-get:%(CONFIGDIR)/neutrino.conf;vcr_AutoSwitch;true~cache=}"); //audio - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;audio_AnalogMode;0~cache=}"; + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;audio_AnalogMode;0~cache=}"; document.f.audio_AnalogMode.selectedIndex = val; - obj_set_radio_value('audiochannel_up_down_enable', "{=ini-get:/var/tuxbox/config/neutrino.conf;audiochannel_up_down_enable;false~cache=}"); - obj_set_radio_value('audio_left_right_selectable', "{=ini-get:/var/tuxbox/config/neutrino.conf;audio_left_right_selectable;false~cache=}"); - obj_set_radio_value('audio_DolbyDigital', "{=ini-get:/var/tuxbox/config/neutrino.conf;audio_DolbyDigital;false~cache=}"); - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;audio_avs_Control;1~cache=}"; + obj_set_radio_value('audiochannel_up_down_enable', "{=ini-get:%(CONFIGDIR)/neutrino.conf;audiochannel_up_down_enable;false~cache=}"); + obj_set_radio_value('audio_left_right_selectable', "{=ini-get:%(CONFIGDIR)/neutrino.conf;audio_left_right_selectable;false~cache=}"); + obj_set_radio_value('audio_DolbyDigital', "{=ini-get:%(CONFIGDIR)/neutrino.conf;audio_DolbyDigital;false~cache=}"); + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;audio_avs_Control;1~cache=}"; document.f.audio_avs_Control.selectedIndex = val; - val = "{=ini-get:/var/tuxbox/config/neutrino.conf;audio_step;5~cache=}" + val = "{=ini-get:%(CONFIGDIR)/neutrino.conf;audio_step;5~cache=}" document.f.audio_step.value = val; } function set_hidden_values() diff --git a/src/nhttpd/web/Y_Settings_wol.yhtm b/src/nhttpd/web/Y_Settings_wol.yhtm index 40d7c429f..83ce4d40a 100644 --- a/src/nhttpd/web/Y_Settings_wol.yhtm +++ b/src/nhttpd/web/Y_Settings_wol.yhtm @@ -4,9 +4,9 @@ -{=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip2=}~1~=}=} +{=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:%(CONFIGDIR)/Y-Web.conf;management_ip2=}~1~=}=} {=var-set:automount={=find-exec:automount=}=} {=var-set:ether-wake={=find-exec:ether-wake=}=} diff --git a/src/nhttpd/web/Y_Tools_Timer_Sync.yhtm b/src/nhttpd/web/Y_Tools_Timer_Sync.yhtm index 5b75bedd3..bee1ec1b4 100644 --- a/src/nhttpd/web/Y_Tools_Timer_Sync.yhtm +++ b/src/nhttpd/web/Y_Tools_Timer_Sync.yhtm @@ -14,8 +14,8 @@
    - TVInfo
    -   + TVInfo
    +