diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index dc8072fd9..bcb7275fc 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1002,6 +1002,7 @@ menu.hint_inet_radio Internetradio menu.hint_info Informationen über das Image, CPU, Arbeitsspeicher und Stream und mehr menu.hint_infobar_back Ändern Sie die Hintergrundfarbe für die Infobar menu.hint_infobar_casys ein: zeigt alle Aktiven farbig, Mini: einzelnes Symbol ob gespeert, Diskret: alle Aktiven CA-Systeme +menu.hint_infobar_casys_frame ein: CA-Systemanzeige mit Rahmen menu.hint_infobar_dd Zeigt ein Dolby Digital Icon bei Verfügbarkeit menu.hint_infobar_filesys Zeigen den vom Flash- und einer HDD verwendeten Speicherplatz menu.hint_infobar_fonts Ändern Sie die Schriftgrößen in der Infobar @@ -1424,6 +1425,7 @@ miscsettings.general Allgemein miscsettings.head Erweitert miscsettings.infobar Infobar miscsettings.infobar_casystem_display CA-System Anzeige +miscsettings.infobar_casystem_frame CA-Anzeige mit Rahmen miscsettings.infobar_casystem_mini Mini miscsettings.infobar_casystem_mode Diskret miscsettings.infobar_disp Logo-Anzeige diff --git a/data/locale/english.locale b/data/locale/english.locale index 738b3889f..76d0cc1a8 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1004,6 +1004,7 @@ menu.hint_inet_radio Internet radio menu.hint_info Information about image, box cpu and storage,\nstream information menu.hint_infobar_back Change infobar background color menu.hint_infobar_casys On: display all with colored active, mini: single\nlocked icon, descreet: all active ca-sys +menu.hint_infobar_casys_frame on: CA-System with frame menu.hint_infobar_dd Show DD icon menu.hint_infobar_filesys Show flash and HDD used space levels menu.hint_infobar_fonts Change infobar font sizes @@ -1426,6 +1427,7 @@ miscsettings.general General miscsettings.head Extended settings miscsettings.infobar Infobar miscsettings.infobar_casystem_display CA-System Display +miscsettings.infobar_casystem_frame CA-Display with frame miscsettings.infobar_casystem_mini mini miscsettings.infobar_casystem_mode discreet miscsettings.infobar_disp Logo display diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 290b81377..0b18bc733 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -689,8 +689,8 @@ void CInfoViewerBB::showBarHdd(int percent) void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_offset) { char buf[20]; - int endx = g_InfoViewer->BoxEndX - 10; - int py = g_InfoViewer->BoxEndY + 2; /* hand-crafted, should be automatic */ + int endx = g_InfoViewer->BoxEndX - (g_settings.casystem_frame ? 20 : 10); + int py = g_InfoViewer->BoxEndY + (g_settings.casystem_frame ? 4 : 2); /* hand-crafted, should be automatic */ int px = 0; static map > icon_map; const int icon_space = 10, icon_number = 10; @@ -816,21 +816,37 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst) void CInfoViewerBB::paintCA_bar(int left, int right) { - int xcnt = (g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX) / 4; - int ycnt = bottom_bar_offset / 4; + int xcnt = (g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - (g_settings.casystem_frame ? 24 : 0)) / 4; + int ycnt = (bottom_bar_offset - (g_settings.casystem_frame ? 14 : 0)) / 4; + if (right) right = xcnt - ((right/4)+1); if (left) left = xcnt - ((left/4)-1); - frameBuffer->paintBox(g_InfoViewer->ChanInfoX + (right*4), g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset, COL_BLACK); + if (g_settings.casystem_frame) { // with highlighted frame + if (!right || !left) { // paint full bar + // background + frameBuffer->paintBox(g_InfoViewer->ChanInfoX , g_InfoViewer->BoxEndY , g_InfoViewer->BoxEndX , g_InfoViewer->BoxEndY + bottom_bar_offset , COL_INFOBAR_PLUS_0); + // shadow + frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 14, g_InfoViewer->BoxEndY + 4, g_InfoViewer->BoxEndX - 6 , g_InfoViewer->BoxEndY + bottom_bar_offset - 6 , COL_INFOBAR_SHADOW_PLUS_0 , RADIUS_SMALL, CORNER_ALL); + // ca bar + frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 11, g_InfoViewer->BoxEndY + 1, g_InfoViewer->BoxEndX - 11, g_InfoViewer->BoxEndY + bottom_bar_offset - 11, COL_INFOBAR_PLUS_0 , RADIUS_SMALL, CORNER_ALL); + // highlighed frame + frameBuffer->paintBoxFrame(g_InfoViewer->ChanInfoX + 10, g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - 2*10, bottom_bar_offset - 10, 1, COL_INFOBAR_PLUS_3, RADIUS_SMALL, CORNER_ALL); + } + else + frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 12 + (right*4), g_InfoViewer->BoxEndY + 2, g_InfoViewer->BoxEndX - 12 - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset - 12, COL_INFOBAR_PLUS_0); + } + else + frameBuffer->paintBox(g_InfoViewer->ChanInfoX + (right*4), g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset, COL_BLACK); if (left) left -= 1; for (int i = 0 + right; i < xcnt - left; i++) { for (int j = 0; j < ycnt; j++) { - frameBuffer->paintBoxRel((g_InfoViewer->ChanInfoX + 2) + i*4, g_InfoViewer->BoxEndY + 2 + j*4, 2, 2, COL_INFOBAR_PLUS_1); + frameBuffer->paintBoxRel((g_InfoViewer->ChanInfoX + (g_settings.casystem_frame ? 14 : 2)) + i*4, g_InfoViewer->BoxEndY + (g_settings.casystem_frame ? 4 : 2) + j*4, 2, 2, COL_INFOBAR_PLUS_1); } } } @@ -858,7 +874,7 @@ void CInfoViewerBB::reset_allScala() void CInfoViewerBB::setBBOffset() { - bottom_bar_offset = (g_settings.casystem_display < 2) ? 22 : 0; + bottom_bar_offset = (g_settings.casystem_display < 2) ? (g_settings.casystem_frame ? 36 : 22) : 0; } void* CInfoViewerBB::scrambledThread(void *arg) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 5cd3be41b..9291716c3 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -996,6 +996,11 @@ void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar) mc->setHint("", LOCALE_MENU_HINT_INFOBAR_CASYS); menu_infobar->addItem(mc); + // CA system frame + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_FRAME, &g_settings.casystem_frame, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.casystem_display < 2); + mc->setHint("", LOCALE_MENU_HINT_INFOBAR_CASYS_FRAME); + menu_infobar->addItem(mc); + // flash/hdd statfs mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_SYSFS_HDD, &g_settings.infobar_show_sysfs_hdd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, infobarHddNotifier); mc->setHint("", LOCALE_MENU_HINT_INFOBAR_FILESYS); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 4e323f466..197587457 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -473,6 +473,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.infobar_show_channellogo = configfile.getInt32("infobar_show_channellogo" , 3 ); g_settings.infobar_progressbar = configfile.getInt32("infobar_progressbar" , 1 ); // below channel name g_settings.casystem_display = configfile.getInt32("casystem_display", 1 );//discreet ca mode default + g_settings.casystem_frame = configfile.getInt32("casystem_frame", 0 ); g_settings.scrambled_message = configfile.getBool("scrambled_message", true ); g_settings.volume_pos = configfile.getInt32("volume_pos", CVolumeBar::VOLUMEBAR_POS_TOP_RIGHT ); g_settings.volume_digits = configfile.getBool("volume_digits", true); @@ -1006,6 +1007,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32("infobar_show_channellogo" , g_settings.infobar_show_channellogo ); configfile.setInt32("infobar_progressbar" , g_settings.infobar_progressbar ); configfile.setInt32("casystem_display" , g_settings.casystem_display ); + configfile.setInt32("casystem_frame" , g_settings.casystem_frame ); configfile.setBool("scrambled_message" , g_settings.scrambled_message ); configfile.setInt32("volume_pos" , g_settings.volume_pos ); configfile.setBool("volume_digits", g_settings.volume_digits); diff --git a/src/system/locals.h b/src/system/locals.h index da243e55a..4b630469b 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1031,6 +1031,7 @@ typedef enum LOCALE_MENU_HINT_INFO, LOCALE_MENU_HINT_INFOBAR_BACK, LOCALE_MENU_HINT_INFOBAR_CASYS, + LOCALE_MENU_HINT_INFOBAR_CASYS_FRAME, LOCALE_MENU_HINT_INFOBAR_DD, LOCALE_MENU_HINT_INFOBAR_FILESYS, LOCALE_MENU_HINT_INFOBAR_FONTS, @@ -1453,6 +1454,7 @@ typedef enum LOCALE_MISCSETTINGS_HEAD, LOCALE_MISCSETTINGS_INFOBAR, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY, + LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_FRAME, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_MINI, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_MODE, LOCALE_MISCSETTINGS_INFOBAR_DISP, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index da186219d..649debff3 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1031,6 +1031,7 @@ const char * locale_real_names[] = "menu.hint_info", "menu.hint_infobar_back", "menu.hint_infobar_casys", + "menu.hint_infobar_casys_frame", "menu.hint_infobar_dd", "menu.hint_infobar_filesys", "menu.hint_infobar_fonts", @@ -1453,6 +1454,7 @@ const char * locale_real_names[] = "miscsettings.head", "miscsettings.infobar", "miscsettings.infobar_casystem_display", + "miscsettings.infobar_casystem_frame", "miscsettings.infobar_casystem_mini", "miscsettings.infobar_casystem_mode", "miscsettings.infobar_disp", diff --git a/src/system/settings.h b/src/system/settings.h index 8a1a8e697..2424cedb5 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -167,6 +167,7 @@ struct SNeutrinoSettings int progressbar_timescale_yellow; int progressbar_timescale_invert; int casystem_display; + int casystem_frame; int scrambled_message; int volume_pos; int volume_digits;