diff --git a/data/icons/buttons/blau.png b/data/icons/buttons/blau.png index 3db35c83e..57a57f6cc 100644 Binary files a/data/icons/buttons/blau.png and b/data/icons/buttons/blau.png differ diff --git a/data/icons/buttons/gelb.png b/data/icons/buttons/gelb.png index 2611c9a4c..501b5b5c7 100644 Binary files a/data/icons/buttons/gelb.png and b/data/icons/buttons/gelb.png differ diff --git a/data/icons/headers/icon_blue.png b/data/icons/headers/icon_blue.png index 91debee83..a44f4b1f5 100644 Binary files a/data/icons/headers/icon_blue.png and b/data/icons/headers/icon_blue.png differ diff --git a/data/icons/headers/icon_yellow.png b/data/icons/headers/icon_yellow.png index c6b70fde8..c1d77f470 100644 Binary files a/data/icons/headers/icon_yellow.png and b/data/icons/headers/icon_yellow.png differ diff --git a/data/icons/headers/mainmenue.png b/data/icons/headers/mainmenue.png index ac3bfae4d..96c2c8ccc 100644 Binary files a/data/icons/headers/mainmenue.png and b/data/icons/headers/mainmenue.png differ diff --git a/data/icons/status/channel/16_9.png b/data/icons/status/channel/16_9.png index 6c4873bdc..246f83620 100644 Binary files a/data/icons/status/channel/16_9.png and b/data/icons/status/channel/16_9.png differ diff --git a/data/icons/status/channel/16_9_gray.png b/data/icons/status/channel/16_9_gray.png index 21f7fb7c8..acc79304f 100644 Binary files a/data/icons/status/channel/16_9_gray.png and b/data/icons/status/channel/16_9_gray.png differ diff --git a/data/icons/status/channel/ca2.png b/data/icons/status/channel/ca2.png index 6582f4b9a..2edb12cbc 100644 Binary files a/data/icons/status/channel/ca2.png and b/data/icons/status/channel/ca2.png differ diff --git a/data/icons/status/channel/ca2_gray.png b/data/icons/status/channel/ca2_gray.png index bf5f60566..45fe6b319 100644 Binary files a/data/icons/status/channel/ca2_gray.png and b/data/icons/status/channel/ca2_gray.png differ diff --git a/data/icons/status/channel/dd.png b/data/icons/status/channel/dd.png index af801a1c4..58dae7d4b 100644 Binary files a/data/icons/status/channel/dd.png and b/data/icons/status/channel/dd.png differ diff --git a/data/icons/status/channel/dd_avail.png b/data/icons/status/channel/dd_avail.png index 79af185af..553dd2227 100644 Binary files a/data/icons/status/channel/dd_avail.png and b/data/icons/status/channel/dd_avail.png differ diff --git a/data/icons/status/channel/dd_gray.png b/data/icons/status/channel/dd_gray.png index 276823e42..8c2efffe2 100644 Binary files a/data/icons/status/channel/dd_gray.png and b/data/icons/status/channel/dd_gray.png differ diff --git a/data/icons/status/channel/radiotextget.png b/data/icons/status/channel/radiotextget.png index 5af40d936..028ed846c 100644 Binary files a/data/icons/status/channel/radiotextget.png and b/data/icons/status/channel/radiotextget.png differ diff --git a/data/icons/status/channel/radiotextoff.png b/data/icons/status/channel/radiotextoff.png index c78523601..e81b4a216 100644 Binary files a/data/icons/status/channel/radiotextoff.png and b/data/icons/status/channel/radiotextoff.png differ diff --git a/data/icons/status/channel/radiotextwait.png b/data/icons/status/channel/radiotextwait.png index a96b7124c..5c66be25e 100644 Binary files a/data/icons/status/channel/radiotextwait.png and b/data/icons/status/channel/radiotextwait.png differ diff --git a/data/icons/status/channel/res_000.png b/data/icons/status/channel/res_000.png index 58f3785a2..7b133b539 100644 Binary files a/data/icons/status/channel/res_000.png and b/data/icons/status/channel/res_000.png differ diff --git a/data/icons/status/channel/res_1080.png b/data/icons/status/channel/res_1080.png index 044397cb9..f3d4d61d6 100644 Binary files a/data/icons/status/channel/res_1080.png and b/data/icons/status/channel/res_1080.png differ diff --git a/data/icons/status/channel/res_1280.png b/data/icons/status/channel/res_1280.png index d13a8d1ca..566ba2fbe 100644 Binary files a/data/icons/status/channel/res_1280.png and b/data/icons/status/channel/res_1280.png differ diff --git a/data/icons/status/channel/res_1440.png b/data/icons/status/channel/res_1440.png index 253d6ade4..31ad86b7a 100644 Binary files a/data/icons/status/channel/res_1440.png and b/data/icons/status/channel/res_1440.png differ diff --git a/data/icons/status/channel/res_1920.png b/data/icons/status/channel/res_1920.png index c9994dc1e..f46d45289 100644 Binary files a/data/icons/status/channel/res_1920.png and b/data/icons/status/channel/res_1920.png differ diff --git a/data/icons/status/channel/res_288.png b/data/icons/status/channel/res_288.png index 2e7b1dab8..abbf050d0 100644 Binary files a/data/icons/status/channel/res_288.png and b/data/icons/status/channel/res_288.png differ diff --git a/data/icons/status/channel/res_352.png b/data/icons/status/channel/res_352.png index 0bc8d412f..a826bc5b7 100644 Binary files a/data/icons/status/channel/res_352.png and b/data/icons/status/channel/res_352.png differ diff --git a/data/icons/status/channel/res_382.png b/data/icons/status/channel/res_382.png index 71ac724e7..f78fc69c1 100644 Binary files a/data/icons/status/channel/res_382.png and b/data/icons/status/channel/res_382.png differ diff --git a/data/icons/status/channel/res_480.png b/data/icons/status/channel/res_480.png index ce78e7cbe..1926d3de4 100644 Binary files a/data/icons/status/channel/res_480.png and b/data/icons/status/channel/res_480.png differ diff --git a/data/icons/status/channel/res_528.png b/data/icons/status/channel/res_528.png index 5f6914b78..f1dc8e40f 100644 Binary files a/data/icons/status/channel/res_528.png and b/data/icons/status/channel/res_528.png differ diff --git a/data/icons/status/channel/res_544.png b/data/icons/status/channel/res_544.png index 0489b9664..38284028a 100644 Binary files a/data/icons/status/channel/res_544.png and b/data/icons/status/channel/res_544.png differ diff --git a/data/icons/status/channel/res_576.png b/data/icons/status/channel/res_576.png index f171387ef..a2a8f48d0 100644 Binary files a/data/icons/status/channel/res_576.png and b/data/icons/status/channel/res_576.png differ diff --git a/data/icons/status/channel/res_704.png b/data/icons/status/channel/res_704.png index 4086c8c73..d74edd3d8 100644 Binary files a/data/icons/status/channel/res_704.png and b/data/icons/status/channel/res_704.png differ diff --git a/data/icons/status/channel/res_720.png b/data/icons/status/channel/res_720.png index 694a7a790..c5cfcfcff 100644 Binary files a/data/icons/status/channel/res_720.png and b/data/icons/status/channel/res_720.png differ diff --git a/data/icons/status/channel/res_hd.png b/data/icons/status/channel/res_hd.png index c70fe0c54..bd2f6e7a7 100644 Binary files a/data/icons/status/channel/res_hd.png and b/data/icons/status/channel/res_hd.png differ diff --git a/data/icons/status/channel/res_sd.png b/data/icons/status/channel/res_sd.png index 67ffccf53..d23dc1f03 100644 Binary files a/data/icons/status/channel/res_sd.png and b/data/icons/status/channel/res_sd.png differ diff --git a/data/icons/status/channel/subt.png b/data/icons/status/channel/subt.png index 7cc7d8395..d43c03e4f 100644 Binary files a/data/icons/status/channel/subt.png and b/data/icons/status/channel/subt.png differ diff --git a/data/icons/status/channel/subt_gray.png b/data/icons/status/channel/subt_gray.png index c3745be2a..e6ce92e75 100644 Binary files a/data/icons/status/channel/subt_gray.png and b/data/icons/status/channel/subt_gray.png differ diff --git a/data/icons/status/channel/tuner_1.png b/data/icons/status/channel/tuner_1.png index 659a16bae..bb95576f9 100644 Binary files a/data/icons/status/channel/tuner_1.png and b/data/icons/status/channel/tuner_1.png differ diff --git a/data/icons/status/channel/tuner_2.png b/data/icons/status/channel/tuner_2.png index a0b2f2640..e62aba12f 100644 Binary files a/data/icons/status/channel/tuner_2.png and b/data/icons/status/channel/tuner_2.png differ diff --git a/data/icons/status/channel/tuner_3.png b/data/icons/status/channel/tuner_3.png index b2d5db40d..d446bc974 100644 Binary files a/data/icons/status/channel/tuner_3.png and b/data/icons/status/channel/tuner_3.png differ diff --git a/data/icons/status/channel/tuner_4.png b/data/icons/status/channel/tuner_4.png index 6e77ef1e9..13a0c1224 100644 Binary files a/data/icons/status/channel/tuner_4.png and b/data/icons/status/channel/tuner_4.png differ diff --git a/data/icons/status/channel/vtxt.png b/data/icons/status/channel/vtxt.png index 911544425..c9ec4fad7 100644 Binary files a/data/icons/status/channel/vtxt.png and b/data/icons/status/channel/vtxt.png differ diff --git a/data/icons/status/channel/vtxt_gray.png b/data/icons/status/channel/vtxt_gray.png index 411234025..341d64aeb 100644 Binary files a/data/icons/status/channel/vtxt_gray.png and b/data/icons/status/channel/vtxt_gray.png differ diff --git a/data/icons/various/stars.png b/data/icons/various/stars.png index affa178b9..b6189f1db 100644 Binary files a/data/icons/various/stars.png and b/data/icons/various/stars.png differ diff --git a/data/icons/various/stars_bg.png b/data/icons/various/stars_bg.png index ee4b28c02..be87f9d2c 100644 Binary files a/data/icons/various/stars_bg.png and b/data/icons/various/stars_bg.png differ diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index ee4ee4282..47e7509a4 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -753,6 +753,7 @@ fontmenu.scaling_x_hint2 Horizontal (in %) min 50 / max 200 fontmenu.scaling_y Vertikal (in %) fontmenu.scaling_y_hint2 Vertikal (in %) min 50 / max 200 fontmenu.sizes Schriftgrößen +fontsize.button_text Schaltflächen-Text fontsize.channel_num_zap Direktauswahl fontsize.channellist Kanalliste fontsize.channellist_descr Beschreibung diff --git a/data/locale/english.locale b/data/locale/english.locale index bc3df1419..c57f56963 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -356,7 +356,7 @@ colormenu.hd_preset LCD colormenu.menucolors Colors colormenu.osd_preset TV preset colormenu.progressbar_active Aktive part color -colormenu.progressbat_passive Background +colormenu.progressbar_passive Background colormenu.sd_preset CRT colormenu.textcolor Text color colormenu.themeselect Select theme @@ -753,6 +753,7 @@ fontmenu.scaling_x_hint2 Horizontal (in %) min 50 / max 200 fontmenu.scaling_y Vertical (in %) fontmenu.scaling_y_hint2 Vertical (in %) min 50 / max 200 fontmenu.sizes Font sizes +fontsize.button_text Button text fontsize.channel_num_zap direct selection fontsize.channellist Channellist fontsize.channellist_descr Description diff --git a/data/locale/nederlands.locale b/data/locale/nederlands.locale index dcd277284..b4c78e9e0 100644 --- a/data/locale/nederlands.locale +++ b/data/locale/nederlands.locale @@ -665,6 +665,7 @@ fontmenu.scaling_x_hint2 Horizontaal (in %) min 50 / max 200 fontmenu.scaling_y Verticaal (in %) fontmenu.scaling_y_hint2 Verticaal (in %) min 50 / max 200 fontmenu.sizes Lettertype grootte +fontsize.button_text Button text fontsize.channel_num_zap directe selectie fontsize.channellist Kanalenlijst fontsize.channellist_descr Omschrijving diff --git a/data/locale/slovak.locale b/data/locale/slovak.locale index 1eb61286d..22ca09a52 100644 --- a/data/locale/slovak.locale +++ b/data/locale/slovak.locale @@ -712,6 +712,7 @@ fontmenu.scaling_x_hint2 Vodorovne (v %) min 50 / max 200 fontmenu.scaling_y Zvislo (v %) fontmenu.scaling_y_hint2 Zvislo (v %) min 50 / max 200 fontmenu.sizes Veľkosti písma +fontsize.button_text Button text fontsize.channel_num_zap Priamy výber fontsize.channellist Zoznam kanálov fontsize.channellist_descr Popis diff --git a/src/driver/pictureviewer/png.cpp b/src/driver/pictureviewer/png.cpp index 55f30613d..808a2147c 100644 --- a/src/driver/pictureviewer/png.cpp +++ b/src/driver/pictureviewer/png.cpp @@ -35,6 +35,7 @@ int int_png_load(const char *name, unsigned char **buffer, int* xp, int* yp, int int bit_depth, color_type, interlace_type, number_passes, pass, int_bpp; png_byte * fbptr; FILE * fh; + bool updateInfo_alreadyRead = false; if(!(fh=fopen(name,"rb"))) return(FH_ERROR_FILE); @@ -59,18 +60,49 @@ int int_png_load(const char *name, unsigned char **buffer, int* xp, int* yp, int png_init_io(png_ptr,fh); png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL); - if (alpha) + if (alpha) // 24bit or gray scale PNGs with alpha-channel { *bpp = png_get_channels(png_ptr, info_ptr); - if ((*bpp != 4) || !(color_type & PNG_COLOR_MASK_ALPHA)) - { + if ((*bpp == 2) && (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) { + if (bit_depth < 8) { + /* Extract multiple pixels with bit depths of 1, 2, and 4 + from a single byte into separate bytes + (useful for paletted and grayscale images). */ + png_set_packing(png_ptr); + /* Expand grayscale images to the full 8 bits + from 1, 2, or 4 bits/pixel */ +#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR <= 2 && PNG_LIBPNG_VER_RELEASE < 9 + png_set_gray_1_2_4_to_8(png_ptr); +#else + png_set_expand_gray_1_2_4_to_8(png_ptr); +#endif + } + /* Expand the grayscale to 24-bit RGB if necessary. */ + png_set_gray_to_rgb(png_ptr); + /* Update the users info structure */ + png_read_update_info(png_ptr, info_ptr); + updateInfo_alreadyRead = true; + *bpp = png_get_channels(png_ptr, info_ptr); + if (*bpp != 4) { + /* No 4 channels found + load PNG without alpha channel */ + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + fclose(fh); + return fh_png_load(name, buffer, xp, yp); + } + } + else if ((*bpp != 4) || !(color_type & PNG_COLOR_MASK_ALPHA)) { + /* No 4 channels & not an alpha channel found + load PNG without alpha channel */ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); fclose(fh); return fh_png_load(name, buffer, xp, yp); } - // 24bit PNGs with alpha-channel int_bpp = 4; -// png_set_swap_alpha(png_ptr); + + /* Expand paletted or RGB images with transparency + to full alpha channels so the data will + be available as RGBA quartets. */ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); }else // All other PNGs @@ -101,7 +133,9 @@ int int_png_load(const char *name, unsigned char **buffer, int* xp, int* yp, int if (bit_depth == 16) png_set_strip_16(png_ptr); number_passes = png_set_interlace_handling(png_ptr); - png_read_update_info(png_ptr,info_ptr); + /* Update the users info structure */ + if (!updateInfo_alreadyRead) + png_read_update_info(png_ptr,info_ptr); unsigned long rowbytes = png_get_rowbytes(png_ptr, info_ptr); if (width * int_bpp != rowbytes) { diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index fc53b32eb..27eddc44a 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2008,7 +2008,6 @@ void CChannelList::paintItem(int pos, const bool firstpaint) if (frameBuffer->paintIcon(record_icon, icon_x_right - icon_w, ypos, fheight)) { offset_right += icon_w + OFFSET_INNER_MID; - icon_x_right -= icon_w + OFFSET_INNER_MID; } } diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index 0331a5a75..18b3d31ea 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -33,7 +33,6 @@ #include #include "cc_frm_button.h" - using namespace std; CComponentsButton::CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h, @@ -44,7 +43,7 @@ CComponentsButton::CComponentsButton( const int& x_pos, const int& y_pos, const int shadow_mode, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) { - cc_btn_capt_locale = NONEXISTANT_LOCALE; + cc_btn_text_locale = NONEXISTANT_LOCALE; initVarButton(x_pos, y_pos, w, h, caption, icon_name, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow); } @@ -56,8 +55,8 @@ CComponentsButton::CComponentsButton( const int& x_pos, const int& y_pos, const int shadow_mode, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) { - cc_btn_capt_locale = caption_locale; - initVarButton(x_pos, y_pos, w, h, g_Locale->getText(cc_btn_capt_locale), icon_name, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow); + cc_btn_text_locale = caption_locale; + initVarButton(x_pos, y_pos, w, h, g_Locale->getText(cc_btn_text_locale), icon_name, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow); } CComponentsButton::CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h, @@ -81,8 +80,8 @@ CComponentsButton::CComponentsButton( const int& x_pos, const int& y_pos, const fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) { string _icon_name = icon_name == NULL ? "" : string(icon_name); - cc_btn_capt_locale = caption_locale; - initVarButton(x_pos, y_pos, w, h, g_Locale->getText(cc_btn_capt_locale), _icon_name, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow); + cc_btn_text_locale = caption_locale; + initVarButton(x_pos, y_pos, w, h, g_Locale->getText(cc_btn_text_locale), _icon_name, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow); } void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const int& w, const int& h, @@ -116,14 +115,14 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const append_y_offset = 0; corner_rad = RADIUS_SMALL; - cc_btn_capt_col = cc_body_gradient_enable ? COL_BUTTON_TEXT_ENABLED : COL_MENUFOOT_TEXT; - cc_btn_capt_disable_col = cc_body_gradient_enable ? COL_BUTTON_TEXT_DISABLED : COL_MENUCONTENTINACTIVE_TEXT; + cc_btn_text_col = cc_body_gradient_enable ? COL_BUTTON_TEXT_ENABLED : COL_MENUFOOT_TEXT; + cc_btn_text_disable_col = cc_body_gradient_enable ? COL_BUTTON_TEXT_DISABLED : COL_MENUCONTENTINACTIVE_TEXT; cc_btn_icon_obj = NULL; - cc_btn_capt_obj = NULL; + cc_btn_text_obj = NULL; cc_btn_dy_font = CNeutrinoFonts::getInstance(); - cc_btn_font = NULL; + cc_btn_font = g_Font[SNeutrinoSettings::FONT_TYPE_BUTTON_TEXT]; cc_btn_icon = icon_name; - cc_btn_capt = caption; + cc_btn_text = caption; cc_directKey = CRCInput::RC_nokey; cc_directKeyAlt = cc_directKey; cc_btn_result = -1; @@ -172,30 +171,34 @@ void CComponentsButton::initIcon() void CComponentsButton::initCaption() { //init label as caption object and add to container - if (!cc_btn_capt.empty()){ - if (cc_btn_capt_obj == NULL){ - cc_btn_capt_obj = new CComponentsLabel(); - cc_btn_capt_obj->doPaintBg(false); - cc_btn_capt_obj->doPaintTextBoxBg(false); - cc_btn_capt_obj->enableTboxSaveScreen(cc_txt_save_screen); - addCCItem(cc_btn_capt_obj); + if (!cc_btn_text.empty()){ + if (cc_btn_text_obj == NULL){ + cc_btn_text_obj = new CComponentsLabel(); + cc_btn_text_obj->doPaintBg(false); + cc_btn_text_obj->doPaintTextBoxBg(false); + cc_btn_text_obj->enableTboxSaveScreen(cc_txt_save_screen); + addCCItem(cc_btn_text_obj); } }else{ - if (cc_btn_capt_obj){ - delete cc_btn_capt_obj; - cc_btn_capt_obj = NULL; + if (cc_btn_text_obj){ + delete cc_btn_text_obj; + cc_btn_text_obj = NULL; } } //set basic properties int w_frame = fr_thickness; - if (cc_btn_capt_obj){ + if (cc_btn_text_obj){ //position and size int x_cap = w_frame; x_cap += cc_btn_icon_obj ? cc_btn_icon_obj->getWidth() : 0; + /* use system defined font as default if not defined */ + if (cc_btn_font == NULL) + cc_btn_font = g_Font[SNeutrinoSettings::FONT_TYPE_BUTTON_TEXT]; + int w_cap = width - w_frame - append_x_offset - x_cap - w_frame; - int h_cap = (height*85/100) - 2*w_frame; + int h_cap = min(height - 2*w_frame, cc_btn_font->getHeight()); /*NOTE: paint of centered text in y direction without y_offset looks unlovely displaced in y direction especially besides small icons and inside small areas, @@ -204,42 +207,37 @@ void CComponentsButton::initCaption() */ int y_cap = height/2 - h_cap/2; - cc_btn_capt_obj->setDimensionsAll(x_cap, y_cap, w_cap, h_cap); + cc_btn_text_obj->setDimensionsAll(x_cap, y_cap, w_cap, h_cap); //text and font - Font* def_font = *cc_btn_dy_font->getDynFont(w_cap, h_cap, cc_btn_capt); - if (cc_btn_font == NULL){ - /* use dynamic font as default font if no font defined */ + Font* def_font = *cc_btn_dy_font->getDynFont(w_cap, h_cap, cc_btn_text); + /* If button dimension too small, use dynamic font, this ignores possible defined font + * Otherwise definied font will be used. Button dimensions are calculated from parent container (e.g. footer...). + * These dimensions must be enough to display complete content like possible icon and without truncated text. + */ + if ((cc_btn_font->getHeight()- 2*w_frame) > h_cap && (cc_btn_font->getRenderWidth(cc_btn_text)- 2*w_frame) > w_cap) cc_btn_font = def_font; - }else{ - /* if button dimension too small, use dynamic font as default font size, this ignores possible defined font - * Otherwise definied font will be used. - */ - if (cc_btn_font->getHeight() > h_cap){ - cc_btn_font = def_font; - } - } - cc_btn_capt_obj->setText(cc_btn_capt, CTextBox::NO_AUTO_LINEBREAK, cc_btn_font); - cc_btn_capt_obj->forceTextPaint(); //here required; - cc_btn_capt_obj->getCTextBoxObject()->setTextBorderWidth(0,0); + cc_btn_text_obj->setText(cc_btn_text, CTextBox::NO_AUTO_LINEBREAK, cc_btn_font); + cc_btn_text_obj->forceTextPaint(); //here required; + cc_btn_text_obj->getCTextBoxObject()->setTextBorderWidth(0,0); //set color - cc_btn_capt_obj->setTextColor(this->cc_item_enabled ? cc_btn_capt_col : cc_btn_capt_disable_col); + cc_btn_text_obj->setTextColor(this->cc_item_enabled ? cc_btn_text_col : cc_btn_text_disable_col); //corner of text item - cc_btn_capt_obj->setCorner(corner_rad-w_frame, corner_type); + cc_btn_text_obj->setCorner(corner_rad-w_frame, corner_type); } //handle common position of icon and text inside container required for alignment int w_required = w_frame + append_x_offset; w_required += cc_btn_icon_obj ? cc_btn_icon_obj->getWidth() + append_x_offset : 0; - w_required += cc_btn_font ? cc_btn_font->getRenderWidth(cc_btn_capt) : 0; + w_required += cc_btn_font ? cc_btn_font->getRenderWidth(cc_btn_text) : 0; w_required += append_x_offset + w_frame; //dynamic width if (w_required > width){ - dprintf(DEBUG_INFO, "[CComponentsButton] [%s - %d] width of button (%s) will be changed: defined width=%d, required width=%d\n", __func__, __LINE__, cc_btn_capt.c_str(), width, w_required); + dprintf(DEBUG_INFO, "[CComponentsButton] [%s - %d] width of button (%s) will be changed: defined width=%d, required width=%d\n", __func__, __LINE__, cc_btn_text.c_str(), width, w_required); width = max(w_required, width); } @@ -256,22 +254,22 @@ void CComponentsButton::initCaption() int y_icon = height/2 - cc_btn_icon_obj->getHeight()/2; cc_btn_icon_obj->setYPos(y_icon); } - if (cc_btn_capt_obj){ - cc_btn_capt_obj->setXPos(x_icon + w_icon + append_x_offset); - cc_btn_capt_obj->setWidth(width - cc_btn_capt_obj->getXPos()); + if (cc_btn_text_obj){ + cc_btn_text_obj->setXPos(x_icon + w_icon + append_x_offset); + cc_btn_text_obj->setWidth(width - cc_btn_text_obj->getXPos()); } } void CComponentsButton::setCaption(const std::string& text) { - cc_btn_capt = text; + cc_btn_text = text; initCCBtnItems(); } void CComponentsButton::setCaption(const neutrino_locale_t locale_text) { - cc_btn_capt_locale = locale_text; - setCaption(g_Locale->getText(cc_btn_capt_locale)); + cc_btn_text_locale = locale_text; + setCaption(g_Locale->getText(cc_btn_text_locale)); } void CComponentsButton::initCCBtnItems() diff --git a/src/gui/components/cc_frm_button.h b/src/gui/components/cc_frm_button.h index 80653e2be..a0540636b 100644 --- a/src/gui/components/cc_frm_button.h +++ b/src/gui/components/cc_frm_button.h @@ -50,7 +50,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen ///object: picture object CComponentsPictureScalable *cc_btn_icon_obj; ///object: label object - CComponentsLabel *cc_btn_capt_obj; + CComponentsLabel *cc_btn_text_obj; ///initialize all required attributes and objects void initVarButton( const int& x_pos, const int& y_pos, const int& w, const int& h, @@ -63,9 +63,9 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow); ///property: button text as string, see also setCaption() and getCaptionString() - std::string cc_btn_capt; + std::string cc_btn_text; ///property: button text as locale, see also setCaption() and getCaptionLocale() - neutrino_locale_t cc_btn_capt_locale; + neutrino_locale_t cc_btn_text_locale; ///property: icon name, only icons supported, to find in gui/widget/icons.h std::string cc_btn_icon; @@ -80,9 +80,9 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen int cc_btn_alias; ///property: text color - fb_pixel_t cc_btn_capt_col; + fb_pixel_t cc_btn_text_col; ///property: text color for disabled button - fb_pixel_t cc_btn_capt_disable_col; + fb_pixel_t cc_btn_text_disable_col; ///object: text font Font* cc_btn_font; ///object: dynamic font object handler @@ -135,7 +135,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); ///set text color - inline virtual void setButtonTextColor(fb_pixel_t caption_color){cc_btn_capt_col = caption_color;}; + inline virtual void setButtonTextColor(fb_pixel_t caption_color){cc_btn_text_col = caption_color;}; /**Member to modify background behavior of embeded caption object. * @param[in] mode @@ -164,9 +164,9 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen virtual void setCaption(const neutrino_locale_t locale_text); ///get caption, type as std::string - inline virtual std::string getCaptionString(){return cc_btn_capt;}; + inline virtual std::string getCaptionString(){return cc_btn_text;}; ///get loacalized caption id, type = neutrino_locale_t - inline virtual neutrino_locale_t getCaptionLocale(){return cc_btn_capt_locale;}; + inline virtual neutrino_locale_t getCaptionLocale(){return cc_btn_text_locale;}; ///property: set font for label caption, parameter as font object, value NULL causes usaage of dynamic font virtual void setButtonFont(Font* font){cc_btn_font = font; initCCBtnItems();}; diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index 5b39177f0..9d4fda733 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -68,6 +68,12 @@ void CComponentsFooter::initVarFooter( const int& x_pos, const int& y_pos, const //init footer width width = w == 0 ? frameBuffer->getScreenWidth(true) : w; + //init default fonts + initDefaultFonts(); + + //init default button text font + ccf_btn_font = g_Font[SNeutrinoSettings::FONT_TYPE_BUTTON_TEXT]; + //init footer height initCaptionFont(); height = max(h, cch_font->getHeight()); @@ -88,7 +94,6 @@ void CComponentsFooter::initVarFooter( const int& x_pos, const int& y_pos, const corner_type = CORNER_BOTTOM; ccf_enable_button_bg = false /*g_settings.theme.Button_gradient*/; //TODO: not implemented at the moment - ccf_btn_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]; chain = NULL; addContextButton(buttons); @@ -426,3 +431,9 @@ void CComponentsFooter::enableButtonShadow(int mode, const int& shadow_width, bo } } } + +void CComponentsFooter::initDefaultFonts() +{ + l_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]; + s_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]; +} diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index 8f56a1003..23ea75125 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -84,6 +84,9 @@ class CComponentsFooter : public CComponentsHeader ///property: set font for label caption, see also setButtonFont() Font* ccf_btn_font; + ///init default fonts for size modes + virtual void initDefaultFonts(); + ///container for button objects CComponentsFrmChain *chain; diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 8a3dff514..032763d16 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -96,6 +96,7 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const height = height_old = h; cch_font = NULL; + initDefaultFonts(); cch_size_mode = CC_HEADER_SIZE_LARGE; CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CComponentsHeader::resetFont)); @@ -165,16 +166,20 @@ void CComponentsHeader::setCaptionFont(Font* font) void CComponentsHeader::resetFont() { if (cch_font){ - cch_font = NULL; dprintf(DEBUG_DEBUG, "\033[33m[CComponentsHeader][%s - %d] reset header font \033[0m\n", __func__, __LINE__); + cch_font = NULL; } + initDefaultFonts(); +} + +void CComponentsHeader::initDefaultFonts() +{ + l_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]; + s_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]; } void CComponentsHeader::initCaptionFont() { - Font *l_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]; - Font *s_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]; - if (cch_font == NULL){ cch_font = (cch_size_mode == CC_HEADER_SIZE_LARGE? l_font : s_font); //select matching height @@ -231,11 +236,10 @@ void CComponentsHeader::initIcon() cch_icon_obj->doPaintBg(false); //set corner mode of icon item - int cc_icon_corner_type = corner_type; + int cc_icon_corner_type = CORNER_LEFT; if (corner_type == CORNER_TOP_LEFT || corner_type == CORNER_TOP) cc_icon_corner_type = CORNER_TOP_LEFT; - else - cc_icon_corner_type = CORNER_LEFT; + cch_icon_obj->setCorner(corner_rad-fr_thickness, cc_icon_corner_type); //global set width of icon object @@ -335,11 +339,10 @@ void CComponentsHeader::initButtons() cch_btn_obj->addIcon(v_cch_btn); //set corner mode of button item - int cc_btn_corner_type = corner_type; + int cc_btn_corner_type = CORNER_RIGHT; if (corner_type == CORNER_TOP_RIGHT || corner_type == CORNER_TOP) cc_btn_corner_type = CORNER_TOP_RIGHT; - else - cc_btn_corner_type = CORNER_RIGHT; + cch_btn_obj->setCorner(corner_rad-fr_thickness, cc_btn_corner_type); //global adapt height @@ -412,11 +415,10 @@ void CComponentsHeader::initClock() cch_cl_obj->setClockFormat(cch_cl_format, cch_cl_sec_format); //set corner mode of button item - int cc_btn_corner_type = corner_type; + int cc_btn_corner_type = CORNER_RIGHT; if (corner_type == CORNER_TOP_RIGHT || corner_type == CORNER_TOP) cc_btn_corner_type = CORNER_TOP_RIGHT; - else - cc_btn_corner_type = CORNER_RIGHT; + cch_cl_obj->setCorner(corner_rad-fr_thickness, cc_btn_corner_type); //global adapt height diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index 6d3169c12..df444ee7a 100644 --- a/src/gui/components/cc_frm_header.h +++ b/src/gui/components/cc_frm_header.h @@ -67,7 +67,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen ///property: caption text color, see also setCaptionColor() fb_pixel_t cch_col_text; ///property: caption font, see also setCaptionFont() - Font* cch_font; + Font* cch_font, *l_font, *s_font; ///reset font void resetFont(); @@ -102,6 +102,8 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen ///init font object and recalculates height if required void initCaptionFont(); + ///init default fonts for size modes + virtual void initDefaultFonts(); ///sub: init icon object void initIcon(); ///sub: init caption object diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index 451d74be3..7137f76ab 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -145,7 +145,7 @@ void CComponentsWindow::initVarWindow( const int& x_pos, const int& y_pos, const ccw_right_sidebar= NULL; ccw_body = NULL; ccw_footer = NULL; - ccw_button_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]; + ccw_button_font = g_Font[SNeutrinoSettings::FONT_TYPE_BUTTON_TEXT]; ccw_buttons = 0; //no header buttons ccw_show_footer = true; diff --git a/src/gui/components/cc_timer.cpp b/src/gui/components/cc_timer.cpp index 566a829e1..11ae9b35e 100644 --- a/src/gui/components/cc_timer.cpp +++ b/src/gui/components/cc_timer.cpp @@ -98,7 +98,8 @@ void CComponentsTimer::initThread() if (res != 0){ dprintf(DEBUG_NORMAL,"\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_create\033[0m\n", __func__, __LINE__); return; - } + }else + dprintf(DEBUG_DEBUG,"\033[33m[CComponentsTimer] [%s - %d] started thread ID:%ld \033[0m\n", __func__, __LINE__, pthread_self()); if (res == 0) CNeutrinoApp::getInstance()->OnBeforeRestart.connect(sl_stop_timer); @@ -111,17 +112,17 @@ void CComponentsTimer::stopThread() while (!sl_stop_timer.empty()) sl_stop_timer.disconnect(); - if(tm_thread) { + while(tm_thread) { int thres = pthread_cancel(tm_thread); if (thres != 0) - dprintf(DEBUG_NORMAL,"\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_cancel, [%d]\033[0m\n", __func__, __LINE__, thres); + dprintf(DEBUG_NORMAL,"\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_cancel, error [%d] %s\033[0m\n", __func__, __LINE__, thres, strerror(thres)); - thres = pthread_join(tm_thread, NULL); + void* res; + thres = pthread_join(tm_thread, &res); - if (thres != 0) - dprintf(DEBUG_NORMAL, "\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_join, [%d]\033[0m\n", __func__, __LINE__, thres); - - if (thres == 0) + if (res != PTHREAD_CANCELED) + dprintf(DEBUG_NORMAL, "\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_join, thread ID:%ld, error [%d] %s\033[0m\n", __func__, __LINE__, pthread_self(), thres, strerror(thres)); + else tm_thread = 0; } } diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 895154b58..b7ef1af46 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -164,7 +164,7 @@ void CInfoViewerBB::getBBIconInfo() initBBOffset(); BBarY = g_InfoViewer->BoxEndY + bottom_bar_offset; BBarFontY = BBarY + InfoHeightY_Info - (InfoHeightY_Info - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()) / 2; /* center in buttonbar */ - bbIconMinX = g_InfoViewer->BoxEndX - 8; //should be 10px, but 2px will be reduced for each icon + bbIconMinX = g_InfoViewer->BoxEndX - OFFSET_INNER_MID; CNeutrinoApp* neutrino = CNeutrinoApp::getInstance(); for (int i = 0; i < CInfoViewerBB::ICON_MAX; i++) { @@ -207,7 +207,9 @@ void CInfoViewerBB::getBBIconInfo() break; } if (iconView) { - bbIconMinX -= w + 2; + if (i > 0) + bbIconMinX -= OFFSET_INNER_SMALL; //NI + bbIconMinX -= w; bbIconInfo[i].x = bbIconMinX; bbIconInfo[i].h = h; } @@ -219,7 +221,7 @@ void CInfoViewerBB::getBBIconInfo() bbIconMaxH = std::max(bbIconMaxH, bbIconInfo[i].h); } if (g_settings.infobar_show_sysfs_hdd) - bbIconMinX -= hddwidth + 2; + bbIconMinX -= hddwidth + OFFSET_INNER_MID; //NI } void CInfoViewerBB::getBBButtonInfo() @@ -799,7 +801,7 @@ void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_o } else { icon_space_offset += icon_sizeW[icon_map[caid].first]; px = endx - icon_space_offset; - icon_space_offset += 4; + icon_space_offset += icon_space; //NI } if (px) { @@ -1026,7 +1028,7 @@ void CInfoViewerBB::paint_cam_icons() int emu_pic_startx = g_InfoViewer->ChanInfoX + (g_settings.infobar_casystem_frame ? 20 : 10); int py = g_InfoViewer->BoxEndY + (g_settings.infobar_casystem_frame ? 4 : 2); const char *icon_name[] = {"mgcamd","doscam","oscam","osemu","newcs","gbox"}; - static int icon_space[] = {14,14,14,14,14,14}; + static int icon_space[] = {10,10,10,10,10,10}; int icon_sizeH = 0; int icon_sizeW = 0; bool useCI = CCamManager::getInstance()->getUseCI(); diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 4364bf234..e61edacb7 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -170,7 +170,8 @@ size_t moviebrowser_font_items = sizeof(moviebrowser_font_sizes)/sizeof(moviebro const SNeutrinoSettings::FONT_TYPES other_font_sizes[] = { SNeutrinoSettings::FONT_TYPE_SUBTITLES, - SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM + SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM, + SNeutrinoSettings::FONT_TYPE_BUTTON_TEXT }; size_t other_font_items = sizeof(other_font_sizes)/sizeof(other_font_sizes[0]); @@ -225,7 +226,8 @@ font_sizes_struct neutrino_font[SNeutrinoSettings::FONT_TYPE_COUNT] = {LOCALE_FONTSIZE_MOVIEBROWSER_LIST , 20, CNeutrinoFonts::FONT_STYLE_REGULAR, 0}, //NI {LOCALE_FONTSIZE_MOVIEBROWSER_INFO , 16, CNeutrinoFonts::FONT_STYLE_REGULAR, 0}, //NI {LOCALE_FONTSIZE_SUBTITLES , 25, CNeutrinoFonts::FONT_STYLE_BOLD , 0}, - {LOCALE_FONTSIZE_MESSAGE_TEXT , 20, CNeutrinoFonts::FONT_STYLE_BOLD , 0} //NI + {LOCALE_FONTSIZE_MESSAGE_TEXT , 20, CNeutrinoFonts::FONT_STYLE_BOLD , 0}, //NI + {LOCALE_FONTSIZE_BUTTON_TEXT , 14, CNeutrinoFonts::FONT_STYLE_REGULAR, 0} }; int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index e17b7cfe1..92660e09c 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1649,9 +1649,6 @@ void CNeutrinoApp::channelsInit(bool bOnly) RADIObouquetList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_PROVS)); RADIOfavList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_FAVS)); - uint32_t i; - i = 1; - int tvi = 0, ri = 0; ZapitChannelList zapitList, webtvList; @@ -1779,7 +1776,7 @@ void CNeutrinoApp::channelsInit(bool bOnly) /* Favorites and providers bouquets */ tvi = ri = 0; if(g_bouquetManager){ - for (i = 0; i < g_bouquetManager->Bouquets.size(); i++) { + for (uint32_t i = 0; i < g_bouquetManager->Bouquets.size(); i++) { CZapitBouquet *b = g_bouquetManager->Bouquets[i]; if (!b->bHidden) { if (b->getTvChannels(zapitList) || (g_settings.show_empty_favorites && b->bUser)) { @@ -3034,7 +3031,7 @@ void CNeutrinoApp::zapTo(t_channel_id channel_id) { bool recordingStatus = CRecordManager::getInstance()->RecordingStatus(channel_id); if (!recordingStatus || (recordingStatus && CRecordManager::getInstance()->TimeshiftOnly()) || - (recordingStatus && channelList->SameTP(channel_id))) { + (recordingStatus && channelList && channelList->SameTP(channel_id))) { dvbsub_stop(); g_Zapit->zapTo_serviceID_NOWAIT(channel_id); @@ -3069,7 +3066,8 @@ void CNeutrinoApp::standbyToStandby(void) t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); if (standby_channel_id && (live_channel_id != standby_channel_id)) { live_channel_id = standby_channel_id; - channelList->zapTo_ChannelID(live_channel_id); + if(channelList) + channelList->zapTo_ChannelID(live_channel_id); } g_Zapit->setStandby(true); g_Sectionsd->setPauseScanning(true); @@ -3496,7 +3494,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) CTimerd::EventInfo * eventinfo = (CTimerd::EventInfo *) data; if (eventinfo->channel_id != CZapit::getInstance()->GetCurrentChannelID()){ if( (recordingstatus == 0) || (recordingstatus && CRecordManager::getInstance()->TimeshiftOnly()) || - (recordingstatus && channelList->SameTP(eventinfo->channel_id)) ) { + (recordingstatus && channelList && channelList->SameTP(eventinfo->channel_id)) ) { bool isTVMode = CServiceManager::getInstance()->IsChannelTVChannel(eventinfo->channel_id); dvbsub_stop(); @@ -3507,7 +3505,9 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) else if (isTVMode && (mode != mode_tv) && (mode != mode_webtv)) { tvMode(true); } - channelList->zapTo_ChannelID(eventinfo->channel_id); + + if(channelList) + channelList->zapTo_ChannelID(eventinfo->channel_id); } } delete[] (unsigned char*) data; @@ -5197,7 +5197,7 @@ bool CNeutrinoApp::adjustToChannelID(const t_channel_id channel_id) if(!has_channel && old_mode == LIST_MODE_SAT) new_mode = LIST_MODE_ALL; - has_channel = TVallList->adjustToChannelID(channel_id); + TVallList->adjustToChannelID(channel_id); } else if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio) { has_channel = RADIOfavList->adjustToChannelID(channel_id); @@ -5224,7 +5224,7 @@ bool CNeutrinoApp::adjustToChannelID(const t_channel_id channel_id) if(!has_channel && old_mode == LIST_MODE_SAT) new_mode = LIST_MODE_ALL; - has_channel = RADIOallList->adjustToChannelID(channel_id); + RADIOallList->adjustToChannelID(channel_id); } if(old_mode != new_mode) CNeutrinoApp::getInstance()->SetChannelMode(new_mode); diff --git a/src/system/locals.h b/src/system/locals.h index d363b6005..b5ab61615 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -780,6 +780,7 @@ typedef enum LOCALE_FONTMENU_SCALING_Y, LOCALE_FONTMENU_SCALING_Y_HINT2, LOCALE_FONTMENU_SIZES, + LOCALE_FONTSIZE_BUTTON_TEXT, LOCALE_FONTSIZE_CHANNEL_NUM_ZAP, LOCALE_FONTSIZE_CHANNELLIST, LOCALE_FONTSIZE_CHANNELLIST_DESCR, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 77ebcb11c..a92e7e00b 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -780,6 +780,7 @@ const char * locale_real_names[] = "fontmenu.scaling_y", "fontmenu.scaling_y_hint2", "fontmenu.sizes", + "fontsize.button_text", "fontsize.channel_num_zap", "fontsize.channellist", "fontsize.channellist_descr", diff --git a/src/system/settings.h b/src/system/settings.h index 360c7392c..b9800645b 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -710,6 +710,7 @@ struct SNeutrinoSettings FONT_TYPE_MOVIEBROWSER_INFO, FONT_TYPE_SUBTITLES, FONT_TYPE_MESSAGE_TEXT, + FONT_TYPE_BUTTON_TEXT, FONT_TYPE_COUNT }; diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index 74b193117..766aab532 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -821,7 +821,9 @@ void CTimerManager::cancelShutdownOnWakeup() { pthread_mutex_lock(&tm_eventsMutex); if (shutdown_eventID > -1) { + pthread_mutex_unlock(&tm_eventsMutex); removeEvent(shutdown_eventID); + pthread_mutex_lock(&tm_eventsMutex); shutdown_eventID = -1; } wakeup = 0; diff --git a/src/zapit/src/fastscan.cpp b/src/zapit/src/fastscan.cpp index e91034db0..017b98ecf 100644 --- a/src/zapit/src/fastscan.cpp +++ b/src/zapit/src/fastscan.cpp @@ -77,7 +77,7 @@ diseq_test_param_t diseqc_test[] = { bool CServiceScan::TestDiseqcConfig(int num) { - if(num >= OPERATOR_MAX) { + if(num >= OPERATOR_MAX || num < 0) { INFO("[fast scan] invalid operator %d", num); return false; } @@ -218,7 +218,7 @@ bool CServiceScan::ScanFast() { fast_scan_type_t * fast_type = (fast_scan_type_t *) scan_arg; fs_operator_t num = fast_type->op; - if(num >= OPERATOR_MAX) { + if(num >= OPERATOR_MAX || num < 0) { INFO("[fast scan] invalid operator %d", num); return false; } @@ -231,7 +231,7 @@ bool CServiceScan::ScanFast() bool CServiceScan::ScanFast(int num, bool reload) { fast_scan_operator_t *op; - if(num >= OPERATOR_MAX) { + if(num >= OPERATOR_MAX || num < 0) { INFO("[fast scan] invalid operator %d", num); goto _err; } @@ -293,7 +293,7 @@ _err: bool CServiceScan::ReadFstVersion(int num) { - if(num >= OPERATOR_MAX) { + if(num >= OPERATOR_MAX || num < 0) { printf("[fast scan] invalid operator %d\n", num); return false; }