From f5213a4ec0d15d37b81a451e54db73936638d8fc Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 18 Jun 2015 12:00:00 +0200 Subject: [PATCH] osd_setup: fix active status of ca_dotmatrix and ca_frame Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/8d84a4387d06e408d9da437aaa5a2f9bb991c832 Author: vanhofen Date: 2015-06-18 (Thu, 18 Jun 2015) Origin message was: ------------------ - osd_setup: fix active status of ca_dotmatrix and ca_frame --- data/locale/deutsch.locale | 2 +- data/locale/english.locale | 8 ++++---- src/gui/osd_setup.cpp | 31 +++++++++++++++++++++++++------ src/gui/osd_setup.h | 2 ++ 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 401cd83f6..97b477e8f 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1426,7 +1426,7 @@ miscsettings.epg_scan_standby Im Standby Modus miscsettings.general Allgemein miscsettings.head Erweitert miscsettings.infobar Infobar -miscsettings.infobar_casystem_display CA-System Anzeige +miscsettings.infobar_casystem_display CA-Systemanzeige miscsettings.infobar_casystem_dotmatrix CA-Anzeige mit Punktematrix miscsettings.infobar_casystem_frame CA-Anzeige mit Rahmen miscsettings.infobar_casystem_mini Mini diff --git a/data/locale/english.locale b/data/locale/english.locale index 8ea15b434..deb8b6a03 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1003,7 +1003,7 @@ menu.hint_inactive_textcolor Change inactive item text color 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 On: display all with colored active, mini: single\nlocked icon, descreet: all active ca-systems menu.hint_infobar_casys_color Change CA-System background color menu.hint_infobar_casys_dotmatrix on: CA-System with dot matrix in background menu.hint_infobar_casys_frame on: CA-System with frame @@ -1428,9 +1428,9 @@ miscsettings.epg_scan_standby Standby miscsettings.general General miscsettings.head Extended settings miscsettings.infobar Infobar -miscsettings.infobar_casystem_display CA-System Display -miscsettings.infobar_casystem_dotmatrix CA-Display with dot matrix -miscsettings.infobar_casystem_frame CA-Display with frame +miscsettings.infobar_casystem_display CA-System display +miscsettings.infobar_casystem_dotmatrix CA display with dot matrix +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/osd_setup.cpp b/src/gui/osd_setup.cpp index 8faf2eae7..a905ae2ec 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -83,6 +83,9 @@ COsdSetup::COsdSetup(int wizard_mode) mfWindowSize = NULL; win_demo = NULL; + ca_dotmatrix = NULL; + ca_frame = NULL; + is_wizard = wizard_mode; width = 40; @@ -92,6 +95,14 @@ COsdSetup::COsdSetup(int wizard_mode) COsdSetup::~COsdSetup() { + if (ca_dotmatrix) { + delete ca_dotmatrix; + ca_dotmatrix = NULL; + } + if (ca_frame) { + delete ca_frame; + ca_frame = NULL; + } delete colorSetupNotifier; delete fontsizenotifier; delete win_demo; @@ -1003,14 +1014,16 @@ void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar) menu_infobar->addItem(mc); // CA system dotmatrix - mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DOTMATRIX, &g_settings.casystem_dotmatrix, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.casystem_display < 2); - mc->setHint("", LOCALE_MENU_HINT_INFOBAR_CASYS_DOTMATRIX); - menu_infobar->addItem(mc); + ca_dotmatrix = new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DOTMATRIX, &g_settings.casystem_dotmatrix, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.casystem_display < 2); + ca_dotmatrix->setHint("", LOCALE_MENU_HINT_INFOBAR_CASYS_DOTMATRIX); + menu_infobar->addItem(ca_dotmatrix); // 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); + ca_frame = 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); + ca_frame->setHint("", LOCALE_MENU_HINT_INFOBAR_CASYS_FRAME); + menu_infobar->addItem(ca_frame); + + menu_infobar->addItem(GenericMenuSeparator); // 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); @@ -1198,6 +1211,12 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) if (g_InfoViewer == NULL) g_InfoViewer = new CInfoViewer; g_InfoViewer->changePB(); + if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY)) + { + ca_dotmatrix->setActive(g_settings.casystem_display < 2); + ca_frame->setActive(g_settings.casystem_display < 2); + return true; + } return false; } else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_OSD_PRESET)) { diff --git a/src/gui/osd_setup.h b/src/gui/osd_setup.h index a461957f8..6075fdf56 100644 --- a/src/gui/osd_setup.h +++ b/src/gui/osd_setup.h @@ -57,6 +57,8 @@ class COsdSetup : public CMenuTarget, public CChangeObserver COnOffNotifier* screensaverNotifier; COnOffNotifier* channellistNotifier; COnOffNotifier* infobarHddNotifier; + CMenuOptionChooser * ca_dotmatrix; + CMenuOptionChooser * ca_frame; int width; int is_wizard;