From 9569be0ff158e88a1d93fbf075cca8d8f0c61603 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH 01/88] CComponentsFrmClock: fix wrong initialization of w_tmp Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/758081a0acef768d2126c485bea0303a0238440a Author: Thilo Graf Date: 2017-08-28 (Mon, 28 Aug 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_clock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index 1beb3d70f..d49276dfd 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -248,7 +248,7 @@ void CComponentsFrmClock::initCCLockItems() //extract timestring segment (char) string stmp = s_time.substr(i, 1); - int w_tmp = minSepWidth; + int w_tmp = 0; //get width of current segment if (isdigit(stmp.at(0)) ) //check for digits, if true, we use digit width w_tmp = cl_font->getMaxDigitWidth(); From 08eb91b084ab888a28c000627e1062a53f3e503c Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH 02/88] cc_frm.cpp, cc_frm_button.cpp: remove unread stored variables Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fe6a24351b927000ea64ea42861cebe87d1980f6 Author: Thilo Graf Date: 2017-08-28 (Mon, 28 Aug 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm.cpp | 6 +++--- src/gui/components/cc_frm_button.cpp | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index defe1433c..1a2f7d1be 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -378,7 +378,7 @@ void CComponentsForm::paintCCItems() size_t items_count = v_cc_items.size(); //using of real x/y values to paint items if this text object is bound in a parent form - int this_x = x, auto_x = x, this_y = y, auto_y = y, this_w = width; + int this_x = x, auto_x = x, this_y = y, auto_y = y, this_w = 0; int w_parent_frame = 0; if (cc_parent){ this_x = auto_x = cc_xr; @@ -441,7 +441,7 @@ void CComponentsForm::paintCCItems() } //move item x-position, if we have a frame on parent, TODO: other constellations not considered at the moment - w_parent_frame = xpos <= fr_thickness ? fr_thickness : 0; + w_parent_frame = xpos <= fr_thickness ? fr_thickness : w_parent_frame; //set required x-position to item: //append vertical @@ -461,7 +461,7 @@ void CComponentsForm::paintCCItems() } //move item y-position, if we have a frame on parent, TODO: other constellations not considered at the moment - w_parent_frame = ypos <= fr_thickness ? fr_thickness : 0; + w_parent_frame = ypos <= fr_thickness ? fr_thickness : w_parent_frame; //set required y-position to item //append hor diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index c0c0039b0..47b9feafa 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -147,14 +147,15 @@ void CComponentsButton::initIcon() if (pos == string::npos) cc_btn_icon = frameBuffer->getIconPath(cc_btn_icon); + int y_icon = 0; + int h_icon = 0; if (cc_btn_icon_obj == NULL){ cc_btn_icon_obj = new CComponentsPictureScalable(fr_thickness, 0, cc_btn_icon, this); cc_btn_icon_obj->SetTransparent(CFrameBuffer::TM_BLACK); cc_btn_icon_obj->doPaintBg(false); } - int y_icon = cc_btn_icon_obj->getYPos(); - int h_icon = cc_btn_icon_obj->getHeight(); + h_icon = cc_btn_icon_obj->getHeight(); //get required icon height int h_max = height-2*fr_thickness; From ce38d562735a780c24d384b314218550ddb03ed2 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH 03/88] CComponentsFooter: fix possible conversion warning For platform compatibility. eg. with neutrino-pc on it is possible that size_t is long unsigned ini, for others unsinged int Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/27995b19fa1d301b0f7a90c53fa4f88d330071bf Author: Thilo Graf Date: 2017-08-28 (Mon, 28 Aug 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_footer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index 913de581e..d8bc9df87 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -223,7 +223,7 @@ void CComponentsFooter::setButtonLabels(const struct button_label_cc * const con btn->setButtonFont(NULL); } - dprintf(DEBUG_INFO, "[CComponentsFooter] [%s - %d] button %s [%u] btn->getWidth() = %d w_btn = %d, (chain->getWidth() = %d)\n", __func__, __LINE__, txt.c_str(), i, btn->getWidth(), w_btn, btn_container->getWidth()); + dprintf(DEBUG_INFO, "[CComponentsFooter] [%s - %d] button %s [%u] btn->getWidth() = %d w_btn = %d, (chain->getWidth() = %d)\n", __func__, __LINE__, txt.c_str(), (uint32_t)i, btn->getWidth(), w_btn, btn_container->getWidth()); } /* add generated button objects to chain object. From 08cb6991755ae21b106f385c0f0f7de7a146bd54 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH 04/88] CComponentsFooter: fix possible error with non-POD element type affected is struct type 'button_label_cc' Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/16dac64ed20173cda69df7c2fc809473fae828c8 Author: Thilo Graf Date: 2017-08-28 (Mon, 28 Aug 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_footer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index d8bc9df87..e7e9da36e 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -251,7 +251,7 @@ void CComponentsFooter::setButtonLabels(const struct button_label_cc * const con void CComponentsFooter::setButtonLabels(const struct button_label * const content, const size_t& label_count, const int& chain_width, const int& label_width) { //conversion for compatibility with older paintButtons() methode, find in /gui/widget/buttons.h - button_label_cc buttons[label_count]; + button_label_cc *buttons = new button_label_cc[label_count]; for (size_t i = 0; i< label_count; i++){ buttons[i].button = content[i].button; buttons[i].locale = content[i].locale; @@ -262,12 +262,13 @@ void CComponentsFooter::setButtonLabels(const struct button_label * const conten buttons[i].btn_alias = -1; } setButtonLabels(buttons, label_count, chain_width, label_width); + delete[] buttons; } void CComponentsFooter::setButtonLabels(const vector &v_content, const int& chain_width, const int& label_width) { size_t label_count = v_content.size(); - button_label_cc buttons[label_count]; + button_label_cc *buttons = new button_label_cc[label_count]; for (size_t i= 0; i< label_count; i++){ buttons[i].button = v_content[i].button; @@ -277,8 +278,8 @@ void CComponentsFooter::setButtonLabels(const vector &v_content buttons[i].btn_result = v_content[i].btn_result; buttons[i].btn_alias = v_content[i].btn_alias; } - setButtonLabels(buttons, label_count, chain_width, label_width); + delete[] buttons; } void CComponentsFooter::setButtonLabel( const char *button_icon, From 4c6d63035ed9e672e1e1ae957ea91f96898f626a Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH 05/88] CComponentsPicture: remove benchmark lines Was only for debugging. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f07a27825d62e45421bb95351d94e13fd0ee97e1 Author: Thilo Graf Date: 2017-08-28 (Mon, 28 Aug 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_item_picture.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index c776dfcb6..63eb85bfc 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -299,10 +299,6 @@ int CComponentsPicture::getHeight() void CComponentsPicture::paintPicture() { - struct timeval t1, t2; - if (debug) - gettimeofday(&t1, NULL); - is_image_painted = false; //initialize image position int x_pic = x; @@ -337,14 +333,6 @@ void CComponentsPicture::paintPicture() frameBuffer->RestoreScreen(x_pic, y_pic, dxc, dyc, image_cache); } } - - //benchmark - if (debug){ - gettimeofday(&t2, NULL); - uint64_t duration = ((t2.tv_sec * 1000000ULL + t2.tv_usec) - (t1.tv_sec * 1000000ULL + t1.tv_usec)) / 1000ULL; - if (duration) - fprintf(stderr, "\033[33m[CComponentsPicture] %s: %" PRIu64 " ms to paint image \033[0m\n", __func__, duration); - } } void CComponentsPicture::paint(bool do_save_bg) From bf5722ee3af4c2f3b82c90169ba9fd97f03c85dd Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH 06/88] CProgressBarCache: remove benchmark lines Was only for debugging. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d42389b1671aab7f2b4f638b0ee9c58fed22d6e0 Author: Thilo Graf Date: 2017-08-28 (Mon, 28 Aug 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_item_progressbar.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/gui/components/cc_item_progressbar.cpp b/src/gui/components/cc_item_progressbar.cpp index d3ea4831f..543d71a8e 100644 --- a/src/gui/components/cc_item_progressbar.cpp +++ b/src/gui/components/cc_item_progressbar.cpp @@ -432,10 +432,6 @@ void CProgressBarCache::pbcApplyGradient(fb_pixel_t *b) void CProgressBar::paintProgress(bool do_save_bg) { - struct timeval t1, t2; - if (debug) - gettimeofday(&t1, NULL); - if (*pb_design == PB_OFF) { paintInit(false); return; @@ -476,14 +472,6 @@ void CProgressBar::paintProgress(bool do_save_bg) if (is_painted) pb_last_width = pb_active_width; - - //benchmark - if (debug){ - gettimeofday(&t2, NULL); - uint64_t duration = ((t2.tv_sec * 1000000ULL + t2.tv_usec) - (t1.tv_sec * 1000000ULL + t1.tv_usec)) / 1000ULL; - if (duration) - fprintf(stderr, "\033[33m[CProgressBar] %s: %" PRIu64 " ms to paint progress \033[0m\n",__func__, duration); - } } From 66876b7889dd1d795c2e621ce39736c840d6b613 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH 07/88] CComponentsHeader: add missing check for null pointer Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5221769840ca6226aab20038e43af8afe8459ecb Author: Thilo Graf Date: 2017-08-28 (Mon, 28 Aug 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_header.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 2a8d82db8..0fcb8aa68 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -343,14 +343,18 @@ void CComponentsHeader::initLogo() * with previous or next item. */ if (cch_caption_align & CC_TITLE_LEFT){ - int left_tag = prev_item->getXPos() + prev_item->getWidth(); - if (x_logo <= left_tag) - x_logo = left_tag + logo_space/2 - w_logo/2; + if (prev_item){ + int left_tag = prev_item->getXPos() + prev_item->getWidth(); + if (x_logo <= left_tag) + x_logo = left_tag + logo_space/2 - w_logo/2; + } } if (cch_caption_align & CC_TITLE_RIGHT){ - if (x_logo + w_logo >= next_item->getXPos()) - x_logo = next_item->getXPos() - logo_space/2 - w_logo/2; + if (next_item){ + if (x_logo + w_logo >= next_item->getXPos()) + x_logo = next_item->getXPos() - logo_space/2 - w_logo/2; + } } } From 31a3bb2ae0a2996a248f262aca2982ebbbd0a53b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH 08/88] Helpbox: add missing check for null pointer Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b5d33f10e1d80a85273190d99a892d89e0d0e01f Author: Thilo Graf Date: 2017-08-28 (Mon, 28 Aug 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/helpbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/helpbox.cpp b/src/gui/widget/helpbox.cpp index d4fd87b76..66a3835ed 100644 --- a/src/gui/widget/helpbox.cpp +++ b/src/gui/widget/helpbox.cpp @@ -106,7 +106,7 @@ void Helpbox::addLine(const std::string& icon, const std::string& text, const in txt->setColorBody(COL_RED); #endif int lines = txt->getCTextBoxObject()->getLines(); - txt_height = std::max(lines*font->getHeight(), h_line); + txt_height = std::max(font ? lines*font->getHeight() : 0, h_line); txt->setHeight(txt_height); line->addCCItem(txt); From e85ba36b4362dcd44b1178dac5022f24134ae145 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH 09/88] cc_item_shapes.cpp/h: Add method to create draw boxes without explicit objects Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c743cb632bbabf3df366074c8478ee633fff6568 Author: Thilo Graf Date: 2017-08-28 (Mon, 28 Aug 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_item_shapes.cpp | 9 +++++++++ src/gui/components/cc_item_shapes.h | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/src/gui/components/cc_item_shapes.cpp b/src/gui/components/cc_item_shapes.cpp index 9b55d0580..66b4be5e9 100644 --- a/src/gui/components/cc_item_shapes.cpp +++ b/src/gui/components/cc_item_shapes.cpp @@ -107,3 +107,12 @@ void CComponentsShapeCircle::paint(bool do_save_bg) { paintInit(do_save_bg); } + + +bool PaintBoxRel(const int& x, const int& y, const int& dx, const int& dy, const fb_pixel_t& col, int radius, int corner_type, int shadow_mode) +{ + CComponentsShapeSquare box(x, y, dx, dy, NULL, shadow_mode, COL_SHADOW_PLUS_0, col); + box.setCorner(radius, corner_type); + box.paint(CC_SAVE_SCREEN_NO); + return box.isPainted(); +} diff --git a/src/gui/components/cc_item_shapes.h b/src/gui/components/cc_item_shapes.h index a1a48d97c..8530c5141 100644 --- a/src/gui/components/cc_item_shapes.h +++ b/src/gui/components/cc_item_shapes.h @@ -73,4 +73,28 @@ class CComponentsShapeSquare : public CComponentsItem void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); }; + + /**Small and easy to apply box paint methode without expilcit object declaration + * @return bool, true = painted + * + * @param[in] x expects type int, x position on screen + * @param[in] y expects type int, y position on screen modes are: + * @param[in] dx expects type int, width of scrollbar object + * @param[in] dy expects type int, height of scrollbar object + * @param[in] col expects type fb_pixel_t, as body color + * + * usual paraemters: + * @param[in] radius optional, expects type int as corner radius, default = 0 + * @param[in] corner_type optional, expects type int as cornar type, default CORNER_ALL + * @param[in] shadow_mode optional, expects type int defined by shadow mode enums, default CC_SHADOW_OFF + */ +bool PaintBoxRel(const int& x, + const int& y, + const int& dx, + const int& dy, + const fb_pixel_t& col, + int radius = 0, + int corner_type = CORNER_ALL, + int shadow_mode = CC_SHADOW_OFF); + #endif From ba35604b8d32ba646ba9a49309f4133505843a4e Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH 10/88] comments: fix copy paste errors Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/6e310a81571dfe21f4cd97e69a3b531d49f17fff Author: Thilo Graf Date: 2017-08-28 (Mon, 28 Aug 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_draw.h | 2 +- src/gui/components/cc_frm_button.h | 2 +- src/gui/components/cc_frm_header.h | 4 +- src/gui/components/cc_frm_scrollbar.h | 58 +++++++++++------------ src/gui/widget/helpbox.h | 58 +++++++++++------------ src/gui/widget/hintbox.h | 66 +++++++++++++-------------- src/gui/widget/msgbox.h | 50 ++++++++++---------- src/gui/widget/navibar.h | 20 ++++---- src/gui/widget/textbox.h | 4 +- 9 files changed, 132 insertions(+), 132 deletions(-) diff --git a/src/gui/components/cc_draw.h b/src/gui/components/cc_draw.h index 76b047f4c..005cc95d0 100644 --- a/src/gui/components/cc_draw.h +++ b/src/gui/components/cc_draw.h @@ -342,7 +342,7 @@ class CCDraw : public COSDFader, public CComponentsSignals * * @return bool returns true if effect was successful canceled * - * @param[in] keep_on_screen optional, exepts bool, default = false. means: item is not repainted after canceled effect + * @param[in] keep_on_screen optional, expects bool, default = false. means: item is not repainted after canceled effect * * @see take a look into test menu class for examples * NOTE: Effect must be started with paintBlink() diff --git a/src/gui/components/cc_frm_button.h b/src/gui/components/cc_frm_button.h index c85777ff7..0e9e4eca2 100644 --- a/src/gui/components/cc_frm_button.h +++ b/src/gui/components/cc_frm_button.h @@ -211,7 +211,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen * Returns true if filtered event msg value of button object is found in cc_directKeys container. * @return bool * @param[in] msg - * @li exepts type neutrino_msg_t as filter for searched message + * @li expects type neutrino_msg_t as filter for searched message * @see neutrino_msg_t getButtonDirectKey(), driver/rcinput.h for possible values */ bool hasButtonDirectKey(const neutrino_msg_t& msg) diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index 2f96c7baf..2496043cc 100644 --- a/src/gui/components/cc_frm_header.h +++ b/src/gui/components/cc_frm_header.h @@ -204,7 +204,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT * Height can be changed with modes by setSizeMode(), setHeight() or constructor. * @return void * - * @param[in] font exepts font object, type Font* + * @param[in] font expects font object, type Font* * @see getCaptionFont(), setSizeMode(), * setCaptionColor(), * setCaptionAlignment(), @@ -227,7 +227,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT * If other size wanted then use set setCaptionFont() and setHeight() * @return void * - * @param[in] size_mode exepts type int (enums) + * @param[in] size_mode expects type int (enums) * possible modes are: * CC_HEADER_SIZE_LARGE * CC_HEADER_SIZE_SMALL diff --git a/src/gui/components/cc_frm_scrollbar.h b/src/gui/components/cc_frm_scrollbar.h index 0b902d591..7395c1107 100644 --- a/src/gui/components/cc_frm_scrollbar.h +++ b/src/gui/components/cc_frm_scrollbar.h @@ -70,20 +70,20 @@ class CComponentsScrollBar : public CComponentsFrmChain public: /**Class constructor to generate individual scrollbar objects * - * @param[in] x_pos exepts type int, x position on screen - * @param[in] x_pos exepts type int, y position on screen modes are: - * @param[in] w exepts type int, width of scrollbar object - * @param[in] h exepts type int, height of scrollbar object - * @param[in] count optional, exepts type int, count of pages, default 1 + * @param[in] x_pos expects type int, x position on screen + * @param[in] x_pos expects type int, y position on screen modes are: + * @param[in] w expects type int, width of scrollbar object + * @param[in] h expects type int, height of scrollbar object + * @param[in] count optional, expects type int, count of pages, default 1 * * usual paraemters: - * @param[in] parent optional, exepts type pointer to a parent CComponentsForm object, default NULL - * @param[in] shadow_mode optional, exepts type int defined by shadow mode enums, default CC_SHADOW_OFF - * @param[in] color_frame optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PLUS_0 - * @param[in] color_body optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PLUS_0 - * @param[in] color_shadow optional, exepts type fb_pixel_t, default COL_SHADOW_PLUS_0 - * @param[in] color_select optional, exepts type fb_pixel_t, default COL_SCROLLBAR_ACTIVE_PLUS_0 - * @param[in] color_passive optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PASSIVE_PLUS_0 + * @param[in] parent optional, expects type pointer to a parent CComponentsForm object, default NULL + * @param[in] shadow_mode optional, expects type int defined by shadow mode enums, default CC_SHADOW_OFF + * @param[in] color_frame optional, expects type fb_pixel_t, default COL_SCROLLBAR_PLUS_0 + * @param[in] color_body optional, expects type fb_pixel_t, default COL_SCROLLBAR_PLUS_0 + * @param[in] color_shadow optional, expects type fb_pixel_t, default COL_SHADOW_PLUS_0 + * @param[in] color_select optional, expects type fb_pixel_t, default COL_SCROLLBAR_ACTIVE_PLUS_0 + * @param[in] color_passive optional, expects type fb_pixel_t, default COL_SCROLLBAR_PASSIVE_PLUS_0 */ CComponentsScrollBar( const int &x_pos, const int &y_pos, @@ -102,7 +102,7 @@ class CComponentsScrollBar : public CComponentsFrmChain /**Set current page number * @return void * - * @param[in] mark_id exepts type int, this sets the current selected page number. + * @param[in] mark_id expects type int, this sets the current selected page number. * * @see getMarkID() */ @@ -120,8 +120,8 @@ class CComponentsScrollBar : public CComponentsFrmChain * Each segment is assigned to a page number. Starting with id 0...n * @return void * - * @param[in] segment_count exepts type int, sets the current count of pages. - * @param[in] mark_id optional, exepts type int, sets the current selected page number, default = 0 + * @param[in] segment_count expects type int, sets the current count of pages. + * @param[in] mark_id optional, expects type int, sets the current selected page number, default = 0 * @see also setMarkID() * getMarkID() */ @@ -135,7 +135,7 @@ class CComponentsScrollBar : public CComponentsFrmChain int getSegmentCount(){return sb_segments_count;} /**Enable/disable vizualized count of possible scroll items - * @param[in] enable optional, exepts type bool. + * @param[in] enable optional, expects type bool. * @note Default mode is disabled. */ void enableVisualize(bool enable = true){sb_visual_enable = enable;} @@ -150,21 +150,21 @@ void getScrollBarData(int *total_pages, int *current_page, int total_items, int /**Small and easy to apply scrollbar paint methode without expilcit object declaration * @return void * - * @param[in] x_pos exepts type int, x position on screen - * @param[in] x_pos exepts type int, y position on screen modes are: - * @param[in] w exepts type int, width of scrollbar object - * @param[in] h exepts type int, height of scrollbar object - * @param[in] count exepts type int, count of pages, default 1 - * @param[in] current_num exepts type int, current selected page, default 0 + * @param[in] x_pos expects type int, x position on screen + * @param[in] x_pos expects type int, y position on screen modes are: + * @param[in] w expects type int, width of scrollbar object + * @param[in] h expects type int, height of scrollbar object + * @param[in] count expects type int, count of pages, default 1 + * @param[in] current_num expects type int, current selected page, default 0 * * usual paraemters: - * @param[in] parent optional, exepts type pointer to a parent CComponentsForm object, default NULL - * @param[in] shadow_mode optional, exepts type int defined by shadow mode enums, default CC_SHADOW_OFF - * @param[in] color_frame optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PLUS_0 - * @param[in] color_body optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PLUS_0 - * @param[in] color_shadow optional, exepts type fb_pixel_t, default COL_SHADOW_PLUS_0 - * @param[in] color_select optional, exepts type fb_pixel_t, default COL_SCROLLBAR_ACTIVE_PLUS_0 - * @param[in] color_passive optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PASSIVE_PLUS_0 + * @param[in] parent optional, expects type pointer to a parent CComponentsForm object, default NULL + * @param[in] shadow_mode optional, expects type int defined by shadow mode enums, default CC_SHADOW_OFF + * @param[in] color_frame optional, expects type fb_pixel_t, default COL_SCROLLBAR_PLUS_0 + * @param[in] color_body optional, expects type fb_pixel_t, default COL_SCROLLBAR_PLUS_0 + * @param[in] color_shadow optional, expects type fb_pixel_t, default COL_SHADOW_PLUS_0 + * @param[in] color_select optional, expects type fb_pixel_t, default COL_SCROLLBAR_ACTIVE_PLUS_0 + * @param[in] color_passive optional, expects type fb_pixel_t, default COL_SCROLLBAR_PASSIVE_PLUS_0 */ void paintScrollBar( const int &x_pos, const int &y_pos, diff --git a/src/gui/widget/helpbox.h b/src/gui/widget/helpbox.h index ed173f7fa..6e0798291 100644 --- a/src/gui/widget/helpbox.h +++ b/src/gui/widget/helpbox.h @@ -52,19 +52,19 @@ public: * NOTE: addLine() members are used only for compatibilty with older implementation * of lines. * @param[in] Title - * @li exepts type std::string, defines caption of window + * @li expects type std::string, defines caption of window * @param[in] Default_Text - * @li optional: exepts type std::string, defines a pre defined help text + * @li optional: expects type std::string, defines a pre defined help text * @param[in] text_mode - * @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes + * @li optional: expects type int, defines text modes, see /gui/widget/textbox.h for possible modes * @param[in] line_height - * @li optional: exepts type int, defines height of line + * @li optional: expects type int, defines height of line * @param[in] line_indent - * @li optional: exepts type int, defines lenght of indent from left + * @li optional: expects type int, defines lenght of indent from left * @param[in] font_text - * @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used + * @li optional: expects type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used * @param[in] Icon - * @li exepts type const char*, defins the title bar icon and can be name (see /gui/icons.h) or path to an image file + * @li expects type const char*, defins the title bar icon and can be name (see /gui/icons.h) or path to an image file */ Helpbox( const std::string& Title, const std::string& Default_Text = std::string(), @@ -79,15 +79,15 @@ public: /**Adds an item with pre defined text * @param[in] text - * @li exepts type std::string + * @li expects type std::string * @param[in] text_mode - * @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes + * @li optional: expects type int, defines text modes, see /gui/widget/textbox.h for possible modes * @param[in] line_height - * @li optional: exepts type int, defines height of line + * @li optional: expects type int, defines height of line * @param[in] line_indent - * @li optional: exepts type int, defines lenght of indent from left + * @li optional: expects type int, defines lenght of indent from left * @param[in] font_text - * @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used + * @li optional: expects type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used */ void addLine( const std::string& text, const int& text_mode = HELPBOX_DEFAULT_TEXT_MODE, @@ -97,15 +97,15 @@ public: /**Adds an item with pre defined text * @param[in] text - * @li exepts type const char * + * @li expects type const char * * @param[in] text_mode - * @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes + * @li optional: expects type int, defines text modes, see /gui/widget/textbox.h for possible modes * @param[in] line_height - * @li optional: exepts type int, defines height of line + * @li optional: expects type int, defines height of line * @param[in] line_indent - * @li optional: exepts type int, defines lenght of indent from left + * @li optional: expects type int, defines lenght of indent from left * @param[in] font_text - * @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used + * @li optional: expects type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used */ void addLine( const char *text, const int& text_mode = HELPBOX_DEFAULT_TEXT_MODE, @@ -115,17 +115,17 @@ public: /**Adds an item with pre defined icon and text * @param[in] icon - * @li exepts type std::string, icon can be name (see /gui/icons.h) or path to an image file + * @li expects type std::string, icon can be name (see /gui/icons.h) or path to an image file * @param[in] text - * @li exepts type std::string + * @li expects type std::string * @param[in] text_mode - * @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes + * @li optional: expects type int, defines text modes, see /gui/widget/textbox.h for possible modes * @param[in] line_height - * @li optional: exepts type int, defines height of line + * @li optional: expects type int, defines height of line * @param[in] line_indent - * @li optional: exepts type int, defines lenght of indent from left + * @li optional: expects type int, defines lenght of indent from left * @param[in] font_text - * @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used + * @li optional: expects type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used */ void addLine( const std::string& icon, const std::string& text, @@ -136,17 +136,17 @@ public: /**Adds an item with pre defined icon and text * @param[in] icon - * @li exepts type const char *, icon can be name (see /gui/icons.h) or path to an image file + * @li expects type const char *, icon can be name (see /gui/icons.h) or path to an image file * @param[in] text - * @li exepts type const char * + * @li expects type const char * * @param[in] text_mode - * @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes + * @li optional: expects type int, defines text modes, see /gui/widget/textbox.h for possible modes * @param[in] line_height - * @li optional: exepts type int, defines height of line + * @li optional: expects type int, defines height of line * @param[in] line_indent - * @li optional: exepts type int, defines lenght of indent from left + * @li optional: expects type int, defines lenght of indent from left * @param[in] font_text - * @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used + * @li optional: expects type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used */ void addLine( const char *icon, const char *text, diff --git a/src/gui/widget/hintbox.h b/src/gui/widget/hintbox.h index 9019228a6..d15fc1ce0 100644 --- a/src/gui/widget/hintbox.h +++ b/src/gui/widget/hintbox.h @@ -90,20 +90,20 @@ class CHintBox : public CComponentsWindow public: /**CHintBox Constructor * @param[in] Caption - * @li exepts type neutrino_locale_t with locale entry from /system/locals.h + * @li expects type neutrino_locale_t with locale entry from /system/locals.h * @param[in] Text - * @li exepts type const char*, this is the message text inside the window, text is UTF-8 encoded + * @li expects type const char*, this is the message text inside the window, text is UTF-8 encoded * @param[in] Width - * @li optional: exepts type int, defines box width, default value = HINTBOX_MIN_WIDTH + * @li optional: expects type int, defines box width, default value = HINTBOX_MIN_WIDTH * @param[in] Icon - * @li optional: exepts type const char*, defines the icon name on the left side of titlebar, default = DEFAULT_HEADER_ICON + * @li optional: expects type const char*, defines the icon name on the left side of titlebar, default = DEFAULT_HEADER_ICON * @param[in] Picon - * @li optional: exepts type const char*, defines the picon name on the left side of message text, default = NULL (non Icon) + * @li optional: expects type const char*, defines the picon name on the left side of message text, default = NULL (non Icon) * @param[in] header_buttons - * @li optional: exepts type int, defines the icon name on the right side of titlebar, default = 0 (non Icon) + * @li optional: expects type int, defines the icon name on the right side of titlebar, default = 0 (non Icon) * @see class CComponentsWindow() * @param[in] text_mode - * @li optional: exepts type int, defines the text modes for embedded text lines + * @li optional: expects type int, defines the text modes for embedded text lines * Possible Modes defined in /gui/widget/textbox.h * AUTO_WIDTH * AUTO_HIGH @@ -115,7 +115,7 @@ class CHintBox : public CComponentsWindow * NO_AUTO_LINEBREAK * AUTO_LINEBREAK_NO_BREAKCHARS * @param[in] indent - * @li optional: exepts type int, defines indent of text + * @li optional: expects type int, defines indent of text * * @see classes CComponentsText(), CTextBox() */ @@ -130,7 +130,7 @@ class CHintBox : public CComponentsWindow /**CHintBox Constructor * @param[in] Caption - * @li exepts type const char* + * @li expects type const char* * @see for other parameters take a look to basic class CHintBox() */ CHintBox( const char * const Caption, @@ -144,9 +144,9 @@ class CHintBox : public CComponentsWindow /**CHintBox Constructor * @param[in] Caption - * @li exepts type neutrino_locale_t with locale entry from /system/locals.h + * @li expects type neutrino_locale_t with locale entry from /system/locals.h * @param[in] Text - * @li exepts type neutrino_locale_t with locale entry from /system/locals.h + * @li expects type neutrino_locale_t with locale entry from /system/locals.h * @see for other parameters take a look to basic class CHintBox() */ CHintBox( const neutrino_locale_t Caption, @@ -160,9 +160,9 @@ class CHintBox : public CComponentsWindow /**CHintBox Constructor * @param[in] Caption - * @li exepts type const char* + * @li expects type const char* * @param[in] Text - * @li exepts type neutrino_locale_t with locale entry from /system/locals.h + * @li expects type neutrino_locale_t with locale entry from /system/locals.h * @see for other parameters take a look to basic class CHintBox() */ CHintBox( const char * const Caption, @@ -192,7 +192,7 @@ class CHintBox : public CComponentsWindow /** * enable/disable visualized timeout as progressbar under titlebar * @param[in] enable - * @li optional: exepts type bool, default = true + * @li optional: expects type bool, default = true */ void enableTimeOutBar(bool enable = true); @@ -205,7 +205,7 @@ class CHintBox : public CComponentsWindow /** * scroll handler for text objects: NOTE: exec() must be called ! * @param[in] hint_id - * @li optional: exepts type unsigned int, default = 0 + * @li optional: expects type unsigned int, default = 0 * default for the 1st hint item (=0), item id arises from the order of added items with addHintItem(), default we have minimal one item with id=0 * @see Scroll() */ @@ -214,7 +214,7 @@ class CHintBox : public CComponentsWindow /** * scroll down handler for text objects: NOTE: exec() must be called ! * @param[in] hint_id - * @li exepts type unsigned int, default = 0 + * @li expects type unsigned int, default = 0 * default for the 1st hint item (=0), item id arises from the order of added items with addHintItem(), default we h * @see Scroll() */ @@ -223,9 +223,9 @@ class CHintBox : public CComponentsWindow /** * Member to add a hint item * @param[in] Text - * @li exepts type std::string, this is the message text inside the window, text is UTF-8 encoded + * @li expects type std::string, this is the message text inside the window, text is UTF-8 encoded * @param[in] text_mode - * @li optional: exepts type int, defines the text modes for embedded text lines + * @li optional: expects type int, defines the text modes for embedded text lines * Possible Modes defined in /gui/widget/textbox.h * AUTO_WIDTH * AUTO_HIGH @@ -237,11 +237,11 @@ class CHintBox : public CComponentsWindow * NO_AUTO_LINEBREAK * AUTO_LINEBREAK_NO_BREAKCHARS * @param[in] Picon - * @li optional: exepts type std::string, defines the picon name on the left side of message text, default = NULL (non Icon) + * @li optional: expects type std::string, defines the picon name on the left side of message text, default = NULL (non Icon) * @param[in] color_text - * @li optional: exepts type fb_pixel_t, defines the text color, default = COL_MENUCONTENT_TEXT + * @li optional: expects type fb_pixel_t, defines the text color, default = COL_MENUCONTENT_TEXT * * @param[in] font_text - * @li optional: exepts type Font*, defines the text font type, default = NULL for system preset for message contents + * @li optional: expects type Font*, defines the text font type, default = NULL for system preset for message contents */ void addHintItem( const std::string& Text, const int& text_mode = DEFAULT_HINTBOX_TEXT_MODE, @@ -252,7 +252,7 @@ class CHintBox : public CComponentsWindow /** * Member to add a hint item from specified cc-item type * @param[in] cc_Item - * @li exepts type CComponentsItem*, allows to add any possible cc-item type + * @li expects type CComponentsItem*, allows to add any possible cc-item type * * @see /gui/components/cc_types.h */ @@ -261,11 +261,11 @@ class CHintBox : public CComponentsWindow /** * Sets a text to a hint item. * @param[in] Text - * @li exepts type std::string, this is the message text inside the hint item, text is UTF-8 encoded + * @li expects type std::string, this is the message text inside the hint item, text is UTF-8 encoded * @param[in] hint_id - * @li optional: exepts type unsigned int, default = 0 for the first or one and only item + * @li optional: expects type unsigned int, default = 0 for the first or one and only item * @param[in] text_mode - * @li optional: exepts type int, defines the text modes for embedded text lines + * @li optional: expects type int, defines the text modes for embedded text lines * Possible Modes defined in /gui/widget/textbox.h * AUTO_WIDTH * AUTO_HIGH @@ -278,9 +278,9 @@ class CHintBox : public CComponentsWindow * AUTO_LINEBREAK_NO_BREAKCHARS * default: CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH | CTextBox::CENTER * @param[in] color_text - * @li optional: exepts type fb_pixel_t, defines the text color, default = COL_MENUCONTENT_TEXT + * @li optional: expects type fb_pixel_t, defines the text color, default = COL_MENUCONTENT_TEXT * * @param[in] style - * @li optional: exepts type int, defines the text style NOTE: only for dynamic font + * @li optional: expects type int, defines the text style NOTE: only for dynamic font * possible styles are: * FONT_STYLE_REGULAR (default) * FONT_STYLE_BOLD @@ -323,16 +323,16 @@ class CHint : public CHintBox public: /**CHint Constructor * @param[in] Text - * @li exepts type const char*, this is the message text inside the window, text is UTF-8 encoded + * @li expects type const char*, this is the message text inside the window, text is UTF-8 encoded * @param[in] show_background - * @li optional: exepts type bool, enable/disable backround paint, default = true + * @li optional: expects type bool, enable/disable backround paint, default = true */ CHint(const char * const Text, bool show_background = true); /**CHint Constructor * @param[in] Text - * @li exepts type neutrino_locale_t, this is the message text inside the window, text is UTF-8 encoded + * @li expects type neutrino_locale_t, this is the message text inside the window, text is UTF-8 encoded * @param[in] show_background - * @li optional: exepts type bool, enable/disable backround paint, default = true + * @li optional: expects type bool, enable/disable backround paint, default = true */ CHint(const neutrino_locale_t Text, bool show_background = true); }; @@ -341,9 +341,9 @@ class CHint : public CHintBox * Simplified methodes to show hintboxes without titlebar and footer * Text is UTF-8 encoded * @param[in] timeout -* @li optional: exepts type int as seconds, default = HINTBOX_DEFAULT_TIMEOUT (get from settings) +* @li optional: expects type int as seconds, default = HINTBOX_DEFAULT_TIMEOUT (get from settings) * @param[in] show_background -* @li optional: exepts type bool, enable/disable backround paint, default = true +* @li optional: expects type bool, enable/disable backround paint, default = true * @see for possible text parameters take a look to CHintBox() */ int ShowHintS(const neutrino_locale_t Text, int timeout = HINTBOX_DEFAULT_TIMEOUT, bool show_background = true); diff --git a/src/gui/widget/msgbox.h b/src/gui/widget/msgbox.h index dcca0b8a7..f207ffcd5 100644 --- a/src/gui/widget/msgbox.h +++ b/src/gui/widget/msgbox.h @@ -121,22 +121,22 @@ class CMsgBox : public CHintBox public: /**CMsgBox Constructor * @param[in] Text - * @li exepts type const char*, this is the message text inside the window, text is UTF-8 encoded + * @li expects type const char*, this is the message text inside the window, text is UTF-8 encoded * @param[in] Title - * @li optional: exepts type const char*, default = NULL, this causes default title "Information" + * @li optional: expects type const char*, default = NULL, this causes default title "Information" * @param[in] Icon - * @li optional: exepts type const char*, defines the icon name on the left side of titlebar, default = DEFAULT_HEADER_ICON + * @li optional: expects type const char*, defines the icon name on the left side of titlebar, default = DEFAULT_HEADER_ICON * @param[in] Picon - * @li optional: exepts type const char*, defines the picon name on the left side of message text, default = NULL (non Icon) + * @li optional: expects type const char*, defines the picon name on the left side of message text, default = NULL (non Icon) * @param[in] Width - * @li optional: exepts type int, defines box width, default value = MSGBOX_MIN_WIDTH + * @li optional: expects type int, defines box width, default value = MSGBOX_MIN_WIDTH * @param[in] Height - * @li optional: exepts type int, defines box width, default value = MSGBOX_MIN_HEIGHT + * @li optional: expects type int, defines box width, default value = MSGBOX_MIN_HEIGHT * @param[in] ShowButtons - * @li optional: exepts type int, defines which buttons are available on screen, default value = mbCancel + * @li optional: expects type int, defines which buttons are available on screen, default value = mbCancel * @see setShowedButtons() * @param[in] Default_result - * @li optional: exepts type int, defines default result value, default value = mbrCancel + * @li optional: expects type int, defines default result value, default value = mbrCancel * possible values are: * mbrYes = 0, * mbrNo = 1, @@ -148,7 +148,7 @@ class CMsgBox : public CHintBox * mbrNone = -1 * @see setDefaultResult(), getResult(); getDefaultResult(), enableDefaultResultOnTimeOut() * @param[in] text_mode - * @li optional: exepts type int, defines the text modes for embedded text lines + * @li optional: expects type int, defines the text modes for embedded text lines * Possible Modes defined in /gui/widget/textbox.h * AUTO_WIDTH * AUTO_HIGH @@ -175,22 +175,22 @@ class CMsgBox : public CHintBox /**CMsgBox Constructor * @param[in] Text - * @li exepts type const char*, this is the message text inside the window, text is UTF-8 encoded + * @li expects type const char*, this is the message text inside the window, text is UTF-8 encoded * @param[in] Title - * @li optional: exepts type neutrino_locale_t with locale entry from /system/locals.h default = NONEXISTANT_LOCALE, this causes default title "Information" + * @li optional: expects type neutrino_locale_t with locale entry from /system/locals.h default = NONEXISTANT_LOCALE, this causes default title "Information" * @param[in] Icon - * @li optional: exepts type const char*, defines the icon name on the left side of titlebar, default = DEFAULT_HEADER_ICON + * @li optional: expects type const char*, defines the icon name on the left side of titlebar, default = DEFAULT_HEADER_ICON * @param[in] Picon - * @li optional: exepts type const char*, defines the picon name on the left side of message text, default = NULL (non Icon) + * @li optional: expects type const char*, defines the picon name on the left side of message text, default = NULL (non Icon) * @param[in] Width - * @li optional: exepts type int, defines box width, default value = MSGBOX_MIN_WIDTH + * @li optional: expects type int, defines box width, default value = MSGBOX_MIN_WIDTH * @param[in] Height - * @li optional: exepts type int, defines box width, default value = MSGBOX_MIN_HEIGHT + * @li optional: expects type int, defines box width, default value = MSGBOX_MIN_HEIGHT * @param[in] ShowButtons - * @li optional: exepts type int, defines which buttons are available on screen, default value = mbCancel + * @li optional: expects type int, defines which buttons are available on screen, default value = mbCancel * @see setShowedButtons() * @param[in] Default_result - * @li optional: exepts type int, defines default result value, default value = mbrCancel + * @li optional: expects type int, defines default result value, default value = mbrCancel * possible values are: * mbrYes = 0, * mbrNo = 1, @@ -202,7 +202,7 @@ class CMsgBox : public CHintBox * mbrNone = -1 * @see setDefaultResult(), getResult(); getDefaultResult(), enableDefaultResultOnTimeOut() * @param[in] text_mode - * @li optional: exepts type int, defines the text modes for embedded text lines + * @li optional: expects type int, defines the text modes for embedded text lines * Possible Modes defined in /gui/widget/textbox.h * AUTO_WIDTH * AUTO_HIGH @@ -249,7 +249,7 @@ class CMsgBox : public CHintBox /** * sets current default result as msg_result_t, independently from current selected button result * @param[in] Default_result - * @li exepts type msg_result_t + * @li expects type msg_result_t */ void setDefaultResult(const msg_result_t& Default_result){default_result = Default_result;} @@ -258,7 +258,7 @@ class CMsgBox : public CHintBox * This member allows to set and overrides already defined buttons from constructor, * parameter ''ShowButtons'' accepts given types, find under button_define_t enumeration * @param[in] ShowButtons - * @li optional: exepts type int, defines which buttons are available on screen, default value = mbCancel + * @li optional: expects type int, defines which buttons are available on screen, default value = mbCancel * possible values are: * mbYes = 0x01, * mbNo = 0x02, @@ -277,14 +277,14 @@ class CMsgBox : public CHintBox /** * define timeout, timeout is enabled if parmeter 1 > -1, otherwise it will be disabled, * @param[in] Timeout - * @li exepts type int + * @li expects type int */ void setTimeOut(const int& Timeout){timeout = Timeout;}; /** * enable/disable defined timeout, otherwise it will be ignored * @param[in] enable - * @li exepts type bool, default = true + * @li expects type bool, default = true */ void enableDefaultResultOnTimeOut(bool enable = true); @@ -293,17 +293,17 @@ class CMsgBox : public CHintBox * This member allows to define an alternate text for an already defined button, * Result values are not touched! * @param[in] showed_button - * @li exepts type int + * @li expects type int * @see setShowedButtons() * @param[in] text - * @li exepts type std::string, sets the new text for button + * @li expects type std::string, sets the new text for button */ void setButtonText(const int& showed_button, const std::string& text); /** * enables background of buttons * @param[in] enable - * @li exepts type bool, default = true + * @li expects type bool, default = true */ void enableButtonBg(bool enable = true); diff --git a/src/gui/widget/navibar.h b/src/gui/widget/navibar.h index cb3cbe08f..9ea3dee50 100644 --- a/src/gui/widget/navibar.h +++ b/src/gui/widget/navibar.h @@ -89,14 +89,14 @@ class CNaviBar : public CComponentsFrmChain /** * Enable or disable left icon * @param[in] enable - * @li exepts type bool, default = true + * @li expects type bool, default = true */ void enableLeftArrow(bool enable = true){nb_lpic_enable = enable; initCCItems();} /** * Enable or disable right icon * @param[in] enable - * @li exepts type bool, default = true + * @li expects type bool, default = true */ void enableRightArrow(bool enable = true){nb_rpic_enable = enable; initCCItems();} @@ -115,9 +115,9 @@ class CNaviBar : public CComponentsFrmChain /** * Enable or disable both icons at once. * @param[in] enable_left - * @li exepts type bool, default = true + * @li expects type bool, default = true * @param[in] enable_right - * @li exepts type bool, default = true + * @li expects type bool, default = true */ void enableArrows(bool enable_left = true, bool enable_right = true){enableLeftArrow(enable_left); enableRightArrow(enable_right);} @@ -130,37 +130,37 @@ class CNaviBar : public CComponentsFrmChain /** * Sets font type for texts. * @param[in] font - * @li exepts type Font* + * @li expects type Font* */ void setFont(Font *font) {nb_font = font; initCCItems();} /** * Sets left text. * @param[in] text - * @li exepts type std::string + * @li expects type std::string */ void setLeftText(const std::string& text) {nb_l_text = text; initCCItems();} /** * Sets right text * @param[in] text - * @li exepts type std::string + * @li expects type std::string */ void setRightText(const std::string& text) {nb_r_text = text; initCCItems();} /** * Sets left and right text at once. * @param[in] left - * @li exepts type std::string + * @li expects type std::string * @param[in] right - * @li exepts type std::string + * @li expects type std::string */ void setText(const std::string& left, const std::string& right) {setLeftText(left); setRightText(right);} /** * Paint bar on screen. * @param[in] do_save_bg - * @li optional: exepts type bool, default = CC_SAVE_SCREEN_YES. + * @li optional: expects type bool, default = CC_SAVE_SCREEN_YES. */ void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); }; diff --git a/src/gui/widget/textbox.h b/src/gui/widget/textbox.h index 5980985e5..89ea1c81b 100644 --- a/src/gui/widget/textbox.h +++ b/src/gui/widget/textbox.h @@ -227,9 +227,9 @@ class CTextBox : public sigc::trackable /** * Returns width of largest line from passed text * @param[in] text - * @li exepts type std::string + * @li expects type std::string * @param[in] font - * @li exepts font type object + * @li expects font type object * @return width of largest line as int * @see getMaxLineWidth(void) */ From 4249ab049755609b956bc20ce532ece056a4e64f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH 11/88] CTimerList: paint header only if required Avoid possible flicker effects. TODO: fix clock background with enabled gradient on header repaint. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/4dd12767f9da83fff309422a33e386a615d3cd90 Author: Thilo Graf Date: 2017-08-28 (Mon, 28 Aug 2017) ------------------ This commit was generated by Migit --- src/gui/timerlist.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 8d39b1783..f6396045d 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -1386,7 +1386,8 @@ void CTimerList::paintHead() header = new CComponentsHeader(x, y, width, header_height, LOCALE_TIMERLIST_NAME, NEUTRINO_ICON_TIMER, CComponentsHeader::CC_BTN_MENU | CComponentsHeader::CC_BTN_EXIT, NULL, CC_SHADOW_ON); header->enableClock(true, " %d.%m.%Y - %H:%M ", NULL, false); } - header->paint(CC_SAVE_SCREEN_NO); + if(!header->isPainted()) + header->paint(CC_SAVE_SCREEN_NO); } void CTimerList::paintFoot() From ec598a94b5acfa801005d4281667cbe13fa54adb Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH 12/88] CTimerList: adjust label width in footer dependent by count of buttons Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3987c3a30633111ed1e5d78f580e3b837b2f87e8 Author: Thilo Graf Date: 2017-08-28 (Mon, 28 Aug 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/timerlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index f6396045d..a0e33df98 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -1413,9 +1413,9 @@ void CTimerList::paintFoot() footer.enableShadow(CC_SHADOW_ON, -1, true); if (timerlist.empty()) - footer.paintButtons(x, y + height - OFFSET_SHADOW - footer_height, width, footer_height, 2, &(TimerListButtons[1])); + footer.paintButtons(x, y + height - OFFSET_SHADOW - footer_height, width, footer_height, 2, &(TimerListButtons[1]), width/(2+1)); else - footer.paintButtons(x, y + height - OFFSET_SHADOW - footer_height, width, footer_height, c, TimerListButtons); + footer.paintButtons(x, y + height - OFFSET_SHADOW - footer_height, width, footer_height, c, TimerListButtons, width/(c-1)); } void CTimerList::paint() From e7b9f353e27327f35a0ecdc06cd10aacda29bd1b Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 29 Aug 2017 15:01:31 +0200 Subject: [PATCH 13/88] remove my stupid init Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c5dc1b777021896f6daddc39dbb7e10fd81761e4 Author: Jacek Jendrzej Date: 2017-08-29 (Tue, 29 Aug 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/radiotext.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/driver/radiotext.cpp b/src/driver/radiotext.cpp index b74aa9ef0..773c51034 100644 --- a/src/driver/radiotext.cpp +++ b/src/driver/radiotext.cpp @@ -836,7 +836,7 @@ void CRadioText::RassDecode(unsigned char *mtext, int len) slidenumr = Rass_SlideFoto; } // - char *filepath = asprintf(&filepath, "%s/Rass_%d.error", DataDir, slidenumr); + char *filepath = NULL; (filetype == 2) ? asprintf(&filepath, "%s/Rass_%d.def", DataDir, slidenumr) : asprintf(&filepath, "%s/Rass_%d.mpg", DataDir, slidenumr); if ((fd = fopen(filepath, "wb")) != NULL) { @@ -881,7 +881,8 @@ void CRadioText::RassDecode(unsigned char *mtext, int len) } else printf("ERROR vdr-radio: writing image/data-file failed '%s'", filepath); - free(filepath); + if(filepath) + free(filepath); } } start = false; From a67cecd5756fc2de4a9953dc2335db191912bd19 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 8 Sep 2017 21:21:32 +0200 Subject: [PATCH 14/88] remove double includes Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/6576729fd16a728affa70e3203e8152fc52734f6 Author: Jacek Jendrzej Date: 2017-09-08 (Fri, 08 Sep 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- lib/libiw/iwlib.h | 2 -- src/driver/pictureviewer/jpeg.cpp | 1 - src/gui/movieplayer.cpp | 1 - src/gui/network_service.cpp | 2 -- src/gui/osd_setup.cpp | 1 - src/gui/plugins.cpp | 1 - src/gui/screensaver.cpp | 1 - src/gui/test_menu.cpp | 1 - src/gui/widget/shellwindow.cpp | 1 - src/neutrino.cpp | 2 -- src/nhttpd/tuxboxapi/controlapi.cpp | 2 -- src/nhttpd/yhttpd.cpp | 1 - src/nhttpd/yhttpd_core/helper.cpp | 1 - src/nhttpd/yhttpd_core/yconnection.cpp | 2 -- src/nhttpd/yhttpd_core/yhook.cpp | 1 - src/nhttpd/yhttpd_core/ylanguage.cpp | 1 - src/nhttpd/yhttpd_core/ywebserver.cpp | 2 -- src/system/helpers.h | 4 ---- src/zapit/include/zapit/client/msgtypes.h | 1 - src/zapit/src/zapit.cpp | 1 - 20 files changed, 29 deletions(-) diff --git a/lib/libiw/iwlib.h b/lib/libiw/iwlib.h index 31cf39b73..c0fbe9461 100644 --- a/lib/libiw/iwlib.h +++ b/lib/libiw/iwlib.h @@ -30,7 +30,6 @@ #include /* gethostbyname, getnetbyname */ #include /* struct ether_addr */ #include /* struct timeval */ -#include /* This is our header selection. Try to hide the mess and the misery :-( * Don't look, you would go blind ;-) @@ -41,7 +40,6 @@ /* Set of headers proposed by Dr. Michael Rietz , 27.3.2 */ #include /* For ARPHRD_ETHER */ -#include /* For AF_INET & struct sockaddr */ #include /* For struct sockaddr_in */ #include diff --git a/src/driver/pictureviewer/jpeg.cpp b/src/driver/pictureviewer/jpeg.cpp index 95413f180..accb8a512 100644 --- a/src/driver/pictureviewer/jpeg.cpp +++ b/src/driver/pictureviewer/jpeg.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #if __cplusplus >= 201103 diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index a18773a4b..e00c8c430 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include diff --git a/src/gui/network_service.cpp b/src/gui/network_service.cpp index fd14d9318..627c65163 100644 --- a/src/gui/network_service.cpp +++ b/src/gui/network_service.cpp @@ -36,8 +36,6 @@ #include #include -#include - #define TOUCH_BASE "/var/etc/." struct network_service diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 88b0c8e5e..be8002c52 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -56,7 +56,6 @@ #include #include -#include #include #include #include diff --git a/src/gui/plugins.cpp b/src/gui/plugins.cpp index 0f7bdc7e6..55062700f 100644 --- a/src/gui/plugins.cpp +++ b/src/gui/plugins.cpp @@ -60,7 +60,6 @@ #include "widget/shellwindow.h" #include -#include #include #include diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index d3d61e7bb..aecc3c6d9 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -36,7 +36,6 @@ #include #include #include // sort -#include #include "audiomute.h" #include "screensaver.h" #include diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index f5edf226d..a2dfa2f32 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -59,7 +59,6 @@ #include #include #include -#include #include extern int cs_test_card(int unit, char * str); diff --git a/src/gui/widget/shellwindow.cpp b/src/gui/widget/shellwindow.cpp index 480b6df4a..bd5daa3ca 100644 --- a/src/gui/widget/shellwindow.cpp +++ b/src/gui/widget/shellwindow.cpp @@ -46,7 +46,6 @@ #include #include #include -#include #include CShellWindow::CShellWindow(const std::string &Command, const int Mode, int *Res, bool auto_exec) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 080a31d07..15a73d540 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -40,7 +40,6 @@ #include #include #include -#include #include #include @@ -72,7 +71,6 @@ #include "gui/bouquetlist.h" #include "gui/cam_menu.h" #include "gui/cec_setup.h" -#include "gui/channellist.h" #include "gui/epgview.h" #include "gui/eventlist.h" #include "gui/favorites.h" diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index 296c83ae7..215ca5d17 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include // tuxbox #include @@ -34,7 +33,6 @@ #include #include #include -#include #include //for relodplugins #include #include diff --git a/src/nhttpd/yhttpd.cpp b/src/nhttpd/yhttpd.cpp index 93e6a66e6..72698d9ed 100644 --- a/src/nhttpd/yhttpd.cpp +++ b/src/nhttpd/yhttpd.cpp @@ -15,7 +15,6 @@ #include #include // yhttpd -#include "yconfig.h" #include #include #include diff --git a/src/nhttpd/yhttpd_core/helper.cpp b/src/nhttpd/yhttpd_core/helper.cpp index 6361bd0c7..8bd342654 100644 --- a/src/nhttpd/yhttpd_core/helper.cpp +++ b/src/nhttpd/yhttpd_core/helper.cpp @@ -16,7 +16,6 @@ // yhttpd #include #include -#include "ytypes_globals.h" #include "helper.h" #include "ylogging.h" diff --git a/src/nhttpd/yhttpd_core/yconnection.cpp b/src/nhttpd/yhttpd_core/yconnection.cpp index 074c78584..62cafb6dc 100644 --- a/src/nhttpd/yhttpd_core/yconnection.cpp +++ b/src/nhttpd/yhttpd_core/yconnection.cpp @@ -9,8 +9,6 @@ #include // yhttpd #include -#include "ytypes_globals.h" -#include "ywebserver.h" #include "yconnection.h" #include "helper.h" //============================================================================= diff --git a/src/nhttpd/yhttpd_core/yhook.cpp b/src/nhttpd/yhttpd_core/yhook.cpp index 7838cefa9..2d4a88d4d 100644 --- a/src/nhttpd/yhttpd_core/yhook.cpp +++ b/src/nhttpd/yhttpd_core/yhook.cpp @@ -10,7 +10,6 @@ // yhttpd #include "yhook.h" -#include "ylogging.h" #include "helper.h" //============================================================================= diff --git a/src/nhttpd/yhttpd_core/ylanguage.cpp b/src/nhttpd/yhttpd_core/ylanguage.cpp index 47391ddc6..f733d16e2 100644 --- a/src/nhttpd/yhttpd_core/ylanguage.cpp +++ b/src/nhttpd/yhttpd_core/ylanguage.cpp @@ -14,7 +14,6 @@ // yhttpd #include #include -#include "ytypes_globals.h" #include "ylanguage.h" #include "yconnection.h" diff --git a/src/nhttpd/yhttpd_core/ywebserver.cpp b/src/nhttpd/yhttpd_core/ywebserver.cpp index e1a5f149d..e3debef47 100644 --- a/src/nhttpd/yhttpd_core/ywebserver.cpp +++ b/src/nhttpd/yhttpd_core/ywebserver.cpp @@ -20,11 +20,9 @@ // yhttpd #include -#include "ytypes_globals.h" #include "ywebserver.h" #include "ylogging.h" #include "helper.h" -#include "ysocket.h" #include "yconnection.h" #include "yrequest.h" #include diff --git a/src/system/helpers.h b/src/system/helpers.h index c7f3ae06a..48ac50a06 100644 --- a/src/system/helpers.h +++ b/src/system/helpers.h @@ -23,7 +23,6 @@ */ #include -#include #include #include #include @@ -33,9 +32,6 @@ #include #include #include - -#include -#include int my_system(const char * cmd); int my_system(int argc, const char *arg, ...); /* argc is number of arguments including command */ diff --git a/src/zapit/include/zapit/client/msgtypes.h b/src/zapit/include/zapit/client/msgtypes.h index c38b754d5..52a0f8144 100644 --- a/src/zapit/include/zapit/client/msgtypes.h +++ b/src/zapit/include/zapit/client/msgtypes.h @@ -25,7 +25,6 @@ #define __msgtypes_h__ -#include "zapittypes.h" #include #include "zapitclient.h" diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index c88eabe0b..f6641dbb8 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -74,7 +74,6 @@ #include #include #include -#include #include #include From 9b9e405f04e077c40c81f8b48d82fd2e9b682e89 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 12 Sep 2017 23:42:52 +0200 Subject: [PATCH 15/88] drop easymenu Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/816de89898a2bc989cfeb89094c8985e723ffd79 Author: vanhofen Date: 2017-09-12 (Tue, 12 Sep 2017) Origin message was: ------------------ - drop easymenu ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 2 - data/locale/english.locale | 2 - src/gui/audio_select.cpp | 10 +- src/gui/audio_setup.cpp | 72 ++++--- src/gui/cam_menu.cpp | 57 +++--- src/gui/info_menue.cpp | 6 - src/gui/mediaplayer.cpp | 82 +++----- src/gui/miscsettings_menu.cpp | 6 - src/gui/movieplayer.cpp | 14 +- src/gui/network_setup.cpp | 40 ++-- src/gui/parentallock_setup.cpp | 20 +- src/gui/personalize.cpp | 44 +---- src/gui/record_setup.cpp | 77 +++----- src/gui/scan_setup.cpp | 37 +--- src/gui/settings_manager.cpp | 41 ++-- src/gui/start_wizard.cpp | 2 +- src/gui/update_menue.cpp | 33 ++-- src/gui/videosettings.cpp | 71 +++---- src/neutrino.cpp | 37 +--- src/neutrino_menue.cpp | 330 +++++++++++---------------------- src/neutrino_menue.h | 1 - src/system/locals.h | 2 - src/system/locals_intern.h | 2 - src/system/settings.h | 1 - version_pseudo.h | 2 +- 25 files changed, 338 insertions(+), 653 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 1319f74a8..022192b09 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -942,7 +942,6 @@ mainmenu.scripts Skripte mainmenu.service Service mainmenu.settings Einstellungen mainmenu.shutdown Ausschalten -mainmenu.shutdown_menu Ausschalt Optionen mainmenu.sleeptimer SleepTimer mainmenu.standby Standby mainmenu.tools Werkzeuge @@ -1424,7 +1423,6 @@ menu.hint_shoutcast_enabled Schaltet die SHOUTcast-Unterstützung ein oder aus menu.hint_show_mute_icon Definiert, ob bei einem Lautstärkewert von 0 das Stumm-Symbol eingeblendet werden soll menu.hint_shutdown Setzen Sie Ihre Box in den Standby-Modus oder schalten Sie die Box komplett aus menu.hint_shutdown_count Die Zeit zum Herunterfahren in den Deep-Standby, wenn die Box im Standby-Modus ist -menu.hint_shutdown_menu Versetzen des Receivers in den Standby Modus, ausschalten des Receivers, setzen des Sleep Timers menu.hint_shutdown_rcdelay Aktiviert den Deep-Standby, wenn die Power-Taste länger als 1 Sekunde betätigt wird menu.hint_shutdown_real Aktiviert den Standby-Modus. Ist diese Option deaktiviert, fährt die Box in den Deep-Standby menu.hint_sleeptimer Zeitschaltuhr auf Ihrer Box aktivieren\nDie Box fährt dann in den Standby-Modus diff --git a/data/locale/english.locale b/data/locale/english.locale index 474aeeed7..c6c774507 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -942,7 +942,6 @@ mainmenu.scripts Scripts mainmenu.service Installation (service) mainmenu.settings System settings mainmenu.shutdown Shutdown (deep standby) -mainmenu.shutdown_menu Shutdown mainmenu.sleeptimer SleepTimer mainmenu.standby Standby mainmenu.tools Tools @@ -1424,7 +1423,6 @@ menu.hint_shoutcast_enabled Enable or disable SHOUTcast support menu.hint_show_mute_icon Show mute icon, when volume set to 0 menu.hint_shutdown Put your box in deep standby mode\nNo confirmation menu.hint_shutdown_count Time to put box in deep-standby\nfrom soft-standby mode -menu.hint_shutdown_menu Put you receiver in sleep or deep standby mode, set sleep timer menu.hint_shutdown_rcdelay Enable deep-standby, if power button\npressed more than 1 second menu.hint_shutdown_real Enable soft-standby mode\nIf disabled, power button put box to deep-standby menu.hint_sleeptimer Set timer to put your box\nin sleep mode diff --git a/src/gui/audio_select.cpp b/src/gui/audio_select.cpp index 8d2adfba9..e94501c3b 100644 --- a/src/gui/audio_select.cpp +++ b/src/gui/audio_select.cpp @@ -134,12 +134,10 @@ int CAudioSelectMenuHandler::doMenu () AudioSelector.addItem( oj ); - if (!g_settings.easymenu) { - oj = new CMenuOptionChooser(LOCALE_AUDIOMENU_ANALOG_OUT, &g_settings.analog_out, - OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, - true, audioSetupNotifier, CRCInput::RC_green); - AudioSelector.addItem( oj ); - } + oj = new CMenuOptionChooser(LOCALE_AUDIOMENU_ANALOG_OUT, &g_settings.analog_out, + OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, + true, audioSetupNotifier, CRCInput::RC_green); + AudioSelector.addItem( oj ); CChannelList *channelList = CNeutrinoApp::getInstance ()->channelList; int curnum = channelList->getActiveChannelNumber(); diff --git a/src/gui/audio_setup.cpp b/src/gui/audio_setup.cpp index 848a747e3..82d658877 100644 --- a/src/gui/audio_setup.cpp +++ b/src/gui/audio_setup.cpp @@ -158,20 +158,19 @@ int CAudioSetup::showAudioSetup() CMenuOptionChooser * as_oj_avsync = NULL; CMenuOptionNumberChooser * as_oj_vsteps = NULL; CMenuOptionNumberChooser * st = NULL; - if (!g_settings.easymenu) { - //av synch - as_oj_avsync = new CMenuOptionChooser(LOCALE_AUDIOMENU_AVSYNC, &g_settings.avsync, AUDIOMENU_AVSYNC_OPTIONS, AUDIOMENU_AVSYNC_OPTION_COUNT, true, audioSetupNotifier); - as_oj_avsync->setHint("", LOCALE_MENU_HINT_AUDIO_AVSYNC); - //volume steps - as_oj_vsteps = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_STEP, (int *)&g_settings.current_volume_step, true, 1, 25, NULL); - as_oj_vsteps->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTEP); + //av synch + as_oj_avsync = new CMenuOptionChooser(LOCALE_AUDIOMENU_AVSYNC, &g_settings.avsync, AUDIOMENU_AVSYNC_OPTIONS, AUDIOMENU_AVSYNC_OPTION_COUNT, true, audioSetupNotifier); + as_oj_avsync->setHint("", LOCALE_MENU_HINT_AUDIO_AVSYNC); - st = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_START, &g_settings.start_volume, true, -1, 100, NULL, CRCInput::RC_nokey, NULL, 0, -1, LOCALE_OPTIONS_OFF); - st->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTART); - //clock rec - //CMenuOptionChooser * as_oj_clockrec new CMenuOptionChooser(LOCALE_AUDIOMENU_CLOCKREC, &g_settings.clockrec, AUDIOMENU_CLOCKREC_OPTIONS, AUDIOMENU_CLOCKREC_OPTION_COUNT, true, audioSetupNotifier); - } + //volume steps + as_oj_vsteps = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_STEP, (int *)&g_settings.current_volume_step, true, 1, 25, NULL); + as_oj_vsteps->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTEP); + + st = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_START, &g_settings.start_volume, true, -1, 100, NULL, CRCInput::RC_nokey, NULL, 0, -1, LOCALE_OPTIONS_OFF); + st->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTART); + //clock rec + //CMenuOptionChooser * as_oj_clockrec new CMenuOptionChooser(LOCALE_AUDIOMENU_CLOCKREC, &g_settings.clockrec, AUDIOMENU_CLOCKREC_OPTIONS, AUDIOMENU_CLOCKREC_OPTION_COUNT, true, audioSetupNotifier); //SRS //SRS algo @@ -194,20 +193,20 @@ int CAudioSetup::showAudioSetup() // ac3,pcm and clear volume adjustment CMenuOptionNumberChooser *adj_ac3 = NULL, *adj_pcm = NULL; CMenuForwarder *adj_clear = NULL; - if (!g_settings.easymenu) { - adj_ac3 = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_AC3, - (int *)&g_settings.audio_volume_percent_ac3, true, 0, 100, audioSetupNotifier); - adj_ac3->setNumberFormat("%d%%"); - adj_ac3->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_AC3); - adj_pcm = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_PCM, - (int *)&g_settings.audio_volume_percent_pcm, true, 0, 100, audioSetupNotifier); - adj_pcm->setNumberFormat("%d%%"); - adj_pcm->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_PCM); + adj_ac3 = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_AC3, + (int *)&g_settings.audio_volume_percent_ac3, true, 0, 100, audioSetupNotifier); + adj_ac3->setNumberFormat("%d%%"); + adj_ac3->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_AC3); + + adj_pcm = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_PCM, + (int *)&g_settings.audio_volume_percent_pcm, true, 0, 100, audioSetupNotifier); + adj_pcm->setNumberFormat("%d%%"); + adj_pcm->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_PCM); + + adj_clear = new CMenuForwarder(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_CLEAR, true, NULL, this, "clear_vol_map"); + adj_clear->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_CLEAR); - adj_clear = new CMenuForwarder(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_CLEAR, true, NULL, this, "clear_vol_map"); - adj_clear->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_CLEAR); - } //paint items audioSettings->addIntroItems(LOCALE_MAINSETTINGS_AUDIO); //--------------------------------------------------------- @@ -218,13 +217,11 @@ int CAudioSetup::showAudioSetup() audioSettings->addItem(as_oj_dd_spdif); audioSettings->addItem(as_oj_ddsubchn); //--------------------------------------------------------- - if (!g_settings.easymenu) { - audioSettings->addItem(GenericMenuSeparatorLine); - audioSettings->addItem(as_oj_avsync); - audioSettings->addItem(as_oj_vsteps); - audioSettings->addItem(st); - //audioSettings->addItem(as_clockrec); - } + audioSettings->addItem(GenericMenuSeparatorLine); + audioSettings->addItem(as_oj_avsync); + audioSettings->addItem(as_oj_vsteps); + audioSettings->addItem(st); + //audioSettings->addItem(as_clockrec); //--------------------------------------------------------- audioSettings->addItem(GenericMenuSeparatorLine); audioSettings->addItem(as_oj_srsonoff); @@ -236,12 +233,10 @@ int CAudioSetup::showAudioSetup() #if 0 audioSettings->addItem(mf); #endif - if (!g_settings.easymenu) { - audioSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT)); - audioSettings->addItem(adj_ac3); - audioSettings->addItem(adj_pcm); - audioSettings->addItem(adj_clear); - } + audioSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT)); + audioSettings->addItem(adj_ac3); + audioSettings->addItem(adj_pcm); + audioSettings->addItem(adj_clear); int res = audioSettings->exec(NULL, ""); selected = audioSettings->getSelected(); @@ -249,8 +244,7 @@ int CAudioSetup::showAudioSetup() #ifdef BOXMODEL_CS_HD2 delete as_oj_noise; #endif - if (!g_settings.easymenu) - CZapit::getInstance()->SetVolumePercent(g_settings.audio_volume_percent_ac3, g_settings.audio_volume_percent_pcm); + CZapit::getInstance()->SetVolumePercent(g_settings.audio_volume_percent_ac3, g_settings.audio_volume_percent_pcm); return res; } diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index 9b2a9755a..c4c586966 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -104,44 +104,41 @@ int CCAMMenuHandler::doMainMenu() char name1[255]={0}; char str1[255]={0}; - int CiSlots = ca ? ca->GetNumberCISlots() : 0; - CMenuWidget* cammenu = new CMenuWidget(LOCALE_CI_SETTINGS, NEUTRINO_ICON_SETTINGS); cammenu->addIntroItems(); + + int CiSlots = ca ? ca->GetNumberCISlots() : 0; + if(CiSlots) { + cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_RESET_STANDBY, &g_settings.ci_standby_reset, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + cammenu->addItem( new CMenuOptionNumberChooser(LOCALE_CI_CLOCK, &g_settings.ci_clock, true, 6, 12, this)); + } + cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_IGNORE_MSG, &g_settings.ci_ignore_messages, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_SAVE_PINCODE, &g_settings.ci_save_pincode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this)); + #ifdef BOXMODEL_CS_HD2 int fecount = CFEManager::getInstance()->getFrontendCount(); char fename[fecount+1][255]; -#endif - if (!g_settings.easymenu) { - if(CiSlots) { - cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_RESET_STANDBY, &g_settings.ci_standby_reset, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - cammenu->addItem( new CMenuOptionNumberChooser(LOCALE_CI_CLOCK, &g_settings.ci_clock, true, 6, 12, this)); - } - cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_IGNORE_MSG, &g_settings.ci_ignore_messages, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); - cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_SAVE_PINCODE, &g_settings.ci_save_pincode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this)); -#ifdef BOXMODEL_CS_HD2 - CMenuOptionChooser::keyval_ext feselect[fecount+1]; - feselect[0].key = -1; - feselect[0].value = NONEXISTANT_LOCALE; - feselect[0].valname = g_Locale->getText(LOCALE_OPTIONS_OFF); - int select_count = 1; + CMenuOptionChooser::keyval_ext feselect[fecount+1]; + feselect[0].key = -1; + feselect[0].value = NONEXISTANT_LOCALE; + feselect[0].valname = g_Locale->getText(LOCALE_OPTIONS_OFF); + int select_count = 1; - for (int i = 0; i < fecount; i++) { - CFrontend * fe = CFEManager::getInstance()->getFE(i); - int num = fe->getNumber(); - snprintf(fename[select_count], sizeof(fename[select_count]), "%d: %s", num+1, fe->getName()); - feselect[select_count].key = num; - feselect[select_count].value = NONEXISTANT_LOCALE; - feselect[select_count].valname = fename[select_count]; - select_count++; - } - CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_CI_TUNER, &g_settings.ci_tuner, feselect, select_count, true, this); - cammenu->addItem(mc); -#endif - - cammenu->addItem( GenericMenuSeparatorLine ); + for (int i = 0; i < fecount; i++) { + CFrontend * fe = CFEManager::getInstance()->getFE(i); + int num = fe->getNumber(); + snprintf(fename[select_count], sizeof(fename[select_count]), "%d: %s", num+1, fe->getName()); + feselect[select_count].key = num; + feselect[select_count].value = NONEXISTANT_LOCALE; + feselect[select_count].valname = fename[select_count]; + select_count++; } + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_CI_TUNER, &g_settings.ci_tuner, feselect, select_count, true, this); + cammenu->addItem(mc); +#endif + + cammenu->addItem( GenericMenuSeparatorLine ); CMenuWidget * tempMenu; int i = 0; diff --git a/src/gui/info_menue.cpp b/src/gui/info_menue.cpp index 79df911fd..e5282d2d7 100644 --- a/src/gui/info_menue.cpp +++ b/src/gui/info_menue.cpp @@ -98,12 +98,6 @@ int CInfoMenu::showMenu() info->addItem(mf); #endif - if (g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler, NULL, CRCInput::RC_blue); - mf->setHint(NEUTRINO_ICON_HINT_CI, LOCALE_MENU_HINT_CI); - info->addItem(mf); - } - //add I_TYPE_INFORMATION plugins info->integratePlugins(CPlugins::I_TYPE_INFORMATION, 1); diff --git a/src/gui/mediaplayer.cpp b/src/gui/mediaplayer.cpp index 7d25e73a3..aec2a061b 100644 --- a/src/gui/mediaplayer.cpp +++ b/src/gui/mediaplayer.cpp @@ -158,12 +158,12 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) if (usage_mode != MODE_VIDEO) { //audio player - neutrino_msg_t audio_rc = usage_mode == MODE_AUDIO ? CRCInput::RC_audio : g_settings.easymenu ? CRCInput::RC_green : CRCInput::RC_red; + neutrino_msg_t audio_rc = usage_mode == MODE_AUDIO ? CRCInput::RC_audio : CRCInput::RC_red; fw_audio = new CMenuForwarder(LOCALE_MAINMENU_AUDIOPLAYER, enabled, NULL, this, "audioplayer", audio_rc); fw_audio->setHint(NEUTRINO_ICON_HINT_APLAY, LOCALE_MENU_HINT_APLAY); //internet player - neutrino_msg_t inet_rc = usage_mode == MODE_AUDIO ? CRCInput::RC_www : g_settings.easymenu ? CRCInput::RC_blue : CRCInput::RC_green; + neutrino_msg_t inet_rc = usage_mode == MODE_AUDIO ? CRCInput::RC_www : CRCInput::RC_green; fw_inet = new CMenuForwarder(LOCALE_INETRADIO_NAME, enabled, NULL, this, "inetplayer", inet_rc); fw_inet->setHint(NEUTRINO_ICON_HINT_INET_RADIO, LOCALE_MENU_HINT_INET_RADIO); } @@ -174,28 +174,20 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { moviePlayer = new CMenuWidget(LOCALE_MAINMENU_MOVIEPLAYER, NEUTRINO_ICON_MULTIMEDIA, width, MN_WIDGET_ID_MEDIA_MOVIEPLAYER); personalize->addWidget(moviePlayer); - if (g_settings.easymenu) - fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, enabled, NULL, moviePlayer, NULL, CRCInput::RC_red); - else - fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, enabled, NULL, moviePlayer, NULL, CRCInput::RC_yellow); + fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, enabled, NULL, moviePlayer, NULL, CRCInput::RC_yellow); fw_mp->setHint(NEUTRINO_ICON_HINT_MOVIE, LOCALE_MENU_HINT_MOVIE); } //pictureviewer pictureviewergui = new CPictureViewerGui(); - if (g_settings.easymenu) - fw_pviewer = new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, pictureviewergui, NULL, CRCInput::RC_1); - else - fw_pviewer = new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, pictureviewergui, NULL, CRCInput::RC_blue); + fw_pviewer = new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, pictureviewergui, NULL, CRCInput::RC_blue); fw_pviewer->setHint(NEUTRINO_ICON_HINT_PICVIEW, LOCALE_MENU_HINT_PICVIEW); #if ENABLE_UPNP //upnp browser - if (!g_settings.easymenu) { - if (!upnpbrowsergui) - upnpbrowsergui = new CUpnpBrowserGui(); - fw_upnp = new CMenuForwarder(LOCALE_UPNPBROWSER_HEAD, enabled, NULL, upnpbrowsergui, NULL, CRCInput::RC_0); - fw_upnp->setHint(NEUTRINO_ICON_HINT_A_PIC, LOCALE_MENU_HINT_UPNP); - } + if (!upnpbrowsergui) + upnpbrowsergui = new CUpnpBrowserGui(); + fw_upnp = new CMenuForwarder(LOCALE_UPNPBROWSER_HEAD, enabled, NULL, upnpbrowsergui, NULL, CRCInput::RC_0); + fw_upnp->setHint(NEUTRINO_ICON_HINT_A_PIC, LOCALE_MENU_HINT_UPNP); #endif // media->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, usage_mode == MODE_AUDIO ? CMenuWidget::BTN_TYPE_CANCEL : CMenuWidget::BTN_TYPE_BACK); } @@ -214,43 +206,24 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) } else { - if (g_settings.easymenu) { - //movieplayer - if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { - showMoviePlayer(moviePlayer, personalize); - personalize->addItem(media, fw_mp, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_MPLAYER]); - } - //audio player - personalize->addItem(media, fw_audio, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_AUDIO]); - if (g_settings.easymenu) { - CMenuForwarder *fw_yt = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, true, NULL, &CMoviePlayerGui::getInstance(), "ytplayback", CRCInput::RC_yellow); - fw_yt->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY); - personalize->addItem(media, fw_yt, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_YTPLAY]); - } - //internet player - personalize->addItem(media, fw_inet, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_INETPLAY]); - //picture viewer - personalize->addItem(media, fw_pviewer, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_PVIEWER]); - } else { - //audio player - personalize->addItem(media, fw_audio, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_AUDIO]); + //audio player + personalize->addItem(media, fw_audio, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_AUDIO]); - //internet player - personalize->addItem(media, fw_inet, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_INETPLAY]); + //internet player + personalize->addItem(media, fw_inet, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_INETPLAY]); - //movieplayer - if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { - showMoviePlayer(moviePlayer, personalize); - personalize->addItem(media, fw_mp, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_MPLAYER], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); - } - - //picture viewer - personalize->addItem(media, fw_pviewer, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_PVIEWER]); -#if ENABLE_UPNP - //upnp browser - personalize->addItem(media, fw_upnp, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_UPNP]); -#endif + //movieplayer + if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { + showMoviePlayer(moviePlayer, personalize); + personalize->addItem(media, fw_mp, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_MPLAYER], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); } + + //picture viewer + personalize->addItem(media, fw_pviewer, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_PVIEWER]); +#if ENABLE_UPNP + //upnp browser + personalize->addItem(media, fw_upnp, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_UPNP]); +#endif } int res = menu_return::RETURN_NONE; @@ -293,12 +266,11 @@ void CMediaPlayerMenu::showMoviePlayer(CMenuWidget *moviePlayer, CPersonalizeGui //fileplayback p->addItem(moviePlayer, fw_file, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_FILEPLAY]); + //ytplayback - if (!g_settings.easymenu) { - CMenuForwarder *fw_yt = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, g_settings.youtube_enabled, NULL, &CMoviePlayerGui::getInstance(), "ytplayback", CRCInput::RC_yellow); - fw_yt->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY); - p->addItem(moviePlayer, fw_yt, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_YTPLAY]); - } + CMenuForwarder *fw_yt = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, g_settings.youtube_enabled, NULL, &CMoviePlayerGui::getInstance(), "ytplayback", CRCInput::RC_yellow); + fw_yt->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY); + p->addItem(moviePlayer, fw_yt, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_YTPLAY]); // #if 0 // //moviePlayer->addItem(new CMenuForwarder(LOCALE_MOVIEPLAYER_PESPLAYBACK, true, NULL, moviePlayerGui, "pesplayback")); diff --git a/src/gui/miscsettings_menu.cpp b/src/gui/miscsettings_menu.cpp index ba352cd63..3034385ad 100644 --- a/src/gui/miscsettings_menu.cpp +++ b/src/gui/miscsettings_menu.cpp @@ -391,12 +391,6 @@ int CMiscMenue::showMiscSettingsMenuEnergy() m4->setHint("", LOCALE_MENU_HINT_SLEEPTIMER_MIN); ms_energy->addItem(m4); - if (g_settings.easymenu) { - CMenuOptionChooser *cec_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC, &g_settings.hdmi_cec_mode, VIDEOMENU_HDMI_CEC_MODE_OPTIONS, VIDEOMENU_HDMI_CEC_MODE_OPTION_COUNT, true, this); - cec_ch->setHint("", LOCALE_MENU_HINT_CEC_MODE); - ms_energy->addItem(cec_ch); - } - int res = ms_energy->exec(NULL, ""); g_settings.shutdown_count = atoi(shutdown_count.c_str()); diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index e00c8c430..22f7d892c 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1946,13 +1946,13 @@ void CMoviePlayerGui::selectAudioPid() 0, 999, CVolume::getInstance())); } } - if (!g_settings.easymenu) { - APIDSelector.addItem(new CMenuSeparator(CMenuSeparator::LINE)); - extern CAudioSetupNotifier * audioSetupNotifier; - APIDSelector.addItem( new CMenuOptionChooser(LOCALE_AUDIOMENU_ANALOG_OUT, &g_settings.analog_out, - OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, - true, audioSetupNotifier, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN) ); - } + + APIDSelector.addItem(new CMenuSeparator(CMenuSeparator::LINE)); + extern CAudioSetupNotifier * audioSetupNotifier; + APIDSelector.addItem( new CMenuOptionChooser(LOCALE_AUDIOMENU_ANALOG_OUT, &g_settings.analog_out, + OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, + true, audioSetupNotifier, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN) ); + APIDSelector.exec(NULL, ""); delete selector; printf("CMoviePlayerGui::selectAudioPid: selected %d (%x) current %x\n", select, (select >= 0) ? apids[select] : -1, currentapid); diff --git a/src/gui/network_setup.cpp b/src/gui/network_setup.cpp index c6748f23f..05eb80617 100644 --- a/src/gui/network_setup.cpp +++ b/src/gui/network_setup.cpp @@ -359,33 +359,31 @@ int CNetworkSetup::showNetworkSetup() CProxySetup proxy(LOCALE_MAINSETTINGS_NETWORK); CNetworkServiceSetup services; - if (!g_settings.easymenu) { - //ntp submenu - sectionsdConfigNotifier = new CSectionsdConfigNotifier; - mf = new CMenuForwarder(LOCALE_NETWORKMENU_NTPTITLE, true, NULL, &ntp, NULL, CRCInput::RC_yellow); - mf->setHint("", LOCALE_MENU_HINT_NET_NTP); - networkSettings->addItem(mf); + //ntp submenu + sectionsdConfigNotifier = new CSectionsdConfigNotifier; + mf = new CMenuForwarder(LOCALE_NETWORKMENU_NTPTITLE, true, NULL, &ntp, NULL, CRCInput::RC_yellow); + mf->setHint("", LOCALE_MENU_HINT_NET_NTP); + networkSettings->addItem(mf); - showNetworkNTPSetup(&ntp); + showNetworkNTPSetup(&ntp); #ifdef ENABLE_GUI_MOUNT - //nfs mount submenu - mf = new CMenuForwarder(LOCALE_NETWORKMENU_MOUNT, true, NULL, &networkmounts, NULL, CRCInput::RC_blue); - mf->setHint("", LOCALE_MENU_HINT_NET_MOUNT); - networkSettings->addItem(mf); - showNetworkNFSMounts(&networkmounts); + //nfs mount submenu + mf = new CMenuForwarder(LOCALE_NETWORKMENU_MOUNT, true, NULL, &networkmounts, NULL, CRCInput::RC_blue); + mf->setHint("", LOCALE_MENU_HINT_NET_MOUNT); + networkSettings->addItem(mf); + showNetworkNFSMounts(&networkmounts); #endif - //proxyserver submenu - mf = new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYSERVER_SEP, true, NULL, &proxy, NULL, CRCInput::RC_0); - mf->setHint("", LOCALE_MENU_HINT_NET_PROXY); - networkSettings->addItem(mf); + //proxyserver submenu + mf = new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYSERVER_SEP, true, NULL, &proxy, NULL, CRCInput::RC_0); + mf->setHint("", LOCALE_MENU_HINT_NET_PROXY); + networkSettings->addItem(mf); - //services - mf = new CMenuForwarder(LOCALE_NETWORKMENU_SERVICES, true, NULL, &services, NULL, CRCInput::RC_1); - mf->setHint("", LOCALE_MENU_HINT_NET_SERVICES); - networkSettings->addItem(mf); - } + //services + mf = new CMenuForwarder(LOCALE_NETWORKMENU_SERVICES, true, NULL, &services, NULL, CRCInput::RC_1); + mf->setHint("", LOCALE_MENU_HINT_NET_SERVICES); + networkSettings->addItem(mf); int ret = 0; while(true) { diff --git a/src/gui/parentallock_setup.cpp b/src/gui/parentallock_setup.cpp index ca4ab7359..1c77e3800 100644 --- a/src/gui/parentallock_setup.cpp +++ b/src/gui/parentallock_setup.cpp @@ -110,31 +110,17 @@ int CParentalSetup::showParentalSetup() CMenuForwarder * mf; CPersonalizeGui &p = CNeutrinoApp::getInstance()->getPersonalizeGui(); - if (g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_PARENTALLOCK_MENU, true, NULL, &p, NULL, CRCInput::RC_red); - mf->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_MENU); - plock->addItem(mf); - } CMenuOptionChooser * mc; - if (g_settings.easymenu) - mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_PROMPT , &g_settings.parentallock_prompt , PARENTALLOCK_PROMPT_OPTIONS, PARENTALLOCK_PROMPT_OPTION_COUNT , !parentallocked, NULL, CRCInput::RC_green); - else - mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_PROMPT , &g_settings.parentallock_prompt , PARENTALLOCK_PROMPT_OPTIONS, PARENTALLOCK_PROMPT_OPTION_COUNT , !parentallocked); + mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_PROMPT , &g_settings.parentallock_prompt , PARENTALLOCK_PROMPT_OPTIONS, PARENTALLOCK_PROMPT_OPTION_COUNT , !parentallocked); mc->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_PROMPT); plock->addItem(mc); - if (g_settings.easymenu) - mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_LOCKAGE, &g_settings.parentallock_lockage, PARENTALLOCK_LOCKAGE_OPTIONS, PARENTALLOCK_LOCKAGE_OPTION_COUNT, !parentallocked, NULL, CRCInput::RC_yellow); - else - mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_LOCKAGE, &g_settings.parentallock_lockage, PARENTALLOCK_LOCKAGE_OPTIONS, PARENTALLOCK_LOCKAGE_OPTION_COUNT, !parentallocked); + mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_LOCKAGE, &g_settings.parentallock_lockage, PARENTALLOCK_LOCKAGE_OPTIONS, PARENTALLOCK_LOCKAGE_OPTION_COUNT, !parentallocked); mc->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_LOCKAGE); plock->addItem(mc); - if (g_settings.easymenu) - mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_BOUQUETMODE, &g_settings.parentallock_defaultlocked, PARENTALLOCK_DEFAULTLOCKED_OPTIONS, PARENTALLOCK_DEFAULTLOCKED_OPTION_COUNT, !parentallocked, NULL, CRCInput::RC_blue); - else - mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_BOUQUETMODE, &g_settings.parentallock_defaultlocked, PARENTALLOCK_DEFAULTLOCKED_OPTIONS, PARENTALLOCK_DEFAULTLOCKED_OPTION_COUNT, !parentallocked); + mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_BOUQUETMODE, &g_settings.parentallock_defaultlocked, PARENTALLOCK_DEFAULTLOCKED_OPTIONS, PARENTALLOCK_DEFAULTLOCKED_OPTION_COUNT, !parentallocked); plock->addItem(mc); plock->addItem(new CMenuOptionNumberChooser(LOCALE_PARENTALLOCK_ZAPTIME, (int *)&g_settings.parentallock_zaptime, !parentallocked, 0, 10000)); diff --git a/src/gui/personalize.cpp b/src/gui/personalize.cpp index 0cf748993..8eb87b935 100644 --- a/src/gui/personalize.cpp +++ b/src/gui/personalize.cpp @@ -310,7 +310,7 @@ int CPersonalizeGui::exec(CMenuTarget* parent, const string & actionKey) //pin protected access to personalize menu also if found any pin protected items bool is_pin_protected = g_settings.personalize[SNeutrinoSettings::P_MAIN_PINSTATUS]; - if (!g_settings.easymenu && (is_pin_protected || hasPinItems())) { + if (is_pin_protected || hasPinItems()) { setHint(LOCALE_PERSONALIZE_PINHINT); //from CPINProtection is_pin_protected = true; if (check()) @@ -330,41 +330,14 @@ int CPersonalizeGui::ShowPersonalizationMenu() { width = 40; - CMenuWidget* pMenu = new CMenuWidget(g_settings.easymenu ? LOCALE_PARENTALLOCK_MENU : LOCALE_PERSONALIZE_HEAD, NEUTRINO_ICON_PERSONALIZE, width, MN_WIDGET_ID_PERSONALIZE); + CMenuWidget* pMenu = new CMenuWidget(LOCALE_PERSONALIZE_HEAD, NEUTRINO_ICON_PERSONALIZE, width, MN_WIDGET_ID_PERSONALIZE); pMenu->addIntroItems(NONEXISTANT_LOCALE, LOCALE_PERSONALIZE_ACCESS); //pin CPINChangeWidget *pinChangeWidget = NULL; - if (!g_settings.easymenu && show_pin_setup) + if (show_pin_setup) ShowPinSetup(pMenu, pinChangeWidget); - int res; - if (g_settings.easymenu) { - int count = 0; - for (uint j = 0; jgetName()); - //pin protected items only - if (v_item[j].item_mode == PERSONALIZE_SHOW_AS_ACCESS_OPTION) - { - const neutrino_msg_t key = (count == 0) ? CRCInput::RC_red : - (count == 1) ? CRCInput::RC_green : - (count == 2) ? CRCInput::RC_yellow : - (count == 3) ? CRCInput::RC_blue : CRCInput::RC_nokey; - count++; - string itm_name = g_Locale->getText(v_item[j].locale_name); - itm_name += " "; - itm_name += g_Locale->getText(LOCALE_PERSONALIZE_PINSTATUS); - - if (v_item[j].personalize_mode != NULL) - pMenu->addItem(new CMenuOptionChooser(itm_name.c_str(), v_item[j].personalize_mode, PERSONALIZE_PROTECT_MODE_OPTIONS, PERSONALIZE_PROTECT_MODE_MAX, v_item[j].menuItem->active, NULL, key)); - } - } - res = pMenu->exec(NULL, ""); - delete pMenu; - delete pinChangeWidget; - return res; - } - //personalized menues CMenuForwarder *p_mn[widget_count]; for (int i = 0; i<(widget_count); i++) @@ -378,7 +351,6 @@ int CPersonalizeGui::ShowPersonalizationMenu() pMenu->addItem(p_mn[i]); } - //usermenu uMenu = NULL; if (show_usermenu) @@ -407,7 +379,7 @@ int CPersonalizeGui::ShowPersonalizationMenu() pMenu->addItem(GenericMenuSeparatorLine); pMenu->addItem(new CMenuForwarder(LOCALE_PERSONALIZE_HELP, true, NULL, this, "personalize_help", CRCInput::RC_help)); - res = pMenu->exec(NULL, ""); + int res = pMenu->exec(NULL, ""); if (show_pluginmenu) { g_settings.plugins_disabled = ""; g_settings.plugins_game = ""; @@ -761,10 +733,6 @@ void CPersonalizeGui::SaveAndExit() // Save the settings and left menu, if user wants to! if (haveChangedSettings()) { - if (g_settings.easymenu) { - ApplySettings(); - return; - } if (ShowMsg(LOCALE_PERSONALIZE_HEAD, g_Locale->getText(LOCALE_PERSONALIZE_APPLY_SETTINGS), CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_QUESTION) == CMsgBox::mbrYes) { CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_MAINSETTINGS_SAVESETTINGSNOW_HINT)); // UTF-8 @@ -959,7 +927,7 @@ void CPersonalizeGui::addPersonalizedItems() use_pin = true; //set pinmode for personalize menu or for settings manager menu and if any item is pin protected - if (!g_settings.easymenu && (in_pinmode && !use_pin)) + if (in_pinmode && !use_pin) if (v_item[i].personalize_mode == &g_settings.personalize[SNeutrinoSettings::P_MAIN_PINSTATUS] || v_item[i].personalize_mode == &g_settings.personalize[SNeutrinoSettings::P_MSET_SETTINGS_MANAGER]) { use_pin = true; @@ -968,7 +936,7 @@ void CPersonalizeGui::addPersonalizedItems() //convert item to locked forwarder and use generated pin mode for usage as ask parameter v_item[i].menuItem = new CLockedMenuForwarder(fw->getTextLocale(), - g_settings.easymenu ? g_settings.parentallock_pincode : g_settings.personalize_pincode, + g_settings.personalize_pincode, use_pin, fw->active, NULL, fw->getTarget(), fw->getActionKey(), d_key, NULL, lock_icon); v_item[i].menuItem->hintIcon = fw->hintIcon; v_item[i].menuItem->hint = fw->hint; diff --git a/src/gui/record_setup.cpp b/src/gui/record_setup.cpp index fae191c0e..a5148e5e1 100644 --- a/src/gui/record_setup.cpp +++ b/src/gui/record_setup.cpp @@ -201,33 +201,15 @@ int CRecordSetup::showRecordSetup() CMenuWidget recordingTimerSettings(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_TIMERSETTINGS); showRecordTimerSetup(&recordingTimerSettings); - if (g_settings.easymenu) { - //timeshift - mf = new CMenuForwarder(LOCALE_RECORDINGMENU_TIMESHIFT, true, NULL, &recordingTsSettings, NULL, CRCInput::RC_red); - mf->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT); - recordingSettings->addItem(mf); - - //timersettings - mf = new CMenuForwarder(LOCALE_TIMERSETTINGS_SEPARATOR, true, NULL, &recordingTimerSettings, NULL, CRCInput::RC_green); - mf->setHint("", LOCALE_MENU_HINT_RECORD_TIMER); - recordingSettings->addItem(mf); - } - bool recstatus = CNeutrinoApp::getInstance()->recordingstatus; //record dir CMenuForwarder* fRecDir; - if (g_settings.easymenu) - fRecDir = new CMenuForwarder(LOCALE_RECORDINGMENU_DEFDIR, !recstatus, g_settings.network_nfs_recordingdir, this, "recordingdir", CRCInput::RC_yellow); - else - fRecDir = new CMenuForwarder(LOCALE_RECORDINGMENU_DEFDIR, !recstatus, g_settings.network_nfs_recordingdir, this, "recordingdir"); + fRecDir = new CMenuForwarder(LOCALE_RECORDINGMENU_DEFDIR, !recstatus, g_settings.network_nfs_recordingdir, this, "recordingdir"); fRecDir->setHint("", LOCALE_MENU_HINT_RECORD_DIR); recordingSettings->addItem(fRecDir); CMenuOptionChooser* channel_rec_dir; - if (g_settings.easymenu) - channel_rec_dir = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SAVE_IN_CHANNELDIR, &g_settings.recording_save_in_channeldir, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::RC_blue); - else - channel_rec_dir = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SAVE_IN_CHANNELDIR, &g_settings.recording_save_in_channeldir, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + channel_rec_dir = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SAVE_IN_CHANNELDIR, &g_settings.recording_save_in_channeldir, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); channel_rec_dir->setHint("", LOCALE_MENU_HINT_RECORD_CHANDIR); recordingSettings->addItem(channel_rec_dir); @@ -247,15 +229,13 @@ int CRecordSetup::showRecordSetup() already_found->setHint("", LOCALE_MENU_HINT_RECORD_ALREADY_FOUND_CHECK); recordingSettings->addItem(already_found); - if (!g_settings.easymenu) { - CMenuOptionChooser* slow_warn = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SLOW_WARN, &g_settings.recording_slow_warning, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); - slow_warn->setHint("", LOCALE_MENU_HINT_RECORD_SLOW_WARN); - recordingSettings->addItem(slow_warn); + CMenuOptionChooser* slow_warn = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SLOW_WARN, &g_settings.recording_slow_warning, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + slow_warn->setHint("", LOCALE_MENU_HINT_RECORD_SLOW_WARN); + recordingSettings->addItem(slow_warn); - CMenuOptionChooser* startstop_msg = new CMenuOptionChooser(LOCALE_RECORDING_STARTSTOP_MSG, &g_settings.recording_startstop_msg, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); - startstop_msg->setHint("", LOCALE_MENU_HINT_RECORD_STARTSTOP_MSG); - recordingSettings->addItem(startstop_msg); - } + CMenuOptionChooser* startstop_msg = new CMenuOptionChooser(LOCALE_RECORDING_STARTSTOP_MSG, &g_settings.recording_startstop_msg, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + startstop_msg->setHint("", LOCALE_MENU_HINT_RECORD_STARTSTOP_MSG); + recordingSettings->addItem(startstop_msg); //filename template CKeyboardInput* filename_template = new CKeyboardInput(LOCALE_RECORDINGMENU_FILENAME_TEMPLATE, &g_settings.recording_filename_template, 0, NULL, NULL, LOCALE_RECORDINGMENU_FILENAME_TEMPLATE_HINT, LOCALE_RECORDINGMENU_FILENAME_TEMPLATE_HINT2); @@ -269,33 +249,30 @@ int CRecordSetup::showRecordSetup() recordingSettings->addItem(GenericMenuSeparatorLine); - if (!g_settings.easymenu) { - //timeshift - mf = new CMenuForwarder(LOCALE_RECORDINGMENU_TIMESHIFT, true, NULL, &recordingTsSettings, NULL, CRCInput::RC_green); - mf->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT); - recordingSettings->addItem(mf); + //timeshift + mf = new CMenuForwarder(LOCALE_RECORDINGMENU_TIMESHIFT, true, NULL, &recordingTsSettings, NULL, CRCInput::RC_green); + mf->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT); + recordingSettings->addItem(mf); - //timersettings - mf = new CMenuForwarder(LOCALE_TIMERSETTINGS_SEPARATOR, true, NULL, &recordingTimerSettings, NULL, CRCInput::RC_yellow); - mf->setHint("", LOCALE_MENU_HINT_RECORD_TIMER); - recordingSettings->addItem(mf); - } + //timersettings + mf = new CMenuForwarder(LOCALE_TIMERSETTINGS_SEPARATOR, true, NULL, &recordingTimerSettings, NULL, CRCInput::RC_yellow); + mf->setHint("", LOCALE_MENU_HINT_RECORD_TIMER); + recordingSettings->addItem(mf); CMenuWidget recordingaAudioSettings(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_AUDIOSETTINGS); CMenuWidget recordingaDataSettings(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_DATASETTINGS); - if (!g_settings.easymenu) { - //audiosettings - showRecordAudioSetup(&recordingaAudioSettings); - mf = new CMenuForwarder(LOCALE_RECORDINGMENU_APIDS, true, NULL, &recordingaAudioSettings, NULL, CRCInput::RC_blue); - mf->setHint("", LOCALE_MENU_HINT_RECORD_APIDS); - recordingSettings->addItem(mf); - //datasettings - showRecordDataSetup(&recordingaDataSettings); - mf = new CMenuForwarder(LOCALE_RECORDINGMENU_DATA_PIDS, true, NULL, &recordingaDataSettings, NULL, CRCInput::RC_2); - mf->setHint("", LOCALE_MENU_HINT_RECORD_DATA); - recordingSettings->addItem(mf); - } + //audiosettings + showRecordAudioSetup(&recordingaAudioSettings); + mf = new CMenuForwarder(LOCALE_RECORDINGMENU_APIDS, true, NULL, &recordingaAudioSettings, NULL, CRCInput::RC_blue); + mf->setHint("", LOCALE_MENU_HINT_RECORD_APIDS); + recordingSettings->addItem(mf); + + //datasettings + showRecordDataSetup(&recordingaDataSettings); + mf = new CMenuForwarder(LOCALE_RECORDINGMENU_DATA_PIDS, true, NULL, &recordingaDataSettings, NULL, CRCInput::RC_2); + mf->setHint("", LOCALE_MENU_HINT_RECORD_DATA); + recordingSettings->addItem(mf); int res = recordingSettings->exec(NULL, ""); delete recordingSettings; diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index e7f0e0654..a70036a49 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -729,19 +729,12 @@ int CScanSetup::showScanMenuFrontendSetup() snprintf(tmp, sizeof(tmp), "config_frontend%d", i); char name[255]; - if (g_settings.easymenu) - snprintf(name, sizeof(name), "%s %d: %s", g_Locale->getText(LOCALE_SATSETUP_FE_SETUP), i+1, - fe->isHybrid() ? g_Locale->getText(LOCALE_SCANTS_ACTHYBRID) - : fe->hasSat() ? g_Locale->getText(LOCALE_SCANTS_ACTSATELLITE) - : fe->hasTerr() ? g_Locale->getText(LOCALE_SCANTS_ACTTERRESTRIAL) - : g_Locale->getText(LOCALE_SCANTS_ACTCABLE)); - else - snprintf(name, sizeof(name), "%s %d: %s %s", g_Locale->getText(LOCALE_SATSETUP_FE_SETUP), i+1, - fe->isHybrid() ? g_Locale->getText(LOCALE_SCANTS_ACTHYBRID) - : fe->hasSat() ? g_Locale->getText(LOCALE_SCANTS_ACTSATELLITE) - : fe->hasTerr()? g_Locale->getText(LOCALE_SCANTS_ACTTERRESTRIAL) - : g_Locale->getText(LOCALE_SCANTS_ACTCABLE), - fe->getName()); + snprintf(name, sizeof(name), "%s %d: %s %s", g_Locale->getText(LOCALE_SATSETUP_FE_SETUP), i+1, + fe->isHybrid() ? g_Locale->getText(LOCALE_SCANTS_ACTHYBRID) + : fe->hasSat() ? g_Locale->getText(LOCALE_SCANTS_ACTSATELLITE) + : fe->hasTerr()? g_Locale->getText(LOCALE_SCANTS_ACTTERRESTRIAL) + : g_Locale->getText(LOCALE_SCANTS_ACTCABLE), + fe->getName()); neutrino_msg_t key = CRCInput::RC_nokey; if (i == 0) @@ -875,14 +868,7 @@ int CScanSetup::showFrontendSetup(int number) dmode = fe_config.diseqcType; char name[255]; - if (g_settings.easymenu) - snprintf(name, sizeof(name), "%s %d: %s", g_Locale->getText(LOCALE_SATSETUP_FE_SETUP), number+1, - fe->isHybrid() ? g_Locale->getText(LOCALE_SCANTS_ACTHYBRID) - : fe->hasSat() ? g_Locale->getText(LOCALE_SCANTS_ACTSATELLITE) - : fe->hasTerr() ? g_Locale->getText(LOCALE_SCANTS_ACTTERRESTRIAL) - : g_Locale->getText(LOCALE_SCANTS_ACTCABLE)); - else - snprintf(name, sizeof(name), "%s %d: %s", g_Locale->getText(LOCALE_SATSETUP_FE_SETUP), number+1, fe->getName()); + snprintf(name, sizeof(name), "%s %d: %s", g_Locale->getText(LOCALE_SATSETUP_FE_SETUP), number+1, fe->getName()); CMenuWidget * setupMenu = new CMenuWidget(name, NEUTRINO_ICON_SETTINGS, width); setupMenu->setSelected(feselected); @@ -1481,12 +1467,9 @@ void CScanSetup::addScanMenuFastScan(CMenuWidget *fast_ScanMenu) mf->setHint("", LOCALE_MENU_HINT_SCAN_FASTDISEQC); fast_ScanMenu->addItem(mf); - if (1 /* !g_settings.easymenu */) - { - mf = new CMenuForwarder(LOCALE_SCANTS_STARTNOW, allow_start, NULL, this, "sfast", CRCInput::RC_blue); - mf->setHint("", LOCALE_MENU_HINT_SCAN_START); - fast_ScanMenu->addItem(mf); - } + mf = new CMenuForwarder(LOCALE_SCANTS_STARTNOW, allow_start, NULL, this, "sfast", CRCInput::RC_blue); + mf->setHint("", LOCALE_MENU_HINT_SCAN_START); + fast_ScanMenu->addItem(mf); } int CScanSetup::showFastscanDiseqcSetup() diff --git a/src/gui/settings_manager.cpp b/src/gui/settings_manager.cpp index 5c5ff7a4f..dc3b81b13 100644 --- a/src/gui/settings_manager.cpp +++ b/src/gui/settings_manager.cpp @@ -176,50 +176,35 @@ int CSettingsManager::showMenu() mset->addIntroItems(LOCALE_MAINSETTINGS_MANAGE); CMenuForwarder * mf; - if (g_settings.easymenu) - mf = new CMenuForwarder(LOCALE_RESET_SETTINGS, true, NULL, resetNotifier, "settings", CRCInput::RC_red); - else - mf = new CMenuForwarder(LOCALE_RESET_SETTINGS, true, NULL, resetNotifier, "settings", CRCInput::RC_recall); + mf = new CMenuForwarder(LOCALE_RESET_SETTINGS, true, NULL, resetNotifier, "settings", CRCInput::RC_recall); mf->setHint(NEUTRINO_ICON_HINT_RESET, LOCALE_MENU_HINT_RESET); // FIXME: RC-button RECALL is broken mset->addItem(mf); - if (!g_settings.easymenu) { - mset->addItem(GenericMenuSeparatorLine); + mset->addItem(GenericMenuSeparatorLine); - mf = new CMenuForwarder(LOCALE_EXTRA_SAVECONFIG, true, NULL, this, "saveconfig", CRCInput::RC_red); - mf->setHint(NEUTRINO_ICON_HINT_SAVEAS, LOCALE_MENU_HINT_SAVEAS); - mset->addItem(mf); + mf = new CMenuForwarder(LOCALE_EXTRA_SAVECONFIG, true, NULL, this, "saveconfig", CRCInput::RC_red); + mf->setHint(NEUTRINO_ICON_HINT_SAVEAS, LOCALE_MENU_HINT_SAVEAS); + mset->addItem(mf); - mf = new CMenuForwarder(LOCALE_EXTRA_LOADCONFIG, true, NULL, this, "loadconfig", CRCInput::RC_green); - mf->setHint(NEUTRINO_ICON_HINT_LOAD, LOCALE_MENU_HINT_LOAD); - mset->addItem(mf); + mf = new CMenuForwarder(LOCALE_EXTRA_LOADCONFIG, true, NULL, this, "loadconfig", CRCInput::RC_green); + mf->setHint(NEUTRINO_ICON_HINT_LOAD, LOCALE_MENU_HINT_LOAD); + mset->addItem(mf); - mset->addItem(GenericMenuSeparatorLine); - } + mset->addItem(GenericMenuSeparatorLine); - if (g_settings.easymenu) - mf = new CMenuForwarder(LOCALE_SETTINGS_BACKUP, true, NULL, this, "backup", CRCInput::RC_green); - else - mf = new CMenuForwarder(LOCALE_SETTINGS_BACKUP, true, NULL, this, "backup", CRCInput::RC_yellow); + mf = new CMenuForwarder(LOCALE_SETTINGS_BACKUP, true, NULL, this, "backup", CRCInput::RC_yellow); mf->setHint(NEUTRINO_ICON_HINT_BACKUP, LOCALE_MENU_HINT_BACKUP); mset->addItem(mf); - if (g_settings.easymenu) - mf = new CMenuForwarder(LOCALE_SETTINGS_RESTORE, true, NULL, this, "restore", CRCInput::RC_yellow); - else - mf = new CMenuForwarder(LOCALE_SETTINGS_RESTORE, true, NULL, this, "restore", CRCInput::RC_blue); + mf = new CMenuForwarder(LOCALE_SETTINGS_RESTORE, true, NULL, this, "restore", CRCInput::RC_blue); mf->setHint(NEUTRINO_ICON_HINT_RESTORE, LOCALE_MENU_HINT_RESTORE); mset->addItem(mf); - if (g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_RESET_ALL, true, NULL, resetNotifier, "all", CRCInput::RC_blue); - } else { - mset->addItem(GenericMenuSeparatorLine); - mf = new CMenuForwarder(LOCALE_RESET_ALL, true, NULL, resetNotifier, "all", CRCInput::RC_standby); - } + mset->addItem(GenericMenuSeparatorLine); + mf = new CMenuForwarder(LOCALE_RESET_ALL, true, NULL, resetNotifier, "all", CRCInput::RC_standby); mf->setHint(NEUTRINO_ICON_HINT_FACTORY, LOCALE_MENU_HINT_FACTORY); mset->addItem(mf); diff --git a/src/gui/start_wizard.cpp b/src/gui/start_wizard.cpp index ffe812ca8..fa911a14c 100644 --- a/src/gui/start_wizard.cpp +++ b/src/gui/start_wizard.cpp @@ -114,7 +114,7 @@ int CStartUpWizard::exec(CMenuTarget* parent, const string & /*actionKey*/) res = g_videoSettings->exec(NULL, ""); g_videoSettings->setWizardMode(SNeutrinoSettings::WIZARD_OFF); } - if(!g_settings.easymenu && advanced && res != menu_return::RETURN_EXIT_ALL) + if(advanced && res != menu_return::RETURN_EXIT_ALL) { COsdSetup osdSettings(SNeutrinoSettings::WIZARD_ON); res = osdSettings.exec(NULL, ""); diff --git a/src/gui/update_menue.cpp b/src/gui/update_menue.cpp index 598ecdc10..4a78fa772 100644 --- a/src/gui/update_menue.cpp +++ b/src/gui/update_menue.cpp @@ -103,34 +103,29 @@ int CSoftwareUpdate::showSoftwareUpdate() CUpdateSettings update_settings; CMenuWidget mtdexpert(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_MTDEXPERT); //settings - if (!g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_FLASHUPDATE_SETTINGS, true, NULL, &update_settings, NULL, CRCInput::RC_yellow); - mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_SETTINGS); - softUpdate.addItem(mf); + mf = new CMenuForwarder(LOCALE_FLASHUPDATE_SETTINGS, true, NULL, &update_settings, NULL, CRCInput::RC_yellow); + mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_SETTINGS); + softUpdate.addItem(mf); - softUpdate.addItem(GenericMenuSeparatorLine); + softUpdate.addItem(GenericMenuSeparatorLine); - //expert-functions - showSoftwareUpdateExpert(&mtdexpert); - mf = new CMenuForwarder(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, true, NULL, &mtdexpert, NULL, CRCInput::RC_blue); - mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_EXPERT); - softUpdate.addItem(mf); + //expert-functions + showSoftwareUpdateExpert(&mtdexpert); + mf = new CMenuForwarder(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, true, NULL, &mtdexpert, NULL, CRCInput::RC_blue); + mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_EXPERT); + softUpdate.addItem(mf); #if 0 - //firmware update via opkg - mf = new CMenuDForwarder(LOCALE_OPKG_TITLE, COPKGManager::hasOpkgSupport(), NULL, new COPKGManager()); - mf->setHint(NEUTRINO_ICON_HINT_SW_UPDATE, LOCALE_MENU_HINT_OPKG); - softUpdate.addItem(mf); + //firmware update via opkg + mf = new CMenuDForwarder(LOCALE_OPKG_TITLE, COPKGManager::hasOpkgSupport(), NULL, new COPKGManager()); + mf->setHint(NEUTRINO_ICON_HINT_SW_UPDATE, LOCALE_MENU_HINT_OPKG); + softUpdate.addItem(mf); #endif - } #ifdef BOXMODEL_CS_HD2 softUpdate.addItem(GenericMenuSeparatorLine); - if (g_settings.easymenu) - mf = new CMenuDForwarder(LOCALE_FLASHUPDATE_CREATEIMAGE_MENU, true, NULL, new CFlashExpertSetup(), NULL, CRCInput::RC_yellow); - else - mf = new CMenuDForwarder(LOCALE_FLASHUPDATE_CREATEIMAGE_MENU, true, NULL, new CFlashExpertSetup(), NULL, CRCInput::convertDigitToKey(1)); + mf = new CMenuDForwarder(LOCALE_FLASHUPDATE_CREATEIMAGE_MENU, true, NULL, new CFlashExpertSetup(), NULL, CRCInput::convertDigitToKey(1)); mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CREATEIMAGE_MENU); softUpdate.addItem(mf); #endif diff --git a/src/gui/videosettings.cpp b/src/gui/videosettings.cpp index 6848628ae..4280f1cb4 100644 --- a/src/gui/videosettings.cpp +++ b/src/gui/videosettings.cpp @@ -283,30 +283,28 @@ int CVideoSettings::showVideoSetup() CMenuWidget automodes(LOCALE_MAINSETTINGS_VIDEO, NEUTRINO_ICON_SETTINGS); #endif CAutoModeNotifier anotify; - if (!g_settings.easymenu) { - //dbdr options - vs_dbdropt_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_DBDR, &g_settings.video_dbdr, VIDEOMENU_DBDR_OPTIONS, VIDEOMENU_DBDR_OPTION_COUNT, true, this); - vs_dbdropt_ch->setHint("", LOCALE_MENU_HINT_VIDEO_DBDR); + //dbdr options + vs_dbdropt_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_DBDR, &g_settings.video_dbdr, VIDEOMENU_DBDR_OPTIONS, VIDEOMENU_DBDR_OPTION_COUNT, true, this); + vs_dbdropt_ch->setHint("", LOCALE_MENU_HINT_VIDEO_DBDR); - //video system modes submenue - videomodes.addIntroItems(LOCALE_VIDEOMENU_ENABLED_MODES); + //video system modes submenue + videomodes.addIntroItems(LOCALE_VIDEOMENU_ENABLED_MODES); - for (int i = 0; i < VIDEOMENU_VIDEOMODE_OPTION_COUNT; i++) - videomodes.addItem(new CMenuOptionChooser(VIDEOMENU_VIDEOMODE_OPTIONS[i].valname, &g_settings.enabled_video_modes[i], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, &anotify)); + for (int i = 0; i < VIDEOMENU_VIDEOMODE_OPTION_COUNT; i++) + videomodes.addItem(new CMenuOptionChooser(VIDEOMENU_VIDEOMODE_OPTIONS[i].valname, &g_settings.enabled_video_modes[i], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, &anotify)); - vs_videomodes_fw = new CMenuForwarder(LOCALE_VIDEOMENU_ENABLED_MODES, true, NULL, &videomodes, NULL, CRCInput::RC_red); - vs_videomodes_fw->setHint("", LOCALE_MENU_HINT_VIDEO_MODES); + vs_videomodes_fw = new CMenuForwarder(LOCALE_VIDEOMENU_ENABLED_MODES, true, NULL, &videomodes, NULL, CRCInput::RC_red); + vs_videomodes_fw->setHint("", LOCALE_MENU_HINT_VIDEO_MODES); #ifdef BOXMODEL_CS_HD2 - automodes.addIntroItems(LOCALE_VIDEOMENU_ENABLED_MODES_AUTO); + automodes.addIntroItems(LOCALE_VIDEOMENU_ENABLED_MODES_AUTO); - for (int i = 0; i < VIDEOMENU_VIDEOMODE_OPTION_COUNT - 1; i++) - automodes.addItem(new CMenuOptionChooser(VIDEOMENU_VIDEOMODE_OPTIONS[i].valname, &g_settings.enabled_auto_modes[i], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, &anotify)); + for (int i = 0; i < VIDEOMENU_VIDEOMODE_OPTION_COUNT - 1; i++) + automodes.addItem(new CMenuOptionChooser(VIDEOMENU_VIDEOMODE_OPTIONS[i].valname, &g_settings.enabled_auto_modes[i], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, &anotify)); - vs_automodes_fw = new CMenuForwarder(LOCALE_VIDEOMENU_ENABLED_MODES_AUTO, true, NULL, &automodes, NULL, CRCInput::RC_green); - vs_automodes_fw->setHint("", LOCALE_MENU_HINT_VIDEO_MODES_AUTO); + vs_automodes_fw = new CMenuForwarder(LOCALE_VIDEOMENU_ENABLED_MODES_AUTO, true, NULL, &automodes, NULL, CRCInput::RC_green); + vs_automodes_fw->setHint("", LOCALE_MENU_HINT_VIDEO_MODES_AUTO); #endif - } //--------------------------------------- videosetup->addIntroItems(LOCALE_MAINSETTINGS_VIDEO /*, LOCALE_VIDEOMENU_TV_SCART*/); @@ -323,31 +321,27 @@ int CVideoSettings::showVideoSetup() videosetup->addItem(vs_43mode_ch); //4:3 mode videosetup->addItem(vs_dispformat_ch); //display format videosetup->addItem(vs_videomodes_ch); //video system - if (!g_settings.easymenu) { - videosetup->addItem(vs_dbdropt_ch); //dbdr options - videosetup->addItem(vs_videomodes_fw); //video modes submenue + videosetup->addItem(vs_dbdropt_ch); //dbdr options + videosetup->addItem(vs_videomodes_fw); //video modes submenue #ifdef BOXMODEL_CS_HD2 - videosetup->addItem(vs_automodes_fw); //video auto modes submenue + videosetup->addItem(vs_automodes_fw); //video auto modes submenue #endif - } #ifdef BOXMODEL_CS_HD2 - if (!g_settings.easymenu) { - /* values are from -128 to 127, but brightness really no sense after +/- 40. changeNotify multiply contrast and saturation to 3 */ - CMenuOptionNumberChooser * bcont = new CMenuOptionNumberChooser(LOCALE_VIDEOMENU_BRIGHTNESS, &g_settings.brightness, true, -42, 42, this); - bcont->setHint("", LOCALE_MENU_HINT_VIDEO_BRIGHTNESS); - CMenuOptionNumberChooser * ccont = new CMenuOptionNumberChooser(LOCALE_VIDEOMENU_CONTRAST, &g_settings.contrast, true, -42, 42, this); - ccont->setHint("", LOCALE_MENU_HINT_VIDEO_CONTRAST); - CMenuOptionNumberChooser * scont = new CMenuOptionNumberChooser(LOCALE_VIDEOMENU_SATURATION, &g_settings.saturation, true, -42, 42, this); - scont->setHint("", LOCALE_MENU_HINT_VIDEO_SATURATION); - videosetup->addItem(bcont); - videosetup->addItem(ccont); - videosetup->addItem(scont); + /* values are from -128 to 127, but brightness really no sense after +/- 40. changeNotify multiply contrast and saturation to 3 */ + CMenuOptionNumberChooser * bcont = new CMenuOptionNumberChooser(LOCALE_VIDEOMENU_BRIGHTNESS, &g_settings.brightness, true, -42, 42, this); + bcont->setHint("", LOCALE_MENU_HINT_VIDEO_BRIGHTNESS); + CMenuOptionNumberChooser * ccont = new CMenuOptionNumberChooser(LOCALE_VIDEOMENU_CONTRAST, &g_settings.contrast, true, -42, 42, this); + ccont->setHint("", LOCALE_MENU_HINT_VIDEO_CONTRAST); + CMenuOptionNumberChooser * scont = new CMenuOptionNumberChooser(LOCALE_VIDEOMENU_SATURATION, &g_settings.saturation, true, -42, 42, this); + scont->setHint("", LOCALE_MENU_HINT_VIDEO_SATURATION); + videosetup->addItem(bcont); + videosetup->addItem(ccont); + videosetup->addItem(scont); - CMenuOptionChooser * sd = new CMenuOptionChooser(LOCALE_VIDEOMENU_SDOSD, &g_settings.enable_sd_osd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); - sd->setHint("", LOCALE_MENU_HINT_VIDEO_SDOSD); - videosetup->addItem(sd); - } + CMenuOptionChooser * sd = new CMenuOptionChooser(LOCALE_VIDEOMENU_SDOSD, &g_settings.enable_sd_osd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); + sd->setHint("", LOCALE_MENU_HINT_VIDEO_SDOSD); + videosetup->addItem(sd); #endif #ifdef ENABLE_PIP CPipSetup pip; @@ -355,11 +349,6 @@ int CVideoSettings::showVideoSetup() pipsetup->setHint("", LOCALE_MENU_HINT_VIDEO_PIP); videosetup->addItem(pipsetup); #endif - if (g_settings.easymenu) { - CMenuForwarder * mf = new CMenuDForwarder(LOCALE_FONTMENU_SCALING, true, NULL, new COsdSetup(), "font_scaling"); - mf->setHint("", LOCALE_MENU_HINT_FONT_SCALING); - videosetup->addItem(mf); - } int res = videosetup->exec(NULL, ""); selected = videosetup->getSelected(); delete videosetup; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 15a73d540..15023c717 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -344,14 +344,7 @@ int CNeutrinoApp::loadSetup(const char * fname) //theme/color options CThemes::getTheme(configfile); - g_settings.easymenu = configfile.getInt32("easymenu", 0); g_settings.softupdate_autocheck = configfile.getBool("softupdate_autocheck" , false); - /* if file present and no config file found, force easy mode */ - if (erg && !access("/var/etc/.easymenu", F_OK)) { - g_settings.easymenu = 1; - g_settings.softupdate_autocheck = 1; - } - dprintf(DEBUG_NORMAL, "g_settings.easymenu %d\n", g_settings.easymenu); // video g_settings.video_Mode = configfile.getInt32("video_Mode", VIDEO_STD_1080I50); // VIDEO_STD_720P50 @@ -650,8 +643,7 @@ int CNeutrinoApp::loadSetup(const char * fname) //recording (server + vcr) g_settings.recording_type = configfile.getInt32("recording_type", RECORDING_FILE); g_settings.recording_stopsectionsd = configfile.getBool("recording_stopsectionsd" , false ); - g_settings.recording_audio_pids_default = configfile.getInt32("recording_audio_pids_default", - g_settings.easymenu ? TIMERD_APIDS_ALL : TIMERD_APIDS_STD | TIMERD_APIDS_AC3); + g_settings.recording_audio_pids_default = configfile.getInt32("recording_audio_pids_default", TIMERD_APIDS_STD | TIMERD_APIDS_AC3); g_settings.recording_zap_on_announce = configfile.getBool("recording_zap_on_announce" , false); g_settings.shutdown_timer_record_type = configfile.getBool("shutdown_timer_record_type" , false); @@ -1078,6 +1070,11 @@ void CNeutrinoApp::saveSetup(const char * fname) if(!scansettings.saveSettings(NEUTRINO_SCAN_SETTINGS_FILE)) { dprintf(DEBUG_NORMAL, "error while saving scan-settings!\n"); } + if (g_settings.version_pseudo < "20170913110000") + { + //remove easymenu + configfile.deleteKey("easymenu"); + } //theme/color options CThemes::setTheme(configfile); @@ -1526,7 +1523,6 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32("infoClockFontSize", g_settings.infoClockFontSize); configfile.setInt32("infoClockBackground", g_settings.infoClockBackground); configfile.setInt32("infoClockSeconds", g_settings.infoClockSeconds); - configfile.setInt32("easymenu", g_settings.easymenu); configfile.setInt32("livestreamResolution", g_settings.livestreamResolution); configfile.setString("livestreamScriptPath", g_settings.livestreamScriptPath); @@ -2893,12 +2889,6 @@ _repeat: adjustToChannelID(live_channel_id);//FIXME what if deleted ? hintBox.hide(); } - if (g_settings.easymenu) { - CBouquetList * blist = (mode == mode_radio) ? RADIOfavList : TVfavList; - t_channel_id live_channel_id = channelList->getActiveChannel_ChannelID(); - if (blist->hasChannelID(live_channel_id)) - SetChannelMode(LIST_MODE_FAV); - } channelList_painted = false; @@ -4311,21 +4301,6 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey) g_RCInput->postMsg(NeutrinoMessages::STANDBY_ON, 0); return menu_return::RETURN_EXIT_ALL; } - else if(actionKey == "easyswitch") { - INFO("easyswitch\n"); - CParentalSetup pin; - if (pin.checkPin()) { - if (parent) - parent->hide(); - - std::string text = "Easy menu switched " + string(g_settings.easymenu?"OFF":"ON") + string(", when restart box.\nRestart now?"); - if (ShowMsg(LOCALE_MESSAGEBOX_INFO, text, CMsgBox::mbrNo, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_INFO, 0) == CMsgBox::mbrYes) { - g_settings.easymenu = (g_settings.easymenu == 0) ? 1 : 0; - INFO("change easymenu to %d\n", g_settings.easymenu); - g_RCInput->postMsg(NeutrinoMessages::REBOOT, 0); - } - } - } return returnval; } diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index fc673329b..436556751 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -93,10 +93,9 @@ extern CCAMMenuHandler * g_CamHandler; const mn_widget_struct_t menu_widgets[MENU_MAX] = { - {LOCALE_MAINMENU_HEAD, NEUTRINO_ICON_MAINMENU, MENU_WIDTH}, /* 0 = MENU_MAIN*/ - {LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, MENU_WIDTH}, /* 1 = MENU_SETTINGS*/ - {LOCALE_SERVICEMENU_HEAD, NEUTRINO_ICON_SETTINGS, MENU_WIDTH}, /* 2 = MENU_SERVICE*/ - {LOCALE_MAINMENU_SHUTDOWN_MENU, NEUTRINO_ICON_BUTTON_POWER, MENU_WIDTH}, /* 3 = MENU_SHUTDOWN*/ + {LOCALE_MAINMENU_HEAD, NEUTRINO_ICON_MAINMENU, MENU_WIDTH}, /* 0 = MENU_MAIN */ + {LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, MENU_WIDTH}, /* 1 = MENU_SETTINGS */ + {LOCALE_SERVICEMENU_HEAD, NEUTRINO_ICON_SETTINGS, MENU_WIDTH} /* 2 = MENU_SERVICE */ }; //init all menues @@ -108,7 +107,7 @@ void CNeutrinoApp::InitMenu() personalize.enableUsermenu(); personalize.enablePluginMenu(); personalize.enablePinSetup(); - personalize.addWidgets(menu_widgets, g_settings.easymenu ? MENU_MAX : 3); + personalize.addWidgets(menu_widgets, MENU_MAX); InitMenuMain(); InitMenuSettings(); @@ -138,44 +137,25 @@ void CNeutrinoApp::InitMenuMain() // Dynamic renumbering personalize.setShortcut(); - CMenuWidget &menu = personalize.getWidget(MENU_MAIN); - menu.addKey(CRCInput::RC_stop, this, "easyswitch"); - //top personalize.addItem(MENU_MAIN, GenericMenuSeparator, NULL, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); //1st section*************************************************************************************************** - if (g_settings.easymenu) { - if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { - CMenuForwarder *mb = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, true, NULL, CMediaPlayerMenu::getInstance(), "movieplayer", CRCInput::RC_red); - mb->setHint(NEUTRINO_ICON_HINT_MB, LOCALE_MENU_HINT_MB); - personalize.addItem(MENU_MAIN, mb, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_MBROWSER], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS); - } -#if 0 - CMenuForwarder *cl = new CMenuForwarder(LOCALE_MAINMENU_CHANNELS, true, NULL, this, "channels", CRCInput::RC_green); - cl->setHint(NEUTRINO_ICON_HINT_TVMODE, LOCALE_MENU_HINT_CHANNELS); - personalize.addItem(MENU_MAIN, cl); -#endif - CMenuForwarder * mf = new CMenuForwarder(LOCALE_BOUQUETEDITOR_NAME , true, NULL, new CBEBouquetWidget(), NULL, CRCInput::RC_green); - mf->setHint(NEUTRINO_ICON_HINT_BEDIT, LOCALE_MENU_HINT_BEDIT); - personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_BOUQUET_EDIT], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); - } else { - //tv <-> radio toggle - CMenuForwarder *tvradio_switch = new CMenuForwarder(LOCALE_MAINMENU_TVRADIO_SWITCH, true, NULL, this, "tv_radio_switch", CRCInput::RC_red); - tvradio_switch->setHint(NEUTRINO_ICON_HINT_TVRADIO_SWITCH, LOCALE_MENU_HINT_TVRADIO_SWITCH); - personalize.addItem(MENU_MAIN, tvradio_switch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS); + //tv <-> radio toggle + CMenuForwarder *tvradio_switch = new CMenuForwarder(LOCALE_MAINMENU_TVRADIO_SWITCH, true, NULL, this, "tv_radio_switch", CRCInput::RC_red); + tvradio_switch->setHint(NEUTRINO_ICON_HINT_TVRADIO_SWITCH, LOCALE_MENU_HINT_TVRADIO_SWITCH); + personalize.addItem(MENU_MAIN, tvradio_switch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS); - //tv-mode - CMenuForwarder *tvswitch = new CMenuForwarder(LOCALE_MAINMENU_TVMODE, true, NULL, this, "tv", CRCInput::RC_red); - tvswitch->setHint(NEUTRINO_ICON_HINT_TVMODE, LOCALE_MENU_HINT_TVMODE); - personalize.addItem(MENU_MAIN, tvswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_TV | DCOND_MODE_TS); //observed + //tv-mode + CMenuForwarder *tvswitch = new CMenuForwarder(LOCALE_MAINMENU_TVMODE, true, NULL, this, "tv", CRCInput::RC_red); + tvswitch->setHint(NEUTRINO_ICON_HINT_TVMODE, LOCALE_MENU_HINT_TVMODE); + personalize.addItem(MENU_MAIN, tvswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_TV | DCOND_MODE_TS); //observed - //radio-mode - CMenuForwarder *radioswitch = new CMenuForwarder(LOCALE_MAINMENU_RADIOMODE, true, NULL, this, "radio", CRCInput::RC_green); - radioswitch->setHint(NEUTRINO_ICON_HINT_RADIOMODE, LOCALE_MENU_HINT_RADIOMODE); - personalize.addItem(MENU_MAIN, radioswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_RADIO | DCOND_MODE_TS); //observed - } + //radio-mode + CMenuForwarder *radioswitch = new CMenuForwarder(LOCALE_MAINMENU_RADIOMODE, true, NULL, this, "radio", CRCInput::RC_green); + radioswitch->setHint(NEUTRINO_ICON_HINT_RADIOMODE, LOCALE_MENU_HINT_RADIOMODE); + personalize.addItem(MENU_MAIN, radioswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_RADIO | DCOND_MODE_TS); //observed //timer CMenuForwarder *timerlist = new CMenuForwarder(LOCALE_TIMERLIST_NAME, true, NULL, new CTimerList(), NULL, CRCInput::RC_yellow); @@ -185,37 +165,32 @@ void CNeutrinoApp::InitMenuMain() //multimedia menu CMenuForwarder *media = new CMenuForwarder(LOCALE_MAINMENU_MEDIA, true, NULL, CMediaPlayerMenu::getInstance(), NULL, CRCInput::RC_blue); media->setHint(NEUTRINO_ICON_HINT_MEDIA, LOCALE_MENU_HINT_MEDIA); - if (g_settings.easymenu) - personalize.addItem(MENU_MAIN, media, &g_settings.personalize[SNeutrinoSettings::P_MAIN_MEDIA], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); - else - personalize.addItem(MENU_MAIN, media, &g_settings.personalize[SNeutrinoSettings::P_MAIN_MEDIA]); + personalize.addItem(MENU_MAIN, media, &g_settings.personalize[SNeutrinoSettings::P_MAIN_MEDIA]); - CMenuForwarder * mf; - if (!g_settings.easymenu) { - //games - bool show_games = g_Plugins->hasPlugin(CPlugins::P_TYPE_GAME); - mf = new CMenuForwarder(LOCALE_MAINMENU_GAMES, show_games, NULL, new CPluginList(LOCALE_MAINMENU_GAMES,CPlugins::P_TYPE_GAME)); - mf->setHint(NEUTRINO_ICON_HINT_GAMES, LOCALE_MENU_HINT_GAMES); - personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_GAMES]); + CMenuForwarder *mf; + //games + bool show_games = g_Plugins->hasPlugin(CPlugins::P_TYPE_GAME); + mf = new CMenuForwarder(LOCALE_MAINMENU_GAMES, show_games, NULL, new CPluginList(LOCALE_MAINMENU_GAMES,CPlugins::P_TYPE_GAME)); + mf->setHint(NEUTRINO_ICON_HINT_GAMES, LOCALE_MENU_HINT_GAMES); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_GAMES]); - //tools - bool show_tools = g_Plugins->hasPlugin(CPlugins::P_TYPE_TOOL); - mf = new CMenuForwarder(LOCALE_MAINMENU_TOOLS, show_tools, NULL, new CPluginList(LOCALE_MAINMENU_TOOLS,CPlugins::P_TYPE_TOOL)); - mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_TOOLS); - personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TOOLS]); + //tools + bool show_tools = g_Plugins->hasPlugin(CPlugins::P_TYPE_TOOL); + mf = new CMenuForwarder(LOCALE_MAINMENU_TOOLS, show_tools, NULL, new CPluginList(LOCALE_MAINMENU_TOOLS,CPlugins::P_TYPE_TOOL)); + mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_TOOLS); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TOOLS]); - //scripts - bool show_scripts = g_Plugins->hasPlugin(CPlugins::P_TYPE_SCRIPT); - mf = new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, show_scripts, NULL, new CPluginList(LOCALE_MAINMENU_SCRIPTS,CPlugins::P_TYPE_SCRIPT)); - mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_SCRIPTS); - personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SCRIPTS]); + //scripts + bool show_scripts = g_Plugins->hasPlugin(CPlugins::P_TYPE_SCRIPT); + mf = new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, show_scripts, NULL, new CPluginList(LOCALE_MAINMENU_SCRIPTS,CPlugins::P_TYPE_SCRIPT)); + mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_SCRIPTS); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SCRIPTS]); - //lua - bool show_lua = g_Plugins->hasPlugin(CPlugins::P_TYPE_LUA); - mf = new CMenuForwarder(LOCALE_MAINMENU_LUA, show_lua, NULL, new CPluginList(LOCALE_MAINMENU_LUA,CPlugins::P_TYPE_LUA)); - mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_LUA); - personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_LUA]); - } + //lua + bool show_lua = g_Plugins->hasPlugin(CPlugins::P_TYPE_LUA); + mf = new CMenuForwarder(LOCALE_MAINMENU_LUA, show_lua, NULL, new CPluginList(LOCALE_MAINMENU_LUA,CPlugins::P_TYPE_LUA)); + mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_LUA); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_LUA]); //separator personalize.addSeparator(MENU_MAIN); @@ -237,24 +212,22 @@ void CNeutrinoApp::InitMenuMain() //3rd section*************************************************************************************************** - if (!g_settings.easymenu) { - //10. -- only 10 shortcuts (1-9, 0), the next could be the last also!(10. => 0) - //sleeptimer - mf = new CMenuForwarder(LOCALE_MAINMENU_SLEEPTIMER, true, NULL, new CSleepTimerWidget); - mf->setHint(NEUTRINO_ICON_HINT_SLEEPTIMER, LOCALE_MENU_HINT_SLEEPTIMER); - personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SLEEPTIMER]); + //10. -- only 10 shortcuts (1-9, 0), the next could be the last also!(10. => 0) + //sleeptimer + mf = new CMenuForwarder(LOCALE_MAINMENU_SLEEPTIMER, true, NULL, new CSleepTimerWidget); + mf->setHint(NEUTRINO_ICON_HINT_SLEEPTIMER, LOCALE_MENU_HINT_SLEEPTIMER); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SLEEPTIMER]); - //reboot - mf = new CMenuForwarder(LOCALE_MAINMENU_REBOOT, true, NULL, this, "reboot"); - mf->setHint(NEUTRINO_ICON_HINT_REBOOT, LOCALE_MENU_HINT_REBOOT); - personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_REBOOT]); + //reboot + mf = new CMenuForwarder(LOCALE_MAINMENU_REBOOT, true, NULL, this, "reboot"); + mf->setHint(NEUTRINO_ICON_HINT_REBOOT, LOCALE_MENU_HINT_REBOOT); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_REBOOT]); - //shutdown - if (g_info.hw_caps->can_shutdown) { - mf = new CMenuForwarder(LOCALE_MAINMENU_SHUTDOWN, true, NULL, this, "shutdown", CRCInput::RC_standby); - mf->setHint(NEUTRINO_ICON_HINT_SHUTDOWN, LOCALE_MENU_HINT_SHUTDOWN); - personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SHUTDOWN]); - } + //shutdown + if (g_info.hw_caps->can_shutdown) { + mf = new CMenuForwarder(LOCALE_MAINMENU_SHUTDOWN, true, NULL, this, "shutdown", CRCInput::RC_standby); + mf->setHint(NEUTRINO_ICON_HINT_SHUTDOWN, LOCALE_MENU_HINT_SHUTDOWN); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SHUTDOWN]); } //separator @@ -268,40 +241,11 @@ void CNeutrinoApp::InitMenuMain() personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_INFOMENU]); //cisettings - if (!g_settings.easymenu && (cCA::GetInstance()->GetNumberCISlots() > 0 || cCA::GetInstance()->GetNumberSmartCardSlots() > 0)) { + if (cCA::GetInstance()->GetNumberCISlots() > 0 || cCA::GetInstance()->GetNumberSmartCardSlots() > 0) { mf = new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler); mf->setHint(NEUTRINO_ICON_HINT_CI, LOCALE_MENU_HINT_CI); personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_CISETTINGS]); } - if (g_settings.easymenu) { - personalize.addIntroItems(MENU_SHUTDOWN); - - mf = new CMenuForwarder(LOCALE_MAINMENU_SHUTDOWN_MENU, true, NULL, &personalize.getWidget(MENU_SHUTDOWN), NULL, CRCInput::RC_standby); - mf->setHint(NEUTRINO_ICON_HINT_SHUTDOWN, LOCALE_MENU_HINT_SHUTDOWN_MENU); - personalize.addItem(MENU_MAIN, mf); - - // standby - mf = new CMenuForwarder(LOCALE_MAINMENU_STANDBY, true, NULL, this, "standby", CRCInput::RC_red); - mf->setHint(NEUTRINO_ICON_HINT_SLEEPTIMER, LOCALE_MENU_HINT_STANDBY); - personalize.addItem(MENU_SHUTDOWN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_STANDBY]); - - //sleeptimer - mf = new CMenuForwarder(LOCALE_MAINMENU_SLEEPTIMER, true, NULL, new CSleepTimerWidget, NULL, CRCInput::RC_green); - mf->setHint(NEUTRINO_ICON_HINT_SLEEPTIMER, LOCALE_MENU_HINT_SLEEPTIMER); - personalize.addItem(MENU_SHUTDOWN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SLEEPTIMER]); - - //reboot - mf = new CMenuForwarder(LOCALE_MAINMENU_REBOOT, true, NULL, this, "reboot", CRCInput::RC_yellow); - mf->setHint(NEUTRINO_ICON_HINT_REBOOT, LOCALE_MENU_HINT_REBOOT); - personalize.addItem(MENU_SHUTDOWN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_REBOOT]); - - //shutdown - if (g_info.hw_caps->can_shutdown) { - mf = new CMenuForwarder(LOCALE_MAINMENU_SHUTDOWN, true, NULL, this, "shutdown", CRCInput::RC_blue); - mf->setHint(NEUTRINO_ICON_HINT_SHUTDOWN, LOCALE_MENU_HINT_SHUTDOWN); - personalize.addItem(MENU_SHUTDOWN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SHUTDOWN]); - } - } #ifdef ENABLE_TESTING personalize.addItem(MENU_MAIN, new CMenuForwarder("Test menu", true, NULL, new CTestMenu()), NULL, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); @@ -325,66 +269,42 @@ void CNeutrinoApp::InitMenuSettings() //*************************************************************************************************** // save CMenuForwarder * mf; - if (!g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_SAVESETTINGSNOW, true, NULL, this, "savesettings", CRCInput::RC_red); - mf->setHint(NEUTRINO_ICON_HINT_SAVE_SETTINGS, LOCALE_MENU_HINT_SAVE_SETTINGS); - personalize.addItem(MENU_SETTINGS, mf, &show, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); - } + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_SAVESETTINGSNOW, true, NULL, this, "savesettings", CRCInput::RC_red); + mf->setHint(NEUTRINO_ICON_HINT_SAVE_SETTINGS, LOCALE_MENU_HINT_SAVE_SETTINGS); + personalize.addItem(MENU_SETTINGS, mf, &show, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); // settings manager - if (g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MANAGE, true, NULL, new CSettingsManager(), NULL, CRCInput::RC_red); - personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_SETTINGS_MANAGER]); - } else { - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MANAGE, true, NULL, new CSettingsManager(), NULL, CRCInput::RC_green); - personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_SETTINGS_MANAGER], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); - } + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MANAGE, true, NULL, new CSettingsManager(), NULL, CRCInput::RC_green); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_SETTINGS_MANAGER], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); mf->setHint(NEUTRINO_ICON_HINT_MANAGE_SETTINGS, LOCALE_MENU_HINT_MANAGE_SETTINGS); // personalize - if (!g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_PERSONALIZE_HEAD, true, NULL, &personalize, NULL, CRCInput::RC_yellow, NULL, NEUTRINO_ICON_LOCK); - mf->setHint(NEUTRINO_ICON_HINT_PERSONALIZE, LOCALE_MENU_HINT_PERSONALIZE); - personalize.addItem(MENU_SETTINGS, mf, &show, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); - } + mf = new CMenuForwarder(LOCALE_PERSONALIZE_HEAD, true, NULL, &personalize, NULL, CRCInput::RC_yellow, NULL, NEUTRINO_ICON_LOCK); + mf->setHint(NEUTRINO_ICON_HINT_PERSONALIZE, LOCALE_MENU_HINT_PERSONALIZE); + personalize.addItem(MENU_SETTINGS, mf, &show, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); // miscSettings - if (!g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MISC, true, NULL, new CMiscMenue() , NULL, CRCInput::RC_blue); - mf->setHint(NEUTRINO_ICON_HINT_EXTENDED, LOCALE_MENU_HINT_EXTENDED); - personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_MISC]); + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MISC, true, NULL, new CMiscMenue() , NULL, CRCInput::RC_blue); + mf->setHint(NEUTRINO_ICON_HINT_EXTENDED, LOCALE_MENU_HINT_EXTENDED); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_MISC]); - //separator - personalize.addSeparator(MENU_SETTINGS); - } + //separator + personalize.addSeparator(MENU_SETTINGS); //1st section*************************************************************************************************** //use only 10 shortcuts (1-9, 0), >9 means -> no shortcut // video. - if (g_settings.easymenu) - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_VIDEO, true, NULL, g_videoSettings, NULL, CRCInput::RC_green); - else - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_VIDEO, true, NULL, g_videoSettings); + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_VIDEO, true, NULL, g_videoSettings); mf->setHint(NEUTRINO_ICON_HINT_VIDEO, LOCALE_MENU_HINT_VIDEO); personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_VIDEO]); // audio - if (g_settings.easymenu) - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_AUDIO, true, NULL, new CAudioSetup(), NULL, CRCInput::RC_yellow); - else - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_AUDIO, true, NULL, new CAudioSetup()); + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_AUDIO, true, NULL, new CAudioSetup()); mf->setHint(NEUTRINO_ICON_HINT_AUDIO, LOCALE_MENU_HINT_AUDIO); personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_AUDIO]); - // channel list - if (g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_MISCSETTINGS_CHANNELLIST, true, NULL, new CMiscMenue(), "channellist", CRCInput::RC_blue); - mf->setHint("", LOCALE_MENU_HINT_MISC_CHANNELLIST); - personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_MISC]); - } - // parental lock mf = new CMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, true, NULL, new CParentalSetup()); mf->setHint(NEUTRINO_ICON_HINT_PROTECTION, LOCALE_MENU_HINT_PROTECTION); @@ -408,11 +328,9 @@ void CNeutrinoApp::InitMenuSettings() personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_OSDLANG]); // osd - if (!g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_OSD, true, NULL, new COsdSetup()); - mf->setHint(NEUTRINO_ICON_HINT_OSD, LOCALE_MENU_HINT_OSD); - personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_OSD]); - } + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_OSD, true, NULL, new COsdSetup()); + mf->setHint(NEUTRINO_ICON_HINT_OSD, LOCALE_MENU_HINT_OSD); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_OSD]); // lcd mf = new CMenuForwarder(LOCALE_MAINSETTINGS_LCD, true, NULL, new CVfdSetup()); @@ -426,29 +344,20 @@ void CNeutrinoApp::InitMenuSettings() personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_DRIVES]); } - // energy - if (g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_MISCSETTINGS_ENERGY, true, NULL, new CMiscMenue(), "energy"); - mf->setHint("", LOCALE_MENU_HINT_MISC_ENERGY); - personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_MISC]); - } + // cisettings + mf = new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler); + mf->setHint(NEUTRINO_ICON_HINT_CI, LOCALE_MENU_HINT_CI); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_CISETTINGS]); - if (!g_settings.easymenu) { - // cisettings - mf = new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler); - mf->setHint(NEUTRINO_ICON_HINT_CI, LOCALE_MENU_HINT_CI); - personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_CISETTINGS]); + // keybindings + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_KEYBINDING, true, NULL, new CKeybindSetup()); + mf->setHint(NEUTRINO_ICON_HINT_KEYS, LOCALE_MENU_HINT_KEYS); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_KEYBINDING]); - // keybindings - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_KEYBINDING, true, NULL, new CKeybindSetup()); - mf->setHint(NEUTRINO_ICON_HINT_KEYS, LOCALE_MENU_HINT_KEYS); - personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_KEYBINDING]); - - // multimedia settings - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MULTIMEDIA, true, NULL, new CMediaPlayerSetup()); - mf->setHint(NEUTRINO_ICON_HINT_A_PIC, LOCALE_MENU_HINT_A_PIC); - personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_MEDIAPLAYER]); - } + // multimedia settings + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MULTIMEDIA, true, NULL, new CMediaPlayerSetup()); + mf->setHint(NEUTRINO_ICON_HINT_A_PIC, LOCALE_MENU_HINT_A_PIC); + personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_MEDIAPLAYER]); } @@ -480,74 +389,55 @@ void CNeutrinoApp::InitMenuService() mf->setHint(NEUTRINO_ICON_HINT_SERVICE_SCAN, LOCALE_MENU_HINT_SERVICE_SCAN); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_SCANTS], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS); - if (!g_settings.easymenu) { - //reload channels - mf = new CMenuForwarder(LOCALE_SERVICEMENU_RELOAD , true, NULL, CScanSetup::getInstance(), "reloadchannels", CRCInput::RC_yellow); - mf->setHint(NEUTRINO_ICON_HINT_RELOAD_CHANNELS, LOCALE_MENU_HINT_RELOAD_CHANNELS); - personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RELOAD_CHANNELS]); - } + //reload channels + mf = new CMenuForwarder(LOCALE_SERVICEMENU_RELOAD , true, NULL, CScanSetup::getInstance(), "reloadchannels", CRCInput::RC_yellow); + mf->setHint(NEUTRINO_ICON_HINT_RELOAD_CHANNELS, LOCALE_MENU_HINT_RELOAD_CHANNELS); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RELOAD_CHANNELS]); //bouquet edit - if (!g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_BOUQUETEDITOR_NAME , true, NULL, new CBEBouquetWidget(), NULL, CRCInput::RC_blue); - - mf->setHint(NEUTRINO_ICON_HINT_BEDIT, LOCALE_MENU_HINT_BEDIT); - personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_BOUQUET_EDIT]); - } + mf = new CMenuForwarder(LOCALE_BOUQUETEDITOR_NAME , true, NULL, new CBEBouquetWidget(), NULL, CRCInput::RC_blue); + mf->setHint(NEUTRINO_ICON_HINT_BEDIT, LOCALE_MENU_HINT_BEDIT); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_BOUQUET_EDIT]); //channel reset CDataResetNotifier *resetNotifier = new CDataResetNotifier(); - if (g_settings.easymenu) - mf = new CMenuForwarder(LOCALE_RESET_CHANNELS , true, NULL, resetNotifier, "channels", CRCInput::RC_yellow); - else - mf = new CMenuForwarder(LOCALE_RESET_CHANNELS , true, NULL, resetNotifier, "channels"); - + mf = new CMenuForwarder(LOCALE_RESET_CHANNELS , true, NULL, resetNotifier, "channels"); mf->setHint(NEUTRINO_ICON_HINT_DELETE_CHANNELS, LOCALE_MENU_HINT_DELETE_CHANNELS); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESET_CHANNELS]); - if (!g_settings.easymenu) { - /* todo: only show if (g_settings.make_removed_list) */ - mf = new CMenuForwarder(LOCALE_RESET_REMOVED, true, NULL, resetNotifier, "delete_removed"); - mf->setHint(NEUTRINO_ICON_HINT_DELETE_CHANNELS, LOCALE_MENU_HINT_DELETE_REMOVED); - personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESET_CHANNELS]); - } + /* todo: only show if (g_settings.make_removed_list) */ + mf = new CMenuForwarder(LOCALE_RESET_REMOVED, true, NULL, resetNotifier, "delete_removed"); + mf->setHint(NEUTRINO_ICON_HINT_DELETE_CHANNELS, LOCALE_MENU_HINT_DELETE_REMOVED); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESET_CHANNELS]); //separator personalize.addSeparator(MENU_SERVICE); - if (!g_settings.easymenu) { - personalize.addSeparator(MENU_SERVICE); + personalize.addSeparator(MENU_SERVICE); - //restart neutrino - mf = new CMenuForwarder(LOCALE_SERVICEMENU_RESTART , true, NULL, this, "restart", CRCInput::RC_standby); - mf->setHint(NEUTRINO_ICON_HINT_SOFT_RESTART, LOCALE_MENU_HINT_SOFT_RESTART); - personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESTART]); + //restart neutrino + mf = new CMenuForwarder(LOCALE_SERVICEMENU_RESTART , true, NULL, this, "restart", CRCInput::RC_standby); + mf->setHint(NEUTRINO_ICON_HINT_SOFT_RESTART, LOCALE_MENU_HINT_SOFT_RESTART); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESTART]); - //reload plugins - mf = new CMenuForwarder(LOCALE_SERVICEMENU_GETPLUGINS, true, NULL, this, "reloadplugins"); - mf->setHint(NEUTRINO_ICON_HINT_RELOAD_CHANNELS, LOCALE_MENU_HINT_RELOAD_PLUGINS); - personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RELOAD_PLUGINS]); + //reload plugins + mf = new CMenuForwarder(LOCALE_SERVICEMENU_GETPLUGINS, true, NULL, this, "reloadplugins"); + mf->setHint(NEUTRINO_ICON_HINT_RELOAD_CHANNELS, LOCALE_MENU_HINT_RELOAD_PLUGINS); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RELOAD_PLUGINS]); - //separator - personalize.addSeparator(MENU_SERVICE); - } + //separator + personalize.addSeparator(MENU_SERVICE); //2nd section*************************************************************************************************** //infomenu - if (!g_settings.easymenu) { - mf = new CMenuForwarder(LOCALE_MESSAGEBOX_INFO, true, NULL, new CInfoMenu(), NULL, CRCInput::RC_info); - mf->setHint(NEUTRINO_ICON_HINT_INFO, LOCALE_MENU_HINT_INFO); - personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_SERVICE_INFOMENU]); - } + mf = new CMenuForwarder(LOCALE_MESSAGEBOX_INFO, true, NULL, new CInfoMenu(), NULL, CRCInput::RC_info); + mf->setHint(NEUTRINO_ICON_HINT_INFO, LOCALE_MENU_HINT_INFO); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_SERVICE_INFOMENU]); //firmware update - if (g_settings.easymenu) - mf = new CMenuForwarder(LOCALE_SERVICEMENU_UPDATE, true, NULL, new CSoftwareUpdate(), NULL, CRCInput::RC_blue); - else - mf = new CMenuForwarder(LOCALE_SERVICEMENU_UPDATE, true, NULL, new CSoftwareUpdate()); - + mf = new CMenuForwarder(LOCALE_SERVICEMENU_UPDATE, true, NULL, new CSoftwareUpdate()); mf->setHint(NEUTRINO_ICON_HINT_SW_UPDATE, LOCALE_MENU_HINT_SW_UPDATE); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_SOFTUPDATE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS); } diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index a1e37f4d9..ba7abdb2f 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -199,7 +199,6 @@ enum MENU_MAIN, MENU_SETTINGS, MENU_SERVICE, - MENU_SHUTDOWN, MENU_MAX }; diff --git a/src/system/locals.h b/src/system/locals.h index 9aee9e30b..02c2b53a6 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -969,7 +969,6 @@ typedef enum LOCALE_MAINMENU_SERVICE, LOCALE_MAINMENU_SETTINGS, LOCALE_MAINMENU_SHUTDOWN, - LOCALE_MAINMENU_SHUTDOWN_MENU, LOCALE_MAINMENU_SLEEPTIMER, LOCALE_MAINMENU_STANDBY, LOCALE_MAINMENU_TOOLS, @@ -1451,7 +1450,6 @@ typedef enum LOCALE_MENU_HINT_SHOW_MUTE_ICON, LOCALE_MENU_HINT_SHUTDOWN, LOCALE_MENU_HINT_SHUTDOWN_COUNT, - LOCALE_MENU_HINT_SHUTDOWN_MENU, LOCALE_MENU_HINT_SHUTDOWN_RCDELAY, LOCALE_MENU_HINT_SHUTDOWN_REAL, LOCALE_MENU_HINT_SLEEPTIMER, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index bdd72cbfd..060d4352b 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -969,7 +969,6 @@ const char * locale_real_names[] = "mainmenu.service", "mainmenu.settings", "mainmenu.shutdown", - "mainmenu.shutdown_menu", "mainmenu.sleeptimer", "mainmenu.standby", "mainmenu.tools", @@ -1451,7 +1450,6 @@ const char * locale_real_names[] = "menu.hint_show_mute_icon", "menu.hint_shutdown", "menu.hint_shutdown_count", - "menu.hint_shutdown_menu", "menu.hint_shutdown_rcdelay", "menu.hint_shutdown_real", "menu.hint_sleeptimer", diff --git a/src/system/settings.h b/src/system/settings.h index 534c7a7a3..ad82d06d0 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -265,7 +265,6 @@ struct SNeutrinoSettings int ci_tuner; std::string ci_pincode; int radiotext_enable; - int easymenu; //screen saver int screensaver_delay; diff --git a/version_pseudo.h b/version_pseudo.h index f72f31607..d32ebccc9 100644 --- a/version_pseudo.h +++ b/version_pseudo.h @@ -1 +1 @@ -#define NEUTRINO_VERSION_PSEUDO "20170209181002" +#define NEUTRINO_VERSION_PSEUDO "20170913110000" From 73b20256415a8899e8d8b700579845cef9f21003 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 13 Sep 2017 13:09:34 +0200 Subject: [PATCH 16/88] remove unused nkplay stuff Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/932a535b6a7cf47d0c53b35f9941545cf49cbe58 Author: vanhofen Date: 2017-09-13 (Wed, 13 Sep 2017) Origin message was: ------------------ - remove unused nkplay stuff ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/icons/hints/hint_nkplay.png | Bin 4072 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 data/icons/hints/hint_nkplay.png diff --git a/data/icons/hints/hint_nkplay.png b/data/icons/hints/hint_nkplay.png deleted file mode 100644 index 4ea007091fcc0d4cc2ff32e4f26a5336c1274b0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4072 zcmai02{@Ep|9*^#8N|#`l${|d%-Cm0gRy1}Ehx<}ld;WUFt!XO%D(g^vXm_pDy2k? z5XoNAipWxGNZCq!kKXU={oeoo`rhw(u5-@yoZo%l=XcKUKG*e}aj>)4EU;Yw0D#R_ zmc;$wh}mc`KCnLsSxEo~=y79PV*t3GCb&x41b)kTTJE<6fCyy(V4nhj@8A@B8UR8- z;>TkEfX@K{amK|4M?)~cN8V>a1lBj+qNegJa0bq>JRA%F>WUkUhgG^a6aWM*t%%0X z-os6~`~19K9&V2r!A%Xj*}wL`=O4E8?OV&!3#3dNv@#@nlZmBVx+V;M9VQ7yN$O@K zq7WIZ-3Sq$Bm^{1MKBb$69tpM4!_w^gb_$DLhs2cu(RL$HuUvEZ54OC@z9$a_sWk< z%yVpF23*cnrS`6@_b%nnhFG(#$;klZD$fx6E1~nIxS$`;-ke50Bu;mFIt$KV@8Z-z zYHWw=3#68Wlpr{UpRh|<`$kj(Pkjt(C<5e;1Bc^NPp~i^|&~lGJO?`9nTq}ZYN!CWn z%Mqc7_t6dpZ$|9hJC@JM9x2MJnBizZ=x1P5O|BNFYW>8nsqWXC7_M^=Nb_O$Kz1+x zsUYb6xKT@;Mpn3Vsi?Kadt)u(ow&^x(d^u+@|Nh8#imTbBu}HCK~qYjL$M>NSTb9S z<9pI@?$I@=n2-75?mCZz>*2*mvNif4)Ei_p*`&zdFr^FODF;nhz}=O`Fism!J6zFq z{N}Czj6~IswinQE4EFC8Syh_r1J1L%-S#|Lyq_m>^wg+o=Wz7HHB+Gi;?B#cs6>`_ zj*tznlJIf7b0@;j?Aw-B%ND|A)rQc76VHoldXCwKRVyz(Dv(T59mIF<<2*NoOvQ4W zVp~p!-_v;ESUBG=f<0kVrfo#n2Hn0dXHg)9%1_x()Nc4h!Y83qwhl*LyjI%=Gmt@5 zN+mKw;;Xq&YZ}B-bQ~Vr_%Fkj_=Jl#y8{>k-?ZbFN!9BTe(%EQ86Pag%(f9;NqQyC zBO2 z?TLcNOiO}z#G$lnMF(`ZJwOEbc$DZ z`@nPCdHxZ_q)nBd92aH#4ux}xKMHIKrz#)BU;j}gX7stw^)73GQAgO}6t!xS)$CUD zbt-1gtoleK&#Y9gWiVGzm%AfFP2qJ;Z5M7|x&Ra0+-=Suv3GT=$M^A(@}bu)k@gg| zp68RJriPGN?3dzK zOpANV9}V&TcF!L=L$IvXX7vjPoMkfGQap{;(m6gY^Wq+>hU+VndKH~0-_PUWOA_BooyPOBNQE zkd|uXU(JGEyv3S5Bl@F;8W*$MYH7ETY8`6zj^5({ds6~u%MTTZJdyds=Cfw`=jZ57 znJwZ97QL7Brx-o&O!s(9`1S^0ZcTjb+FEjW-M<}ryxcr~Tv<#$TQQlPbhhp;COCh< z;=As z-9iEyam4YUv#POD%7qhm>M~?Mndz#pi}}hrCUQzAl1nFC?ticMFj8<3+w`O5XGHFj zBf7#ofdMFF9NWkIs=XbCjH?=%5i0E-uN>R?g)^)_@Z?D`sx~O&*jr?eVeiYA!+Wb(pw=Hr^bn?;lb{>@bi{uByUMNx8YX9h#Dh zaL1NN$fQrLIYS%ODmo$3d&+`+AVt{^b57-;(J6}+9Ibw~U0$N51@vN`w-c12X|ol3 z%Bg_YtdB3n#H&FOXGegRiVDGvOZd>`mab_qZ9>`SB$E$fSvxbGyq$@O!=z;MONkK? zT{`XSjHU+@+LM#I>1E|3PtD_fk`+*j9YR7*W9*_#Wo(>)ut(}~nK2O; zh2=3o>DfQhwaZY2K9ZIF6*o=KEC;T?Jjowd-x_o%FVosL%xLpW;3V?t^jKR_Hez0; z`DOS_bge?%lLQqHlqd0qx^-T~X+0NS{NtkjYuz1NUV!vm$K)69bj{)FY??-|drU(l zQvO5rJCj!L=0#b=&((P@FB18Q#TJVuLg~3VgJU*Rm|go6X==y;Vc?aFgK&M}nXQ+X zoFl`m#PnyeZ$q-JsHue?M$LRPOQ&j$GQHzxN7}X&i=00Nqpb5(ZXY~+otCA3aZkTa zZ>j?}Gqi^gxmgwhPbE)Hz9-o4KvpR?cR#|cl;fQnfS(lF-JrMHUOkalA7IY{FWKJy zqA)S|x@3Rm3UcD)EJ?gKOD*7;PXS`5`+K|Ip!!*r)222bEw^VNX0qk%*rLr7{MnIV z4rcU$8$!#2hh2RSraKkrnC1_*cXfOc!kTAN#c@lhwnYPpd-i3Uh90!AV)$>?8V?+< z9#80SY?|3)nb`5Jt(+jlbAHw{;dSd5^)swzB{LRFkZaGAb||M^$Y}YxMHp@fnZK19 zkpIH9(ED=8nuW?D*MYki?GktC;X;6;5Z8FnOz(W(VZnUu#AeaBmV>zas&j2d^0SK1 zVT#C7F(aaYm1WOSg_-J$emxvl3*KxFS3Wi@_Q(12S?A(UlhYGk7HFDh>(=!gZN7c* z%J-#oG8>5*OQeW+d?F#QN_18deN*}c;4(_bvf0&=?z%qCVJ8O%aL$?etYeA`-4l~O z0=1jp7@`@ntmr0RqqQ?%x79qzDy)2A`6?-gDt_>j=aMY)D-Wu3I~v)HGKoLHcT(Qw zm9>jQdR?F36K(viw3}VHVP$hx_@42xOrB*v##A~1x@HG|@a^f)tEm94Yrv9pgiMkI z5}7%uU=^G(>hG^QAwdtmTu=1;VvP)m%Mr`JjS>AC@#bxThvYI$@>HM=OxTNA)lhtKDV{MphlkybZ6kJtUq8A?P57_5K)a8m5jqVCL*77IO1qlSzDI~U>A zZs_XVl?$P*ca$?Ag?vVWQJO^8(yAXhy}9iEK8%2p7^gl~!)c^Xy#2(kFJf@E(x}U5 z7KfrN?$dinYQgyD);VR-`V}VIpucha4diFb`EcY)49}bCR|aa=Qs=-QZ6&7JA*L6J zNx^#tQNRJv#9+15u$pQZeP^sD9;=Vn)Zc}{;xU-^rdvFJA^6k1Xw>lkOVGk=YW+d5 z;lEr962yM3;EAWwgZxQMfaXs+PSIe}s8n?1-WD*9+=x?HG%DVd?ne)DVvsy309GUq zVg&{zeg_?BEQ;SDBF&!?5KN;709qJ~+3jrJ|BpHRCq@&e&qv;k12L!#9fmiZNe}j> zGw_zQU?x2%91z%YP#TQx+lU4;_fx2NFS=(4xCGOR2#~z!WXi?_%?tl0m4v~0lCfl* z8rf6NOAU*qXsVHQ^r>oIIIN~VRiBE{@gfh1?{5NS@qfzF0)m;O08a`i8xjKQ{Y!=P zcPjk@8nU2@_=d{HdErTZ3~v$;5DE#Iy!HR)<_Xib0XW=nAc&x4*=q%7v z+F0G8GhHBB<~RD#eo8RiFNFE83S+=W1G~{1#1-H93-a)PLl(fbZvQ)L7Kwp3{pD-o zZ*OCC)Udi6-u{)rA67+3>coN^)r~xUbLc_Nbh_W)?6t0?fB8RIwiG4_yh^0MU&~E! ziTt1W+5Wmlf6pnIfN$*nmrud`Y;Ezx|K(GCJ#8Hl4y&t1reLUl_!OtBNm0|+_QL4t ZV{kYv9qr@kh;C38urjkFR+}7)`zH{j;G_Tm From 30105a0b3fa3d3737d02e9775c32429f5a4aa4d1 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 13 Sep 2017 13:09:34 +0200 Subject: [PATCH 17/88] remove unused nkplay stuff Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1fae4130b8dca8ae6fa3c5a6e2ff1ae032f573a0 Author: vanhofen Date: 2017-09-13 (Wed, 13 Sep 2017) Origin message was: ------------------ - remove unused nkplay stuff ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/icons.h | 2 -- src/neutrino.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gui/widget/icons.h b/src/gui/widget/icons.h index 830ceb22b..e9c5903f2 100644 --- a/src/gui/widget/icons.h +++ b/src/gui/widget/icons.h @@ -101,7 +101,6 @@ #define NEUTRINO_ICON_MOUNTED "mounted" #define NEUTRINO_ICON_MULTIMEDIA "multimedia" #define NEUTRINO_ICON_MOVIEPLAYER "icon_movieplayer" -#define NEUTRINO_ICON_NKPLAY "icon_nkplay" #define NEUTRINO_ICON_YTPLAY "icon_ytplay" #define NEUTRINO_ICON_NOT_MOUNTED "not_mounted" #define NEUTRINO_ICON_PAUSE "mp_pause" @@ -295,7 +294,6 @@ #define NEUTRINO_ICON_GREEN_9 "9-green" /* misc */ -#define NEUTRINO_ICON_HINT_NKPLAY "hint_nkplay" #define NEUTRINO_ICON_HINT_YTPLAY "hint_ytplay" #define NEUTRINO_ICON_HINT_SPARK "hint_spark" diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 15023c717..eb4e8db6f 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -4228,7 +4228,7 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey) hintBox.hide(); } - else if(actionKey=="nkplayback" || actionKey=="ytplayback" || actionKey=="tsmoviebrowser" || actionKey=="fileplayback") { + else if(actionKey=="ytplayback" || actionKey=="tsmoviebrowser" || actionKey=="fileplayback") { frameBuffer->Clear(); if(mode == NeutrinoMessages::mode_radio ) frameBuffer->stopFrame(); From f55d2b44a64aa0dd3a2e9288e28db1df43513911 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 13 Sep 2017 14:08:29 +0200 Subject: [PATCH 18/88] fix pick diff error Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a7813a885dbf4ba901b68b48e35a80876a32c633 Author: Jacek Jendrzej Date: 2017-09-13 (Wed, 13 Sep 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/neutrino.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index eb4e8db6f..46d9a58fa 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1053,7 +1053,11 @@ void CNeutrinoApp::upgradeSetup(const char * fname) configfile.deleteKey("screen_width"); configfile.deleteKey("screen_height"); } - + if (g_settings.version_pseudo < "20170913110000") + { + //remove easymenu + configfile.deleteKey("easymenu"); + } g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO; configfile.setString("version_pseudo", g_settings.version_pseudo); @@ -1070,11 +1074,6 @@ void CNeutrinoApp::saveSetup(const char * fname) if(!scansettings.saveSettings(NEUTRINO_SCAN_SETTINGS_FILE)) { dprintf(DEBUG_NORMAL, "error while saving scan-settings!\n"); } - if (g_settings.version_pseudo < "20170913110000") - { - //remove easymenu - configfile.deleteKey("easymenu"); - } //theme/color options CThemes::setTheme(configfile); From fec79fd522b06adc7efa8b7cf1bcad10d7d5fea0 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 13 Sep 2017 15:36:34 +0200 Subject: [PATCH 19/88] rework multimedia-menu code; cleanup from many unused code Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d23323758c302b0f82d471c93e2640296b5cef93 Author: vanhofen Date: 2017-09-13 (Wed, 13 Sep 2017) Origin message was: ------------------ - rework multimedia-menu code; cleanup from many unused code ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 1 - data/locale/english.locale | 1 - src/gui/mediaplayer.cpp | 197 +++++++++++-------------------------- src/gui/mediaplayer.h | 14 +-- src/neutrino.cpp | 11 +-- src/system/locals.h | 1 - src/system/locals_intern.h | 1 - 7 files changed, 61 insertions(+), 165 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 022192b09..cc5bdc0f7 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -408,7 +408,6 @@ eventlistbar.channelswitch Umschalten eventlistbar.eventsort Sortieren eventlistbar.recordevent Aufnehmen extra.add_to_bouquet dem Bouquet zufügen -extra.audio_run_player Audiotaste startet Player extra.auto_delete Automatisch löschen extra.auto_timeshift Autom. Aufnahme, Sek. (0 = deakt.) extra.cache_txt Teletext zwischenspeichern diff --git a/data/locale/english.locale b/data/locale/english.locale index c6c774507..f12f30850 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -408,7 +408,6 @@ eventlistbar.channelswitch schedule eventlistbar.eventsort sorting eventlistbar.recordevent record extra.add_to_bouquet Add to bouquet -extra.audio_run_player Audio key start player extra.auto_delete Auto-delete extra.auto_timeshift Auto-record, sec (0 = disable) extra.cache_txt Cache teletext diff --git a/src/gui/mediaplayer.cpp b/src/gui/mediaplayer.cpp index aec2a061b..893f5dc53 100644 --- a/src/gui/mediaplayer.cpp +++ b/src/gui/mediaplayer.cpp @@ -57,9 +57,6 @@ extern cVideo * videoDecoder; CMediaPlayerMenu::CMediaPlayerMenu() { - setMenuTitel(); - setUsageMode(); - width = 40; audioPlayer = NULL; @@ -85,8 +82,6 @@ CMediaPlayerMenu::~CMediaPlayerMenu() int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey) { - printf("init mediaplayer menu in usage mode %d\n", usage_mode); - if (parent) parent->hide(); @@ -105,7 +100,7 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey) int res = inetPlayer->exec(NULL, "init"); return res; //menu_return::RETURN_REPAINT; } - else if (actionKey == "movieplayer") + else if (actionKey == "moviebrowser") { audiomute->enableMuteIcon(false); CInfoClock::getInstance()->enableInfoClock(false); @@ -125,107 +120,76 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey) return res; } - //show selectable mediaplayer items int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) { CPersonalizeGui *personalize = p; - CMenuWidget *media = m; + CMenuWidget *multimedia_menu = m; - bool show = (personalize == NULL || media == NULL); + bool show = (personalize == NULL || multimedia_menu == NULL); if (personalize == NULL) personalize = new CPersonalizeGui(); - if (media == NULL) - media = new CMenuWidget(menu_title, NEUTRINO_ICON_MULTIMEDIA, width, MN_WIDGET_ID_MEDIA); + if (multimedia_menu == NULL) + multimedia_menu = new CMenuWidget(LOCALE_MAINMENU_MEDIA, NEUTRINO_ICON_MULTIMEDIA, width, MN_WIDGET_ID_MEDIA); - personalize->addWidget(media); - personalize->addIntroItems(media); + personalize->addWidget(multimedia_menu); + personalize->addIntroItems(multimedia_menu); - CMenuForwarder *fw_audio = NULL; - CMenuForwarder *fw_inet = NULL; - CMenuForwarder *fw_mp = NULL; - CMenuForwarder *fw_pviewer = NULL; - CPictureViewerGui *pictureviewergui = NULL; -#if ENABLE_UPNP - static CUpnpBrowserGui *upnpbrowsergui = NULL; - CMenuForwarder *fw_upnp = NULL; -#endif - CMenuWidget *moviePlayer = NULL; - bool enabled = !CMoviePlayerGui::getInstance().Playing(); - if (usage_mode != MODE_VIDEO) - { - //audio player - neutrino_msg_t audio_rc = usage_mode == MODE_AUDIO ? CRCInput::RC_audio : CRCInput::RC_red; - fw_audio = new CMenuForwarder(LOCALE_MAINMENU_AUDIOPLAYER, enabled, NULL, this, "audioplayer", audio_rc); - fw_audio->setHint(NEUTRINO_ICON_HINT_APLAY, LOCALE_MENU_HINT_APLAY); - //internet player - neutrino_msg_t inet_rc = usage_mode == MODE_AUDIO ? CRCInput::RC_www : CRCInput::RC_green; - fw_inet = new CMenuForwarder(LOCALE_INETRADIO_NAME, enabled, NULL, this, "inetplayer", inet_rc); - fw_inet->setHint(NEUTRINO_ICON_HINT_INET_RADIO, LOCALE_MENU_HINT_INET_RADIO); - } + //audio player + CMenuForwarder *fw_audio = new CMenuForwarder(LOCALE_MAINMENU_AUDIOPLAYER, enabled, NULL, this, "audioplayer", CRCInput::RC_red); + fw_audio->setHint(NEUTRINO_ICON_HINT_APLAY, LOCALE_MENU_HINT_APLAY); + personalize->addItem(multimedia_menu, fw_audio, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_AUDIO]); - if (usage_mode == MODE_DEFAULT) - { - //movieplayer - if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { - moviePlayer = new CMenuWidget(LOCALE_MAINMENU_MOVIEPLAYER, NEUTRINO_ICON_MULTIMEDIA, width, MN_WIDGET_ID_MEDIA_MOVIEPLAYER); - personalize->addWidget(moviePlayer); - fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, enabled, NULL, moviePlayer, NULL, CRCInput::RC_yellow); - fw_mp->setHint(NEUTRINO_ICON_HINT_MOVIE, LOCALE_MENU_HINT_MOVIE); - } + //internet player + CMenuForwarder *fw_inet = new CMenuForwarder(LOCALE_INETRADIO_NAME, enabled, NULL, this, "inetplayer", CRCInput::RC_green); + fw_inet->setHint(NEUTRINO_ICON_HINT_INET_RADIO, LOCALE_MENU_HINT_INET_RADIO); + personalize->addItem(multimedia_menu, fw_inet, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_INETPLAY]); + + //init movieplayer submenu + CMenuWidget *movieplayer_menu = new CMenuWidget(LOCALE_MAINMENU_MOVIEPLAYER, NEUTRINO_ICON_MULTIMEDIA, width, MN_WIDGET_ID_MEDIA_MOVIEPLAYER); + personalize->addWidget(movieplayer_menu); + personalize->addIntroItems(movieplayer_menu); + + //moviebrowser + CMenuForwarder *fw_mbrowser = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, true, NULL, this, "moviebrowser", CRCInput::RC_red); + fw_mbrowser->setHint(NEUTRINO_ICON_HINT_MB, LOCALE_MENU_HINT_MB); + personalize->addItem(movieplayer_menu, fw_mbrowser, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_MBROWSER]); + + //fileplayback + CMenuForwarder *fw_fileplay = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, true, NULL, &CMoviePlayerGui::getInstance(), "fileplayback", CRCInput::RC_green); + fw_fileplay->setHint(NEUTRINO_ICON_HINT_FILEPLAY, LOCALE_MENU_HINT_FILEPLAY); + personalize->addItem(movieplayer_menu, fw_fileplay, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_FILEPLAY]); + + //ytplayback + CMenuForwarder *fw_ytplay = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, g_settings.youtube_enabled, NULL, &CMoviePlayerGui::getInstance(), "ytplayback", CRCInput::RC_yellow); + fw_ytplay->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY); + personalize->addItem(movieplayer_menu, fw_ytplay, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_YTPLAY]); + + //add movieplayer submenu + CMenuForwarder *fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, enabled, NULL, movieplayer_menu, NULL, CRCInput::RC_yellow); + fw_mp->setHint(NEUTRINO_ICON_HINT_MOVIE, LOCALE_MENU_HINT_MOVIE); + personalize->addItem(multimedia_menu, fw_mp, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_MPLAYER], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); + + //pictureviewer + CMenuForwarder *fw_pviewer = new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, new CPictureViewerGui(), NULL, CRCInput::RC_blue); + fw_pviewer->setHint(NEUTRINO_ICON_HINT_PICVIEW, LOCALE_MENU_HINT_PICVIEW); + personalize->addItem(multimedia_menu, fw_pviewer, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_PVIEWER]); - //pictureviewer - pictureviewergui = new CPictureViewerGui(); - fw_pviewer = new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, pictureviewergui, NULL, CRCInput::RC_blue); - fw_pviewer->setHint(NEUTRINO_ICON_HINT_PICVIEW, LOCALE_MENU_HINT_PICVIEW); #if ENABLE_UPNP - //upnp browser - if (!upnpbrowsergui) - upnpbrowsergui = new CUpnpBrowserGui(); - fw_upnp = new CMenuForwarder(LOCALE_UPNPBROWSER_HEAD, enabled, NULL, upnpbrowsergui, NULL, CRCInput::RC_0); - fw_upnp->setHint(NEUTRINO_ICON_HINT_A_PIC, LOCALE_MENU_HINT_UPNP); + //upnp browser + static CUpnpBrowserGui *upnpbrowsergui = NULL; + if (!upnpbrowsergui) + upnpbrowsergui = new CUpnpBrowserGui(); + + CMenuForwarder *fw_upnp = new CMenuForwarder(LOCALE_UPNPBROWSER_HEAD, enabled, NULL, upnpbrowsergui, NULL, CRCInput::RC_0); + fw_upnp->setHint(NEUTRINO_ICON_HINT_A_PIC, LOCALE_MENU_HINT_UPNP); + personalize->addItem(multimedia_menu, fw_upnp, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_UPNP]); #endif -// media->addIntroItems(NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, usage_mode == MODE_AUDIO ? CMenuWidget::BTN_TYPE_CANCEL : CMenuWidget::BTN_TYPE_BACK); - } - if (usage_mode == MODE_AUDIO) - { - //audio player - personalize->addItem(media, fw_audio, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_AUDIO]); - - //internet player - personalize->addItem(media, fw_inet, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_INETPLAY]); - } - else if (usage_mode == MODE_VIDEO) - { - showMoviePlayer(media, personalize); - } - else - { - //audio player - personalize->addItem(media, fw_audio, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_AUDIO]); - - //internet player - personalize->addItem(media, fw_inet, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_INETPLAY]); - - //movieplayer - if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { - showMoviePlayer(moviePlayer, personalize); - personalize->addItem(media, fw_mp, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_MPLAYER], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); - } - - //picture viewer - personalize->addItem(media, fw_pviewer, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_PVIEWER]); -#if ENABLE_UPNP - //upnp browser - personalize->addItem(media, fw_upnp, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_UPNP]); -#endif - } - int res = menu_return::RETURN_NONE; if (show) @@ -234,57 +198,14 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) personalize->addPersonalizedItems(); //add I_TYPE_MULTIMEDIA plugins - unsigned int nextShortcut = (unsigned int)media->getNextShortcut(); - media->integratePlugins(CPlugins::I_TYPE_MULTIMEDIA, nextShortcut, enabled); + unsigned int nextShortcut = (unsigned int)multimedia_menu->getNextShortcut(); + multimedia_menu->integratePlugins(CPlugins::I_TYPE_MULTIMEDIA, nextShortcut, enabled); - res = media->exec(NULL, ""); - delete media; - delete moviePlayer; + res = multimedia_menu->exec(NULL, ""); + + delete movieplayer_menu; + delete multimedia_menu; delete personalize; - delete pictureviewergui; -#if ENABLE_UPNP - //delete upnpbrowsergui; -#endif - - setUsageMode();//set default usage_mode } return res; } - -//show movieplayer submenu with selectable items for moviebrowser or filebrowser -void CMediaPlayerMenu::showMoviePlayer(CMenuWidget *moviePlayer, CPersonalizeGui *p) -{ - CMenuForwarder *fw_mbrowser = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, true, NULL, this, "movieplayer", CRCInput::RC_red); - fw_mbrowser->setHint(NEUTRINO_ICON_HINT_MB, LOCALE_MENU_HINT_MB); - CMenuForwarder *fw_file = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, true, NULL, &CMoviePlayerGui::getInstance(), "fileplayback", CRCInput::RC_green); - fw_file->setHint(NEUTRINO_ICON_HINT_FILEPLAY, LOCALE_MENU_HINT_FILEPLAY); - - p->addIntroItems(moviePlayer); - - //moviebrowser - p->addItem(moviePlayer, fw_mbrowser, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_MBROWSER]); - - //fileplayback - p->addItem(moviePlayer, fw_file, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_FILEPLAY]); - - //ytplayback - CMenuForwarder *fw_yt = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, g_settings.youtube_enabled, NULL, &CMoviePlayerGui::getInstance(), "ytplayback", CRCInput::RC_yellow); - fw_yt->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY); - p->addItem(moviePlayer, fw_yt, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_YTPLAY]); - -// #if 0 -// //moviePlayer->addItem(new CMenuForwarder(LOCALE_MOVIEPLAYER_PESPLAYBACK, true, NULL, moviePlayerGui, "pesplayback")); -// //moviePlayer->addItem(new CMenuForwarder(LOCALE_MOVIEPLAYER_TSPLAYBACK_PC, true, NULL, moviePlayerGui, "tsplayback_pc")); -// moviePlayer->addItem(new CLockedMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, g_settings.parentallock_pincode, false, true, NULL, moviePlayerGui, "tsmoviebrowser")); -// moviePlayer->addItem(new CLockedMenuForwarder(LOCALE_MOVIEPLAYER_TSPLAYBACK, g_settings.parentallock_pincode, false, true, NULL, moviePlayerGui, "tsplayback", CRCInput::RC_green)); -// -// moviePlayer->addItem(new CLockedMenuForwarder(LOCALE_MOVIEPLAYER_BOOKMARK, g_settings.parentallock_pincode, false, true, NULL, moviePlayerGui, "bookmarkplayback")); -// moviePlayer->addItem(GenericMenuSeparator); -// moviePlayer->addItem(new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, true, NULL, moviePlayerGui, "fileplayback", CRCInput::RC_red)); -// moviePlayer->addItem(new CMenuForwarder(LOCALE_MOVIEPLAYER_DVDPLAYBACK, true, NULL, moviePlayerGui, "dvdplayback", CRCInput::RC_yellow)); -// moviePlayer->addItem(new CMenuForwarder(LOCALE_MOVIEPLAYER_VCDPLAYBACK, true, NULL, moviePlayerGui, "vcdplayback", CRCInput::RC_blue)); -// moviePlayer->addItem(GenericMenuSeparatorLine); -// moviePlayer->addItem(new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, &streamingSettings, NULL, CRCInput::RC_help)); -// moviePlayer->addItem(new CMenuForwarder(LOCALE_NFSMENU_HEAD, true, NULL, new CNFSSmallMenu(), NULL, CRCInput::RC_setup)); -// #endif -} diff --git a/src/gui/mediaplayer.h b/src/gui/mediaplayer.h index e2b6710d7..1da9612e8 100644 --- a/src/gui/mediaplayer.h +++ b/src/gui/mediaplayer.h @@ -38,22 +38,12 @@ class CMediaPlayerMenu : public CMenuTarget { private: - int width, usage_mode; - neutrino_locale_t menu_title; + int width; CAudioPlayerGui *audioPlayer; CAudioPlayerGui *inetPlayer; - - void showMoviePlayer(CMenuWidget *menu_movieplayer, CPersonalizeGui *p); public: - enum MM_MENU_MODES - { - MODE_DEFAULT, - MODE_AUDIO, - MODE_VIDEO - }; - CMediaPlayerMenu(); ~CMediaPlayerMenu(); static CMediaPlayerMenu* getInstance(); @@ -61,8 +51,6 @@ class CMediaPlayerMenu : public CMenuTarget int initMenuMedia(CMenuWidget *m = NULL, CPersonalizeGui *p = NULL); int exec(CMenuTarget* parent, const std::string & actionKey); - void setMenuTitel(const neutrino_locale_t title = LOCALE_MAINMENU_MEDIA){menu_title = title;}; - void setUsageMode(const int& mm_mode = MODE_DEFAULT){usage_mode = mm_mode;}; CAudioPlayerGui *getPlayerInstance() { if (audioPlayer != NULL) return audioPlayer; else if (inetPlayer != NULL) return inetPlayer; else return NULL; } }; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 46d9a58fa..55b296ad5 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2733,19 +2733,10 @@ void CNeutrinoApp::RealRun() as.exec(NULL, "-1"); StartSubtitles(); } -#if 0 - else if( (msg == CRCInput::RC_audio) && g_settings.audio_run_player) { - //open mediaplayer menu in audio mode, user can select between audioplayer and internetradio - CMediaPlayerMenu * media = CMediaPlayerMenu::getInstance(); - media->setMenuTitel(LOCALE_MAINMENU_AUDIOPLAYER); - media->setUsageMode(CMediaPlayerMenu::MODE_AUDIO); - media->exec(NULL, ""); - } -#endif else if( msg == CRCInput::RC_video || msg == CRCInput::RC_play ) { //open moviebrowser via media player menu object if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) - CMediaPlayerMenu::getInstance()->exec(NULL,"movieplayer"); + CMediaPlayerMenu::getInstance()->exec(NULL, "moviebrowser"); } else if( ( msg == CRCInput::RC_help ) || ( msg == CRCInput::RC_info) || ( msg == NeutrinoMessages::SHOW_INFOBAR ) ) diff --git a/src/system/locals.h b/src/system/locals.h index 02c2b53a6..fd8ad67c3 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -435,7 +435,6 @@ typedef enum LOCALE_EVENTLISTBAR_EVENTSORT, LOCALE_EVENTLISTBAR_RECORDEVENT, LOCALE_EXTRA_ADD_TO_BOUQUET, - LOCALE_EXTRA_AUDIO_RUN_PLAYER, LOCALE_EXTRA_AUTO_DELETE, LOCALE_EXTRA_AUTO_TIMESHIFT, LOCALE_EXTRA_CACHE_TXT, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 060d4352b..a9e8544d2 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -435,7 +435,6 @@ const char * locale_real_names[] = "eventlistbar.eventsort", "eventlistbar.recordevent", "extra.add_to_bouquet", - "extra.audio_run_player", "extra.auto_delete", "extra.auto_timeshift", "extra.cache_txt", From ada6a1280a114c1cb114c0865d8a1663f20d6811 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 13 Sep 2017 16:35:52 +0200 Subject: [PATCH 20/88] parentallock_setup: fix compiler warning; remove easymenu leftover Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/26e8712f902592f96aae9cbc1fe889e9e9085a20 Author: vanhofen Date: 2017-09-13 (Wed, 13 Sep 2017) Origin message was: ------------------ - parentallock_setup: fix compiler warning; remove easymenu leftover ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/parentallock_setup.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/parentallock_setup.cpp b/src/gui/parentallock_setup.cpp index 1c77e3800..1fb1f4dc4 100644 --- a/src/gui/parentallock_setup.cpp +++ b/src/gui/parentallock_setup.cpp @@ -109,7 +109,6 @@ int CParentalSetup::showParentalSetup() plock->addIntroItems(); CMenuForwarder * mf; - CPersonalizeGui &p = CNeutrinoApp::getInstance()->getPersonalizeGui(); CMenuOptionChooser * mc; mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_PROMPT , &g_settings.parentallock_prompt , PARENTALLOCK_PROMPT_OPTIONS, PARENTALLOCK_PROMPT_OPTION_COUNT , !parentallocked); From aecad369c16f4f8b1b18307d375e3fe7e6298286 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 14 Sep 2017 11:17:36 +0200 Subject: [PATCH 21/88] src/driver/screenshot.cpp avoid memory ranges overlap Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d30bd0ea268eb0effa680c20afb392d6576f9420 Author: Jacek Jendrzej Date: 2017-09-14 (Thu, 14 Sep 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/screenshot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver/screenshot.cpp b/src/driver/screenshot.cpp index 1ad99fe01..28366adc2 100644 --- a/src/driver/screenshot.cpp +++ b/src/driver/screenshot.cpp @@ -393,7 +393,7 @@ bool CScreenShot::SaveJpg() int xres2 = xres1+2; for (int x = 0; x < xres; x++) { int x2 = x*3; - memcpy(pixel_data + x2 + xres1, pixel_data + x*4 + y*xres*4, 3); + memmove(pixel_data + x2 + xres1, pixel_data + x*4 + y*xres*4, 3); SWAP(pixel_data[x2 + xres1], pixel_data[x2 + xres2]); } } From d232a0d8dfeba0e493cb6015a9217bc5d8de58fe Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 14 Sep 2017 12:09:40 +0200 Subject: [PATCH 22/88] try to fix tm thread Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/513850f9157613f867d472508dc5d117f39b043e Author: Jacek Jendrzej Date: 2017-09-14 (Thu, 14 Sep 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_timer.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/components/cc_timer.cpp b/src/gui/components/cc_timer.cpp index 5f32adf2d..a54c9bfc1 100644 --- a/src/gui/components/cc_timer.cpp +++ b/src/gui/components/cc_timer.cpp @@ -43,11 +43,11 @@ CComponentsTimer::CComponentsTimer(const int& interval, bool is_nano) tm_thread = 0; tm_interval = interval; tm_enable_nano = is_nano; - + tm_enable = false; sl_stop_timer = sigc::mem_fun(*this, &CComponentsTimer::stopTimer); if (interval > 0) - startTimer(); + tm_enable = startTimer(); } CComponentsTimer::~CComponentsTimer() @@ -132,12 +132,11 @@ void CComponentsTimer::stopThread() bool CComponentsTimer::startTimer() { - tm_enable = true; initThread(); if(tm_thread) - return true; + tm_enable = true; - return false; + return tm_enable; } bool CComponentsTimer::stopTimer() From d97a3de34d6da20d747279eae8e05c32594e2e4d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 11 Aug 2016 13:52:49 +0200 Subject: [PATCH 23/88] helpers.chh/h: add some helper functions Partial cherry pick from: https://bitbucket.org/neutrino-images/ni-neutrino-hd Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/43c7e0ed0992c0fd0d6a473312ed5533f2e641af Author: vanhofen Date: 2016-08-11 (Thu, 11 Aug 2016) ------------------ This commit was generated by Migit --- src/system/helpers.cpp | 108 +++++++++++++++++++++++++++++++++++++++++ src/system/helpers.h | 5 ++ 2 files changed, 113 insertions(+) diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index 59d64524a..17afa8c1a 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -50,6 +50,8 @@ //#include #include #include +#include +#define MD5_DIGEST_LENGTH 16 using namespace std; int mySleep(int sec) { @@ -1273,6 +1275,112 @@ std::string Lang2ISO639_1(std::string& lang) return ret; } +// returns the pid of the first process found in /proc +int getpidof(const char *process) +{ + DIR *dp; + struct dirent *entry; + struct stat statbuf; + + if ((dp = opendir("/proc")) == NULL) + { + fprintf(stderr, "Cannot open directory /proc\n"); + return -1; + } + + while ((entry = readdir(dp)) != NULL) + { + // get information about the file/folder + lstat(entry->d_name, &statbuf); + // files under /proc which start with a digit are processes + if (S_ISDIR(statbuf.st_mode) && isdigit(entry->d_name[0])) + { + // 14 chars for /proc//status + 0 + char procpath[14 + strlen(entry->d_name)]; + char procname[50]; + FILE *file; + + sprintf(procpath, "/proc/%s/status", entry->d_name); + + if (! (file = fopen(procpath, "r")) ) { + continue; + } + + fscanf(file,"%*s %s", procname); + fclose(file); + + // only 15 char available + if (strncmp(procname, process, 15) == 0) { + return atoi(entry->d_name); + } + } + } + closedir (dp); + return 0; +} + +std::string filehash(const char *file) +{ +#if 0 + int fd; + int i; + unsigned long size; + struct stat s_stat; + unsigned char hash[MD5_DIGEST_LENGTH]; + void *buff; + std::ostringstream os; + + memset(hash, 0, MD5_DIGEST_LENGTH); + + fd = open(file, O_RDONLY | O_NONBLOCK); + if (fd > 0) + { + // Get the size of the file by its file descriptor + fstat(fd, &s_stat); + size = s_stat.st_size; + + buff = mmap(0, size, PROT_READ, MAP_SHARED, fd, 0); + MD5((const unsigned char *)buff, size, hash); + munmap(buff, size); + + // Print the MD5 sum as hex-digits. + for(i = 0; i < MD5_DIGEST_LENGTH; ++i) { + os.width(2); + os.fill('0'); + os << std::hex << static_cast(hash[i]); + } + close(fd); + } + return os.str(); +#endif + int i; + unsigned char hash[MD5_DIGEST_LENGTH]; + std::ostringstream os; + + md5_file(file, 1, (unsigned char*) hash); + // Print the MD5 sum as hex-digits. + for(i = 0; i < MD5_DIGEST_LENGTH; ++i) { + os.width(2); + os.fill('0'); + os << std::hex << static_cast(hash[i]); + } + return os.str(); +} + +std::string get_path(const char *path) +{ + if(path[0] == '/' && strstr(path,"/var") == 0) + { + std::string varc = "/var"; + varc += path; + + if(file_exists(varc.c_str())) + return varc; + } + + return path; +} + string readLink(string lnk) { char buf[PATH_MAX]; diff --git a/src/system/helpers.h b/src/system/helpers.h index 48ac50a06..57fe0216d 100644 --- a/src/system/helpers.h +++ b/src/system/helpers.h @@ -146,4 +146,9 @@ std::string getJFFS2MountPoint(int mtdPos); std::string Lang2ISO639_1(std::string& lang); std::string readLink(std::string lnk); +int getpidof(const char *process); +std::string filehash(const char * file); +std::string get_path(const char * path); +inline bool file_exists(const std::string file) { return file_exists(file.c_str()); } + #endif From 0a58d1e685623493606f6a75f7327fd4c20e5da6 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 29 Aug 2017 14:38:26 +0200 Subject: [PATCH 24/88] locale: small changes in update locales Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9112e85cd3c848fa541fd2f2abc7a64225c6962f Author: vanhofen Date: 2017-08-29 (Tue, 29 Aug 2017) Origin message was: ------------------ - locale: small changes in update locales Signed-off-by: Thilo Graf ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 4 ++-- data/locale/english.locale | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index cc5bdc0f7..2ade89a25 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -605,7 +605,7 @@ flashupdate.apply_settings Sollen die aktuellen Einstellungen in das neue Image flashupdate.autocheck Beim Start nach Updates suchen flashupdate.cantopenfile kann Datei nicht öffnen flashupdate.cantopenmtd kann MTD nicht öffnen -flashupdate.checkupdate_internet Online nach Updates suchen +flashupdate.checkupdate_internet Online-Update flashupdate.checkupdate_local Lokales Update flashupdate.copy_image Kopiere Image in den Arbeitsspeicher flashupdate.createimage Image speichern @@ -657,7 +657,7 @@ flashupdate.namemode2_default +.img flashupdate.namemode2_hostname_time ++.img flashupdate.new_found Updates verfügbar! flashupdate.new_notfound Keine Updates verfügbar! -flashupdate.noversion Bei Updates werden Versionsüberprüfungen derzeit nur über Web-Updates unterstützt.\nWollen Sie das ausgewählte Image wirklich installieren? +flashupdate.noversion Eine Versionsüberprüfungen ist nur über das Online-Update möglich.\nWollen Sie das ausgewählte Image trotzdem installieren? flashupdate.programmingflash programmiere Flash flashupdate.proxypassword Passwort flashupdate.proxypassword_hint1 Geben sie das Proxy-Passwort ein diff --git a/data/locale/english.locale b/data/locale/english.locale index f12f30850..cb31cda9c 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -605,7 +605,7 @@ flashupdate.apply_settings Import current settings into new image? flashupdate.autocheck Auto-check updates on boot flashupdate.cantopenfile can't open file flashupdate.cantopenmtd can't open MTD -flashupdate.checkupdate_internet Check for online updates +flashupdate.checkupdate_internet Online update flashupdate.checkupdate_local Local update flashupdate.copy_image Copy Image to main memory flashupdate.createimage Save image @@ -657,7 +657,7 @@ flashupdate.namemode2_default +