From 96fe3a385615d9237336bc502976239a633d83d6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 13 Mar 2017 09:45:38 +0100 Subject: [PATCH 01/21] CComponentsFooter: add bg_image to button_label_cc type Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e2ca965ee9e8390413466398db2d69a0c88ec9ca Author: Thilo Graf Date: 2017-03-13 (Mon, 13 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_footer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index 5add6ffae..b2c7a9768 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -39,6 +39,7 @@ typedef struct button_label_cc neutrino_msg_t directKeyAlt; int btn_result; int btn_alias; + std::string bg_image; button_label_cc(): text(std::string()), locale(NONEXISTANT_LOCALE){} } button_label_cc_struct; From fc7164a1820928694938be95d80b3c09da17ee86 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 13 Mar 2017 09:45:38 +0100 Subject: [PATCH 02/21] cc_types: move struct button_label_cc into cc_types.h Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e777ecdfdb269d2420daccf60c03b922533112e3 Author: Thilo Graf Date: 2017-03-13 (Mon, 13 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_footer.h | 13 ------------- src/gui/components/cc_types.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index b2c7a9768..3cc572605 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -29,19 +29,6 @@ #include #include //for compatibility with 'button_label' type -//for 'button_label' type with string -typedef struct button_label_cc -{ - const char * button; - std::string text; - neutrino_locale_t locale; - neutrino_msg_t directKey; - neutrino_msg_t directKeyAlt; - int btn_result; - int btn_alias; - std::string bg_image; - button_label_cc(): text(std::string()), locale(NONEXISTANT_LOCALE){} -} button_label_cc_struct; /*! CComponentsFooter, sub class of CComponentsHeader provides prepared container for footer diff --git a/src/gui/components/cc_types.h b/src/gui/components/cc_types.h index c76520bb8..a55c0f866 100644 --- a/src/gui/components/cc_types.h +++ b/src/gui/components/cc_types.h @@ -175,6 +175,21 @@ typedef struct cc_string_ext_txt_t Font* font; } cc_string_ext_txt_struct_t; + +//for 'button_label' type with string +typedef struct button_label_cc +{ + const char * button; + std::string text; + neutrino_locale_t locale; + neutrino_msg_t directKey; + neutrino_msg_t directKeyAlt; + int btn_result; + int btn_alias; + std::string bg_image; + button_label_cc(): text(std::string()), locale(NONEXISTANT_LOCALE){} +} button_label_cc_struct; + #define CC_WIDTH_MIN 16 #define CC_HEIGHT_MIN 16 From 22f84b5bd877e2bad37b252f9acb46fc9b225ffb Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 13 Mar 2017 09:45:38 +0100 Subject: [PATCH 03/21] cc_types.h: expand button_label_cc with hint as descrpition for button Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3fa097ebb959e3e7cceaf94ec93be6c95d272630 Author: Thilo Graf Date: 2017-03-13 (Mon, 13 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/components/cc_types.h b/src/gui/components/cc_types.h index a55c0f866..5f56ee181 100644 --- a/src/gui/components/cc_types.h +++ b/src/gui/components/cc_types.h @@ -187,7 +187,8 @@ typedef struct button_label_cc int btn_result; int btn_alias; std::string bg_image; - button_label_cc(): text(std::string()), locale(NONEXISTANT_LOCALE){} + std::string hint; + button_label_cc(): button(NULL), text(std::string()), locale(NONEXISTANT_LOCALE){} } button_label_cc_struct; #define CC_WIDTH_MIN 16 From b5aa38dc56462596bce958d1c45f841d031899d8 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 13 Mar 2017 09:20:31 +0100 Subject: [PATCH 04/21] CMenuWidget::calcSize: Recalculation of min_width ... ... for adjustment to the osd resolution Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/30db40da1afebe1c3a4f5748d864bb1a043b2946 Author: Michael Liebmann Date: 2017-03-13 (Mon, 13 Mar 2017) ------------------ This commit was generated by Migit --- src/gui/widget/menue.cpp | 8 ++++++++ src/gui/widget/menue.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 3ccd2905c..9511e5239 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -600,6 +600,7 @@ void CMenuWidget::Init(const std::string &NameString, const std::string &Icon, c selected = (widget_index == NO_WIDGET_ID ? preselected : mglobal->v_selected[widget_index]); //dimension + mwidth_save = mwidth; min_width = 0; width = 0; /* is set in paint() */ if (mwidth > 100){ @@ -1096,6 +1097,13 @@ void CMenuWidget::checkHints() void CMenuWidget::calcSize() { + // recalc min_width + min_width = 0; + int mwidth = std::min(mwidth_save, 100); + min_width = frameBuffer->getScreenWidth(true) * mwidth / 100; + if (min_width > (int)frameBuffer->getScreenWidth()) + min_width = frameBuffer->getScreenWidth(); + width = min_width; int wi, hi; diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index bf784e3cb..6a174ea18 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -513,6 +513,7 @@ class CMenuWidget : public CMenuTarget, public CComponentsSignals std::string iconfile; int min_width; + int mwidth_save; int width; int height; int hheight; // header From 671568a19ea189b9e68de516423f3e85a07c4bd0 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 13 Mar 2017 09:20:36 +0100 Subject: [PATCH 05/21] CMenuWidget::calcSize: Use scale2Res() to adjust fixed sizes Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2ed30486c47a6d13e852372347cd55d7734c3967 Author: Michael Liebmann Date: 2017-03-13 (Mon, 13 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/menue.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 9511e5239..77ace6045 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1112,35 +1112,35 @@ void CMenuWidget::calcSize() if (items[i]->iconName_Info_right) { frameBuffer->getIconSize(items[i]->iconName_Info_right, &wi, &hi); if ((wi > 0) && (hi > 0)) - wi += 10; + wi += OFFSET_INNER_MID; else wi = 0; } - int tmpw = items[i]->getWidth() + 10 + 10 + wi; /* 10 pixels to the left and right of the text */ + int tmpw = items[i]->getWidth() + 2*OFFSET_INNER_MID; /* 10 pixels to the left and right of the text */ if (tmpw > width) width = tmpw; } hint_height = 0; if(g_settings.show_menu_hints && has_hints) { - hint_height = 60; //TODO: rework calculation of hint_height + hint_height = frameBuffer->scale2Res(60); //TODO: rework calculation of hint_height int fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT]->getHeight(); - int h_tmp = 16 + 2*fheight; + int h_tmp = OFFSET_INNER_LARGE + 2*fheight; /* assuming all hint icons has the same size ! */ int iw, ih; frameBuffer->getIconSize(NEUTRINO_ICON_HINT_TVMODE, &iw, &ih); - h_tmp = std::max(h_tmp, ih+10); + h_tmp = std::max(h_tmp, ih+OFFSET_INNER_MID); hint_height = std::max(h_tmp, hint_height); } /* set the max height to 9/10 of usable screen height debatable, if the callers need a possibility to set this */ height = (frameBuffer->getScreenHeight() - fbutton_height - hint_height) / 20 * 18; /* make sure its a multiple of 2 */ - if(height > ((int)frameBuffer->getScreenHeight() - 10)) - height = frameBuffer->getScreenHeight() - 10; + if(height > ((int)frameBuffer->getScreenHeight() - OFFSET_INNER_MID)) + height = frameBuffer->getScreenHeight() - OFFSET_INNER_MID; int neededWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(getName()); - if (neededWidth > width-48) { - width= neededWidth+ 49; + if (neededWidth > width - frameBuffer->scale2Res(48)) { + width = neededWidth + frameBuffer->scale2Res(48)+1; } hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); @@ -1174,7 +1174,7 @@ void CMenuWidget::calcSize() iconOffset = w; } - iconOffset += 10; + iconOffset += OFFSET_INNER_MID; width += iconOffset; if (fbutton_count) From 94ddefdfd09744ea068ba68f5969edef3060bbe9 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 13 Mar 2017 10:33:32 +0100 Subject: [PATCH 06/21] CMenuWidget::calcSize: Add forgotten 'wi' Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d0b02a9752ce56787c076d51db26d90f7a27c30e Author: Michael Liebmann Date: 2017-03-13 (Mon, 13 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/menue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 77ace6045..473c29c40 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1116,7 +1116,7 @@ void CMenuWidget::calcSize() else wi = 0; } - int tmpw = items[i]->getWidth() + 2*OFFSET_INNER_MID; /* 10 pixels to the left and right of the text */ + int tmpw = items[i]->getWidth() + 2*OFFSET_INNER_MID + wi; /* 10 pixels to the left and right of the text */ if (tmpw > width) width = tmpw; } From 51c85e1c58d419b9d1d478d51e0c89bbbcee9c91 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 13 Mar 2017 12:40:04 +0100 Subject: [PATCH 07/21] unify DetailsLine-names; move define to settings.h Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5b0faeab8c19af921829f8166eaf38df686aba88 Author: vanhofen Date: 2017-03-13 (Mon, 13 Mar 2017) Origin message was: ------------------ - unify DetailsLine-names; move define to settings.h ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/fb_generic.cpp | 4 ++-- src/driver/fb_generic.h | 1 - src/driver/framebuffer.cpp | 4 ++-- src/driver/framebuffer.h | 1 - src/gui/audioplayer.cpp | 12 ++++++------ src/gui/audioplayer.h | 2 +- src/gui/bedit/bouqueteditor_channels.cpp | 8 ++++---- src/gui/bedit/bouqueteditor_channels.h | 2 +- src/gui/bedit/bouqueteditor_chanselect.cpp | 8 ++++---- src/gui/bedit/bouqueteditor_chanselect.h | 2 +- src/gui/channellist.cpp | 10 +++++----- src/gui/channellist.h | 2 +- src/gui/components/cc_detailsline.cpp | 16 ++++++++-------- src/gui/components/cc_detailsline.h | 6 +++--- src/gui/moviebrowser/mb.cpp | 4 ++-- src/gui/moviebrowser/mb.h | 2 +- src/gui/upnpbrowser.cpp | 8 ++++---- src/gui/upnpbrowser.h | 2 +- src/gui/widget/menue.cpp | 22 +++++++++++----------- src/gui/widget/menue.h | 2 +- src/system/settings.h | 2 ++ 21 files changed, 60 insertions(+), 60 deletions(-) diff --git a/src/driver/fb_generic.cpp b/src/driver/fb_generic.cpp index 37b66ca00..6d470ade6 100644 --- a/src/driver/fb_generic.cpp +++ b/src/driver/fb_generic.cpp @@ -275,8 +275,8 @@ unsigned int CFrameBuffer::getScreenHeight(bool real) unsigned int CFrameBuffer::getScreenWidthRel(bool force_small) { int percent = force_small ? WINDOW_SIZE_MIN_FORCED : g_settings.window_width; - // always reduce a possible detailline - return (g_settings.screen_EndX - g_settings.screen_StartX - 2*ConnectLineBox_Width) * percent / 100; + // always reduce a possible detailsline + return (g_settings.screen_EndX - g_settings.screen_StartX - 2*DETAILSLINE_WIDTH) * percent / 100; } unsigned int CFrameBuffer::getScreenHeightRel(bool force_small) diff --git a/src/driver/fb_generic.h b/src/driver/fb_generic.h index 44bd4f764..26752987c 100644 --- a/src/driver/fb_generic.h +++ b/src/driver/fb_generic.h @@ -67,7 +67,6 @@ typedef struct gradientData_t #define WINDOW_SIZE_MAX 100 // % #define WINDOW_SIZE_MIN 50 // % #define WINDOW_SIZE_MIN_FORCED 80 // % -#define ConnectLineBox_Width 16 // px /** Ausfuehrung als Singleton */ class CFrameBuffer : public sigc::trackable diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index 20ff5a506..f3139410b 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -457,8 +457,8 @@ unsigned int CFrameBuffer::getScreenHeight(bool real) unsigned int CFrameBuffer::getScreenWidthRel(bool force_small) { int percent = force_small ? WINDOW_SIZE_MIN_FORCED : g_settings.window_width; - // always reduce a possible detailline - return (g_settings.screen_EndX - g_settings.screen_StartX - 2*ConnectLineBox_Width) * percent / 100; + // always reduce a possible detailsline + return (g_settings.screen_EndX - g_settings.screen_StartX - 2*DETAILSLINE_WIDTH) * percent / 100; } unsigned int CFrameBuffer::getScreenHeightRel(bool force_small) diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h index 87d6375f0..74977914d 100644 --- a/src/driver/framebuffer.h +++ b/src/driver/framebuffer.h @@ -70,7 +70,6 @@ typedef struct gradientData_t #define WINDOW_SIZE_MAX 100 // % #define WINDOW_SIZE_MIN 50 // % #define WINDOW_SIZE_MIN_FORCED 80 // % -#define ConnectLineBox_Width 16 // px /** Ausfuehrung als Singleton */ class CFrameBuffer : public sigc::trackable diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 46ab4b8b9..673c8103c 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -270,8 +270,8 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey) m_height = m_theight + m_info_height + m_title_height + 2*m_buttonHeight + m_listmaxshow * m_fheight; // recalc height m_x = getScreenStartX( m_width ); - if (m_x < ConnectLineBox_Width) - m_x = ConnectLineBox_Width; + if (m_x < DETAILSLINE_WIDTH) + m_x = DETAILSLINE_WIDTH; m_y = getScreenStartY( m_height ); m_idletime=time(NULL); @@ -1467,8 +1467,8 @@ void CAudioPlayerGui::hide() // printf("hide(){\n"); if (m_visible) { - m_frameBuffer->paintBackgroundBoxRel(m_x - ConnectLineBox_Width, m_y + m_title_height, - m_width + ConnectLineBox_Width, m_height - m_title_height); + m_frameBuffer->paintBackgroundBoxRel(m_x - DETAILSLINE_WIDTH, m_y + m_title_height, + m_width + DETAILSLINE_WIDTH, m_height - m_title_height); clearItemID3DetailsLine(); m_frameBuffer->paintBackgroundBoxRel(m_x, m_y, m_width, m_title_height); m_visible = false; @@ -1788,7 +1788,7 @@ void CAudioPlayerGui::clearItemID3DetailsLine () void CAudioPlayerGui::paintItemID3DetailsLine (int pos) { - int xpos = m_x - ConnectLineBox_Width; + int xpos = m_x - DETAILSLINE_WIDTH; int ypos1 = m_y + m_title_height + m_theight + pos*m_fheight; int ypos2 = m_y + (m_height - m_info_height) + OFFSET_INTER; int ypos1a = ypos1 + (m_fheight / 2); @@ -1806,7 +1806,7 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos) { //details line if (dline == NULL) - dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, m_fheight/2, m_info_height-RADIUS_LARGE*2); + dline = new CComponentsDetailsLine(xpos, ypos1a, ypos2a, m_fheight/2, m_info_height-RADIUS_LARGE*2); dline->paint(false); // paint id3 infobox diff --git a/src/gui/audioplayer.h b/src/gui/audioplayer.h index 7905d6e1c..af7c10df8 100644 --- a/src/gui/audioplayer.h +++ b/src/gui/audioplayer.h @@ -139,7 +139,7 @@ class CAudioPlayerGui : public CMenuTarget int m_idletime; bool m_screensaver; bool m_inetmode; - CComponentsDetailLine *dline; + CComponentsDetailsLine *dline; CComponentsInfoBox *ibox; SMSKeyInput m_SMSKeyInput; diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 8fea35409..2c87de088 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -231,7 +231,7 @@ void CBEChannelWidget::paintDetails(int index) void CBEChannelWidget::initItem2DetailsLine (int pos, int /*ch_index*/) { - int xpos = x - ConnectLineBox_Width; + int xpos = x - DETAILSLINE_WIDTH; int ypos1 = y + theight+0 + pos*iheight; int ypos2 = y + height + OFFSET_INTER; int ypos1a = ypos1 + (fheight/2); @@ -244,7 +244,7 @@ void CBEChannelWidget::initItem2DetailsLine (int pos, int /*ch_index*/) if (pos >= 0) { if (dline == NULL) - dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, fheight/2, info_height-RADIUS_LARGE*2); + dline = new CComponentsDetailsLine(xpos, ypos1a, ypos2a, fheight/2, info_height-RADIUS_LARGE*2); dline->setYPos(ypos1a); //infobox @@ -318,8 +318,8 @@ int CBEChannelWidget::exec(CMenuTarget* parent, const std::string & /*actionKey* height = theight+footerHeight+listmaxshow*iheight; // recalc height x = getScreenStartX(width); - if (x < ConnectLineBox_Width) - x = ConnectLineBox_Width; + if (x < DETAILSLINE_WIDTH) + x = DETAILSLINE_WIDTH; y = getScreenStartY(height + info_height); diff --git a/src/gui/bedit/bouqueteditor_channels.h b/src/gui/bedit/bouqueteditor_channels.h index 09394fc64..8ee180710 100644 --- a/src/gui/bedit/bouqueteditor_channels.h +++ b/src/gui/bedit/bouqueteditor_channels.h @@ -48,7 +48,7 @@ class CBEChannelWidget : public CMenuTarget, public CListHelpers private: CFrameBuffer *frameBuffer; - CComponentsDetailLine *dline; + CComponentsDetailsLine *dline; CComponentsInfoBox *ibox; CComponentsFooter footer; enum state_ diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index c60372450..c80a182b2 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -202,8 +202,8 @@ int CBEChannelSelectWidget::exec(CMenuTarget* parent, const std::string & action height = theight+footerHeight+listmaxshow*iheight; // recalc height x = getScreenStartX(width); - if (x < ConnectLineBox_Width) - x = ConnectLineBox_Width; + if (x < DETAILSLINE_WIDTH) + x = DETAILSLINE_WIDTH; y = getScreenStartY(height + info_height); bouquetChannels = mode == CZapitClient::MODE_TV ? &(bouquet->tvChannels) : &(bouquet->radioChannels); @@ -288,7 +288,7 @@ void CBEChannelSelectWidget::paintDetails(int index) void CBEChannelSelectWidget::initItem2DetailsLine (int pos, int /*ch_index*/) { - int xpos = x - ConnectLineBox_Width; + int xpos = x - DETAILSLINE_WIDTH; int ypos1 = y + theight+0 + pos*iheight; int ypos2 = y + height + OFFSET_INTER; int ypos1a = ypos1 + (fheight/2); @@ -301,7 +301,7 @@ void CBEChannelSelectWidget::initItem2DetailsLine (int pos, int /*ch_index*/) if (pos >= 0) { if (dline == NULL) - dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, fheight/2, info_height-RADIUS_LARGE*2); + dline = new CComponentsDetailsLine(xpos, ypos1a, ypos2a, fheight/2, info_height-RADIUS_LARGE*2); dline->setYPos(ypos1a); //infobox diff --git a/src/gui/bedit/bouqueteditor_chanselect.h b/src/gui/bedit/bouqueteditor_chanselect.h index 91ed9fdb3..519b16397 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.h +++ b/src/gui/bedit/bouqueteditor_chanselect.h @@ -49,7 +49,7 @@ class CBEChannelSelectWidget : public CListBox enum{SORT_ALPHA,SORT_FREQ,SORT_SAT,SORT_CH_NUMBER, SORT_END}; CZapitClient::channelsMode mode; bool isChannelInBouquet( int index); - CComponentsDetailLine *dline; + CComponentsDetailsLine *dline; CComponentsInfoBox *ibox; CComponentsFooter footer; uint getItemCount(); diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 9f8fc22be..bb016b2e1 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -485,7 +485,7 @@ void CChannelList::calcSize() pig_on_win = ( (g_settings.channellist_additional == 2) /* with miniTV */ && (CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_ts) ); // calculate width - full_width = pig_on_win ? (frameBuffer->getScreenWidth()-2*ConnectLineBox_Width) : frameBuffer->getScreenWidthRel(); + full_width = pig_on_win ? (frameBuffer->getScreenWidth()-2*DETAILSLINE_WIDTH) : frameBuffer->getScreenWidthRel(); if (g_settings.channellist_additional) width = full_width / 3 * 2; @@ -502,8 +502,8 @@ void CChannelList::calcSize() // calculate x position x = getScreenStartX(full_width); - if (x < ConnectLineBox_Width) - x = ConnectLineBox_Width; + if (x < DETAILSLINE_WIDTH) + x = DETAILSLINE_WIDTH; // calculate header height const int pic_h = 39; @@ -1652,14 +1652,14 @@ void CChannelList::paintItem2DetailsLine (int pos) if (!g_settings.channellist_show_infobox) return; - int xpos = x - ConnectLineBox_Width; + int xpos = x - DETAILSLINE_WIDTH; int ypos1 = y + theight + pos*fheight + (fheight/2); int ypos2 = y + height + OFFSET_INTER + (info_height/2); // paint Line if detail info (and not valid list pos) if (pos >= 0) { if (dline == NULL) - dline = new CComponentsDetailLine(xpos, ypos1, ypos2, fheight/2, info_height-RADIUS_LARGE*2); + dline = new CComponentsDetailsLine(xpos, ypos1, ypos2, fheight/2, info_height-RADIUS_LARGE*2); dline->paint(false); } } diff --git a/src/gui/channellist.h b/src/gui/channellist.h index aa9933030..f5addbe68 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -104,7 +104,7 @@ private: ZapitChannelList *chanlist; CBouquet *bouquet; CZapProtection* zapProtection; - CComponentsDetailLine *dline; + CComponentsDetailsLine *dline; int full_width; int width; diff --git a/src/gui/components/cc_detailsline.cpp b/src/gui/components/cc_detailsline.cpp index cb86eb14a..81da16c5e 100644 --- a/src/gui/components/cc_detailsline.cpp +++ b/src/gui/components/cc_detailsline.cpp @@ -35,15 +35,15 @@ using namespace std; -//sub class CComponentsDetailLine from CComponents -CComponentsDetailLine::CComponentsDetailLine( const int& x_pos, const int& y_pos_top, +//sub class CComponentsDetailsLine from CComponents +CComponentsDetailsLine::CComponentsDetailsLine( const int& x_pos, const int& y_pos_top, const int& y_pos_down, const int& h_mark_top_, const int& h_mark_down_, fb_pixel_t color_line, fb_pixel_t color_shadow) { initVarDline(x_pos, y_pos_top, y_pos_down, h_mark_top_, h_mark_down_, color_line, color_shadow); } -void CComponentsDetailLine::initVarDline( const int& x_pos, const int& y_pos_top, +void CComponentsDetailsLine::initVarDline( const int& x_pos, const int& y_pos_top, const int& y_pos_down, const int& h_mark_top_, const int& h_mark_down_, fb_pixel_t color_line, fb_pixel_t color_shadow) { @@ -53,20 +53,20 @@ void CComponentsDetailLine::initVarDline( const int& x_pos, const int& y_pos_top col_shadow = color_shadow; col_body = color_line; - //CComponentsDetailLine + //CComponentsDetailsLine y_down = y_pos_down; h_mark_top = h_mark_top_; h_mark_down = h_mark_down_; shadow_w = 1; - //CComponentsDetailLine + //CComponentsDetailsLine thickness = 4; /* MUST be an even value! */ cc_body_gradient_enable = false; } -CComponentsDetailLine::~CComponentsDetailLine() +CComponentsDetailsLine::~CComponentsDetailsLine() { } @@ -86,7 +86,7 @@ CComponentsDetailLine::~CComponentsDetailLine() //paint details line with current parameters -void CComponentsDetailLine::paint(bool do_save_bg) +void CComponentsDetailsLine::paint(bool do_save_bg) { hide(); if (hasChanges()) @@ -139,7 +139,7 @@ void CComponentsDetailLine::paint(bool do_save_bg) //synchronize colors for details line //This is usefull if the system colors are changed during runtime //so you can ensure correct applied system colors in relevant objects with unchanged instances. -void CComponentsDetailLine::syncSysColors() +void CComponentsDetailsLine::syncSysColors() { col_body = COL_FRAME_PLUS_0; col_shadow = COL_SHADOW_PLUS_0; diff --git a/src/gui/components/cc_detailsline.h b/src/gui/components/cc_detailsline.h index dfea467bd..be07ef57f 100644 --- a/src/gui/components/cc_detailsline.h +++ b/src/gui/components/cc_detailsline.h @@ -37,7 +37,7 @@ Not usable as CCItem! */ -class CComponentsDetailLine : public CComponents +class CComponentsDetailsLine : public CComponents { private: ///property: line thickness @@ -55,10 +55,10 @@ class CComponentsDetailLine : public CComponents fb_pixel_t color_line, fb_pixel_t color_shadow); public: - CComponentsDetailLine( const int& x_pos = 1,const int& y_pos_top = 1, const int& y_pos_down = 1, + CComponentsDetailsLine( const int& x_pos = 1,const int& y_pos_top = 1, const int& y_pos_down = 1, const int& h_mark_top_ = CC_HEIGHT_MIN , const int& h_mark_down_ = CC_HEIGHT_MIN, fb_pixel_t color_line = COL_FRAME_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); - ~CComponentsDetailLine(); + ~CComponentsDetailsLine(); ///set colors void setColors(fb_pixel_t color_line, fb_pixel_t color_shadow){col_body = color_line; col_shadow = color_shadow;}; diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index b6d49b888..2d670805a 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -1530,12 +1530,12 @@ void CMovieBrowser::refreshDetailsLine(int pos) int hheight = m_pcBrowser->getHeaderListHeight(); int theight = m_pcBrowser->getTitleHeight(); - int xpos = m_cBoxFrameBrowserList.iX - ConnectLineBox_Width; + int xpos = m_cBoxFrameBrowserList.iX - DETAILSLINE_WIDTH; int ypos1 = m_cBoxFrameBrowserList.iY + hheight + theight + OFFSET_INNER_MID + pos*fheight + (fheight/2); int ypos2 = m_cBoxFrameInfo1.iY + (m_cBoxFrameInfo1.iHeight/2); if (m_detailsLine == NULL) - m_detailsLine = new CComponentsDetailLine(); + m_detailsLine = new CComponentsDetailsLine(); m_detailsLine->setDimensionsAll(xpos, ypos1, ypos2, fheight/2, m_cBoxFrameInfo1.iHeight-2*RADIUS_LARGE); m_detailsLine->paint(true); diff --git a/src/gui/moviebrowser/mb.h b/src/gui/moviebrowser/mb.h index 3f29afdea..57e1f549c 100644 --- a/src/gui/moviebrowser/mb.h +++ b/src/gui/moviebrowser/mb.h @@ -163,7 +163,7 @@ class CMovieBrowser : public CMenuTarget CBox m_cBoxFrameTitleRel; CComponentsHeader *m_header; - CComponentsDetailLine *m_detailsLine; + CComponentsDetailsLine *m_detailsLine; CComponentsChannelLogo *m_channelLogo; CComponentsPicture *m_movieCover; diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index dfa79f6c9..2ace35ee8 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -146,8 +146,8 @@ void CUpnpBrowserGui::Init() footer.enableShadow(CC_SHADOW_ON, -1, true); m_x=getScreenStartX(m_width); - if (m_x < ConnectLineBox_Width) // shouldn't happen - m_x = ConnectLineBox_Width; + if (m_x < DETAILSLINE_WIDTH) // shouldn't happen + m_x = DETAILSLINE_WIDTH; m_y=getScreenStartY(m_height); // calc positions @@ -1235,14 +1235,14 @@ void CUpnpBrowserGui::paintItem2DetailsLine(int pos) if (pos < 0) return; - int xpos = m_x - ConnectLineBox_Width; + int xpos = m_x - DETAILSLINE_WIDTH; int ypos1 = m_item_y + pos*m_item_height; int ypos2 = infobox.getYPos() + infobox.getHeight() - infobox.getHeight()/2; int ypos1a = ypos1 + (m_item_height/2); if (!dline) - dline = new CComponentsDetailLine(); + dline = new CComponentsDetailsLine(); dline->setDimensionsAll(xpos, ypos1a, ypos2, m_item_height/2, infobox.getHeight() - RADIUS_LARGE*2); dline->paint(); } diff --git a/src/gui/upnpbrowser.h b/src/gui/upnpbrowser.h index 105ec5fa1..123c9fe0e 100644 --- a/src/gui/upnpbrowser.h +++ b/src/gui/upnpbrowser.h @@ -97,7 +97,7 @@ class CUpnpBrowserGui : public CMenuTarget, public CListHelpers time_t m_time_played; bool m_playing_entry_is_shown; time_t timeout; - CComponentsDetailLine * dline; + CComponentsDetailsLine * dline; CComponentsFooter footer; CComponentsInfoBox topbox, infobox, timebox; CComponentsPicture *image; diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 3ccd2905c..927f1c559 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1183,13 +1183,13 @@ void CMenuWidget::calcSize() if(total_pages > 1) sb_width=SCROLLBAR_WIDTH; - full_width = /*ConnectLineBox_Width+*/width+sb_width+OFFSET_SHADOW; + full_width = /*DETAILSLINE_WIDTH+*/width+sb_width+OFFSET_SHADOW; full_height = height+RADIUS_LARGE+OFFSET_SHADOW*2 /*+hint_height+OFFSET_INTER*/; - /* + ConnectLineBox_Width for the hintbox connection line + /* + DETAILSLINE_WIDTH for the hintbox connection line * + center_offset for symmetry * + 20 for setMenuPos calculates 10 pixels border left and right */ - int center_offset = (g_settings.menu_pos == MENU_POS_CENTER) ? ConnectLineBox_Width : 0; - int max_possible = (int)frameBuffer->getScreenWidth() - ConnectLineBox_Width - center_offset - 20; + int center_offset = (g_settings.menu_pos == MENU_POS_CENTER) ? DETAILSLINE_WIDTH : 0; + int max_possible = (int)frameBuffer->getScreenWidth() - DETAILSLINE_WIDTH - center_offset - 20; if (full_width > max_possible) { width = max_possible - sb_width - OFFSET_SHADOW; @@ -1269,13 +1269,13 @@ void CMenuWidget::setMenuPos(const int& menu_width) case MENU_POS_CENTER: x = offx + scr_x + ((scr_w - menu_width ) >> 1 ); y = offy + scr_y + ((scr_h - real_h) >> 1 ); - x += ConnectLineBox_Width; + x += DETAILSLINE_WIDTH; break; case MENU_POS_TOP_LEFT: y = offy + scr_y + 10; x = offx + scr_x + 10; - x += ConnectLineBox_Width; + x += DETAILSLINE_WIDTH; break; case MENU_POS_TOP_RIGHT: @@ -1286,7 +1286,7 @@ void CMenuWidget::setMenuPos(const int& menu_width) case MENU_POS_BOTTOM_LEFT: y = /*offy +*/ scr_y + scr_h - real_h - 10; x = offx + scr_x + 10; - x += ConnectLineBox_Width; + x += DETAILSLINE_WIDTH; break; case MENU_POS_BOTTOM_RIGHT: @@ -1386,14 +1386,14 @@ void CMenuWidget::saveScreen() saveScreen_x = x; background = new fb_pixel_t [saveScreen_height * saveScreen_width]; if(background) - frameBuffer->SaveScreen(saveScreen_x /*-ConnectLineBox_Width*/, saveScreen_y, saveScreen_width, saveScreen_height, background); + frameBuffer->SaveScreen(saveScreen_x /*-DETAILSLINE_WIDTH*/, saveScreen_y, saveScreen_width, saveScreen_height, background); } void CMenuWidget::restoreScreen() { if(background) { if(savescreen) - frameBuffer->RestoreScreen(saveScreen_x /*-ConnectLineBox_Width*/, saveScreen_y, saveScreen_width, saveScreen_height, background); + frameBuffer->RestoreScreen(saveScreen_x /*-DETAILSLINE_WIDTH*/, saveScreen_y, saveScreen_width, saveScreen_height, background); } } @@ -1450,7 +1450,7 @@ void CMenuWidget::paintHint(int pos) int iheight = item->getHeight(); int rad = RADIUS_LARGE; - int xpos = x - ConnectLineBox_Width; + int xpos = x - DETAILSLINE_WIDTH; int ypos2 = y + height + fbutton_height + rad + OFFSET_SHADOW + OFFSET_INTER; int iwidth = width+sb_width; @@ -1463,7 +1463,7 @@ void CMenuWidget::paintHint(int pos) //init details line if (details_line == NULL) - details_line = new CComponentsDetailLine(); + details_line = new CComponentsDetailsLine(); details_line->setXPos(xpos); details_line->setYPos(ypos1a); diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index bf784e3cb..de1d58744 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -494,7 +494,7 @@ class CMenuWidget : public CMenuTarget, public CComponentsSignals private: mn_widget_id_t widget_index; CMenuGlobal *mglobal; - CComponentsDetailLine *details_line; + CComponentsDetailsLine *details_line; CComponentsInfoBox *info_box; int hint_height; CComponentsHeader *header; diff --git a/src/system/settings.h b/src/system/settings.h index c6e352b85..c8aef6895 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -921,6 +921,8 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO #define SCROLLBAR_WIDTH OFFSET_INNER_MID + 2*OFFSET_INNER_MIN +#define DETAILSLINE_WIDTH 16 // TODO: scale2Res() ? + struct SglobalInfo { unsigned char box_Type; From 4152afc612eed365cf2dd35097a7d052faf68e5d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 13 Mar 2017 23:48:08 +0100 Subject: [PATCH 08/21] neutrinoyparser: stay compatible with present code in Y_Blocks.txt Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/60d3cfb9621cb9f45a6676da43f7855118efde39 Author: vanhofen Date: 2017-03-13 (Mon, 13 Mar 2017) Origin message was: ------------------ - neutrinoyparser: stay compatible with present code in Y_Blocks.txt ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/nhttpd/tuxboxapi/neutrinoyparser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp index 8692f5298..f7ab07684 100644 --- a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -839,8 +839,11 @@ std::string CNeutrinoYParser::func_get_partition_list(CyhookHandler *, std::str std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler *, std::string) { std::string boxvendor(g_info.hw_caps->boxvendor); - std::string boxname(g_info.hw_caps->boxname); + /* stay compatible with present code in Y_Blocks.txt */ + if (boxvendor.compare("Coolstream") == 0) + boxvendor = "CST"; + std::string boxname(g_info.hw_caps->boxname); /* workaround for Neo2 */ if ((boxname.compare("Neo") == 0) && (CFEManager::getInstance()->getFrontendCount() > 1)) boxname += " Twin"; From 8315062d3fb5669fcbe03ce9068c640f214b4a3a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 14 Mar 2017 08:04:26 +0100 Subject: [PATCH 09/21] .gitignore: add compile - .svnignore: remove Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/4bf9c74f59bc2ab327982556f16101857ee6b8d7 Author: vanhofen Date: 2017-03-14 (Tue, 14 Mar 2017) Origin message was: ------------------ - .gitignore: add compile - .svnignore: remove ------------------ This commit was generated by Migit --- .gitignore | 1 + .svnignore | 12 ------------ 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 .svnignore diff --git a/.gitignore b/.gitignore index 1443eff76..43dd1585a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ Makefile autom4te.cache *.in aclocal.m4 +compile config.* configure depcomp diff --git a/.svnignore b/.svnignore deleted file mode 100644 index e44c6013e..000000000 --- a/.svnignore +++ /dev/null @@ -1,12 +0,0 @@ -autom4te.cache -*.in -aclocal.m4 -config.* -configure -depcomp -install-sh -*.pc -libtool -ltmain.sh -missing -stamp.h1 From 5ab0fbc0817280750072be0268d787558a431f8a Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 14 Mar 2017 09:10:29 +0100 Subject: [PATCH 10/21] settings.h: enable scale for DETAILSLINE_WIDTH Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/afe98d395210f4263125a40a783deb5651302499 Author: Thilo Graf Date: 2017-03-14 (Tue, 14 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/system/settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/settings.h b/src/system/settings.h index 70280a589..945c13ecc 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -930,7 +930,7 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO #define SCROLLBAR_WIDTH OFFSET_INNER_MID + 2*OFFSET_INNER_MIN -#define DETAILSLINE_WIDTH 16 // TODO: scale2Res() ? +#define DETAILSLINE_WIDTH CFrameBuffer::getInstance()->scale2Res(16) struct SglobalInfo { From 20c5788556f3170c39cba3247cb7c8d59f2333d3 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 14 Mar 2017 09:11:45 +0100 Subject: [PATCH 11/21] cc_types.h: add scale to CC_WIDTH_MIN/CC_HEIGHT_MIN Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/df484340927dae179ed3e21a10be2dec98d2d0d0 Author: Thilo Graf Date: 2017-03-14 (Tue, 14 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_types.h b/src/gui/components/cc_types.h index 5f56ee181..7b57dc9e3 100644 --- a/src/gui/components/cc_types.h +++ b/src/gui/components/cc_types.h @@ -191,8 +191,8 @@ typedef struct button_label_cc button_label_cc(): button(NULL), text(std::string()), locale(NONEXISTANT_LOCALE){} } button_label_cc_struct; -#define CC_WIDTH_MIN 16 -#define CC_HEIGHT_MIN 16 +#define CC_WIDTH_MIN CFrameBuffer::getInstance()->scale2Res(16) +#define CC_HEIGHT_MIN CC_WIDTH_MIN #define CC_SHADOW_OFF 0x0 #define CC_SHADOW_RIGHT 0x2 From 19c6ff581a78823537c3ede472eed47cd48195ac Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 14 Mar 2017 09:23:31 +0100 Subject: [PATCH 12/21] CComponentsDetailsLine: add scale to details line width Also added correction for odd line width values and added method to change details line width. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f5f2bf92bad20d532dbb95368dd52da54db53447 Author: Thilo Graf Date: 2017-03-14 (Tue, 14 Mar 2017) ------------------ This commit was generated by Migit --- src/gui/components/cc_detailsline.cpp | 23 ++++++++++++----------- src/gui/components/cc_detailsline.h | 6 ++++-- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/gui/components/cc_detailsline.cpp b/src/gui/components/cc_detailsline.cpp index 81da16c5e..82dd27cca 100644 --- a/src/gui/components/cc_detailsline.cpp +++ b/src/gui/components/cc_detailsline.cpp @@ -61,7 +61,7 @@ void CComponentsDetailsLine::initVarDline( const int& x_pos, const int& y_pos_to shadow_w = 1; //CComponentsDetailsLine - thickness = 4; /* MUST be an even value! */ + dl_w = CFrameBuffer::getInstance()->scale2Res(3); cc_body_gradient_enable = false; } @@ -101,6 +101,7 @@ void CComponentsDetailsLine::paint(bool do_save_bg) int y_mark_top = y-h_mark_top/2; int y_mark_down = y_down-h_mark_down/2; + int dx_c = dl_w%2; //correction for odd values cc_fbdata_t fbdata[] = { @@ -108,26 +109,26 @@ void CComponentsDetailsLine::paint(bool do_save_bg) {true, CC_FBDATA_TYPE_BGSCREEN, x, y_mark_top, width, y_mark_down-y_mark_top+h_mark_down+sw, 0, 0, 0, 0, NULL, NULL, NULL, false}, /* vertical item mark | */ - {true, CC_FBDATA_TYPE_BOX, x+width-thickness-sw, y_mark_top, thickness, h_mark_top, col_body, 0, 0, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BOX, x+width-dl_w-sw, y_mark_top, dl_w, h_mark_top, col_body, 0, 0, 0, NULL, NULL, NULL, false}, {true, CC_FBDATA_TYPE_BOX, x+width-sw, y_mark_top+sw, sw, h_mark_top-sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false}, - {true, CC_FBDATA_TYPE_BOX, x+width-thickness, y_mark_top+h_mark_top, thickness, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BOX, x+width-dl_w, y_mark_top+h_mark_top, dl_w, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false}, /* horizontal item line - */ - {true, CC_FBDATA_TYPE_BOX, x, y-thickness/2, width-thickness-sw, thickness, col_body, 0, 0, 0, NULL, NULL, NULL, false}, - {true, CC_FBDATA_TYPE_BOX, x+thickness, y+thickness/2, width-2*thickness-sw, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BOX, x, y-dl_w/2, width-dl_w-sw, dl_w, col_body, 0, 0, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BOX, x+dl_w, y+dl_w/2+dx_c, width-2*dl_w-sw, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false}, /* vertical connect line [ */ - {true, CC_FBDATA_TYPE_BOX, x, y+thickness/2, thickness, y_down-y-thickness, col_body, 0, 0, 0, NULL, NULL, NULL, false}, - {true, CC_FBDATA_TYPE_BOX, x+thickness, y+thickness/2+sw, sw, y_down-y-thickness-sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BOX, x, y+dl_w/2+dx_c, dl_w, y_down-y-dl_w, col_body, 0, 0, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BOX, x+dl_w, y+dl_w/2+dx_c, sw, y_down-y-dl_w, col_shadow, 0, 0, 0, NULL, NULL, NULL, false}, /* horizontal info line - */ - {true, CC_FBDATA_TYPE_BOX, x, y_down-thickness/2, width-thickness-sw, thickness, col_body, 0, 0, 0, NULL, NULL, NULL, false}, - {true, CC_FBDATA_TYPE_BOX, x+sw, y_down+thickness/2, width-thickness-2*sw, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BOX, x, y_down-dl_w/2, width-dl_w-sw, dl_w, col_body, 0, 0, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BOX, x+sw, y_down+dl_w/2+dx_c, width-dl_w-2*sw, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false}, /* vertical info mark | */ - {true, CC_FBDATA_TYPE_BOX, x+width-thickness-sw, y_mark_down, thickness, h_mark_down, col_body, 0, 0, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BOX, x+width-dl_w-sw, y_mark_down, dl_w, h_mark_down, col_body, 0, 0, 0, NULL, NULL, NULL, false}, {true, CC_FBDATA_TYPE_BOX, x+width-sw, y_mark_down+sw, sw, h_mark_down-sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false}, - {true, CC_FBDATA_TYPE_BOX, x+width-thickness, y_mark_down+h_mark_down,thickness, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BOX, x+width-dl_w, y_mark_down+h_mark_down,dl_w, sw, col_shadow, 0, 0, 0, NULL, NULL, NULL, false}, }; for(size_t i =0; i< (sizeof(fbdata) / sizeof(fbdata[0])) ;i++) diff --git a/src/gui/components/cc_detailsline.h b/src/gui/components/cc_detailsline.h index be07ef57f..66197f51f 100644 --- a/src/gui/components/cc_detailsline.h +++ b/src/gui/components/cc_detailsline.h @@ -40,8 +40,8 @@ Not usable as CCItem! class CComponentsDetailsLine : public CComponents { private: - ///property: line thickness - int thickness; + ///property: line width + int dl_w; ///property: lowest y position int y_down; ///property: height of top marker @@ -73,6 +73,8 @@ class CComponentsDetailsLine : public CComponents ///set all positions and dimensions of details line at once void setDimensionsAll(const int& x_pos,const int& y_pos, const int& y_pos_down, const int& h_mark_top_ , const int& h_mark_down_) {setXPos(x_pos); setYPos(y_pos); setYPosDown(y_pos_down); setHMarkTop(h_mark_top_); setHMarkDown(h_mark_down_);} + ///property: set line thickness + void setLineWidth(const int& w){dl_w = w;} ///paint all to screen void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); From 054d0c33bf5fb078780d983e15f9b2cdd9c8063d Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 14 Mar 2017 08:16:12 +0100 Subject: [PATCH 13/21] CColorChooser: fix compile conversion warnings Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3b5cd00bf4af7ef65fad1490c346b249d5ce2365 Author: Thilo Graf Date: 2017-03-14 (Tue, 14 Mar 2017) Origin message was: ------------------ CColorChooser: fix compile conversion warnings ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/colorchooser.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/gui/widget/colorchooser.cpp b/src/gui/widget/colorchooser.cpp index f7b90b371..589f49fe7 100644 --- a/src/gui/widget/colorchooser.cpp +++ b/src/gui/widget/colorchooser.cpp @@ -158,6 +158,7 @@ int CColorChooser::exec(CMenuTarget* parent, const std::string &) timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings ::TIMING_MENU]); + int val = (*value[selected]); switch ( msg ) { case CRCInput::RC_down: { @@ -190,12 +191,12 @@ int CColorChooser::exec(CMenuTarget* parent, const std::string &) } case CRCInput::RC_right: { - if ((*value[selected]) < 100) + if (val < 100) { - if ((*value[selected]) < 98) - (*value[selected]) += 2; + if (val < 98) + val += 2; else - (*value[selected]) = 100; + val = 100; paintSlider(x + 10, y + hheight + mheight * selected, value[selected], colorchooser_names[selected], iconnames[selected], true); setColor(); @@ -204,12 +205,12 @@ int CColorChooser::exec(CMenuTarget* parent, const std::string &) } case CRCInput::RC_left: { - if ((*value[selected]) > 0) + if (val > 0) { - if ((*value[selected]) > 2) - (*value[selected]) -= 2; + if (val > 2) + val -= 2; else - (*value[selected]) = 0; + val = 0; paintSlider(x + 10, y + hheight + mheight * selected, value[selected], colorchooser_names[selected], iconnames[selected], true); setColor(); From fa776f72d15312be43672beac201661f2c34f559 Mon Sep 17 00:00:00 2001 From: Andrej Tobola Date: Wed, 15 Mar 2017 09:32:43 +0100 Subject: [PATCH 14/21] Update slovak.locale Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9cefe16d4b8d65d4ad0887d9ecdfe4f22400e70e Author: Andrej Tobola Date: 2017-03-15 (Wed, 15 Mar 2017) ------------------ This commit was generated by Migit --- data/locale/slovak.locale | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/data/locale/slovak.locale b/data/locale/slovak.locale index 3ae068e32..46da1a908 100644 --- a/data/locale/slovak.locale +++ b/data/locale/slovak.locale @@ -682,6 +682,15 @@ flashupdate.selectimage Dostupné verzie / súbory flashupdate.settings Aktualizácia nastavení flashupdate.titlereadflash Načítavanie pamäte FLASH flashupdate.titlewriteflash Zapisovanie pamäte FLASH +flashupdate.type_addon Doplnok +flashupdate.type_beta Beta +flashupdate.type_internal Interná +flashupdate.type_locale Jazyk +flashupdate.type_release Release +flashupdate.type_settings Nastavenia +flashupdate.type_text Text +flashupdate.type_unknown Neznáma +flashupdate.type_update Aktualizácia flashupdate.update_with_settings_del_skipped Zložka [%s] nebola vymazaná. Zadanie je preskočené. flashupdate.update_with_settings_error Chyba FLASH pamäte!\n \nNový IMAGE má len %ld KB (ostáva %ld KB) do konca. \nnedostatok miesta pre dokončenie operácie.\n \nOperácia prerušená! flashupdate.update_with_settings_processed IMAGE sa spracováva... From 46859665edb06310f0e1575d877e225cde1684bb Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 15 Mar 2017 09:17:16 +0100 Subject: [PATCH 15/21] CImageInfo: use global offset for item offset Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1db1182b87be39b69b57d54bc99b0d620bb64f3f Author: Thilo Graf Date: 2017-03-15 (Wed, 15 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/imageinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index 8dd342ed8..dd0e8a1c1 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -69,7 +69,7 @@ void CImageInfo::Init(void) cc_sub_caption = NULL; b_info = NULL; btn_red = NULL; - item_offset = 10; + item_offset = OFFSET_INNER_MID; item_font = NULL; item_height = 0; y_tmp = 0; From 344b254a4b7c602dda4ba0453a3714c0988eff5b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 15 Mar 2017 09:37:55 +0100 Subject: [PATCH 16/21] CComponentsExtTextForm: fix label width calculation Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/81cde4836fc6b04129560f2b4847eb95e3e89b3d Author: Thilo Graf Date: 2017-03-15 (Wed, 15 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_ext_text.cpp | 6 +++--- src/gui/components/cc_frm_ext_text.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/gui/components/cc_frm_ext_text.cpp b/src/gui/components/cc_frm_ext_text.cpp index 864336d91..7ae619423 100644 --- a/src/gui/components/cc_frm_ext_text.cpp +++ b/src/gui/components/cc_frm_ext_text.cpp @@ -86,8 +86,7 @@ void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_p width = w; //init ccx_label_width and ccx_text_width //default ccx_label_width = 30% of form width - ccx_percent_label_w = DEF_LABEL_WIDTH_PERCENT; - ccx_label_width = ccx_percent_label_w * width/100; + ccx_label_width = DEF_LABEL_WIDTH_PERCENT * width/100; ccx_text_width = width-ccx_label_width; height = h; @@ -223,7 +222,8 @@ void CComponentsExtTextForm::initCCTextItems() void CComponentsExtTextForm::setLabelWidthPercent(const uint8_t& percent_val) { - ccx_percent_label_w = (int)percent_val; + ccx_label_width = (int)percent_val * width/100; + ccx_text_width = width-ccx_label_width; initCCTextItems(); } diff --git a/src/gui/components/cc_frm_ext_text.h b/src/gui/components/cc_frm_ext_text.h index 837eb8c18..4e37efd0f 100644 --- a/src/gui/components/cc_frm_ext_text.h +++ b/src/gui/components/cc_frm_ext_text.h @@ -49,8 +49,6 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen int ccx_text_width; ///property: font type of both items (label and text), see also setLabelAndText() Font* ccx_font; - ///property: percentage val of label width related to full width, causes fit of text automatically into the available remaining size of item, see also setLabelWidthPercent() - uint8_t ccx_percent_label_w; ///centered y position of label and text int y_text; From e05016388d1b71e03f44e5275b2077e19701ff14 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 15 Mar 2017 09:41:03 +0100 Subject: [PATCH 17/21] CImageInfo: optimize label arrangement Distance between label and text was too large with full hd resolution. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/17227504c29ec48d6f96411aa1d049c579e658e2 Author: Thilo Graf Date: 2017-03-15 (Wed, 15 Mar 2017) ------------------ This commit was generated by Migit --- src/gui/imageinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index dd0e8a1c1..d62fa7487 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -355,7 +355,7 @@ void CImageInfo::InitInfos() y_tmp = 0; for (size_t i=0; igetWidth(), 0, g_Locale->getText(v_info[i].caption), v_info[i].info_text); - item->setLabelWidthPercent(20); + item->setLabelWidthPercent(15); if (!item_font){ item_font = item->getFont(); From 540c433a4158846c744c3ca8e98e39a7c53834cd Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 15 Mar 2017 09:47:00 +0100 Subject: [PATCH 18/21] CComponentsExtTextForm: use scaled default dimension values Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e498cc6b09b5521590db732c3296d91b4b78ff67 Author: Thilo Graf Date: 2017-03-15 (Wed, 15 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_ext_text.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_ext_text.cpp b/src/gui/components/cc_frm_ext_text.cpp index 7ae619423..0587d90db 100644 --- a/src/gui/components/cc_frm_ext_text.cpp +++ b/src/gui/components/cc_frm_ext_text.cpp @@ -31,7 +31,8 @@ #include -#define DEF_HEIGHT 27 +#define DEF_HEIGHT CFrameBuffer::getInstance()->scale2Res(27) +#define DEF_WIDTH CFrameBuffer::getInstance()->scale2Res(300) #define DEF_LABEL_WIDTH_PERCENT 30 using namespace std; @@ -39,7 +40,7 @@ using namespace std; CComponentsExtTextForm::CComponentsExtTextForm(CComponentsForm* parent) { Font* t_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]; - initVarExtTextForm(0, 0, 300, t_font->getHeight(), "", "", t_font, parent, CC_SHADOW_OFF, COL_MENUCONTENTINACTIVE_TEXT, COL_MENUCONTENT_TEXT, COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_SHADOW_PLUS_0); + initVarExtTextForm(0, 0, DEF_WIDTH, t_font->getHeight(), "", "", t_font, parent, CC_SHADOW_OFF, COL_MENUCONTENTINACTIVE_TEXT, COL_MENUCONTENT_TEXT, COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_SHADOW_PLUS_0); initCCTextItems(); } From 2a2238f53a5d3f432a38fb6de06e1ddbb255d891 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 15 Mar 2017 15:56:23 +0100 Subject: [PATCH 19/21] src/neutrino.cpp fix possible memleak Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f18ec050c79245b1e116303923bec423991b68d6 Author: Jacek Jendrzej Date: 2017-03-15 (Wed, 15 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/neutrino.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 55f19b35a..598beedd1 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -873,7 +873,10 @@ int CNeutrinoApp::loadSetup(const char * fname) // USERMENU -> in system/settings.h //------------------------------------------- - + for(unsigned int i=0; i Date: Wed, 15 Mar 2017 19:02:44 +0100 Subject: [PATCH 20/21] screenshot.cpp fix memcpy param overlap Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/142ac1392f87a70c74d6b8a50e34f59755a3f292 Author: Jacek Jendrzej Date: 2017-03-15 (Wed, 15 Mar 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 98b873ca0..db6bf89d7 100644 --- a/src/driver/screenshot.cpp +++ b/src/driver/screenshot.cpp @@ -268,7 +268,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 d0555d5c08c6adbdde93fbe3718cbe18112a5f93 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Wed, 15 Mar 2017 19:51:20 +0100 Subject: [PATCH 21/21] add unicable2/jess (thx DboxOldie) Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f974b563437c476b42a9c75bc75cf1546274de2f Author: TangoCash Date: 2017-03-15 (Wed, 15 Mar 2017) ------------------ 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/scan_setup.cpp | 20 +++--- src/system/locals.h | 1 + src/system/locals_intern.h | 1 + src/zapit/include/zapit/client/zapittypes.h | 3 +- src/zapit/include/zapit/frontend_c.h | 1 + src/zapit/src/femanager.cpp | 2 +- src/zapit/src/frontend.cpp | 72 ++++++++++++++++++++- 9 files changed, 89 insertions(+), 13 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 05b8b5e58..7a3fc72ca 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -2199,6 +2199,7 @@ satsetup.smatvremote SMATV Remote Tuning satsetup.uncomm_input Uncommitted satsetup.uni_settings Unicable Einstellungen satsetup.unicable Unicable +satsetup.unicable2 Unicable 2 (Jess) satsetup.usals_repeat USALS wiederholen satsetup.use_bat Benutze BAT satsetup.use_fta_flag nur FTA Kanäle diff --git a/data/locale/english.locale b/data/locale/english.locale index 4f4430a68..b45a5c01b 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -2199,6 +2199,7 @@ satsetup.smatvremote SMATV Remote Tuning satsetup.uncomm_input Uncommited input satsetup.uni_settings Unicable Settings satsetup.unicable Unicable +satsetup.unicable2 Unicable 2 (Jess) satsetup.usals_repeat USALS command repeat satsetup.use_bat Use BAT satsetup.use_fta_flag just free Channels diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index 8970ea014..e7f0e0654 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -89,7 +89,7 @@ const CMenuOptionChooser::keyval SCANTS_ZAPIT_SCANTYPE[SCANTS_ZAPIT_SCANTYPE_COU { CServiceScan::SCAN_ALL , LOCALE_ZAPIT_SCANTYPE_ALL } }; -#define SATSETUP_DISEQC_OPTION_COUNT 6 +#define SATSETUP_DISEQC_OPTION_COUNT 7 const CMenuOptionChooser::keyval SATSETUP_DISEQC_OPTIONS[SATSETUP_DISEQC_OPTION_COUNT] = { { NO_DISEQC, LOCALE_SATSETUP_NODISEQC }, @@ -98,7 +98,8 @@ const CMenuOptionChooser::keyval SATSETUP_DISEQC_OPTIONS[SATSETUP_DISEQC_OPTION_ { DISEQC_1_1, LOCALE_SATSETUP_DISEQC11 }, /*{ DISEQC_1_2, LOCALE_SATSETUP_DISEQC12 },*/ { DISEQC_ADVANCED, LOCALE_SATSETUP_DISEQC_ADVANCED }, - { DISEQC_UNICABLE, LOCALE_SATSETUP_UNICABLE } + { DISEQC_UNICABLE, LOCALE_SATSETUP_UNICABLE }, + { DISEQC_UNICABLE2, LOCALE_SATSETUP_UNICABLE2 } // { SMATV_REMOTE_TUNING, LOCALE_SATSETUP_SMATVREMOTE } }; @@ -845,7 +846,8 @@ void CScanSetup::setDiseqcOptions(int number) mfe_config.diseqcType == DISEQC_1_0 ? LOCALE_SATSETUP_DISEQC10 : mfe_config.diseqcType == DISEQC_1_1 ? LOCALE_SATSETUP_DISEQC11 : mfe_config.diseqcType == DISEQC_ADVANCED ? LOCALE_SATSETUP_DISEQC_ADVANCED : - LOCALE_SATSETUP_UNICABLE); + mfe_config.diseqcType == DISEQC_UNICABLE ? LOCALE_SATSETUP_UNICABLE : + LOCALE_SATSETUP_UNICABLE2); if (mode == CFrontend::FE_MODE_LINK_TWIN && mfe_config.diseqcType != DISEQC_UNICABLE) { count++; @@ -990,7 +992,7 @@ int CScanSetup::showFrontendSetup(int number) fsatSetup->setHint("", LOCALE_MENU_HINT_SCAN_SATSETUP); setupMenu->addItem(fsatSetup); - uniSetup = new CMenuForwarder(LOCALE_SATSETUP_UNI_SETTINGS, (dmode == DISEQC_UNICABLE), NULL, this, "unisetup", CRCInput::convertDigitToKey(shortcut++)); + uniSetup = new CMenuForwarder(LOCALE_SATSETUP_UNI_SETTINGS, (dmode == DISEQC_UNICABLE ? true : dmode == DISEQC_UNICABLE2), NULL, this, "unisetup", CRCInput::convertDigitToKey(shortcut++)); setupMenu->addItem(uniSetup); CMenuWidget * rotorMenu = new CMenuWidget(LOCALE_SATSETUP_EXTENDED_MOTOR, NEUTRINO_ICON_SETTINGS, width); @@ -1058,7 +1060,7 @@ int CScanSetup::showUnicableSetup() int unicable_scr = fe_config.uni_scr; int unicable_qrg = fe_config.uni_qrg; - CMenuOptionNumberChooser *uniscr = new CMenuOptionNumberChooser(LOCALE_UNICABLE_SCR, &unicable_scr, true, 0, 7); + CMenuOptionNumberChooser *uniscr = new CMenuOptionNumberChooser(LOCALE_UNICABLE_SCR, &unicable_scr, true, 0, dmode == DISEQC_UNICABLE ? 7 : 31); CIntInput *uniqrg = new CIntInput(LOCALE_UNICABLE_QRG, &unicable_qrg, 4, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); CMenuWidget *uni_setup = new CMenuWidget(LOCALE_SATSETUP_UNI_SETTINGS, NEUTRINO_ICON_SETTINGS, width); @@ -1306,7 +1308,7 @@ void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satcon CMenuOptionNumberChooser *unilnb = NULL; CMenuOptionNumberChooser *motor = NULL; CMenuOptionChooser *usals = NULL; - bool unicable = (dmode == DISEQC_UNICABLE); + bool unicable = (dmode == DISEQC_UNICABLE ? true : dmode == DISEQC_UNICABLE2); if (!unicable) { diseqc = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQC_INPUT, &satconfig.diseqc, ((dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED)), -1, 15, this, CRCInput::RC_nokey, NULL, 1, -1, LOCALE_OPTIONS_OFF); @@ -1322,7 +1324,7 @@ void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satcon } else { if (satconfig.diseqc < 0) satconfig.diseqc = 0; - unilnb = new CMenuOptionNumberChooser(LOCALE_UNICABLE_LNB, &satconfig.diseqc, true, 0, 1); + unilnb = new CMenuOptionNumberChooser(LOCALE_UNICABLE_LNB, &satconfig.diseqc, true, 0, dmode == DISEQC_UNICABLE ? 1 : 3); } CIntInput* lofL = new CIntInput(LOCALE_SATSETUP_LOFL, (int*) &satconfig.lnbOffsetLow, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); @@ -1798,7 +1800,7 @@ bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data* fe->setDiseqcType((diseqc_t) dmode); fe->setTsidOnid(0); - uniSetup->setActive(dmode == DISEQC_UNICABLE); + uniSetup->setActive(dmode == DISEQC_UNICABLE ? true : dmode == DISEQC_UNICABLE2); bool enable = (dmode < DISEQC_ADVANCED) && (dmode != NO_DISEQC); ojDiseqcRepeats->setActive(enable && !CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED); dorder->setActive(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED && dmode == DISEQC_ADVANCED); @@ -1820,7 +1822,7 @@ bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data* linkfe->setActive(CFrontend::linked(femode)); /* leave diseqc type enabled for TWIN in case user need different unicable setup */ dtype->setActive(femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP); - uniSetup->setActive(dmode == DISEQC_UNICABLE && femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP); + uniSetup->setActive(dmode == DISEQC_UNICABLE ? true : dmode == DISEQC_UNICABLE2 && femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP); dorder->setActive(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED && dmode == DISEQC_ADVANCED); fsatSelect->setActive(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED); fsatSetup->setActive(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED); diff --git a/src/system/locals.h b/src/system/locals.h index 8aa833059..ffa9f4f9b 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -2226,6 +2226,7 @@ typedef enum LOCALE_SATSETUP_UNCOMM_INPUT, LOCALE_SATSETUP_UNI_SETTINGS, LOCALE_SATSETUP_UNICABLE, + LOCALE_SATSETUP_UNICABLE2, LOCALE_SATSETUP_USALS_REPEAT, LOCALE_SATSETUP_USE_BAT, LOCALE_SATSETUP_USE_FTA_FLAG, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index f1134b99e..41ca230ce 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -2226,6 +2226,7 @@ const char * locale_real_names[] = "satsetup.uncomm_input", "satsetup.uni_settings", "satsetup.unicable", + "satsetup.unicable2", "satsetup.usals_repeat", "satsetup.use_bat", "satsetup.use_fta_flag", diff --git a/src/zapit/include/zapit/client/zapittypes.h b/src/zapit/include/zapit/client/zapittypes.h index 1751450a2..aee92a37f 100644 --- a/src/zapit/include/zapit/client/zapittypes.h +++ b/src/zapit/include/zapit/client/zapittypes.h @@ -41,7 +41,8 @@ typedef enum { DISEQC_1_1, DISEQC_1_2, DISEQC_ADVANCED, - DISEQC_UNICABLE + DISEQC_UNICABLE, + DISEQC_UNICABLE2 #if 0 , DISEQC_2_0, DISEQC_2_1, diff --git a/src/zapit/include/zapit/frontend_c.h b/src/zapit/include/zapit/frontend_c.h index 1fd509ad9..2e92da4b5 100644 --- a/src/zapit/include/zapit/frontend_c.h +++ b/src/zapit/include/zapit/frontend_c.h @@ -168,6 +168,7 @@ class CFrontend void sendDiseqcReset(uint32_t ms = 40); void sendDiseqcSmatvRemoteTuningCommand(const uint32_t frequency); uint32_t sendEN50494TuningCommand(const uint32_t frequency, const int high_band, const int horizontal, const int bank); + uint32_t sendEN50607TuningCommand(const uint32_t frequency, const int high_band, const int horizontal, const int bank); void sendDiseqcZeroByteCommand(const uint8_t frm, const uint8_t addr, const uint8_t cmd, uint32_t ms = 15); void sendToneBurst(const fe_sec_mini_cmd_t burst, const uint32_t ms); int setFrontend(const FrontendParameters *feparams, bool nowait = false); diff --git a/src/zapit/src/femanager.cpp b/src/zapit/src/femanager.cpp index 2cf50a6a4..5364a64b8 100644 --- a/src/zapit/src/femanager.cpp +++ b/src/zapit/src/femanager.cpp @@ -371,7 +371,7 @@ void CFEManager::saveSettings(bool write) void CFEManager::copySettings(CFrontend * from, CFrontend * to) { INFO("Copy settings fe %d -> fe %d", from->fenumber, to->fenumber); - if (to->config.diseqcType != DISEQC_UNICABLE || to->getMode() == CFrontend::FE_MODE_LINK_LOOP) + if (to->config.diseqcType != DISEQC_UNICABLE || to->config.diseqcType != DISEQC_UNICABLE2 || to->getMode() == CFrontend::FE_MODE_LINK_LOOP) to->config.diseqcType = from->config.diseqcType; to->config.diseqcRepeats = from->config.diseqcRepeats; diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index f0b5b5599..215a58ea2 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -1171,6 +1171,12 @@ bool CFrontend::buildProperties(const FrontendParameters *feparams, struct dtv_p currentVoltage == SEC_VOLTAGE_18, !!config.uni_lnb); + if (config.diseqcType == DISEQC_UNICABLE2) + cmdseq.props[FREQUENCY].u.data = sendEN50607TuningCommand(feparams->frequency, + currentToneMode == SEC_TONE_ON, + currentVoltage == SEC_VOLTAGE_18, + config.uni_lnb); + cmdseq.num += nrOfProps; return true; @@ -1324,6 +1330,9 @@ void CFrontend::setDiseqcType(const diseqc_t newDiseqcType, bool force) case DISEQC_UNICABLE: INFO("fe%d: DISEQC_UNICABLE", fenumber); break; + case DISEQC_UNICABLE2: + INFO("fe%d: DISEQC_UNICABLE2", fenumber); + break; #if 0 case DISEQC_2_0: INFO("DISEQC_2_0"); @@ -1340,7 +1349,7 @@ void CFrontend::setDiseqcType(const diseqc_t newDiseqcType, bool force) return; } - if (newDiseqcType == DISEQC_UNICABLE) { + if (newDiseqcType == DISEQC_UNICABLE || newDiseqcType == DISEQC_UNICABLE2) { secSetTone(SEC_TONE_OFF, 0); secSetVoltage(SEC_VOLTAGE_13, 0); } @@ -1451,7 +1460,7 @@ void CFrontend::setInput(t_satellite_position satellitePosition, uint32_t freque config.uni_lnb = sit->second.diseqc; setLnbOffsets(sit->second.lnbOffsetLow, sit->second.lnbOffsetHigh, sit->second.lnbSwitch); - if (config.diseqcType == DISEQC_UNICABLE) + if (config.diseqcType == DISEQC_UNICABLE || config.diseqcType == DISEQC_UNICABLE2) return; @@ -1504,6 +1513,39 @@ uint32_t CFrontend::sendEN50494TuningCommand(const uint32_t frequency, const int return 0; } +uint32_t CFrontend::sendEN50607TuningCommand(const uint32_t frequency, const int high_band, const int horizontal, const int bank) +{ + uint32_t bpf = config.uni_qrg; + struct dvb_diseqc_master_cmd cmd = { {0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, 4 }; + + unsigned int t = frequency / 1000 - 100; + if (t < 0x800 && config.uni_scr >= 0 && config.uni_scr < 32) + { + uint32_t ret = bpf * 1000; + INFO("[unicable-JESS] 18V=%d TONE=%d, freq=%d qrg=%d scr=%d bank=%d ret=%d", currentVoltage == SEC_VOLTAGE_18, currentToneMode == SEC_TONE_ON, frequency, bpf, config.uni_scr, bank, ret); + if (!slave && info.type == FE_QPSK) + { + cmd.msg[1] = ((config.uni_scr & 0x1F) << 3) | /* user band adress ( 0 to 31) */ + /* max. possible tuning word = 0x7FF */ + ((t >> 8) & 0x07); /* highest 3 bits of t (MSB) */ + cmd.msg[2] = t & 0xFF; /* tuning word (LSB) */ + cmd.msg[3] = (0 << 4) | /* no uncommited switch */ + /* I really don't know if the combines of option and position bits are right here, + because I can'test it, assuming here 4 sat positions */ + ((bank & 0x03) << 2) | /* input 0/1/2/3 */ + (horizontal << 1) | /* horizontal == 0x02 */ + high_band; /* high_band == 0x01 */ + fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_18); + usleep(15 * 1000); /* en50494 says: >4ms and < 22 ms */ + sendDiseqcCommand(&cmd, 50); /* en50494 says: >2ms and < 60 ms */ + fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_13); + } + return ret; + } + WARN("ooops. t > 2047? (%d) or uni_scr out of range? (%d)", t, config.uni_scr); + return 0; +} + bool CFrontend::tuneChannel(CZapitChannel * /*channel*/, bool /*nvod*/) { transponder_list_t::iterator transponder = transponders.find(currentTransponder.getTransponderId()); @@ -1749,6 +1791,32 @@ void CFrontend::sendDiseqcReset(uint32_t ms) void CFrontend::sendDiseqcStandby(uint32_t ms) { printf("[fe%d] diseqc standby\n", fenumber); + if (config.diseqcType > DISEQC_ADVANCED) + { + /* use ODU_Power_OFF command for unicable or jess here + to set the used UB frequency of the frontend to standby */ + struct dvb_diseqc_master_cmd cmd = {{0}, 6}; + printf("[fe%d] standby scr: %d\n", fenumber, config.uni_scr); + if (config.diseqcType == DISEQC_UNICABLE) + { + cmd.msg[0] = 0xe0; + cmd.msg[1] = 0x10; + cmd.msg[2] = 0x5a; + cmd.msg[3] = ((config.uni_scr & 0x07) << 5); + cmd.msg_len = 5; + } + if (config.diseqcType == DISEQC_UNICABLE2) + { + cmd.msg[0] = 0x70; + cmd.msg[1] = ((config.uni_scr & 0x1F) << 3); + cmd.msg_len = 4; + } + fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_18); + usleep(15 * 1000); + sendDiseqcCommand(&cmd, ms); + fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_13); + return; + } // Send power off to 'all' equipment sendDiseqcZeroByteCommand(0xe0, 0x00, 0x02, ms); }