From e72c03e5f7c425cb4132f56ac93d3e8303924808 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 9 May 2013 16:32:11 +0200 Subject: [PATCH 01/56] CChannelList::show() call hide only once Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/438248bfacae93c6fe0ca30306dec538b2ed93f6 Author: Jacek Jendrzej Date: 2013-05-09 (Thu, 09 May 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 748107974..536b47430 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -601,6 +601,7 @@ int CChannelList::show() bool bouquet_changed = false; bool loop=true; + bool dont_hide = false; while (loop) { g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, true); if ( msg <= CRCInput::RC_MaxRC ) @@ -770,6 +771,7 @@ int CChannelList::show() res = bouquetList->showChannelList(); loop = false; } + dont_hide = true; } } else if ( msg == CRCInput::RC_ok ) { @@ -927,10 +929,10 @@ int CChannelList::show() if (bouquet_changed) res = -5; /* in neutrino.cpp: -5 == "don't change bouquet after adding a channel to fav" */ - - hide(); - - fader.Stop(); + if(!dont_hide){ + hide(); + fader.Stop(); + } if (bShowBouquetList) { res = bouquetList->exec(true); From cd11f3173a81aab5b8f335b4375211aa06ae2da0 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 9 May 2013 17:54:51 +0200 Subject: [PATCH 02/56] OSD Setup: Move volume settings in a separate submenu. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3d33901e5e999af3bab73ff9248971cf344ad0fa Author: Michael Liebmann Date: 2013-05-09 (Thu, 09 May 2013) Origin message was: ------------------ * OSD Setup: Move volume settings in a separate submenu. ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 2 ++ data/locale/english.locale | 2 ++ src/gui/osd_setup.cpp | 57 +++++++++++++++++++++++++------------- src/gui/osd_setup.h | 1 + src/neutrino_menue.h | 1 + src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ 7 files changed, 47 insertions(+), 20 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index de55258c8..1b99848e2 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1109,6 +1109,7 @@ menu.hint_video_modes Definiert, welche Videosysteme mit der VF-Taste der Fernbe menu.hint_video_pip Bild in Bild Größe und Position menu.hint_video_saturation Change picture saturation menu.hint_video_scart_mode Wählen Sie den Modus des Ausgangssignals für den SCART-Anschluss +menu.hint_volume Wählen Sie die Anzeigeoptionen für die Lautstärke menu.hint_volume_digits Zifferndarstellung der Lautstärkeanzeige ein- oder ausschalten menu.hint_volume_pos Wählen Sie die Position der Lautstärkeanzeige aus menu.hint_zap_cycle Wählen Sie, ob nur innerhalb des aktiven Bouquets umgeschaltet werden kann @@ -1186,6 +1187,7 @@ miscsettings.shutdown_count_hint2 den Deep-Standby geschalten wird (0 = aus) miscsettings.shutdown_real Standbymodus miscsettings.shutdown_real_rcdelay Verzögertes Ausschalten miscsettings.sleeptimer Ausschalten nach Inaktivität +miscsettings.volume Lautstärke miscsettings.zapto_pre_time Umschaltstart-Vorlaufzeit (Minuten) motorcontrol.calc_positions Positionen (Neu)-Berechne(n)) motorcontrol.disable_limit Deaktiviere (soft) Limit diff --git a/data/locale/english.locale b/data/locale/english.locale index 733169b61..30c798aea 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1109,6 +1109,7 @@ menu.hint_video_modes VF key will cycle between enabled modes menu.hint_video_pip Picture in picture size and position menu.hint_video_saturation Change picture saturation menu.hint_video_scart_mode Select analog output mode for SCART connectors +menu.hint_volume Configure Volume GUI options menu.hint_volume_digits Numeric display of the volumebar on/off menu.hint_volume_pos Select volume indicator position menu.hint_zap_cycle When swithing channels, stay in current bouquet @@ -1186,6 +1187,7 @@ miscsettings.shutdown_count_hint2 to deep standby (0 = off). miscsettings.shutdown_real Enable standby miscsettings.shutdown_real_rcdelay Delayed shutdown miscsettings.sleeptimer Inactivity shutdown timer +miscsettings.volume Volume miscsettings.zapto_pre_time Zapto Start Time Correction (minutes) motorcontrol.calc_positions (Re)-Calculate Positions motorcontrol.disable_limit Disable (soft) Limits diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index f9c23648a..6f863afba 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -394,6 +394,8 @@ const CMenuOptionChooser::keyval OPTIONS_COLORED_EVENTS_OPTIONS[OPTIONS_COLORED_ //show osd setup int COsdSetup::showOsdSetup() { + int shortcut = 1; + //osd main menu osd_menu = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP); osd_menu->setWizardMode(is_wizard); @@ -431,35 +433,42 @@ int COsdSetup::showOsdSetup() osd_menu->addItem(mf); //progressbar - mf = new CMenuForwarder(LOCALE_MISCSETTINGS_PROGRESSBAR, true, NULL, new CProgressbarSetup(), NULL, CRCInput::RC_1); + mf = new CMenuForwarder(LOCALE_MISCSETTINGS_PROGRESSBAR, true, NULL, new CProgressbarSetup(), NULL, CRCInput::convertDigitToKey(shortcut++)); mf->setHint("", LOCALE_MENU_HINT_PROGRESSBAR); osd_menu->addItem(mf); //infobar CMenuWidget osd_menu_infobar(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_INFOBAR); showOsdInfobarSetup(&osd_menu_infobar); - mf = new CMenuForwarder(LOCALE_MISCSETTINGS_INFOBAR, true, NULL, &osd_menu_infobar, NULL, CRCInput::RC_2); + mf = new CMenuForwarder(LOCALE_MISCSETTINGS_INFOBAR, true, NULL, &osd_menu_infobar, NULL, CRCInput::convertDigitToKey(shortcut++)); mf->setHint("", LOCALE_MENU_HINT_INFOBAR_SETUP); osd_menu->addItem(mf); //channellist CMenuWidget osd_menu_chanlist(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_CHANNELLIST); showOsdChanlistSetup(&osd_menu_chanlist); - mf = new CMenuForwarder(LOCALE_MISCSETTINGS_CHANNELLIST, true, NULL, &osd_menu_chanlist, NULL, CRCInput::RC_3); + mf = new CMenuForwarder(LOCALE_MISCSETTINGS_CHANNELLIST, true, NULL, &osd_menu_chanlist, NULL, CRCInput::convertDigitToKey(shortcut++)); mf->setHint("", LOCALE_MENU_HINT_CHANNELLIST_SETUP); osd_menu->addItem(mf); //eventlist CMenuWidget osd_menu_eventlist(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_EVENTLIST); showOsdEventlistSetup(&osd_menu_eventlist); - mf = new CMenuForwarder(LOCALE_EVENTLIST_NAME, true, NULL, &osd_menu_eventlist, NULL, CRCInput::RC_4); + mf = new CMenuForwarder(LOCALE_EVENTLIST_NAME, true, NULL, &osd_menu_eventlist, NULL, CRCInput::convertDigitToKey(shortcut++)); mf->setHint("", LOCALE_MENU_HINT_EVENTLIST_SETUP); osd_menu->addItem(mf); + //volume + CMenuWidget osd_menu_volume(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_VOLUME); + showOsdVolumeSetup(&osd_menu_volume); + mf = new CMenuForwarder(LOCALE_MISCSETTINGS_VOLUME, true, NULL, &osd_menu_volume, NULL, CRCInput::convertDigitToKey(shortcut++)); + mf->setHint("", LOCALE_MENU_HINT_VOLUME); + osd_menu->addItem(mf); + //screenshot CMenuWidget osd_menu_screenshot(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_SCREENSHOT); showOsdScreenShotSetup(&osd_menu_screenshot); - mf = new CMenuForwarder(LOCALE_SCREENSHOT_MENU, true, NULL, &osd_menu_screenshot, NULL, CRCInput::RC_5); + mf = new CMenuForwarder(LOCALE_SCREENSHOT_MENU, true, NULL, &osd_menu_screenshot, NULL, CRCInput::convertDigitToKey(shortcut++)); mf->setHint("", LOCALE_MENU_HINT_SCREENSHOT_SETUP); osd_menu->addItem(mf); @@ -485,21 +494,6 @@ int COsdSetup::showOsdSetup() mc->setHint("", LOCALE_MENU_HINT_SUBCHANNEL_POS); osd_menu->addItem(mc); - // volume position - mc = new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_POS, &g_settings.volume_pos, VOLUMEBAR_DISP_POS_OPTIONS, VOLUMEBAR_DISP_POS_OPTIONS_COUNT, true, this); - mc->setHint("", LOCALE_MENU_HINT_VOLUME_POS); - osd_menu->addItem(mc); - - // volume digits - mc = new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_DIGITS, &g_settings.volume_digits, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); - mc->setHint("", LOCALE_MENU_HINT_VOLUME_DIGITS); - osd_menu->addItem(mc); - - // show mute at volume 0 - mc = new CMenuOptionChooser(LOCALE_EXTRA_SHOW_MUTE_ICON, &g_settings.show_mute_icon, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); - mc->setHint("", LOCALE_MENU_HINT_SHOW_MUTE_ICON); - osd_menu->addItem(mc); - // menu position mc = new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true, this); mc->setHint("", LOCALE_MENU_HINT_MENU_POS); @@ -856,6 +850,29 @@ void COsdSetup::showOsdEventlistSetup(CMenuWidget *menu_eventlist) menu_eventlist->addItem(mc); } +// volume +void COsdSetup::showOsdVolumeSetup(CMenuWidget *menu_volume) +{ + CMenuOptionChooser * mc; + + menu_volume->addIntroItems(LOCALE_MISCSETTINGS_VOLUME); + + // volume position + mc = new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_POS, &g_settings.volume_pos, VOLUMEBAR_DISP_POS_OPTIONS, VOLUMEBAR_DISP_POS_OPTIONS_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_VOLUME_POS); + menu_volume->addItem(mc); + + // volume digits + mc = new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_DIGITS, &g_settings.volume_digits, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_VOLUME_DIGITS); + menu_volume->addItem(mc); + + // show mute at volume 0 + mc = new CMenuOptionChooser(LOCALE_EXTRA_SHOW_MUTE_ICON, &g_settings.show_mute_icon, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SHOW_MUTE_ICON); + menu_volume->addItem(mc); +} + bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) { if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_CONTRAST_FONTS)) diff --git a/src/gui/osd_setup.h b/src/gui/osd_setup.h index d3a84ce30..a6087bf37 100644 --- a/src/gui/osd_setup.h +++ b/src/gui/osd_setup.h @@ -58,6 +58,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver void showOsdInfobarSetup(CMenuWidget *menu_infobar); void showOsdChanlistSetup(CMenuWidget *menu_chanlist); void showOsdEventlistSetup(CMenuWidget *menu_eventlist); + void showOsdVolumeSetup(CMenuWidget *menu_volume); void showOsdScreenShotSetup(CMenuWidget *menu_screenshot); void AddFontSettingItem(CMenuWidget &font_Settings, const SNeutrinoSettings::FONT_TYPES number_of_fontsize_entry); diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index 970bc2afc..7ca7dffa9 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -62,6 +62,7 @@ enum MN_WIDGET_ID MN_WIDGET_ID_OSDSETUP_MENUCOLORS, MN_WIDGET_ID_OSDSETUP_TIMEOUT, MN_WIDGET_ID_OSDSETUP_SCREENSHOT, + MN_WIDGET_ID_OSDSETUP_VOLUME, //actually it does not matter, but these 6 entries must be the same order as in menu MN_WIDGET_ID_OSDSETUP_FONTSIZE_MENU, MN_WIDGET_ID_OSDSETUP_FONTSIZE_CHANNELLIST, diff --git a/src/system/locals.h b/src/system/locals.h index fe84c7659..e47ef053b 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1136,6 +1136,7 @@ typedef enum LOCALE_MENU_HINT_VIDEO_PIP, LOCALE_MENU_HINT_VIDEO_SATURATION, LOCALE_MENU_HINT_VIDEO_SCART_MODE, + LOCALE_MENU_HINT_VOLUME, LOCALE_MENU_HINT_VOLUME_DIGITS, LOCALE_MENU_HINT_VOLUME_POS, LOCALE_MENU_HINT_ZAP_CYCLE, @@ -1213,6 +1214,7 @@ typedef enum LOCALE_MISCSETTINGS_SHUTDOWN_REAL, LOCALE_MISCSETTINGS_SHUTDOWN_REAL_RCDELAY, LOCALE_MISCSETTINGS_SLEEPTIMER, + LOCALE_MISCSETTINGS_VOLUME, LOCALE_MISCSETTINGS_ZAPTO_PRE_TIME, LOCALE_MOTORCONTROL_CALC_POSITIONS, LOCALE_MOTORCONTROL_DISABLE_LIMIT, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 706e282d2..c8f4dee42 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1136,6 +1136,7 @@ const char * locale_real_names[] = "menu.hint_video_pip", "menu.hint_video_saturation", "menu.hint_video_scart_mode", + "menu.hint_volume", "menu.hint_volume_digits", "menu.hint_volume_pos", "menu.hint_zap_cycle", @@ -1213,6 +1214,7 @@ const char * locale_real_names[] = "miscsettings.shutdown_real", "miscsettings.shutdown_real_rcdelay", "miscsettings.sleeptimer", + "miscsettings.volume", "miscsettings.zapto_pre_time", "motorcontrol.calc_positions", "motorcontrol.disable_limit", From 93484713fef65fff56f1c1fe6b5fa3ab0bb45e3a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 10 May 2013 09:33:25 +0200 Subject: [PATCH 03/56] infoviewer: get width of timescale from progressbar object ... .. to remove hardcoded timescale width in showInfoFile() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7d5ecda6e56a3eee756497ce7c074c34c068405c Author: vanhofen Date: 2013-05-10 (Fri, 10 May 2013) Origin message was: ------------------ - infoviewer: get width of timescale from progressbar object ... .. to remove hardcoded timescale width in showInfoFile() ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 939e80fcb..2860a39fd 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -527,7 +527,7 @@ void CInfoViewer::showMovieTitle(const int playState, const std::string &Channel paintTime (show_dot, true); showRecordIcon (show_dot); show_dot = !show_dot; - showInfoFile(); + infoViewerBB->paintshowButtonBar(); g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(ChanNameX + 10 , ChanNameY + time_height,BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 ,ChannelName, COL_INFOBAR, 0, true); // UTF-8 @@ -585,6 +585,8 @@ void CInfoViewer::showMovieTitle(const int playState, const std::string &Channel frameBuffer->paintIcon(playicon, icon_x, icon_y); showLcdPercentOver (); + showInfoFile(); + //loop(fadeValue, show_dot , fadeIn); loop(show_dot); aspectRatio = 0; @@ -685,7 +687,6 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con showRecordIcon (show_dot); show_dot = !show_dot; - showInfoFile(); if (showButtonBar) { infoViewerBB->paintshowButtonBar(); } @@ -782,7 +783,9 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con } else { show_current_next(new_chan,epgpos); } + showLcdPercentOver (); + showInfoFile(); #if 0 if ((g_RemoteControl->current_channel_id == channel_id) && !(((info_CurrentNext.flags & CSectionsdClient::epgflags::has_next) && (info_CurrentNext.flags & (CSectionsdClient::epgflags::has_current | CSectionsdClient::epgflags::has_no_current))) || (info_CurrentNext.flags & CSectionsdClient::epgflags::not_broadcast))) { @@ -1833,12 +1836,17 @@ void CInfoViewer::showInfoFile() return; } + //get width of progressbar timescale + int pb_w = 0; + if ( (timescale != NULL) && (g_settings.infobar_progressbar == 0) ) { + pb_w = timescale->getWidth(); + } + //set position of info area const int oOffset = 140; // outer left/right offset - const int pb_w = 112; // same value as int pb_w in display_Info() const int xStart = BoxStartX + ChanWidth + oOffset; const int yStart = BoxStartY; - const int width = BoxEndX - xStart - (g_settings.infobar_progressbar ? oOffset : oOffset + pb_w); + const int width = BoxEndX - xStart - oOffset - pb_w; const int height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight() + 2; //create info object From d3b6b0295d6cc3b141cd32b6c7671b54795aee72 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 10 May 2013 10:31:46 +0200 Subject: [PATCH 04/56] framebuffer: add possibility to force small windows Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/742cc81f468eed9174527f073214f9301877e103 Author: vanhofen Date: 2013-05-10 (Fri, 10 May 2013) Origin message was: ------------------ - framebuffer: add possibility to force small windows ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/framebuffer.cpp | 20 +++++++++++++++----- src/driver/framebuffer.h | 5 +++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index e5230a0e3..15c99a2e9 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -430,15 +430,25 @@ unsigned int CFrameBuffer::getScreenHeight(bool real) return g_settings.screen_EndY - g_settings.screen_StartY; } -unsigned int CFrameBuffer::getScreenWidthRel() +unsigned int CFrameBuffer::getScreenPercentRel(bool force_small) { - // always reduce a possible detailline - return (g_settings.screen_EndX - g_settings.screen_StartX - 2*ConnectLineBox_Width) * (g_settings.big_windows ? 100 : NON_BIG_WINDOWS) / 100; + int percent = 100; + if (force_small || !g_settings.big_windows) + percent = NON_BIG_WINDOWS; + return percent; } -unsigned int CFrameBuffer::getScreenHeightRel() +unsigned int CFrameBuffer::getScreenWidthRel(bool force_small) { - return (g_settings.screen_EndY - g_settings.screen_StartY) * (g_settings.big_windows ? 100 : NON_BIG_WINDOWS) / 100; + int percent = getScreenPercentRel(force_small); + // always reduce a possible detailline + return (g_settings.screen_EndX - g_settings.screen_StartX - 2*ConnectLineBox_Width) * percent / 100; +} + +unsigned int CFrameBuffer::getScreenHeightRel(bool force_small) +{ + int percent = getScreenPercentRel(force_small); + return (g_settings.screen_EndY - g_settings.screen_StartY) * percent / 100; } unsigned int CFrameBuffer::getScreenX() diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h index c994d3a68..dbe42cf52 100644 --- a/src/driver/framebuffer.h +++ b/src/driver/framebuffer.h @@ -146,8 +146,9 @@ class CFrameBuffer unsigned int getStride() const; // size of a single line in the framebuffer (in bytes) unsigned int getScreenWidth(bool real = false); unsigned int getScreenHeight(bool real = false); - unsigned int getScreenWidthRel(); - unsigned int getScreenHeightRel(); + unsigned int getScreenPercentRel(bool force_small); + unsigned int getScreenWidthRel(bool force_small = false); + unsigned int getScreenHeightRel(bool force_small = false); unsigned int getScreenX(); unsigned int getScreenY(); From 8f32bca5be5ba288779ceb2e8ad1c9c3e7ade89b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 10 May 2013 10:33:23 +0200 Subject: [PATCH 05/56] epgview: depend window size on font size Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/df3d5567a1deb50cf1f561220eb231331f754be0 Author: vanhofen Date: 2013-05-10 (Fri, 10 May 2013) Origin message was: ------------------ - epgview: depend window size on font size ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/epgview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 1d3412b12..dbe65abf1 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -117,8 +117,8 @@ CEpgData::CEpgData() void CEpgData::start() { - ox = frameBuffer->getScreenWidthRel(); - oy = frameBuffer->getScreenHeightRel(); + ox = frameBuffer->getScreenWidthRel(bigFonts ? false /* big */ : true /* small */); + oy = frameBuffer->getScreenHeightRel(bigFonts ? false /* big */ : true /* small */); topheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->getHeight(); topboxheight = topheight + 6; From 0a2403d344da966d5e2f9d6d156fbee53ed15dc5 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 10 May 2013 11:28:22 +0200 Subject: [PATCH 06/56] CNeutrinoEventList::exec call hide only once Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/28c67bbc9b19de8aa256b2d3c4b58a1bb4e002a4 Author: Jacek Jendrzej Date: 2013-05-10 (Fri, 10 May 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 697e85b34..a56e7bd6c 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -306,11 +306,11 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c } UpdateTimerList(); + bool dont_hide = false; if(channelname_prev.empty(), channelname_next.empty()){ paintHead(channel_id, channelname); }else{ paintHead(channelname, channelname_prev, channelname_next); - } paint(channel_id); showFunctionBar(true, channel_id); @@ -580,6 +580,7 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c } } loop = false; + dont_hide = true; exec(_channel_id, current_channel_name, prev_channel_name, next_channel_name); } else if (msg == CRCInput::RC_0) { @@ -671,8 +672,10 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c oldEventID = -1; bgRightBoxPaint = false; - hide(); - fader.Stop(); + if(!dont_hide){ + hide(); + fader.Stop(); + } return res; } From cc3927aa46f29b1d5e5ae61a8da7a7bf575cf4d7 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 9 May 2013 21:54:25 +0200 Subject: [PATCH 07/56] CComponents::paintFbItems: Fix paint frame - Remove function CComponents::allowPaint() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/612ef514a32ee78e9af8eb2589d18d1aac68d7db Author: Michael Liebmann Date: 2013-05-09 (Thu, 09 May 2013) Origin message was: ------------------ * CComponents::paintFbItems: Fix paint frame - Remove function CComponents::allowPaint() ------------------ This commit was generated by Migit --- src/gui/components/cc.h | 2 -- src/gui/components/cc_base.cpp | 26 +++++--------------------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/gui/components/cc.h b/src/gui/components/cc.h index 8e68473d7..248bc2be0 100644 --- a/src/gui/components/cc.h +++ b/src/gui/components/cc.h @@ -36,8 +36,6 @@ class CComponents { - private: - bool allowPaint(const int& i); protected: int x, y, height, width, corner_type, shadow_w; int corner_rad, fr_thickness, fr_thickness_sel; diff --git a/src/gui/components/cc_base.cpp b/src/gui/components/cc_base.cpp index 5cb0a9f7f..30c84dea8 100644 --- a/src/gui/components/cc_base.cpp +++ b/src/gui/components/cc_base.cpp @@ -80,24 +80,6 @@ void CComponents::initVarBasic() saved_screen.pixbuf = NULL; } -bool CComponents::allowPaint(const int& i) -{ - if(v_fbdata[i].fbdata_type == CC_FBDATA_TYPE_BOX) - return true; - - - if (v_fbdata[CC_FBDATA_TYPE_BOX].x != v_fbdata[i].x) - return true; - else if (v_fbdata[CC_FBDATA_TYPE_BOX].y != v_fbdata[i].y) - return true; - else if (v_fbdata[CC_FBDATA_TYPE_BOX].dx != v_fbdata[i].dx) - return true; - else if (v_fbdata[CC_FBDATA_TYPE_BOX].dy != v_fbdata[i].dy) - return true; - - return false; -} - //paint framebuffer stuff and fill buffer void CComponents::paintFbItems(bool do_save_bg) { @@ -140,11 +122,13 @@ void CComponents::paintFbItems(bool do_save_bg) firstPaint = false; } if (fbtype != CC_FBDATA_TYPE_BGSCREEN){ - if (fbtype == CC_FBDATA_TYPE_FRAME && v_fbdata[i].frame_thickness > 0) - frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, v_fbdata[i].frame_thickness, v_fbdata[i].color, v_fbdata[i].r); + if (fbtype == CC_FBDATA_TYPE_FRAME) { + if (v_fbdata[i].frame_thickness > 0) + frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, v_fbdata[i].frame_thickness, v_fbdata[i].color, v_fbdata[i].r); + } else if (fbtype == CC_FBDATA_TYPE_BACKGROUND) frameBuffer->paintBackgroundBoxRel(x, y, v_fbdata[i].dx, v_fbdata[i].dy); - else if( allowPaint(i) || fbtype == CC_FBDATA_TYPE_LINE) + else frameBuffer->paintBoxRel(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, v_fbdata[i].color, v_fbdata[i].r, corner_type); } } From be087adf5a23a1e7435604576068ae44843b9f83 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Fri, 10 May 2013 12:25:48 +0200 Subject: [PATCH 08/56] Rework positioning of volumebar / mute icon / info clock - Is required for custom icons Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/cfd7b4b16bcaec36410f8596b552cf5254b87703 Author: Michael Liebmann Date: 2013-05-10 (Fri, 10 May 2013) Origin message was: ------------------ * Rework positioning of volumebar / mute icon / info clock - Is required for custom icons ------------------ This commit was generated by Migit --- src/gui/audiomute.cpp | 5 +- src/gui/infoclock.cpp | 49 +++++-------- src/gui/infoclock.h | 6 +- src/gui/volumebar.cpp | 127 +++++++++++++++++++++------------ src/gui/volumebar.h | 13 +++- src/system/setting_helpers.cpp | 4 +- 6 files changed, 117 insertions(+), 87 deletions(-) diff --git a/src/gui/audiomute.cpp b/src/gui/audiomute.cpp index 409ca5187..0f50340e1 100644 --- a/src/gui/audiomute.cpp +++ b/src/gui/audiomute.cpp @@ -39,6 +39,7 @@ CAudioMute::CAudioMute() mute_dx = 0; mute_dy = 0; mute_ay_old = -1; + CVolumeHelper::getInstance()->refresh(); CVolumeHelper::getInstance()->getMuteIconDimensions(&mute_ax, &mute_ay, &mute_dx, &mute_dy); mIcon = new CComponentsPicture(mute_ax, mute_ay, mute_dx, mute_dy, NEUTRINO_ICON_BUTTON_MUTE); } @@ -74,7 +75,7 @@ void CAudioMute::AudioMute(int newValue, bool isEvent) mute_ay_old = mute_ay; } if ((g_settings.mode_clock) && (doInit)) - CInfoClock::getInstance(true)->ClearDisplay(); + CInfoClock::getInstance()->ClearDisplay(); if (newValue) mIcon->paint(); @@ -82,6 +83,6 @@ void CAudioMute::AudioMute(int newValue, bool isEvent) mIcon->hide(); if (doInit) - CInfoClock::getInstance(true)->Init(true); + CVolumeHelper::getInstance()->refresh(); } } diff --git a/src/gui/infoclock.cpp b/src/gui/infoclock.cpp index 4dae4fd86..44fe7f045 100644 --- a/src/gui/infoclock.cpp +++ b/src/gui/infoclock.cpp @@ -17,12 +17,12 @@ #define YOFF 0 -CInfoClock::CInfoClock(bool noVolume) +CInfoClock::CInfoClock() { frameBuffer = CFrameBuffer::getInstance(); x = y = clock_x = 0; time_height = time_width = thrTimer = 0; - Init(noVolume); + Init(); } CInfoClock::~CInfoClock() @@ -32,53 +32,35 @@ CInfoClock::~CInfoClock() thrTimer = 0; } -void CInfoClock::Init(bool noVolume) +void CInfoClock::Init() { - static int mute_dx = 0, mute_dy = 0, y_org = 0, spacer = 0; - int mute_corrY = 0; - if (!noVolume) { - CVolumeHelper *vh = CVolumeHelper::getInstance(); - int dummy; - vh->getDimensions(&dummy, &y, &x, &dummy); - vh->getMuteIconDimensions(&dummy, &dummy, &mute_dx, &mute_dy); - vh->getSpacer(&spacer, &dummy); - y_org = y; - } - else - y = y_org; - - digit_offset = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitOffset(); - digit_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitHeight(); - int t1 = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(widest_number); - int t2 = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(":"); - time_height = digit_h + (int)((float)digit_offset * 1.5); - time_width = t1*6 + t2*2; - clock_x = x - time_width; - if (CNeutrinoApp::getInstance()->isMuted()) { - clock_x -= (mute_dx + spacer); - if (mute_dy > time_height) - y += (mute_dy - time_height) / 2; - else - mute_corrY = (time_height - mute_dy) / 2; - CVolumeHelper::getInstance()->setMuteIconCorrY(mute_corrY); - } + CVolumeHelper::getInstance()->refresh(); + CVolumeHelper::getInstance()->getInfoClockDimensions(&clock_x, &y, &time_width, &time_height, &digit_h, &digit_offset); } -CInfoClock* CInfoClock::getInstance(bool noVolume) +CInfoClock* CInfoClock::getInstance() { static CInfoClock* InfoClock = NULL; if(!InfoClock) - InfoClock = new CInfoClock(noVolume); + InfoClock = new CInfoClock(); return InfoClock; } void CInfoClock::paintTime( bool show_dot) { char timestr[20]; + int dummy, mute_dx, h_spacer; time_t tm = time(0); strftime((char*) ×tr, sizeof(timestr), "%H:%M:%S", localtime(&tm)); timestr[2] = show_dot ? ':':'.'; + CVolumeHelper *cvh = CVolumeHelper::getInstance(); + cvh->getInfoClockDimensions(&clock_x, &y, &time_width, &time_height, &digit_h, &digit_offset); + cvh->getMuteIconDimensions(&dummy, &dummy, &mute_dx, &dummy); + cvh->getSpacer(&h_spacer, &dummy); + if (CNeutrinoApp::getInstance()->isMuted()) + clock_x -= (mute_dx + h_spacer); + int x_diff = (time_width - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(timestr)) / 2; frameBuffer->paintBoxRel(clock_x, y, time_width, time_height, COL_MENUCONTENT_PLUS_0, RADIUS_SMALL); g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(clock_x + x_diff, y + digit_h + digit_offset + ((time_height - digit_h) / 2), time_width, timestr, COL_MENUCONTENT); @@ -104,6 +86,7 @@ void* CInfoClock::TimerProc(void *arg) void CInfoClock::ClearDisplay() { frameBuffer->paintBackgroundBoxRel(clock_x, y, time_width, time_height); + Init(); } void CInfoClock::StartClock() diff --git a/src/gui/infoclock.h b/src/gui/infoclock.h index 73b4ebb93..8d578181d 100644 --- a/src/gui/infoclock.h +++ b/src/gui/infoclock.h @@ -20,15 +20,15 @@ class CInfoClock void paintTime( bool show_dot); int time_offset, digit_offset, digit_h; int x, y, clock_x; + void Init(); static void CleanUpProc(void* arg); static void* TimerProc(void *arg); public: - CInfoClock(bool noVolume=false); + CInfoClock(); ~CInfoClock(); - static CInfoClock* getInstance(bool noVolume=false); + static CInfoClock* getInstance(); - void Init(bool noVolume=false); void StartClock(); void StopClock(); void ClearDisplay(); diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 65ead0134..8e45cfa89 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -28,7 +28,6 @@ #include #endif - #include "gui/volumebar.h" #include @@ -37,6 +36,9 @@ using namespace std; +//default vol_height +#define VOL_HEIGHT 36 + CVolumeBar::CVolumeBar() { initVarVolumeBar(); @@ -47,7 +49,6 @@ void CVolumeBar::initVarVolumeBar() //init inherited variables initVarForm(); col_body = COL_MENUCONTENT_PLUS_0; - height = 36; //default height //init variables this @@ -57,12 +58,6 @@ void CVolumeBar::initVarVolumeBar() //items //icon object vb_icon = NULL; - // icon whith / height - int tmp_h = 0; - frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME, &icon_w, &tmp_h); - icon_w += 12; - tmp_h += 4; - height = max(height, tmp_h); //progressbar object vb_pb = NULL; @@ -87,16 +82,14 @@ void CVolumeBar::initVarVolumeBar() //calculates size referred for possible activated clock or/and mute icon void CVolumeBar::initVolumeBarSize() { - int tmp_h = height; - - // digit whith / height - if (g_settings.volume_digits) { - tmp_h = g_Font[VolumeFont]->getDigitHeight() + (g_Font[VolumeFont]->getDigitOffset() * 18) / 10; - height = max(height, tmp_h); + // digit whith + if (g_settings.volume_digits) digit_w = g_Font[VolumeFont]->getRenderWidth("100 "); - } else digit_w = 0; + int dummy = 0; + frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME, &icon_w, &dummy); + icon_w += 12; //adapt x-pos icon_x = corner_rad + 2; @@ -112,30 +105,19 @@ void CVolumeBar::initVolumeBarSize() CVolumeHelper *cvh = CVolumeHelper::getInstance(); cvh->getSpacer(&h_spacer, &v_spacer); cvh->getDimensions(&x, &y, &sw, &sh); + cvh->getVolBarDimensions(&y, &height); // mute icon cvh->getMuteIconDimensions(&mute_ax, &mute_ay, &mute_dx, &mute_dy); - - clock_height = 0; - int clock_width = 0; + // info clock + cvh->getInfoClockDimensions(&dummy, &clock_y, &clock_width, &clock_height, &dummy, &dummy); int mute_corrY = 0; - if ((g_settings.mode_clock) && (g_settings.volume_pos == 0)) { - // Clock and MuteIcon in a line. - clock_height = CInfoClock::getInstance(true)->time_height; - clock_width = CInfoClock::getInstance(true)->time_width; - mute_corrY = (clock_height - mute_dy) / 2; - } - else { - // Volume level and MuteIcon in a line. - if (mute_dy > height) - y += (mute_dy - height) / 2; - else - mute_corrY = (height - mute_dy) / 2; - } + if (mute_dy < height) + mute_corrY = (height - mute_dy) / 2; cvh->setMuteIconCorrY(mute_corrY); if ((g_settings.mode_clock) && (!CNeutrinoApp::getInstance()->isMuted())) - frameBuffer->paintBackgroundBoxRel(sw - clock_width, y, clock_width, clock_height); + CInfoClock::getInstance()->ClearDisplay(); vb_pbh = height-8; vb_pby = height/2-vb_pbh/2; @@ -154,7 +136,7 @@ void CVolumeBar::initVolumeBarPosition() if ((neutrino->isMuted()) && (!g_settings.mode_clock)) x_corr = mute_dx + h_spacer; if (g_settings.mode_clock) - y += clock_height + v_spacer / 2; + y += max(clock_y + clock_height, mute_ay + mute_dy) /*+ v_spacer / 2*/; } x = sw - width - x_corr; break; @@ -290,22 +272,75 @@ CVolumeHelper::CVolumeHelper() h_spacer = 11; v_spacer = 6; - CFrameBuffer *frameBuffer = CFrameBuffer::getInstance(); - x = frameBuffer->getScreenX() + h_spacer; - y = frameBuffer->getScreenY() + v_spacer; - sw = g_settings.screen_EndX - h_spacer; - sh = frameBuffer->getScreenHeight(); + frameBuffer = CFrameBuffer::getInstance(); - int mute_icon_dx = 0; - int mute_icon_dy = 0; - frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE, &mute_icon_dx, &mute_icon_dy); - mute_dx = mute_icon_dx; - mute_dy = mute_icon_dy; - mute_dx += mute_icon_dx / 4; - mute_dy += mute_icon_dx / 4; + Init(); +} + +void CVolumeHelper::Init() +{ + + x = frameBuffer->getScreenX() + h_spacer; + y = frameBuffer->getScreenY() + v_spacer; + sw = g_settings.screen_EndX - h_spacer; + sh = frameBuffer->getScreenHeight(); + + initVolBarHeight(); + initMuteIcon(); + initInfoClock(); +} + +void CVolumeHelper::initInfoClock() +{ + digit_offset = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitOffset(); + digit_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitHeight(); + int t1 = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(widest_number); + int t2 = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(":"); + clock_dy = digit_h + (int)((float)digit_offset * 1.5); + clock_dx = t1*6 + t2*2; + clock_ax = sw - clock_dx; + clock_ay = y; + vol_ay = y; + mute_corrY = 0; + + if (g_settings.mode_clock) { + if (mute_dy > clock_dy) + clock_ay += (mute_dy - clock_dy) / 2; + else + mute_corrY = (clock_dy - mute_dy) / 2; + } + else { + if (mute_dy > vol_height) + vol_ay += (mute_dy - vol_height) / 2; + else + mute_corrY = (vol_height - mute_dy) / 2; + } +} + +void CVolumeHelper::initMuteIcon() +{ + frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE, &mute_dx, &mute_dy); mute_ax = sw - mute_dx; mute_ay = y; - mute_corrY = 0; +} + +void CVolumeHelper::initVolBarHeight() +{ + vol_height = VOL_HEIGHT; + int tmp_h = 0; + int dummy = 0; + frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME, &dummy, &tmp_h); + tmp_h += 4; + vol_height = max(vol_height, tmp_h); + if (g_settings.volume_digits) { + tmp_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getDigitHeight() + (g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getDigitOffset() * 18) / 10; + vol_height = max(vol_height, tmp_h); + } +} + +void CVolumeHelper::refresh() +{ + Init(); } CVolumeHelper* CVolumeHelper::getInstance() diff --git a/src/gui/volumebar.h b/src/gui/volumebar.h index ce78b7f65..e44b2d881 100644 --- a/src/gui/volumebar.h +++ b/src/gui/volumebar.h @@ -44,7 +44,7 @@ class CVolumeBar : public CComponentsForm int h_spacer, v_spacer; //clock - int clock_height; + int clock_y, clock_width, clock_height; //volume value char *vb_vol; @@ -82,7 +82,15 @@ class CVolumeHelper private: int x, y, sw, sh; int mute_ax, mute_ay, mute_dx, mute_dy, mute_corrY; + int clock_ax, clock_ay, clock_dx, clock_dy, digit_h, digit_offset; int h_spacer, v_spacer; + int vol_ay, vol_height; + CFrameBuffer *frameBuffer; + + void Init(); + void initVolBarHeight(); + void initMuteIcon(); + void initInfoClock(); public: @@ -92,7 +100,10 @@ class CVolumeHelper void getSpacer(int *h, int *v) { *h = h_spacer; *v = v_spacer; } void getDimensions(int *_x, int *_y, int *_sw, int *_sh) { *_x = x; *_y = y; *_sw = sw; *_sh = sh; } void getMuteIconDimensions(int *_x, int *_y, int *w, int *h) { *_x = mute_ax; *_y = mute_ay+mute_corrY; *w = mute_dx; *h = mute_dy; } + void getInfoClockDimensions(int *_x, int *_y, int *w, int *h, int *d_h, int *d_o) { *_x = clock_ax; *_y = clock_ay; *w = clock_dx; *h = clock_dy, *d_h = digit_h, *d_o = digit_offset; } + void getVolBarDimensions(int *_y, int *_dy) { *_y = vol_ay; *_dy = vol_height; } void setMuteIconCorrY(int corr) { mute_corrY = corr; } + void refresh(); }; #endif diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 59b833b45..42f9fb6cd 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -243,8 +243,8 @@ bool CFontSizeNotifier::changeNotify(const neutrino_locale_t, void *) CNeutrinoApp::getInstance()->SetupFonts(); hintBox.hide(); - /* recalculate infoclock */ - CInfoClock::getInstance()->Init(); + /* recalculate infoclock/muteicon/volumebar */ + CVolumeHelper::getInstance()->refresh(); return true; } From a5bd75527a4364b1b0f08880ef113f8fd5b20aff Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 10 May 2013 13:43:23 +0200 Subject: [PATCH 09/56] supplement to 0c34433d23dd8737419e7d1dbde6e49e6523fc73 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3a62b97fcb70eca41c6a28014cca01a40eababff Author: Jacek Jendrzej Date: 2013-05-10 (Fri, 10 May 2013) ------------------ 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 fb55158bf..fb8412a1c 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -967,7 +967,7 @@ void CMenuWidget::paintItems() int item_height=height-(item_start_y-y); frameBuffer->paintBoxRel(x+ width,item_start_y, 15, item_height, COL_MENUCONTENT_PLUS_1, RADIUS_MIN); frameBuffer->paintBoxRel(x+ width +2, item_start_y+ 2+ current_page*(item_height-4)/total_pages, 11, (item_height-4)/total_pages, COL_MENUCONTENT_PLUS_3, RADIUS_MIN); - if(current_page==total_pages-1){ + if((current_page==total_pages-1) || (current_page == 0 && RADIUS_MIN)){ frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0); } } From 9689f4572fcb806fc8b3a3418256de6b2b875e65 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 10 May 2013 21:36:34 +0200 Subject: [PATCH 10/56] osd-setup: move menu-related stuff to a submenu 'menus' * re-sort remaining items Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/655ae5d51f041bd6ae78062c8500b3eb178bc12a Author: vanhofen Date: 2013-05-10 (Fri, 10 May 2013) Origin message was: ------------------ - osd-setup: move menu-related stuff to a submenu 'menus' * re-sort remaining items ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 14 ++++---- data/locale/english.locale | 6 ++-- src/gui/osd_setup.cpp | 72 +++++++++++++++++++++++++------------- src/gui/osd_setup.h | 3 ++ src/neutrino_menue.h | 1 + src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ 7 files changed, 67 insertions(+), 33 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 1b99848e2..43630bb04 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -256,16 +256,16 @@ colorchooser.green grün colorchooser.red rot colormenu.background Hintergrundfarbe colormenu.contrast_fonts Schriftkontrast -colormenu.fade Menüs faden +colormenu.fade Ein-/Ausblenden colormenu.font Neutrino-HD Schriftart colormenu.font_ttx Teletext Schriftart colormenu.hd_preset LCD -colormenu.menucolors Menüfarben +colormenu.menucolors Farben colormenu.osd_preset Monitor Auswahl colormenu.sd_preset CRT colormenu.textcolor Textfarbe colormenu.themeselect Theme auswählen -colormenu.timing OSD Timeouts +colormenu.timing Timeouts colormenusetup.menucontent Fensterinhalt colormenusetup.menucontent_inactive Fensterinhalt deaktiviert colormenusetup.menucontent_selected Fensterinhalt selektiert @@ -779,7 +779,7 @@ menu.hint_eventlist_fonts Ändern Sie die Schriftgröße in der Event-Liste menu.hint_eventlist_setup Wählen Sie die Anzeigeoptionen für die Event-Liste menu.hint_extended Energiespar-, EPG-Speicher- und Lade-Optionen, HDMI-CEC, Startkanal und mehr menu.hint_factory Zurücksetzen der Box auf Werkseinstellungen.\nDie Box wird danach neu gestartet -menu.hint_fade Bei aktivierter Funktion werden die Menüfenster 'weich' ein- bzw. ausgeblendet +menu.hint_fade Bei aktivierter Funktion werden die GUI-Fenster 'weich' ein- bzw. ausgeblendet menu.hint_fan_speed Steuerung der Lüftergeschwindigkeit für die CPU menu.hint_filebrowser_denydirectoryleave Verhindert das Verlassen des Startverzeichnisses menu.hint_filebrowser_showrights Anzeige der Dateirechte der Dateien im Filebrowser @@ -891,6 +891,7 @@ menu.hint_media Abspielen von Musik, Internetradio und Filmen; Betrachten Sie Bi menu.hint_menu_fonts Ändern Sie die Schriftgrößen im Menü menu.hint_menu_hints Zeigt Ihnen Hinweise zu den Menüpunkten an. Sie erreichen das auch jederzeit mit der Taste 'Hilfe' menu.hint_menu_pos Legen Sie die Anzeigeposition der Menüs fest +menu.hint_menus Wählen Sie die Anzeigeoptionen für die Menüs menu.hint_misc_cec HDMI-CEC Optionen menu.hint_misc_channellist Erweiterte Einstellungen für die Kanallisten und Zapping-Einstellungen menu.hint_misc_energy Energieverbrauchs- und Standby-Optionen, verzögertes Ausschalten, setzen bzw. ändern des Inaktivitätstimers @@ -1699,8 +1700,9 @@ servicemenu.update Software-Aktualisierung settings.backup Image-Einstellungen: Sichern settings.backup_failed Sicherung fehlgeschlagen! settings.help Hilfe -settings.menu_hints Menühinweise anzeigen -settings.menu_pos Menüposition +settings.menu_hints Hinweise anzeigen +settings.menu_pos Position +settings.menus Menüs settings.missingoptionsconffile Die Neutrino-HD Einstellungen wurden erweitert.\nDie neuen Werte werden auf Standard gesetzt. settings.noconffile Die Neutrino-HD Einstellungen wurden nicht\ngefunden. Es werden Standardwerte benutzt. settings.pos_bottom_left unten links diff --git a/data/locale/english.locale b/data/locale/english.locale index 30c798aea..915007398 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -256,7 +256,7 @@ colorchooser.green green colorchooser.red red colormenu.background Background colormenu.contrast_fonts Contrast fonts -colormenu.fade Fade menus +colormenu.fade Fade GUI colormenu.font Select GUI font colormenu.font_ttx Select Teletext font colormenu.hd_preset LCD @@ -265,7 +265,7 @@ colormenu.osd_preset TV preset colormenu.sd_preset CRT colormenu.textcolor Text color colormenu.themeselect Select theme -colormenu.timing OSD Timeouts +colormenu.timing Timeouts colormenusetup.menucontent Content colormenusetup.menucontent_inactive Content inactive colormenusetup.menucontent_selected Content selected @@ -891,6 +891,7 @@ menu.hint_media Play movies, audio files\nWatch pictures menu.hint_menu_fonts Change menu font sizes menu.hint_menu_hints Show this hints. Also you can switch\nit any time using 'help' button menu.hint_menu_pos Select menu position +menu.hint_menus Configure menu options menu.hint_misc_cec HDMI-CEC Options menu.hint_misc_channellist HD/New/Removed channel lists\nZap cycle menu.hint_misc_energy Enable soft-standby, delayed shutdown\ninactivity timers @@ -1701,6 +1702,7 @@ settings.backup_failed Backup failed! settings.help Help settings.menu_hints Show menu hints settings.menu_pos Menu position +settings.menus Menus settings.missingoptionsconffile The Neutrino-HD settings have been updated.\nNew Options will be set to default. settings.noconffile No Neutrino-HD settings found.\nUsing defaults. settings.pos_bottom_left bottom left diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 6f863afba..8680e8559 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -68,10 +68,12 @@ COsdSetup::COsdSetup(bool wizard_mode) colorSetupNotifier = new CColorSetupNotifier(); fontsizenotifier = new CFontSizeNotifier; osd_menu = NULL; + submenu_menus = NULL; is_wizard = wizard_mode; width = w_max (40, 10); //% + show_menu_hints = 0; show_tuner_icon = 0; } @@ -432,6 +434,13 @@ int COsdSetup::showOsdSetup() mf->setHint("", LOCALE_MENU_HINT_SCREEN_SETUP); osd_menu->addItem(mf); + //menus + CMenuWidget osd_menu_menus(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_MENUS); + showOsdMenusSetup(&osd_menu_menus); + mf = new CMenuForwarder(LOCALE_SETTINGS_MENUS, true, NULL, &osd_menu_menus, NULL, CRCInput::convertDigitToKey(shortcut++)); + mf->setHint("", LOCALE_MENU_HINT_MENUS); + osd_menu->addItem(mf); + //progressbar mf = new CMenuForwarder(LOCALE_MISCSETTINGS_PROGRESSBAR, true, NULL, new CProgressbarSetup(), NULL, CRCInput::convertDigitToKey(shortcut++)); mf->setHint("", LOCALE_MENU_HINT_PROGRESSBAR); @@ -472,39 +481,19 @@ int COsdSetup::showOsdSetup() mf->setHint("", LOCALE_MENU_HINT_SCREENSHOT_SETUP); osd_menu->addItem(mf); + osd_menu->addItem(GenericMenuSeparatorLine); + //monitor CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_COLORMENU_OSD_PRESET, &g_settings.screen_preset, OSD_PRESET_OPTIONS, OSD_PRESET_OPTIONS_COUNT, true, this); mc->setHint("", LOCALE_MENU_HINT_OSD_PRESET); osd_menu->addItem(mc); - osd_menu->addItem(GenericMenuSeparatorLine); - // corners + // round corners int rounded_corners = g_settings.rounded_corners; mc = new CMenuOptionChooser(LOCALE_EXTRA_ROUNDED_CORNERS, &rounded_corners, MENU_CORNERSETTINGS_TYPE_OPTIONS, MENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true, this); mc->setHint("", LOCALE_MENU_HINT_ROUNDED_CORNERS); osd_menu->addItem(mc); - // scrambled - mc = new CMenuOptionChooser(LOCALE_EXTRA_SCRAMBLED_MESSAGE, &g_settings.scrambled_message, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); - mc->setHint("", LOCALE_MENU_HINT_SCRAMBLED_MESSAGE); - osd_menu->addItem(mc); - - // subchannel menu position - mc = new CMenuOptionChooser(LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true); - mc->setHint("", LOCALE_MENU_HINT_SUBCHANNEL_POS); - osd_menu->addItem(mc); - - // menu position - mc = new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true, this); - mc->setHint("", LOCALE_MENU_HINT_MENU_POS); - osd_menu->addItem(mc); - - // menu hints - int show_hints = g_settings.show_menu_hints; - mc = new CMenuOptionChooser(LOCALE_SETTINGS_MENU_HINTS, &show_hints, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); - mc->setHint("", LOCALE_MENU_HINT_MENU_HINTS); - osd_menu->addItem(mc); - // fade windows mc = new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true ); mc->setHint("", LOCALE_MENU_HINT_FADE); @@ -515,8 +504,21 @@ int COsdSetup::showOsdSetup() mc->setHint("", LOCALE_MENU_HINT_BIGWINDOWS); osd_menu->addItem(mc); + osd_menu->addItem(GenericMenuSeparatorLine); + + // scrambled + mc = new CMenuOptionChooser(LOCALE_EXTRA_SCRAMBLED_MESSAGE, &g_settings.scrambled_message, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SCRAMBLED_MESSAGE); + osd_menu->addItem(mc); + + // subchannel menu position + mc = new CMenuOptionChooser(LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true); + mc->setHint("", LOCALE_MENU_HINT_SUBCHANNEL_POS); + osd_menu->addItem(mc); + int res = osd_menu->exec(NULL, ""); + delete submenu_menus; delete osd_menu; return res; } @@ -732,6 +734,26 @@ const CMenuOptionChooser::keyval LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS[LOCAL { 6 , LOCALE_MISCSETTINGS_INFOBAR_DISP_6 } }; +//menus +void COsdSetup::showOsdMenusSetup(CMenuWidget *menu_menus) +{ + submenu_menus = menu_menus; + CMenuOptionChooser * mc; + + submenu_menus->addIntroItems(LOCALE_SETTINGS_MENUS); + + // menu position + mc = new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_MENU_POS); + submenu_menus->addItem(mc); + + // menu hints + show_menu_hints = g_settings.show_menu_hints; + mc = new CMenuOptionChooser(LOCALE_SETTINGS_MENU_HINTS, &show_menu_hints, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_MENU_HINTS); + submenu_menus->addItem(mc); +} + //infobar void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar) { @@ -878,12 +900,12 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_CONTRAST_FONTS)) return true; else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SETTINGS_MENU_POS)) { - osd_menu->hide(); + submenu_menus->hide(); return true; } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_SETTINGS_MENU_HINTS)) { /* change option after hide, to let hide clear hint */ - osd_menu->hide(); + submenu_menus->hide(); g_settings.show_menu_hints = * (int*) data; return true; } diff --git a/src/gui/osd_setup.h b/src/gui/osd_setup.h index a6087bf37..d8c866131 100644 --- a/src/gui/osd_setup.h +++ b/src/gui/osd_setup.h @@ -46,15 +46,18 @@ class COsdSetup : public CMenuTarget, public CChangeObserver CColorSetupNotifier *colorSetupNotifier; CFontSizeNotifier *fontsizenotifier; CMenuWidget *osd_menu; + CMenuWidget *submenu_menus; int width; bool is_wizard; + int show_menu_hints; int show_tuner_icon; int showOsdSetup(); void showOsdMenueColorSetup(CMenuWidget *menu_colors); void showOsdFontSizeSetup(CMenuWidget *menu_fonts); void showOsdTimeoutSetup(CMenuWidget *menu_timeout); + void showOsdMenusSetup(CMenuWidget *menu_menus); void showOsdInfobarSetup(CMenuWidget *menu_infobar); void showOsdChanlistSetup(CMenuWidget *menu_chanlist); void showOsdEventlistSetup(CMenuWidget *menu_eventlist); diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index 7ca7dffa9..0d55a725a 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -54,6 +54,7 @@ enum MN_WIDGET_ID //osd setup MN_WIDGET_ID_OSDSETUP, + MN_WIDGET_ID_OSDSETUP_MENUS, MN_WIDGET_ID_OSDSETUP_CHANNELLIST, MN_WIDGET_ID_OSDSETUP_EVENTLIST, MN_WIDGET_ID_OSDSETUP_FONT, diff --git a/src/system/locals.h b/src/system/locals.h index e47ef053b..c3aef8b74 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -918,6 +918,7 @@ typedef enum LOCALE_MENU_HINT_MENU_FONTS, LOCALE_MENU_HINT_MENU_HINTS, LOCALE_MENU_HINT_MENU_POS, + LOCALE_MENU_HINT_MENUS, LOCALE_MENU_HINT_MISC_CEC, LOCALE_MENU_HINT_MISC_CHANNELLIST, LOCALE_MENU_HINT_MISC_ENERGY, @@ -1728,6 +1729,7 @@ typedef enum LOCALE_SETTINGS_HELP, LOCALE_SETTINGS_MENU_HINTS, LOCALE_SETTINGS_MENU_POS, + LOCALE_SETTINGS_MENUS, LOCALE_SETTINGS_MISSINGOPTIONSCONFFILE, LOCALE_SETTINGS_NOCONFFILE, LOCALE_SETTINGS_POS_BOTTOM_LEFT, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index c8f4dee42..500cada98 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -918,6 +918,7 @@ const char * locale_real_names[] = "menu.hint_menu_fonts", "menu.hint_menu_hints", "menu.hint_menu_pos", + "menu.hint_menus", "menu.hint_misc_cec", "menu.hint_misc_channellist", "menu.hint_misc_energy", @@ -1728,6 +1729,7 @@ const char * locale_real_names[] = "settings.help", "settings.menu_hints", "settings.menu_pos", + "settings.menus", "settings.missingoptionsconffile", "settings.noconffile", "settings.pos_bottom_left", From ccf8a2b02d6c5252fff7edb57b4c659ee9dec007 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 10 May 2013 21:55:19 +0200 Subject: [PATCH 11/56] deutsch.locale: fix typo in menu.hint_subchannel_pos Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fd63df9688b1d5dabbc863ba9ef2ead9f84e2f7b Author: vanhofen Date: 2013-05-10 (Fri, 10 May 2013) Origin message was: ------------------ - deutsch.locale: fix typo in menu.hint_subchannel_pos ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 43630bb04..702dd166e 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1079,7 +1079,7 @@ menu.hint_softupdate_expert_write Einzelne Partitionen (Splash, Kernel, SystemFS menu.hint_softupdate_settings Das lokale Update-Verzeichnis und die Konfigurationsdatei festlegen menu.hint_start_tostandby Aktiviert den Standby-Modus direkt nach dem Starten der Box menu.hint_streaminfo Aktuelle Sender-Informationen über PIDs, SNR-Verhältnis, Bitrate und mehr -menu.hint_subchannel_pos Wählen Sie die Anzeigeposition der Untertitel aus +menu.hint_subchannel_pos Wählen Sie die Anzeigeposition der Unterkanäle aus menu.hint_sw_update Neutrino-HD aktualisieren, Image sichern und wiederherstellen menu.hint_theme Wählen Sie ein vordefiniertes Farbschema, speichern oder laden Sie ihre eigenen Farbschemata menu.hint_timeouts Gibt an, nach welcher Zeit in Sekunden die Menüs oder Infofenster sich automatisch schließen (0 deaktiviert) From 48ea7a045eefb00dcab7f258719e9f243c45d5bf Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 10 May 2013 22:48:37 +0200 Subject: [PATCH 12/56] osd-setup: fix segmentation fault Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1376a94197761986c6e10f5734c0bde39aba7bce Author: vanhofen Date: 2013-05-10 (Fri, 10 May 2013) Origin message was: ------------------ - osd-setup: fix segmentation fault ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/osd_setup.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 8680e8559..9af64ae3c 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -518,7 +518,6 @@ int COsdSetup::showOsdSetup() int res = osd_menu->exec(NULL, ""); - delete submenu_menus; delete osd_menu; return res; } From f73d9905729a988ff0c37200427fd0aafbf15a11 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sat, 11 May 2013 10:21:54 +0200 Subject: [PATCH 13/56] COsdSetup::changeNotify: Add handling for volume digits / CVolumeHelper Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d90ce278762a9fa889b0b2826027a155ade58e44 Author: Michael Liebmann Date: 2013-05-11 (Sat, 11 May 2013) Origin message was: ------------------ * COsdSetup::changeNotify: Add handling for volume digits / CVolumeHelper ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/osd_setup.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 9af64ae3c..e97c13a0d 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -947,6 +947,10 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) g_Radiotext = NULL; } } + else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_VOLUME_DIGITS)) { + CVolumeHelper::getInstance()->refresh(); + return false; + } return false; } From e213733fdee43412fc5afa9ba0375e8ee51ad611 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 11 May 2013 12:57:36 +0200 Subject: [PATCH 14/56] locals: use more matching descriptions for screen positions Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c80b1b0640131ed239dfee6f139cfff2c94737e9 Author: vanhofen Date: 2013-05-11 (Sat, 11 May 2013) Origin message was: ------------------ - locals: use more matching descriptions for screen positions ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 5 +++-- data/locale/english.locale | 5 +++-- src/gui/osd_setup.cpp | 4 ++-- src/system/locals.h | 3 ++- src/system/locals_intern.h | 3 ++- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 702dd166e..6d6c306af 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1705,10 +1705,11 @@ settings.menu_pos Position settings.menus Menüs settings.missingoptionsconffile Die Neutrino-HD Einstellungen wurden erweitert.\nDie neuen Werte werden auf Standard gesetzt. settings.noconffile Die Neutrino-HD Einstellungen wurden nicht\ngefunden. Es werden Standardwerte benutzt. +settings.pos_bottom_center unten zentriert settings.pos_bottom_left unten links settings.pos_bottom_right unten rechts -settings.pos_default_center oben Mitte -settings.pos_higher_center unten Mitte +settings.pos_default_center zentriert +settings.pos_top_center oben zentriert settings.pos_top_left oben links settings.pos_top_right oben rechts settings.restore Image-Einstellungen: Wiederherstellen diff --git a/data/locale/english.locale b/data/locale/english.locale index 915007398..12f357934 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1705,10 +1705,11 @@ settings.menu_pos Menu position settings.menus Menus settings.missingoptionsconffile The Neutrino-HD settings have been updated.\nNew Options will be set to default. settings.noconffile No Neutrino-HD settings found.\nUsing defaults. +settings.pos_bottom_center bottom center settings.pos_bottom_left bottom left settings.pos_bottom_right bottom right -settings.pos_default_center top center -settings.pos_higher_center higher center +settings.pos_default_center center +settings.pos_top_center top center settings.pos_top_left top left settings.pos_top_right top right settings.restore Image-Settings: Restore diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index e97c13a0d..1f00e23f1 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -339,8 +339,8 @@ const CMenuOptionChooser::keyval VOLUMEBAR_DISP_POS_OPTIONS[VOLUMEBAR_DISP_POS_ { 1 , LOCALE_SETTINGS_POS_TOP_LEFT }, { 2 , LOCALE_SETTINGS_POS_BOTTOM_LEFT }, { 3 , LOCALE_SETTINGS_POS_BOTTOM_RIGHT }, - { 4 , LOCALE_SETTINGS_POS_DEFAULT_CENTER }, - { 5 , LOCALE_SETTINGS_POS_HIGHER_CENTER } + { 4 , LOCALE_SETTINGS_POS_TOP_CENTER }, + { 5 , LOCALE_SETTINGS_POS_BOTTOM_CENTER } }; #define MENU_DISP_POS_OPTIONS_COUNT 5 diff --git a/src/system/locals.h b/src/system/locals.h index c3aef8b74..7e8d1f76c 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1732,10 +1732,11 @@ typedef enum LOCALE_SETTINGS_MENUS, LOCALE_SETTINGS_MISSINGOPTIONSCONFFILE, LOCALE_SETTINGS_NOCONFFILE, + LOCALE_SETTINGS_POS_BOTTOM_CENTER, LOCALE_SETTINGS_POS_BOTTOM_LEFT, LOCALE_SETTINGS_POS_BOTTOM_RIGHT, LOCALE_SETTINGS_POS_DEFAULT_CENTER, - LOCALE_SETTINGS_POS_HIGHER_CENTER, + LOCALE_SETTINGS_POS_TOP_CENTER, LOCALE_SETTINGS_POS_TOP_LEFT, LOCALE_SETTINGS_POS_TOP_RIGHT, LOCALE_SETTINGS_RESTORE, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 500cada98..d241acc6f 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1732,10 +1732,11 @@ const char * locale_real_names[] = "settings.menus", "settings.missingoptionsconffile", "settings.noconffile", + "settings.pos_bottom_center", "settings.pos_bottom_left", "settings.pos_bottom_right", "settings.pos_default_center", - "settings.pos_higher_center", + "settings.pos_top_center", "settings.pos_top_left", "settings.pos_top_right", "settings.restore", From 9221ac371692620080f11609f275ee9354411d4a Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 10 May 2013 18:07:48 +0200 Subject: [PATCH 15/56] CAudioMute: implementation of CComponents Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/35444cb703f5141633d98462e72565d210b019bd Author: Thilo Graf Date: 2013-05-10 (Fri, 10 May 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/audiomute.cpp | 31 +++++++++++-------------------- src/gui/audiomute.h | 8 +++----- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/src/gui/audiomute.cpp b/src/gui/audiomute.cpp index 0f50340e1..0cb46bc5a 100644 --- a/src/gui/audiomute.cpp +++ b/src/gui/audiomute.cpp @@ -4,6 +4,8 @@ audioMute - Neutrino-GUI Copyright (C) 2013 M. Liebmann (micha-bbg) + CComponents implementation + Copyright (C) 2013 Thilo Graf License: GPL @@ -32,21 +34,11 @@ #include #include -CAudioMute::CAudioMute() +CAudioMute::CAudioMute():CComponentsPicture(0, 0, 0, 0, NEUTRINO_ICON_BUTTON_MUTE) { - mute_ax = 0; - mute_ay = 0; - mute_dx = 0; - mute_dy = 0; - mute_ay_old = -1; + y_old = -1; CVolumeHelper::getInstance()->refresh(); - CVolumeHelper::getInstance()->getMuteIconDimensions(&mute_ax, &mute_ay, &mute_dx, &mute_dy); - mIcon = new CComponentsPicture(mute_ax, mute_ay, mute_dx, mute_dy, NEUTRINO_ICON_BUTTON_MUTE); -} - -CAudioMute::~CAudioMute() -{ - delete mIcon; + CVolumeHelper::getInstance()->getMuteIconDimensions(&x, &y, &width, &height); } CAudioMute* CAudioMute::getInstance() @@ -68,19 +60,18 @@ void CAudioMute::AudioMute(int newValue, bool isEvent) if( isEvent && ( neutrino->getMode() != CNeutrinoApp::mode_scart ) && ( neutrino->getMode() != CNeutrinoApp::mode_audio) && ( neutrino->getMode() != CNeutrinoApp::mode_pic)) { - CVolumeHelper::getInstance()->getMuteIconDimensions(&mute_ax, &mute_ay, &mute_dx, &mute_dy); - if ((mIcon) && (mute_ay_old != mute_ay)) { - mIcon->hide(); - mIcon->setYPos(mute_ay); - mute_ay_old = mute_ay; + CVolumeHelper::getInstance()->getMuteIconDimensions(&x, &y, &width, &height); + if ((y_old != y)) { + this->hide(); + y_old = y; } if ((g_settings.mode_clock) && (doInit)) CInfoClock::getInstance()->ClearDisplay(); if (newValue) - mIcon->paint(); + this->paint(); else - mIcon->hide(); + this->hide(); if (doInit) CVolumeHelper::getInstance()->refresh(); diff --git a/src/gui/audiomute.h b/src/gui/audiomute.h index a45fa70e2..18dfcc8f5 100644 --- a/src/gui/audiomute.h +++ b/src/gui/audiomute.h @@ -29,17 +29,15 @@ #include -class CAudioMute +class CAudioMute : public CComponentsPicture { private: - int mute_ay_old; - int mute_ax, mute_ay, mute_dx, mute_dy; - CComponentsPicture *mIcon; + int y_old; public: CAudioMute(); - ~CAudioMute(); +// ~CAudioMute(); static CAudioMute* getInstance(); void AudioMute(int newValue, bool isEvent= false); From 5186371bb5c3ff712dd2525c4e27179f0f22c854 Mon Sep 17 00:00:00 2001 From: rhabarber1848 Date: Wed, 25 Apr 2012 18:23:27 +0000 Subject: [PATCH 16/56] eventlist: Use selected event title as default search word, patch by Gaucho316: http://www.dbox2-tuning.net/forum/viewtopic.php?p=382712#p382712 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f6413891b25bb85cb8a9c272d3c7182c3ad7ef9e Author: rhabarber1848 Date: 2012-04-25 (Wed, 25 Apr 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 6 ++++++ src/gui/eventlist.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index a56e7bd6c..04348f36a 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -1016,6 +1016,12 @@ bool CNeutrinoEventList::findEvents(void) int event = 0; t_channel_id channel_id = 0; + if((m_search_keyword.empty() || m_search_keyword == m_search_autokeyword) && evtlist[selected].eventID != 0) + { + m_search_keyword = evtlist[selected].description; + m_search_autokeyword = m_search_keyword; + } + CEventFinderMenu menu( &event, &m_search_epg_item, &m_search_keyword, diff --git a/src/gui/eventlist.h b/src/gui/eventlist.h index 530b69e8d..c39d5f1eb 100644 --- a/src/gui/eventlist.h +++ b/src/gui/eventlist.h @@ -67,6 +67,7 @@ class CNeutrinoEventList private: int m_search_epg_item; std::string m_search_keyword; + std::string m_search_autokeyword; int m_search_list; t_channel_id m_search_channel_id; t_bouquet_id m_search_bouquet_id; From 70501b38d0bb6396b427aa31cd69abc3b834f498 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 12 May 2013 14:16:51 +0200 Subject: [PATCH 17/56] CComponents: fix missing save of background in paint_bg=false mode Exit in initVarItem() on !paint_bg was too early. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9ae72bf02d469a84391815af521d2fd083521966 Author: Thilo Graf Date: 2013-05-12 (Sun, 12 May 2013) ------------------ This commit was generated by Migit --- src/gui/components/cc_base.cpp | 7 ++++++- src/gui/components/cc_item.cpp | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gui/components/cc_base.cpp b/src/gui/components/cc_base.cpp index 30c84dea8..777015ee0 100644 --- a/src/gui/components/cc_base.cpp +++ b/src/gui/components/cc_base.cpp @@ -83,6 +83,7 @@ void CComponents::initVarBasic() //paint framebuffer stuff and fill buffer void CComponents::paintFbItems(bool do_save_bg) { + //save background before first paint, do_save_bg must be true if (firstPaint && do_save_bg) { for(size_t i=0; i 0) frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, v_fbdata[i].frame_thickness, v_fbdata[i].color, v_fbdata[i].r); diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index a50375d10..0e9985814 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -67,9 +67,6 @@ void CComponentsItem::paintInit(bool do_save_bg) { clear(); - if(!paint_bg) - return; - int sw = shadow ? shadow_w : 0; int th = fr_thickness; fb_pixel_t col_frame_cur = col_frame; From 12186c29cc5b05c9a2a41842bfa345e791c7a63e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 12 May 2013 22:26:10 +0200 Subject: [PATCH 18/56] channellist: show current event in additional info box Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e170aec2d9f0ae58234b69f03ca1b853b0a7a095 Author: vanhofen Date: 2013-05-12 (Sun, 12 May 2013) Origin message was: ------------------ - channellist: show current event in additional info box ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 536b47430..48f7c2985 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2237,8 +2237,7 @@ void CChannelList::paint_events(int index) for (e=evtlist.begin(); e!=evtlist.end(); ++e ) { //Remove events in the past - time_t dif = azeit - e->startTime; - if ( (dif > 0) && (!(e->eventID == 0))) + if ( (azeit > (e->startTime + e->duration)) && (!(e->eventID == 0))) { do { @@ -2246,9 +2245,8 @@ void CChannelList::paint_events(int index) e = evtlist.erase( e ); if (e == evtlist.end()) break; - dif = azeit - e->startTime; } - while ( dif > 0 ); + while ( azeit > (e->startTime + e->duration)); } if (e == evtlist.end()) break; @@ -2256,15 +2254,17 @@ void CChannelList::paint_events(int index) //Display the remaining events if ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height)) { + bool first = false; if (e->eventID) { + first = (i == 1); struct tm *tmStartZeit = localtime(&e->startTime); strftime(startTime, sizeof(startTime), "%H:%M", tmStartZeit ); //printf("%s %s\n", startTime, e->description.c_str()); startTimeWidth = eventStartTimeWidth; g_Font[eventFont]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, startTimeWidth, startTime, (g_settings.colored_events_channellist == 2 /* next */) ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTINACTIVE, 0, true); } - g_Font[eventFont]->RenderString(x+ width+5+startTimeWidth, y+ theight+ pig_height + i*ffheight, infozone_width - startTimeWidth - 20, e->description, COL_MENUCONTENTDARK, 0, true); + g_Font[eventFont]->RenderString(x+ width+5+startTimeWidth, y+ theight+ pig_height + i*ffheight, infozone_width - startTimeWidth - 20, e->description, (first) ? COL_MENUHEAD : COL_MENUCONTENTDARK, 0, true); } else { From 7bf34687f8c9ce26a1d695525b607f8a5fd5d6e8 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 12 May 2013 23:06:57 +0200 Subject: [PATCH 19/56] channellist: show infotext when epg.info2 is empty ... ... and 'description' is selected in additional infos * fix double paint of infozone Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/4277b8e283a496b400f7073ef445e207327d5de4 Author: vanhofen Date: 2013-05-12 (Sun, 12 May 2013) Origin message was: ------------------ - channellist: show infotext when epg.info2 is empty ... ... and 'description' is selected in additional infos * fix double paint of infozone ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 48f7c2985..db8effcb0 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -868,9 +868,6 @@ int CChannelList::show() paintHead(); // update button bar paint(); - - if (!displayList && g_settings.channellist_additional) - showdescription(selected); } else if ( msg == CRCInput::RC_green ) { @@ -1664,7 +1661,12 @@ void CChannelList::paintDetails(int index) } } if ((g_settings.channellist_additional) && (p_event != NULL)) - paint_events(index); + { + if (displayList) + paint_events(index); + else + showdescription(selected); + } } void CChannelList::clearItem2DetailsLine() @@ -2308,13 +2310,15 @@ void CChannelList::showdescription(int index) epgData.info2.clear(); epgText.clear(); CEitManager::getInstance()->getEPGid(p_event->eventID, p_event->startTime, &epgData); + if (!(epgData.info2.empty())) - { - frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0); processTextToArray(epgData.info2); - for (int i = 1; (i < (int)epgText.size()+1) && ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height)); i++) - g_Font[eventFont]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, infozone_width - 20, epgText[i-1].first, COL_MENUCONTENTDARK , 0, true); - } + else + processTextToArray(g_Locale->getText(LOCALE_EPGVIEWER_NODETAILED)); + + frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0); + for (int i = 1; (i < (int)epgText.size()+1) && ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height)); i++) + g_Font[eventFont]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, infozone_width - 20, epgText[i-1].first, COL_MENUCONTENTDARK , 0, true); } void CChannelList::addTextToArray(const std::string & text, int screening) // UTF-8 From 826a4768882158842964c4503e5b6dee42240211 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 12 May 2013 23:41:36 +0200 Subject: [PATCH 20/56] channellist: disable 'displayNext' when additional infos enabled * otherwise there is no possibility to disable 'displayNext' except exiting the channellist Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2ab63ce14dc98d6a4b73f9024a75a598357075b9 Author: vanhofen Date: 2013-05-12 (Sun, 12 May 2013) Origin message was: ------------------ - channellist: disable 'displayNext' when additional infos enabled * otherwise there is no possibility to disable 'displayNext' except exiting the channellist ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index db8effcb0..a06de7d0b 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2105,8 +2105,12 @@ void CChannelList::paint() // paint background for main box frameBuffer->paintBoxRel(x, y+theight, width, height-footerHeight-theight, COL_MENUCONTENT_PLUS_0); if (g_settings.channellist_additional) + { + // disable displayNext + displayNext = false; // paint background for right box frameBuffer->paintBoxRel(x+width,y+theight,infozone_width,pig_height+infozone_height,COL_MENUCONTENT_PLUS_0); + } for(unsigned int count = 0; count < listmaxshow; count++) { paintItem(count, true); From c8d82ff6945acb3b244d9df4b1627470d5b93524 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 13 May 2013 08:48:29 +0200 Subject: [PATCH 21/56] channellist.cpp fix compil -comparison between signed and unsigned integer expressions Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c32266e8f4ab5dcbee1f7625d124c5e29998c433 Author: Jacek Jendrzej Date: 2013-05-13 (Mon, 13 May 2013) Origin message was: ------------------ channellist.cpp fix compil -comparison between signed and unsigned integer expressions ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index a06de7d0b..b1ee4e771 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2228,6 +2228,7 @@ void CChannelList::paint_events(int index) CChannelEventList::iterator e; time_t azeit; time(&azeit); + unsigned int u_azeit = ( azeit > -1)? azeit:0; if ( evtlist.empty() ) { @@ -2243,7 +2244,7 @@ void CChannelList::paint_events(int index) for (e=evtlist.begin(); e!=evtlist.end(); ++e ) { //Remove events in the past - if ( (azeit > (e->startTime + e->duration)) && (!(e->eventID == 0))) + if ( (u_azeit > (e->startTime + e->duration)) && (!(e->eventID == 0))) { do { @@ -2252,7 +2253,7 @@ void CChannelList::paint_events(int index) if (e == evtlist.end()) break; } - while ( azeit > (e->startTime + e->duration)); + while ( u_azeit > (e->startTime + e->duration)); } if (e == evtlist.end()) break; From 255f7049df8e4221bbb44263209eb8a96f190d75 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 13 May 2013 10:13:29 +0200 Subject: [PATCH 22/56] CNeutrinoEventList::findEvents - search in unique channelList Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3ee3452fdaf3417c4be0274af07b930938cdf9ad Author: Jacek Jendrzej Date: 2013-05-13 (Mon, 13 May 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 04348f36a..47d4d1c17 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -1006,8 +1006,6 @@ int CEventListHandler::exec(CMenuTarget* parent, const std::string &/*actionkey* return res; } - - /************************************************************************************************/ bool CNeutrinoEventList::findEvents(void) /************************************************************************************************/ @@ -1057,15 +1055,23 @@ bool CNeutrinoEventList::findEvents(void) CHintBox box(LOCALE_TIMING_EPG,g_Locale->getText(LOCALE_EVENTFINDER_SEARCHING)); box.paint(); int bouquet_nr = bouquetList->Bouquets.size(); + std::vector v; for(int bouquet = 0; bouquet < bouquet_nr; bouquet++) { int channel_nr = bouquetList->Bouquets[bouquet]->channelList->getSize(); for(int channel = 0; channel < channel_nr; channel++) { channel_id = bouquetList->Bouquets[bouquet]->channelList->getChannelFromIndex(channel)->channel_id; - CEitManager::getInstance()->getEventsServiceKey(channel_id,evtlist, m_search_epg_item,m_search_keyword); + v.push_back(channel_id); } } + sort(v.begin(), v.end()); + std::vector::iterator last_it = unique(v.begin(), v.end()); + std::vector::iterator it; + for (it = v.begin(); it != last_it; ++it) + { + CEitManager::getInstance()->getEventsServiceKey(*it,evtlist, m_search_epg_item,m_search_keyword); + } box.hide(); } if(!evtlist.empty()){ From 5891ce3ca1b4dc57d5d620b694ff0084ddcf6cae Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 13 May 2013 20:56:14 +0200 Subject: [PATCH 23/56] CNeutrinoEventList::paintDescription - show info1 if info2 is empty Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f23be72ee097e04857db1189f9c51620a9f446f5 Author: Jacek Jendrzej Date: 2013-05-13 (Mon, 13 May 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 47d4d1c17..b8b97ccd3 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -829,8 +829,12 @@ void CNeutrinoEventList::paintDescription(int index) else CEitManager::getInstance()->getActualEPGServiceKey(evtlist[index].channelID, &epgData ); - if(!epgData.info2.empty()) + if(!epgData.info2.empty()){ infozone_text = epgData.info2; + } + else if (!epgData.info1.empty()){ + infozone_text = epgData.info1; + } else infozone_text = g_Locale->getText(LOCALE_EPGLIST_NOEVENTS); From f94c0c7a998d71c2849ef5c600f447866a84b8fe Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 14 May 2013 01:07:58 +0200 Subject: [PATCH 24/56] stringinput: save/restore screen and add shadow Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d69502e5b891e6dd8c68f6195fc7e02c086b9b5b Author: vanhofen Date: 2013-05-14 (Tue, 14 May 2013) Origin message was: ------------------ - stringinput: save/restore screen and add shadow ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/stringinput.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 306d00116..7b85123ac 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -389,6 +389,11 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) strcat(value, " "); strncpy(oldval, value, size); + fb_pixel_t * pixbuf = new fb_pixel_t[(width + SHADOW_OFFSET) * (hheight + bheight + SHADOW_OFFSET)]; + + if (pixbuf != NULL) + frameBuffer->SaveScreen(x, y, width + SHADOW_OFFSET, hheight + bheight + SHADOW_OFFSET, pixbuf); + paint(); uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); @@ -500,6 +505,12 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) hide(); + if (pixbuf != NULL) + { + frameBuffer->RestoreScreen(x, y, width + SHADOW_OFFSET, hheight + bheight + SHADOW_OFFSET, pixbuf); + delete[] pixbuf;//Mismatching allocation and deallocation: pixbuf + } + for(int count=size-1;count>=0;count--) { if((value[count]==' ') || (value[count]==0)) @@ -532,11 +543,12 @@ int CStringInput::handleOthers(const neutrino_msg_t /*msg*/, const neutrino_msg_ void CStringInput::hide() { - frameBuffer->paintBackgroundBoxRel(x, y, width, height); + frameBuffer->paintBackgroundBoxRel(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET); } void CStringInput::paint(bool sms) { + frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width, hheight + bheight, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP); //round frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0, sms ? 0 : RADIUS_LARGE, CORNER_BOTTOM); From c9b9d8a5cbfdec979312ab3a05db207482064cf7 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 14 May 2013 01:09:10 +0200 Subject: [PATCH 25/56] neutrino: use key 'sleep' to execute CSleepTimerWidget Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a5857e9d5bbe5b5ba80a605b823f8a1801db04a5 Author: vanhofen Date: 2013-05-14 (Tue, 14 May 2013) Origin message was: ------------------ - neutrino: use key 'sleep' to execute CSleepTimerWidget ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/neutrino.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index decdc70fe..a8d39c17d 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -78,6 +78,7 @@ #include "gui/plugins.h" #include "gui/rc_lock.h" #include "gui/scan_setup.h" +#include "gui/sleeptimer.h" #include "gui/start_wizard.h" #include "gui/videosettings.h" @@ -2576,6 +2577,12 @@ _repeat: g_videoSettings->SwitchFormat(); return messages_return::handled; } + else if( msg == CRCInput::RC_sleep ) { + CSleepTimerWidget *sleepTimer = new CSleepTimerWidget; + sleepTimer->exec(NULL, ""); + delete sleepTimer; + return messages_return::handled; + } else if (msg == (neutrino_msg_t) g_settings.key_screenshot) { //video+osd scaled to osd size CScreenShot * sc = new CScreenShot("", (CScreenShot::screenshot_format_t)g_settings.screenshot_format); From fd65a171572aafebb8ed6c9003c48513f278a998 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 14 May 2013 22:20:40 +0200 Subject: [PATCH 26/56] sleeptimer: allow only one instance * remove unneeded includes Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/07da9cecdc5085e7df11e96e27ac923dcee3eaeb Author: vanhofen Date: 2013-05-14 (Tue, 14 May 2013) Origin message was: ------------------ - sleeptimer: allow only one instance * remove unneeded includes ------------------ This commit was generated by Migit --- src/gui/sleeptimer.cpp | 29 ++++++++++++++++++----------- src/gui/sleeptimer.h | 7 +++++-- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/gui/sleeptimer.cpp b/src/gui/sleeptimer.cpp index be0c70d32..08ebbbc20 100644 --- a/src/gui/sleeptimer.cpp +++ b/src/gui/sleeptimer.cpp @@ -4,13 +4,6 @@ Copyright (C) 2001 Steffen Hehn 'McClean' Homepage: http://dbox.cyberphoria.org/ - Kommentar: - - Diese GUI wurde von Grund auf neu programmiert und sollte nun vom - Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert - auf der Client-Server Idee, diese GUI ist also von der direkten DBox- - Steuerung getrennt. Diese wird dann von Daemons uebernommen. - License: GPL @@ -35,22 +28,30 @@ #include -#include -#include #include #include #include -#include +#include extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ #include +bool CSleepTimerWidget::is_running = false; + int CSleepTimerWidget::exec(CMenuTarget* parent, const std::string &actionKey) { - int res = menu_return::RETURN_REPAINT; + int res = menu_return::RETURN_REPAINT; + + if (is_running) + { + printf("[CSleepTimerWidget] %s: another instance is already running.\n", __FUNCTION__); + return res; + } + is_running = true; + int shutdown_min = 0; char value[16]; CStringInput *inbox; @@ -88,7 +89,10 @@ int CSleepTimerWidget::exec(CMenuTarget* parent, const std::string &actionKey) /* exit pressed, cancel timer setup */ if(ret == menu_return::RETURN_EXIT_REPAINT) + { + is_running = false; return res; + } int new_val = atoi(value); if(permanent) { @@ -107,5 +111,8 @@ int CSleepTimerWidget::exec(CMenuTarget* parent, const std::string &actionKey) else // set the sleeptimer to actual time + shutdown mins and announce 1 min before g_Timerd->setSleeptimer(time(NULL) + ((shutdown_min -1) * 60),time(NULL) + shutdown_min * 60,0); } + + is_running = false; + return res; } diff --git a/src/gui/sleeptimer.h b/src/gui/sleeptimer.h index 8215c34d2..dd02a34a8 100644 --- a/src/gui/sleeptimer.h +++ b/src/gui/sleeptimer.h @@ -27,8 +27,11 @@ class CSleepTimerWidget: public CMenuTarget { - public: - int exec(CMenuTarget* parent, const std::string & actionKey); + private: + static bool is_running; + + public: + int exec(CMenuTarget* parent, const std::string & actionKey); }; From 4befb00cfafe06c1941acc63d087b371d5ae99fe Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 14 May 2013 22:40:49 +0200 Subject: [PATCH 27/56] yweb: add key 'sleep' Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ee4a4cbea1b2be3176994b0074ed376dff201024 Author: vanhofen Date: 2013-05-14 (Tue, 14 May 2013) Origin message was: ------------------ - yweb: add key 'sleep' ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/nhttpd/tuxboxapi/coolstream/controlapi.cpp | 1 + src/nhttpd/web/Y_Blocks.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index 3894cedac..d67eb5caf 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -736,6 +736,7 @@ static const struct key keynames[] = { {"KEY_NEXT", KEY_NEXT}, {"KEY_PREVIOUS", KEY_PREVIOUS}, {"KEY_TIME", KEY_TIME}, + {"KEY_SLEEP", KEY_SLEEP}, {"KEY_AUDIO", KEY_AUDIO}, {"KEY_REWIND", KEY_REWIND}, {"KEY_FORWARD", KEY_FORWARD}, diff --git a/src/nhttpd/web/Y_Blocks.txt b/src/nhttpd/web/Y_Blocks.txt index 15efccad1..c887e2822 100644 --- a/src/nhttpd/web/Y_Blocks.txt +++ b/src/nhttpd/web/Y_Blocks.txt @@ -595,6 +595,7 @@ start-block~remote_zee + From 937c7617d4ac79253383a5abf716396bf1efa1e0 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 15 May 2013 14:39:09 +0200 Subject: [PATCH 28/56] CNeutrinoEventList::findEvents - speedup search in all channelList Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/63bb0996da519cffef147355ea316039f8fae460 Author: Jacek Jendrzej Date: 2013-05-15 (Wed, 15 May 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/eitd/sectionsd.cpp | 7 +++++-- src/gui/eventlist.cpp | 26 +++++++++++++++----------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 99daa9778..95bd0bc38 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -2253,7 +2253,7 @@ void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEve for (MySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey::iterator e = mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.begin(); e != mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.end(); ++e) { - if ((*e)->get_channel_id() == serviceUniqueKey64) { + if ((*e)->get_channel_id() == serviceUniqueKey64 || (serviceUniqueKey64 == 1)) { serviceIDfound = 1; bool copy = true; @@ -2289,7 +2289,10 @@ void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEve aEvent.text = (*e)->getExtendedText().substr(0, 120); else aEvent.text = (*e)->getText(); - aEvent.channelID = serviceUniqueKey; + if(serviceUniqueKey64 == 1)//hack for all channel search + aEvent.channelID = (*e)->get_channel_id(); + else + aEvent.channelID = serviceUniqueKey; eList.push_back(aEvent); } } // if = serviceID diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index b8b97ccd3..4079eedab 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -1056,25 +1056,29 @@ bool CNeutrinoEventList::findEvents(void) } else if(m_search_list == SEARCH_LIST_ALL) { + CHintBox box(LOCALE_TIMING_EPG,g_Locale->getText(LOCALE_EVENTFINDER_SEARCHING)); box.paint(); - int bouquet_nr = bouquetList->Bouquets.size(); std::vector v; - for(int bouquet = 0; bouquet < bouquet_nr; bouquet++) - { - int channel_nr = bouquetList->Bouquets[bouquet]->channelList->getSize(); + int channel_nr = CNeutrinoApp::getInstance ()->channelList->getSize();//unique channelList TV or Radio for(int channel = 0; channel < channel_nr; channel++) { - channel_id = bouquetList->Bouquets[bouquet]->channelList->getChannelFromIndex(channel)->channel_id; + channel_id = CNeutrinoApp::getInstance ()->channelList->getChannelFromIndex(channel)->channel_id; v.push_back(channel_id); } - } - sort(v.begin(), v.end()); - std::vector::iterator last_it = unique(v.begin(), v.end()); - std::vector::iterator it; - for (it = v.begin(); it != last_it; ++it) + + std::map ch_id_map; + std::vector::iterator it; + for (it = v.begin(); it != v.end(); ++it) { - CEitManager::getInstance()->getEventsServiceKey(*it,evtlist, m_search_epg_item,m_search_keyword); + ch_id_map[*it & 0xFFFFFFFFFFFFULL] = *it; + } + CEitManager::getInstance()->getEventsServiceKey(1/*hack*/,evtlist, m_search_epg_item,m_search_keyword); + CChannelEventList::iterator e; + for ( e=evtlist.begin(); e!=evtlist.end(); ++e ) + { + if(e->channelID) + e->channelID = ch_id_map[e->channelID];//map channelID48 to channelID64 } box.hide(); } From b828f9db70193a94b669b74891ad0908e08f5dae Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 15 May 2013 17:36:33 +0200 Subject: [PATCH 29/56] CNeutrinoEventList::findEvents - remove events for not found channels in channelList Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5869af605bb2603a0db7f66ec38a92cf491edc0c Author: Jacek Jendrzej Date: 2013-05-15 (Wed, 15 May 2013) Origin message was: ------------------ CNeutrinoEventList::findEvents - remove events for not found channels in channelList ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 4079eedab..2263b8582 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -1061,24 +1061,29 @@ bool CNeutrinoEventList::findEvents(void) box.paint(); std::vector v; int channel_nr = CNeutrinoApp::getInstance ()->channelList->getSize();//unique channelList TV or Radio - for(int channel = 0; channel < channel_nr; channel++) - { - channel_id = CNeutrinoApp::getInstance ()->channelList->getChannelFromIndex(channel)->channel_id; - v.push_back(channel_id); - } + for(int channel = 0; channel < channel_nr; channel++){ + channel_id = CNeutrinoApp::getInstance ()->channelList->getChannelFromIndex(channel)->channel_id; + v.push_back(channel_id); + } - std::map ch_id_map; + std::map ch_id_map; std::vector::iterator it; - for (it = v.begin(); it != v.end(); ++it) - { + for (it = v.begin(); it != v.end(); ++it){ ch_id_map[*it & 0xFFFFFFFFFFFFULL] = *it; } CEitManager::getInstance()->getEventsServiceKey(1/*hack*/,evtlist, m_search_epg_item,m_search_keyword); + + std::map::iterator map_it; CChannelEventList::iterator e; - for ( e=evtlist.begin(); e!=evtlist.end(); ++e ) - { - if(e->channelID) - e->channelID = ch_id_map[e->channelID];//map channelID48 to channelID64 + for ( e=evtlist.begin(); e!=evtlist.end();){ + map_it = ch_id_map.find(e->channelID); + if (map_it != ch_id_map.end()){ + e->channelID = map_it->second;//map channelID48 to channelID + ++e; + } + else{ + evtlist.erase(e);// remove event for not found channels in channelList + } } box.hide(); } From 3cc3eec0ed66508772fd782bafbf5c9825558c17 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 16 May 2013 10:21:45 +0200 Subject: [PATCH 30/56] CNeutrinoEventList::findEvents -fix segfault if Bouquets not in current mode, remove unique sort Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/8079c9126b1e6b3b8e7d0ce1cec3df578196ef2c Author: Jacek Jendrzej Date: 2013-05-16 (Thu, 16 May 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 2263b8582..d3b959879 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -65,6 +65,11 @@ bool sortById (const CChannelEvent& a, const CChannelEvent& b) { return a.eventID < b.eventID ; } + +inline static bool sortbyEventid (const CChannelEvent& a, const CChannelEvent& b) +{ + return (a.channelID == b.channelID && a.eventID == b.eventID && a.startTime == b.startTime); +} #endif inline bool sortByDescription (const CChannelEvent& a, const CChannelEvent& b) { @@ -78,11 +83,6 @@ inline static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& return a.startTime < b.startTime; } -inline static bool sortbyEventid (const CChannelEvent& a, const CChannelEvent& b) -{ - return (a.channelID == b.channelID && a.eventID == b.eventID && a.startTime == b.startTime); -} - CNeutrinoEventList::CNeutrinoEventList() { frameBuffer = CFrameBuffer::getInstance(); @@ -1075,21 +1075,23 @@ bool CNeutrinoEventList::findEvents(void) std::map::iterator map_it; CChannelEventList::iterator e; - for ( e=evtlist.begin(); e!=evtlist.end();){ - map_it = ch_id_map.find(e->channelID); - if (map_it != ch_id_map.end()){ - e->channelID = map_it->second;//map channelID48 to channelID - ++e; - } - else{ - evtlist.erase(e);// remove event for not found channels in channelList + if(!evtlist.empty()){ + for ( e=evtlist.begin(); e!=evtlist.end();){ + map_it = ch_id_map.find(e->channelID); + if (map_it != ch_id_map.end()){ + e->channelID = map_it->second;//map channelID48 to channelID + ++e; + } + else{ + evtlist.erase(e);// remove event for not found channels in channelList + } } } + box.hide(); } if(!evtlist.empty()){ sort(evtlist.begin(),evtlist.end(),sortByDateTime); - evtlist.erase(unique(evtlist.begin(), evtlist.end(),sortbyEventid), evtlist.end()); } current_event = (unsigned int)-1; @@ -1292,7 +1294,7 @@ int CEventFinderMenu::showMenu(void) } else if(*m_search_list == CNeutrinoEventList::SEARCH_LIST_BOUQUET) { - if(bouquetList->Bouquets.size()<*m_search_bouquet_id ){ + if(bouquetList->Bouquets.size() < *m_search_bouquet_id ){ *m_search_bouquet_id = bouquetList->getActiveBouquetNumber();; } if(!bouquetList->Bouquets.empty()) @@ -1342,8 +1344,13 @@ bool CEventFinderMenu::changeNotify(const neutrino_locale_t OptionName, void *) } else if (*m_search_list == CNeutrinoEventList::SEARCH_LIST_BOUQUET) { - m_search_channelname = bouquetList->Bouquets[*m_search_bouquet_id]->channelList->getName(); - m_search_channelname_mf->setActive(true); + if(bouquetList->Bouquets.size() < *m_search_bouquet_id ){ + *m_search_bouquet_id = bouquetList->getActiveBouquetNumber(); + } + if(!bouquetList->Bouquets.empty()){ + m_search_channelname = bouquetList->Bouquets[*m_search_bouquet_id]->channelList->getName(); + m_search_channelname_mf->setActive(true); + } } else if (*m_search_list == CNeutrinoEventList::SEARCH_LIST_ALL) { From c6e25fc5c4dd9ad924c7bc20f98eb6bcdb17e067 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 13 May 2013 06:31:02 +0200 Subject: [PATCH 31/56] Rework handling muteicon - Integrated for monitoring the mute icon into the frame buffer class. If the icon is overwritten by an element, it is restored from the framebuffer. Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1049b337bb98d7e02e3982086bbcb4e0f6d12d71 Author: Michael Liebmann Date: 2013-05-13 (Mon, 13 May 2013) Origin message was: ------------------ * Rework handling muteicon - Integrated for monitoring the mute icon into the frame buffer class. If the icon is overwritten by an element, it is restored from the framebuffer. Signed-off-by: Thilo Graf ------------------ This commit was generated by Migit --- src/driver/fontrenderer.cpp | 3 + src/driver/framebuffer.cpp | 135 +++++++++++++++++++++++++++++++++--- src/driver/framebuffer.h | 66 +++++++++++++++--- src/gui/audiomute.cpp | 47 +++++++++++-- src/gui/audiomute.h | 3 + 5 files changed, 228 insertions(+), 26 deletions(-) diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index f0d0220db..b92accfa7 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -372,6 +372,8 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u if (!frameBuffer->getActive()) return; + frameBuffer->checkFbArea(x, y, width, height, true); + pthread_mutex_lock( &renderer->render_mutex ); FT_Error err = FTC_Manager_LookupSize(renderer->cacheManager, &scaler, &size); @@ -620,6 +622,7 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u } //printf("RenderStat: %d %d %d \n", renderer->cacheManager->num_nodes, renderer->cacheManager->num_bytes, renderer->cacheManager->max_bytes); pthread_mutex_unlock( &renderer->render_mutex ); + frameBuffer->checkFbArea(x, y, width, height, false); } void Font::RenderString(int x, int y, const int width, const std::string & text, const unsigned char color, const int boxheight, const bool utf8_encoded) diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index 15c99a2e9..fdac73996 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -4,21 +4,27 @@ Copyright (C) 2001 Steffen Hehn 'McClean' 2003 thegoodguy + mute icon handling from tuxbox project + Copyright (C) 2009 Stefan Seyfried + mute icon & info clock handling + Copyright (C) 2013 M. Liebmann (micha-bbg) + License: GPL - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public + License along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H @@ -38,6 +44,7 @@ #include +#include #include #include #include @@ -196,6 +203,9 @@ CFrameBuffer::CFrameBuffer() memset(green, 0, 256*sizeof(__u16)); memset(blue, 0, 256*sizeof(__u16)); memset(trans, 0, 256*sizeof(__u16)); + fbAreaActiv = false; + fb_no_check = false; + do_paint_mute_icon = true; } CFrameBuffer* CFrameBuffer::getInstance() @@ -402,6 +412,8 @@ CFrameBuffer::~CFrameBuffer() } close(fd); close(tty); + + v_fbarea.clear(); } int CFrameBuffer::getFileHandle() const @@ -651,12 +663,16 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int printf("paintBoxRel: radius %d, start x %d y %d end x %d y %d\n", radius, x, y, x+dx, y+dy); return; } + + checkFbArea(x, y, dx, dy, true); + #if defined(FB_HW_ACCELERATION) fb_fillrect fillrect; fillrect.color = col; fillrect.rop = ROP_COPY; #elif defined(USE_NEVIS_GXA) - OpenThreads::ScopedLock m_lock(mutex); + if (!fb_no_check) + OpenThreads::ScopedLock m_lock(mutex); /* solid fill with background color */ unsigned int cmd = GXA_CMD_BLT | GXA_CMD_NOT_TEXT | GXA_SRC_BMP_SEL(7) | GXA_DST_BMP_SEL(2) | GXA_PARAM_COUNT(2) | GXA_CMD_NOT_ALPHA; _write_gxa(gxa_base, GXA_BG_COLOR_REG, (unsigned int) col); /* setup the drawing color */ @@ -805,6 +821,7 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int */ add_gxa_sync_marker(); #endif + checkFbArea(x, y, dx, dy, false); } void CFrameBuffer::paintVLineRelInternal(int x, int y, int dy, const fb_pixel_t col) @@ -1069,9 +1086,11 @@ _display: if (h != 0) yy += (h - height) / 2; + checkFbArea(x, yy, width, height, true); if (paintBg) paintBoxRel(x, yy, width, height, colBg); blit2FB(data, width, height, x, yy, 0, 0, true); + checkFbArea(x, yy, width, height, false); return true; } @@ -1475,6 +1494,7 @@ void CFrameBuffer::paintBackgroundBoxRel(int x, int y, int dx, int dy) if (!getActive()) return; + checkFbArea(x, y, dx, dy, true); if(!useBackgroundPaint) { paintBoxRel(x, y, dx, dy, backgroundColor); @@ -1490,6 +1510,7 @@ void CFrameBuffer::paintBackgroundBoxRel(int x, int y, int dx, int dy) bkpos += BACKGROUNDIMAGEWIDTH; } } + checkFbArea(x, y, dx, dy, false); } void CFrameBuffer::paintBackground() @@ -1497,6 +1518,7 @@ void CFrameBuffer::paintBackground() if (!getActive()) return; + checkFbArea(0, 0, xRes, yRes, true); if (useBackgroundPaint && (background != NULL)) { for (int i = 0; i < 576; i++) @@ -1506,6 +1528,7 @@ void CFrameBuffer::paintBackground() { paintBoxRel(0, 0, xRes, yRes, backgroundColor); } + checkFbArea(0, 0, xRes, yRes, false); } void CFrameBuffer::SaveScreen(int x, int y, int dx, int dy, fb_pixel_t * const memp) @@ -1513,6 +1536,7 @@ void CFrameBuffer::SaveScreen(int x, int y, int dx, int dy, fb_pixel_t * const m if (!getActive()) return; + checkFbArea(x, y, dx, dy, true); uint8_t * pos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y; fb_pixel_t * bkpos = memp; for (int count = 0; count < dy; count++) { @@ -1536,6 +1560,7 @@ void CFrameBuffer::SaveScreen(int x, int y, int dx, int dy, fb_pixel_t * const m bkpos += dx; } #endif + checkFbArea(x, y, dx, dy, false); } @@ -1544,6 +1569,7 @@ void CFrameBuffer::RestoreScreen(int x, int y, int dx, int dy, fb_pixel_t * cons if (!getActive()) return; + checkFbArea(x, y, dx, dy, true); uint8_t * fbpos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y; fb_pixel_t * bkpos = memp; for (int count = 0; count < dy; count++) @@ -1552,6 +1578,7 @@ void CFrameBuffer::RestoreScreen(int x, int y, int dx, int dy, fb_pixel_t * cons fbpos += stride; bkpos += dx; } + checkFbArea(x, y, dx, dy, false); } #if 0 //never used @@ -1768,3 +1795,91 @@ void CFrameBuffer::displayRGB(unsigned char *rgbbuff, int x_size, int y_size, in blit2FB(fbbuff, x_size, y_size, x_offs, y_offs, x_pan, y_pan); cs_free_uncached(fbbuff); } + +// ## AudioMute / Clock ###################################### + +void CFrameBuffer::setFbArea(int element, int _x, int _y, int _dx, int _dy) +{ + if (_x == 0 && _y == 0 && _dx == 0 && _dy == 0) { + // delete area + for (fbarea_iterator_t it = v_fbarea.begin(); it != v_fbarea.end(); ++it) { + if (it->element == element) { + v_fbarea.erase(it); + break; + } + } + if (v_fbarea.empty()) { + fbAreaActiv = false; + } + } + else { + // change area + bool found = false; + for (unsigned int i = 0; i < v_fbarea.size(); i++) { + if (v_fbarea[i].element == element) { + v_fbarea[i].x = _x; + v_fbarea[i].y = _y; + v_fbarea[i].dx = _dx; + v_fbarea[i].dy = _dy; + found = true; + break; + } + } + // set new area + if (!found) { + fb_area_t area; + area.x = _x; + area.y = _y; + area.dx = _dx; + area.dy = _dy; + area.element = element; + v_fbarea.push_back(area); + } + fbAreaActiv = true; + } +} + +int CFrameBuffer::checkFbAreaElement(int _x, int _y, int _dx, int _dy, fb_area_t *area) +{ + if (fb_no_check) + return FB_PAINTAREA_MATCH_NO; + + if (_y > area->y + area->dy) + return FB_PAINTAREA_MATCH_NO; + if (_x + _dx < area->x) + return FB_PAINTAREA_MATCH_NO; + if (_x > area->x + area->dx) + return FB_PAINTAREA_MATCH_NO; + if (_y + _dy < area->y) + return FB_PAINTAREA_MATCH_NO; + return FB_PAINTAREA_MATCH_OK; +} + +bool CFrameBuffer::_checkFbArea(int _x, int _y, int _dx, int _dy, bool prev) +{ + if (v_fbarea.empty()) + return true; + + for (unsigned int i = 0; i < v_fbarea.size(); i++) { + int ret = checkFbAreaElement(_x, _y, _dx, _dy, &v_fbarea[i]); + if (ret == FB_PAINTAREA_MATCH_OK) { + switch (v_fbarea[i].element) { + case FB_PAINTAREA_MUTEICON1: + if (!do_paint_mute_icon) + break; +// waitForIdle(); + fb_no_check = true; + if (prev) + CAudioMute::getInstance()->hide(true); + else + CAudioMute::getInstance()->paint(); + fb_no_check = false; + break; + default: + break; + } + } + } + + return true; +} diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h index dbe42cf52..27218ac7f 100644 --- a/src/driver/framebuffer.h +++ b/src/driver/framebuffer.h @@ -2,23 +2,23 @@ Neutrino-GUI - DBoxII-Project Copyright (C) 2001 Steffen Hehn 'McClean' - Homepage: http://dbox.cyberphoria.org/ License: GPL - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public + License along with this program; if not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. */ @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -243,6 +244,51 @@ class CFrameBuffer }; void SetTransparent(int t){ m_transparent = t; } void SetTransparentDefault(){ m_transparent = m_transparent_default; } + +// ## AudioMute / Clock ###################################### + private: + enum { + FB_PAINTAREA_MATCH_NO, + FB_PAINTAREA_MATCH_OK + }; + + typedef struct fb_area_t + { + int x; + int y; + int dx; + int dy; + int element; + } fb_area_struct_t; + + bool fbAreaActiv; + typedef std::vector v_fbarea_t; + typedef v_fbarea_t::iterator fbarea_iterator_t; + v_fbarea_t v_fbarea; + bool fb_no_check; + bool do_paint_mute_icon; + + bool _checkFbArea(int _x, int _y, int _dx, int _dy, bool prev); + int checkFbAreaElement(int _x, int _y, int _dx, int _dy, fb_area_t *area); + + public: + enum { + FB_PAINTAREA_INFOCLOCK, + FB_PAINTAREA_MUTEICON1, + FB_PAINTAREA_MUTEICON2, + + FB_PAINTAREA_MAX + }; + +#if defined(FB_HW_ACCELERATION) + inline bool checkFbArea(int, int, int, int, bool) { return true; } +#else + inline bool checkFbArea(int _x, int _y, int _dx, int _dy, bool prev) { return (fbAreaActiv && !fb_no_check) ? _checkFbArea(_x, _y, _dx, _dy, prev) : true; } +#endif + + void setFbArea(int element, int _x=0, int _y=0, int _dx=0, int _dy=0); + void fbNoCheck(bool noCheck) { fb_no_check = noCheck; } + void doPaintMuteIcon(bool mode) { do_paint_mute_icon = mode; } }; #endif diff --git a/src/gui/audiomute.cpp b/src/gui/audiomute.cpp index 0cb46bc5a..fa22f6714 100644 --- a/src/gui/audiomute.cpp +++ b/src/gui/audiomute.cpp @@ -36,7 +36,9 @@ CAudioMute::CAudioMute():CComponentsPicture(0, 0, 0, 0, NEUTRINO_ICON_BUTTON_MUTE) { - y_old = -1; + y_old = -1; + paint_bg = false; + do_paint_mute_icon = true; CVolumeHelper::getInstance()->refresh(); CVolumeHelper::getInstance()->getMuteIconDimensions(&x, &y, &width, &height); } @@ -60,20 +62,53 @@ void CAudioMute::AudioMute(int newValue, bool isEvent) if( isEvent && ( neutrino->getMode() != CNeutrinoApp::mode_scart ) && ( neutrino->getMode() != CNeutrinoApp::mode_audio) && ( neutrino->getMode() != CNeutrinoApp::mode_pic)) { + CFrameBuffer *framebuffer = CFrameBuffer::getInstance(); CVolumeHelper::getInstance()->getMuteIconDimensions(&x, &y, &width, &height); if ((y_old != y)) { - this->hide(); + if (do_paint_mute_icon) + { + framebuffer->fbNoCheck(true); + this->hide(true); + framebuffer->fbNoCheck(false); + } + framebuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1); y_old = y; } if ((g_settings.mode_clock) && (doInit)) CInfoClock::getInstance()->ClearDisplay(); - if (newValue) - this->paint(); - else - this->hide(); + framebuffer->fbNoCheck(true); + if (newValue) { + if (do_paint_mute_icon) + this->paint(); + framebuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1, this->getXPos(), this->getYPos(), this->getWidth(), this->getHeight()); + } + else { + if (do_paint_mute_icon) + this->hide(true); + framebuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1); + } + framebuffer->fbNoCheck(false); if (doInit) CVolumeHelper::getInstance()->refresh(); } } + +void CAudioMute::enableMuteIcon(bool enable) +{ + CNeutrinoApp *neutrino = CNeutrinoApp::getInstance(); + CFrameBuffer *framebuffer = CFrameBuffer::getInstance(); + if (enable) { + framebuffer->doPaintMuteIcon(true); + do_paint_mute_icon = true; + if (neutrino->isMuted()) + this->paint(); + } + else { + if (neutrino->isMuted()) + this->hide(true); + framebuffer->doPaintMuteIcon(false); + do_paint_mute_icon = false; + } +} diff --git a/src/gui/audiomute.h b/src/gui/audiomute.h index 18dfcc8f5..406483f18 100644 --- a/src/gui/audiomute.h +++ b/src/gui/audiomute.h @@ -33,6 +33,7 @@ class CAudioMute : public CComponentsPicture { private: int y_old; + bool do_paint_mute_icon; public: @@ -41,6 +42,8 @@ class CAudioMute : public CComponentsPicture static CAudioMute* getInstance(); void AudioMute(int newValue, bool isEvent= false); + void doPaintMuteIcon(bool mode) { do_paint_mute_icon = mode; } + void enableMuteIcon(bool enable); }; #endif // __CAUDIOMUTE__ From 5235cec6d0f63d125ef84a2626e01c65d3faf441 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 13 May 2013 04:30:36 +0200 Subject: [PATCH 32/56] Various changes for reworked mute icon handling in some classes - mute icon disabled for moviebrowser, upnpbrowser, pictureviewer - extra handling for audioplayer Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/bf1c7bfdb744f1d31d3aa5b2bf1a1bfd3de953fd Author: Michael Liebmann Date: 2013-05-13 (Mon, 13 May 2013) Origin message was: ------------------ * Various changes for reworked mute icon handling in some classes - mute icon disabled for moviebrowser, upnpbrowser, pictureviewer - extra handling for audioplayer ------------------ This commit was generated by Migit --- src/driver/volume.cpp | 11 +++++++++++ src/gui/audioplayer.cpp | 10 ++++++++++ src/gui/audioplayer.h | 1 + src/gui/mediaplayer.cpp | 10 ++++++++-- src/gui/mediaplayer.h | 1 + src/gui/movieplayer.cpp | 5 +++++ src/gui/pictureviewer.cpp | 5 +++++ src/gui/upnpbrowser.cpp | 5 +++++ src/neutrino.cpp | 9 --------- 9 files changed, 46 insertions(+), 11 deletions(-) diff --git a/src/driver/volume.cpp b/src/driver/volume.cpp index 73c3cff88..c6c395586 100644 --- a/src/driver/volume.cpp +++ b/src/driver/volume.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include @@ -117,6 +118,11 @@ void CVolume::setVolume(const neutrino_msg_t key, bool nowait) volscale = NULL; } CAudioMute::getInstance()->AudioMute(false, true); + if (mode == CNeutrinoApp::mode_audio) { + CAudioPlayerGui *cap = CMediaPlayerMenu::getInstance()->getPlayerInstance(); + if (cap != NULL) + cap->refreshMuteIcon(); + } setVolume(msg); return; } @@ -138,6 +144,11 @@ void CVolume::setVolume(const neutrino_msg_t key, bool nowait) volscale = NULL; } CAudioMute::getInstance()->AudioMute(true, true); + if (mode == CNeutrinoApp::mode_audio) { + CAudioPlayerGui *cap = CMediaPlayerMenu::getInstance()->getPlayerInstance(); + if (cap != NULL) + cap->refreshMuteIcon(); + } setVolume(msg); return; } diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 3597915ff..8f2077a9e 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -281,6 +281,8 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey) m_fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); int iw, ih; + m_frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE, &iw, &ih); + m_theight = std::max(m_theight, ih+2); m_frameBuffer->getIconSize(NEUTRINO_ICON_MP3, &iw, &ih); m_theight = std::max(m_theight, ih+4); @@ -899,6 +901,9 @@ int CAudioPlayerGui::show() ret = menu_return::RETURN_EXIT_ALL; loop = false; } + // update mute icon + paintHead(); + paintLCD(); } } hide(); @@ -1667,6 +1672,11 @@ void CAudioPlayerGui::paintHead() } //m_frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MENU, m_x + m_width - 30, ypos); #endif + if ( CNeutrinoApp::getInstance()->isMuted() ) + { + m_frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE, &iw, &ih); + m_frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MUTE, xpos - iw, ypos, m_theight); + } } //------------------------------------------------------------------------ diff --git a/src/gui/audioplayer.h b/src/gui/audioplayer.h index 74284ed4a..8ed6eb5f8 100644 --- a/src/gui/audioplayer.h +++ b/src/gui/audioplayer.h @@ -261,6 +261,7 @@ class CAudioPlayerGui : public CMenuTarget bool playNext(bool allow_rotate = false); bool playPrev(bool allow_rotate = false); int getAudioPlayerM_current() {return m_current;} + void refreshMuteIcon() { paintHead(); } }; diff --git a/src/gui/mediaplayer.cpp b/src/gui/mediaplayer.cpp index b7998ca51..b120e528d 100644 --- a/src/gui/mediaplayer.cpp +++ b/src/gui/mediaplayer.cpp @@ -38,6 +38,7 @@ #include #include +#include #include #include #if ENABLE_UPNP @@ -87,30 +88,35 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey) if (parent) parent->hide(); + CAudioMute *audiomute = CAudioMute::getInstance(); if (actionKey == "audioplayer") { + audiomute->enableMuteIcon(false); if (audioPlayer == NULL) audioPlayer = new CAudioPlayerGui(); int res = audioPlayer->exec(NULL, "init"); - + audiomute->enableMuteIcon(true); return res /*menu_return::RETURN_REPAINT*/; } else if (actionKey == "inetplayer") { + audiomute->enableMuteIcon(false); if (inetPlayer == NULL) inetPlayer = new CAudioPlayerGui(true); int res = inetPlayer->exec(NULL, "init"); - + audiomute->enableMuteIcon(true); return res; //menu_return::RETURN_REPAINT; } else if (actionKey == "movieplayer") { + audiomute->enableMuteIcon(false); int mode = CNeutrinoApp::getInstance()->getMode(); if( mode == NeutrinoMessages::mode_radio ) videoDecoder->StopPicture(); int res = CMoviePlayerGui::getInstance().exec(NULL, "tsmoviebrowser"); if( mode == NeutrinoMessages::mode_radio ) videoDecoder->ShowPicture(DATADIR "/neutrino/icons/radiomode.jpg"); + audiomute->enableMuteIcon(true); return res; } diff --git a/src/gui/mediaplayer.h b/src/gui/mediaplayer.h index a52199d8b..e2b6710d7 100644 --- a/src/gui/mediaplayer.h +++ b/src/gui/mediaplayer.h @@ -63,6 +63,7 @@ class CMediaPlayerMenu : public CMenuTarget int exec(CMenuTarget* parent, const std::string & actionKey); void setMenuTitel(const neutrino_locale_t title = LOCALE_MAINMENU_MEDIA){menu_title = title;}; void setUsageMode(const int& mm_mode = MODE_DEFAULT){usage_mode = mm_mode;}; + CAudioPlayerGui *getPlayerInstance() { if (audioPlayer != NULL) return audioPlayer; else if (inetPlayer != NULL) return inetPlayer; else return NULL; } }; diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 1250969a8..b9d04a81c 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -484,6 +485,8 @@ void CMoviePlayerGui::PlayFile(void) } } + CAudioMute::getInstance()->enableMuteIcon(true); + while (playstate >= CMoviePlayerGui::PLAY) { if (update_lcd) { @@ -717,6 +720,8 @@ void CMoviePlayerGui::PlayFile(void) restoreNeutrino(); + CAudioMute::getInstance()->enableMuteIcon(false); + if (g_settings.mode_clock) InfoClock->StartClock(); } diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index f281f9bc7..5830d25cd 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -44,6 +44,7 @@ #include #include +#include #include #include @@ -238,6 +239,8 @@ int CPictureViewerGui::show() if (audioplayer) m_currentTitle = m_audioPlayer->getAudioPlayerM_current(); + CAudioMute::getInstance()->enableMuteIcon(false); + while (loop) { if (update) @@ -618,6 +621,8 @@ int CPictureViewerGui::show() } hide(); + CAudioMute::getInstance()->enableMuteIcon(true); + return(res); } diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index c6df7735f..ff780b4c0 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -52,6 +52,7 @@ #include +#include #include #include #include @@ -396,6 +397,8 @@ void CUpnpBrowserGui::selectDevice() return; } + CAudioMute::getInstance()->enableMuteIcon(false); + while (loop) { if (changed) @@ -488,6 +491,8 @@ void CUpnpBrowserGui::selectDevice() } } delete scanBox; + + CAudioMute::getInstance()->enableMuteIcon(true); } //------------------------------------------------------------------------ diff --git a/src/neutrino.cpp b/src/neutrino.cpp index a8d39c17d..20bfdebd6 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2047,9 +2047,6 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) //if(!g_settings.cacheTXT) // tuxtxt_stop(); g_RCInput->clearRCMsg(); - // restore mute symbol - if (current_muted) - g_audioMute->AudioMute(current_muted, true); if(g_settings.mode_clock) InfoClock->StartClock(); StartSubtitles(); @@ -2060,9 +2057,6 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) if(g_settings.mode_clock) InfoClock->StopClock(); mainMenu.exec(NULL, ""); - // restore mute symbol - if (current_muted) - g_audioMute->AudioMute(current_muted, true); if(g_settings.mode_clock) InfoClock->StartClock(); StartSubtitles(); @@ -2381,9 +2375,6 @@ _show: nNewChannel = bouquetList->Bouquets[old_b]->channelList->exec();//with ZAP! else nNewChannel = bouquetList->exec(true); - // restore mute symbol - if (current_muted) - g_audioMute->AudioMute(current_muted, true); } else if(msg == CRCInput::RC_sat) { SetChannelMode(LIST_MODE_SAT); nNewChannel = bouquetList->exec(true); From d4836544aa5e786da4bf3ef1c32d96d323bc8efb Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 16 May 2013 08:27:24 +0200 Subject: [PATCH 33/56] CFrameBuffer: Rework paintBoxFrame() - Rounded corners can be displayed individually - Improved rendering of circular arcs - Remove duplicate code in paintBoxRel() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b089d9bf204b1eb783a10f310badc5d2cf836772 Author: Michael Liebmann Date: 2013-05-16 (Thu, 16 May 2013) Origin message was: ------------------ * CFrameBuffer: Rework paintBoxFrame() - Rounded corners can be displayed individually - Improved rendering of circular arcs - Remove duplicate code in paintBoxRel() ------------------ This commit was generated by Migit --- src/driver/framebuffer.cpp | 289 +++++++++++++++++++++---------------- src/driver/framebuffer.h | 22 ++- 2 files changed, 184 insertions(+), 127 deletions(-) diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index fdac73996..b49788b58 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -198,6 +198,12 @@ CFrameBuffer::CFrameBuffer() // TM_NONE: No 'pseudo' transparency // TM_INI: Transparency depends on g_settings.infobar_alpha ??? m_transparent = m_transparent_default; + q_circle = NULL; + initQCircle(); + corner_tl = false; + corner_tr = false; + corner_bl = false; + corner_br = false; //FIXME: test memset(red, 0, 256*sizeof(__u16)); memset(green, 0, 256*sizeof(__u16)); @@ -391,6 +397,11 @@ CFrameBuffer::~CFrameBuffer() backupBackground = NULL; } + if (q_circle) { + delete[] q_circle; + q_circle = NULL; + } + #if 0 #ifdef RETURN_FROM_GRAPHICS_MODE if (-1 == ioctl(tty,KDSETMODE, kd_mode)) @@ -678,83 +689,14 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int _write_gxa(gxa_base, GXA_BG_COLOR_REG, (unsigned int) col); /* setup the drawing color */ #endif - /* this table contains the x coordinates for a quarter circle (the bottom right quarter) with fixed - radius of 540 px which is the half of the max HD graphics size of 1080 px. So with that table we - ca draw boxes with round corners and als circles by just setting dx = dy = radius (max 540). */ - static const int q_circle[541] = { - 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, - 540, 540, 540, 540, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, - 539, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 537, 537, 537, 537, 537, 537, 537, - 537, 537, 536, 536, 536, 536, 536, 536, 536, 536, 535, 535, 535, 535, 535, 535, 535, 535, 534, 534, - 534, 534, 534, 534, 533, 533, 533, 533, 533, 533, 532, 532, 532, 532, 532, 532, 531, 531, 531, 531, - 531, 531, 530, 530, 530, 530, 529, 529, 529, 529, 529, 529, 528, 528, 528, 528, 527, 527, 527, 527, - 527, 526, 526, 526, 526, 525, 525, 525, 525, 524, 524, 524, 524, 523, 523, 523, 523, 522, 522, 522, - 522, 521, 521, 521, 521, 520, 520, 520, 519, 519, 519, 518, 518, 518, 518, 517, 517, 517, 516, 516, - 516, 515, 515, 515, 515, 514, 514, 514, 513, 513, 513, 512, 512, 512, 511, 511, 511, 510, 510, 510, - 509, 509, 508, 508, 508, 507, 507, 507, 506, 506, 506, 505, 505, 504, 504, 504, 503, 503, 502, 502, - 502, 501, 501, 500, 500, 499, 499, 499, 498, 498, 498, 497, 497, 496, 496, 496, 495, 495, 494, 494, - 493, 493, 492, 492, 491, 491, 490, 490, 490, 489, 489, 488, 488, 487, 487, 486, 486, 485, 485, 484, - 484, 483, 483, 482, 482, 481, 481, 480, 480, 479, 479, 478, 478, 477, 477, 476, 476, 475, 475, 474, - 473, 473, 472, 472, 471, 471, 470, 470, 469, 468, 468, 467, 466, 466, 465, 465, 464, 464, 463, 462, - 462, 461, 460, 460, 459, 459, 458, 458, 457, 456, 455, 455, 454, 454, 453, 452, 452, 451, 450, 450, - 449, 449, 448, 447, 446, 446, 445, 445, 444, 443, 442, 441, 441, 440, 440, 439, 438, 437, 436, 436, - 435, 435, 434, 433, 432, 431, 431, 430, 429, 428, 427, 427, 426, 425, 425, 424, 423, 422, 421, 421, - 420, 419, 418, 417, 416, 416, 415, 414, 413, 412, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, - 403, 402, 401, 400, 399, 398, 397, 397, 395, 394, 393, 393, 392, 391, 390, 389, 388, 387, 386, 385, - 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 369, 368, 367, 367, 365, 364, - 363, 362, 361, 360, 358, 357, 356, 355, 354, 353, 352, 351, 350, 348, 347, 346, 345, 343, 342, 341, - 340, 339, 337, 336, 335, 334, 332, 331, 329, 328, 327, 326, 324, 323, 322, 321, 319, 317, 316, 315, - 314, 312, 310, 309, 308, 307, 305, 303, 302, 301, 299, 297, 296, 294, 293, 291, 289, 288, 287, 285, - 283, 281, 280, 278, 277, 275, 273, 271, 270, 268, 267, 265, 263, 261, 259, 258, 256, 254, 252, 250, - 248, 246, 244, 242, 240, 238, 236, 234, 232, 230, 228, 225, 223, 221, 219, 217, 215, 212, 210, 207, - 204, 202, 200, 197, 195, 192, 190, 187, 184, 181, 179, 176, 173, 170, 167, 164, 160, 157, 154, 150, - 147, 144, 140, 136, 132, 128, 124, 120, 115, 111, 105, 101, 95, 89, 83, 77, 69, 61, 52, 40, - 23}; - int line = 0; - if (type && radius) { - bool corner_tl = (type & CORNER_TOP_LEFT) == CORNER_TOP_LEFT; - bool corner_tr = (type & CORNER_TOP_RIGHT) == CORNER_TOP_RIGHT; - bool corner_bl = (type & CORNER_BOTTOM_LEFT) == CORNER_BOTTOM_LEFT; - bool corner_br = (type & CORNER_BOTTOM_RIGHT)== CORNER_BOTTOM_RIGHT; - int ofs, scf, scl, ofl, ofr; - /* just an multiplicator for all math to reduce rounding errors */ -#define MUL 32768 - - /* limit the radius */ - if (radius > dx) - radius = dx; - if (radius > dy) - radius = dy; - if (radius > 540) - radius = 540; - - scf = (540 * MUL) / ((radius < 1) ? 1 : radius); + setCornerFlags(type); + radius = limitRadius(dx, dy, radius); while (line < dy) { - ofl = ofr = 0; - - if (line < radius && (type & CORNER_TOP)) {/* one of the top corners */ - //printf("1: x %d y %d dx %d dy %d rad %d line %d\n", x, y, dx, dy, radius, line); - /* uper round corners */ - scl = scf * (radius - line) / MUL; - if ((scf * (radius - line) % MUL) >= (MUL / 2)) /* round up */ - scl++; - ofs = radius - (q_circle[scl] * MUL / scf); - // ofl = corner_tl * ofs; // might depend on the arch if multiply is faster or not - ofl = corner_tl ? ofs : 0; - ofr = corner_tr ? ofs : 0; - } else if ((line >= dy - radius) && (type & CORNER_BOTTOM)) { /* one of the bottom corners */ - //printf("2: x %d y %d dx %d dy %d rad %d line %d\n", x, y, dx, dy, radius, line); - /* lower round corners */ - scl = scf * (radius - (dy - (line + 1))) / MUL; - if ((scf * (radius - (dy - (line + 1))) % MUL) >= (MUL / 2)) /* round up */ - scl++; - ofs = radius - (q_circle[scl] * MUL / scf); - ofl = corner_bl ? ofs : 0; - ofr = corner_br ? ofs : 0; - } else { + int ofl, ofr; + if (calcCorners(NULL, &ofl, &ofr, dy, line, radius, type)) { //printf("3: x %d y %d dx %d dy %d rad %d line %d\n", x, y, dx, dy, radius, line); #if defined(FB_HW_ACCELERATION) || defined(USE_NEVIS_GXA) int rect_height_mult = ((type & CORNER_TOP) && (type & CORNER_BOTTOM)) ? 2 : 1; @@ -1143,65 +1085,170 @@ void CFrameBuffer::paintPixel(const int x, const int y, const fb_pixel_t col) #endif } -void CFrameBuffer::paintBoxFrame(const int sx, const int sy, const int dx, const int dy, const int px, const fb_pixel_t col, const int rad) +void CFrameBuffer::paintShortHLineRelInternal(const int& x, const int& dx, const int& y, const fb_pixel_t& col) +{ + uint8_t * pos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y; + fb_pixel_t * dest = (fb_pixel_t *)pos; + for (int i = 0; i < dx; i++) + *(dest++) = col; +} + +int CFrameBuffer::limitRadius(const int& dx, const int& dy, int& radius) +{ + if (radius > dx) + return dx; + if (radius > dy) + return dy; + if (radius > 540) + return 540; + return radius; +} + +void CFrameBuffer::setCornerFlags(const int& type) +{ + corner_tl = (type & CORNER_TOP_LEFT) == CORNER_TOP_LEFT; + corner_tr = (type & CORNER_TOP_RIGHT) == CORNER_TOP_RIGHT; + corner_bl = (type & CORNER_BOTTOM_LEFT) == CORNER_BOTTOM_LEFT; + corner_br = (type & CORNER_BOTTOM_RIGHT) == CORNER_BOTTOM_RIGHT; +} + +void CFrameBuffer::initQCircle() +{ + /* this table contains the x coordinates for a quarter circle (the bottom right quarter) with fixed + radius of 540 px which is the half of the max HD graphics size of 1080 px. So with that table we + ca draw boxes with round corners and als circles by just setting dx = dy = radius (max 540). */ + static const int _q_circle[541] = { + 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, + 540, 540, 540, 540, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 536, 536, 536, 536, 536, 536, 536, 536, 535, 535, 535, 535, 535, 535, 535, 535, 534, 534, + 534, 534, 534, 534, 533, 533, 533, 533, 533, 533, 532, 532, 532, 532, 532, 532, 531, 531, 531, 531, + 531, 531, 530, 530, 530, 530, 529, 529, 529, 529, 529, 529, 528, 528, 528, 528, 527, 527, 527, 527, + 527, 526, 526, 526, 526, 525, 525, 525, 525, 524, 524, 524, 524, 523, 523, 523, 523, 522, 522, 522, + 522, 521, 521, 521, 521, 520, 520, 520, 519, 519, 519, 518, 518, 518, 518, 517, 517, 517, 516, 516, + 516, 515, 515, 515, 515, 514, 514, 514, 513, 513, 513, 512, 512, 512, 511, 511, 511, 510, 510, 510, + 509, 509, 508, 508, 508, 507, 507, 507, 506, 506, 506, 505, 505, 504, 504, 504, 503, 503, 502, 502, + 502, 501, 501, 500, 500, 499, 499, 499, 498, 498, 498, 497, 497, 496, 496, 496, 495, 495, 494, 494, + 493, 493, 492, 492, 491, 491, 490, 490, 490, 489, 489, 488, 488, 487, 487, 486, 486, 485, 485, 484, + 484, 483, 483, 482, 482, 481, 481, 480, 480, 479, 479, 478, 478, 477, 477, 476, 476, 475, 475, 474, + 473, 473, 472, 472, 471, 471, 470, 470, 469, 468, 468, 467, 466, 466, 465, 465, 464, 464, 463, 462, + 462, 461, 460, 460, 459, 459, 458, 458, 457, 456, 455, 455, 454, 454, 453, 452, 452, 451, 450, 450, + 449, 449, 448, 447, 446, 446, 445, 445, 444, 443, 442, 441, 441, 440, 440, 439, 438, 437, 436, 436, + 435, 435, 434, 433, 432, 431, 431, 430, 429, 428, 427, 427, 426, 425, 425, 424, 423, 422, 421, 421, + 420, 419, 418, 417, 416, 416, 415, 414, 413, 412, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, + 403, 402, 401, 400, 399, 398, 397, 397, 395, 394, 393, 393, 392, 391, 390, 389, 388, 387, 386, 385, + 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 369, 368, 367, 367, 365, 364, + 363, 362, 361, 360, 358, 357, 356, 355, 354, 353, 352, 351, 350, 348, 347, 346, 345, 343, 342, 341, + 340, 339, 337, 336, 335, 334, 332, 331, 329, 328, 327, 326, 324, 323, 322, 321, 319, 317, 316, 315, + 314, 312, 310, 309, 308, 307, 305, 303, 302, 301, 299, 297, 296, 294, 293, 291, 289, 288, 287, 285, + 283, 281, 280, 278, 277, 275, 273, 271, 270, 268, 267, 265, 263, 261, 259, 258, 256, 254, 252, 250, + 248, 246, 244, 242, 240, 238, 236, 234, 232, 230, 228, 225, 223, 221, 219, 217, 215, 212, 210, 207, + 204, 202, 200, 197, 195, 192, 190, 187, 184, 181, 179, 176, 173, 170, 167, 164, 160, 157, 154, 150, + 147, 144, 140, 136, 132, 128, 124, 120, 115, 111, 105, 101, 95, 89, 83, 77, 69, 61, 52, 40, + 23}; + if (q_circle == NULL) + q_circle = new int[sizeof(_q_circle) / sizeof(int)]; + memcpy(q_circle, _q_circle, sizeof(_q_circle)); +} + +bool CFrameBuffer::calcCorners(int *ofs, int *ofl, int *ofr, const int& dy, const int& line, const int& radius, const int& type) +{ +/* just an multiplicator for all math to reduce rounding errors */ +#define MUL 32768 + int scl, _ofs = 0; + bool ret = false; + if (ofl != NULL) *ofl = 0; + if (ofr != NULL) *ofr = 0; + int scf = (540 * MUL) / ((radius < 1) ? 1 : radius); + /* one of the top corners */ + if (line < radius && (type & CORNER_TOP)) { + /* uper round corners */ + scl = scf * (radius - line) / MUL; + if ((scf * (radius - line) % MUL) >= (MUL / 2)) /* round up */ + scl++; + _ofs = radius - (q_circle[scl] * MUL / scf); + if (ofl != NULL) *ofl = corner_tl ? _ofs : 0; + if (ofr != NULL) *ofr = corner_tr ? _ofs : 0; + } + /* one of the bottom corners */ + else if ((line >= dy - radius) && (type & CORNER_BOTTOM)) { + /* lower round corners */ + scl = scf * (radius - (dy - (line + 1))) / MUL; + if ((scf * (radius - (dy - (line + 1))) % MUL) >= (MUL / 2)) /* round up */ + scl++; + _ofs = radius - (q_circle[scl] * MUL / scf); + if (ofl != NULL) *ofl = corner_bl ? _ofs : 0; + if (ofr != NULL) *ofr = corner_br ? _ofs : 0; + } + else + ret = true; + if (ofs != NULL) *ofs = _ofs; + return ret; +} + +void CFrameBuffer::paintBoxFrame(const int x, const int y, const int dx, const int dy, const int px, const fb_pixel_t col, int radius, int type) { if (!getActive()) return; - int radius = rad; - int c_radius = rad << 1; - - paintBoxRel(sx + rad , sy , dx - c_radius, px, col); // upper horizontal - paintBoxRel(sx + rad , sy + dy - px, dx - c_radius, px, col); // lower horizontal - paintBoxRel(sx , sy + rad , px, dy - c_radius , col); // left vertical - paintBoxRel(sx + dx - px, sy + rad , px, dy - c_radius , col); // right vertical - - if (!radius) - { + if (dx == 0 || dy == 0) { + printf("paintBoxFrame: radius %d, start x %d y %d end x %d y %d\n", radius, x, y, x+dx, y+dy); return; } - int x1 = sx + radius; - int y1 = sy + radius; - int x2 = sx + dx - radius -1; - int y2 = sy + dy - radius -1; + setCornerFlags(type); + int rad_tl = 0, rad_tr = 0, rad_bl = 0, rad_br = 0; + if (type && radius) { + int x_rad = radius - 1; + if (corner_tl) rad_tl = x_rad; + if (corner_tr) rad_tr = x_rad; + if (corner_bl) rad_bl = x_rad; + if (corner_br) rad_br = x_rad; + } + paintBoxRel(x + rad_tl , y , dx - rad_tl - rad_tr, px , col); // top horizontal + paintBoxRel(x + rad_bl , y + dy - px, dx - rad_bl - rad_br, px , col); // bottom horizontal + paintBoxRel(x , y + rad_tl , px , dy - rad_tl - rad_bl, col); // left vertical + paintBoxRel(x + dx - px, y + rad_tr , px , dy - rad_tr - rad_br, col); // right vertical - int f = 1 - radius; - int ddF_x = 1; - int ddF_y = - c_radius; - int x = 0; - int y = radius; + if (type && radius) { + radius = limitRadius(dx, dy, radius); + int line = 0; + waitForIdle(); + while (line < dy) { + int ofs = 0, ofs_i = 0; + // inner box + if ((line >= px) && (line < (dy - px))) + ofs_i = calcCornersOffset(dy - 2*px, line-px, radius-px, type); + // outer box + ofs = calcCornersOffset(dy, line, radius, type); - while(x < y) - { - // ddF_x == 2 * x + 1; - // ddF_y == -2 * y; - // f == x*x + y*y - radius*radius + 2*x - y + 1; - if(f >= 0) - { - y--; - ddF_y += 2; - f += ddF_y; - } - x++; - ddF_x += 2; - f += ddF_x; - - int width = 0; - while (width <= px) - { - paintPixel(x2 + x , y1 - y + width, col); // 1. oct - paintPixel(x2 + y - width, y1 - x , col); // 2. oct - paintPixel(x2 + y - width, y2 + x , col); // 3. oct - paintPixel(x2 + x , y2 + y - width, col); // 4. oct - paintPixel(x1 - x , y2 + y - width, col); // 5. oct - paintPixel(x1 - y + width, y2 + x , col); // 6. oct - paintPixel(x1 - y + width, y1 - x , col); // 7. oct - paintPixel(x1 - x , y1 - y + width, col); // 8. oct - width++; + int _x = x + ofs; + int _x_end = x + dx; + int _y = y + line; + if ((line < px) || (line >= (dy - px))) { + // left + if (((corner_tl) && (line < radius)) || ((corner_bl) && (line >= dy - radius))) + paintShortHLineRelInternal(_x, radius - ofs, _y, col); + // right + if (((corner_tr) && (line < radius)) || ((corner_br) && (line >= dy - radius))) + paintShortHLineRelInternal(_x_end - radius, radius - ofs, _y, col); + } + else if (line < (dy - px)) { + int _dx = (ofs_i-ofs) + px; + // left + if (((corner_tl) && (line < radius)) || ((corner_bl) && (line >= dy - radius))) + paintShortHLineRelInternal(_x, _dx, _y, col); + // right + if (((corner_tr) && (line < radius)) || ((corner_br) && (line >= dy - radius))) + paintShortHLineRelInternal(_x_end - ofs_i - px, _dx, _y, col); + } + if ((line == radius) && (dy > 2*radius)) + // line outside the rounded corners + line = dy - radius; + else + line++; } } - } void CFrameBuffer::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col) diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h index 27218ac7f..6b37f3ffe 100644 --- a/src/driver/framebuffer.h +++ b/src/driver/framebuffer.h @@ -111,30 +111,40 @@ class CFrameBuffer bool active; static void switch_signal (int); fb_fix_screeninfo fix; - #ifdef USE_NEVIS_GXA +#ifdef USE_NEVIS_GXA int devmem_fd; /* to access the GXA register we use /dev/mem */ unsigned int smem_start; /* as aquired from the fbdev, the framebuffers physical start address */ volatile uint8_t *gxa_base; /* base address for the GXA's register access */ - - #endif /* USE_NEVIS_GXA */ +#endif /* USE_NEVIS_GXA */ bool locked; std::map icon_cache; int cache_size; + + int *q_circle; + bool corner_tl, corner_tr, corner_bl, corner_br; + void * int_convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y, int transp, bool alpha); int m_transparent_default, m_transparent; // Unlocked versions (no mutex) void paintHLineRelInternal(int x, int dx, int y, const fb_pixel_t col); void paintVLineRelInternal(int x, int y, int dy, const fb_pixel_t col); + void paintShortHLineRelInternal(const int& x, const int& dx, const int& y, const fb_pixel_t& col); + int limitRadius(const int& dx, const int& dy, int& radius); + void setCornerFlags(const int& type); + void initQCircle(); + inline int calcCornersOffset(const int& dy, const int& line, const int& radius, const int& type) { int ofs = 0; calcCorners(&ofs, NULL, NULL, dy, line, radius, type); return ofs; } + bool calcCorners(int *ofs, int *ofl, int *ofr, const int& dy, const int& line, const int& radius, const int& type); + public: fb_pixel_t realcolor[256]; ~CFrameBuffer(); static CFrameBuffer* getInstance(); - #ifdef USE_NEVIS_GXA +#ifdef USE_NEVIS_GXA void setupGXA(void); - #endif +#endif void init(const char * const fbDevice = "/dev/fb/0"); int setMode(unsigned int xRes, unsigned int yRes, unsigned int bpp); @@ -177,7 +187,7 @@ class CFrameBuffer inline void paintBox(int xa, int ya, int xb, int yb, const fb_pixel_t col) { paintBoxRel(xa, ya, xb - xa, yb - ya, col); } inline void paintBox(int xa, int ya, int xb, int yb, const fb_pixel_t col, int radius, int type) { paintBoxRel(xa, ya, xb - xa, yb - ya, col, radius, type); } - void paintBoxFrame(const int x, const int y, const int dx, const int dy, const int px, const fb_pixel_t col, const int rad = 0); + void paintBoxFrame(const int x, const int y, const int dx, const int dy, const int px, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL); void paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col); inline void paintVLine(int x, int ya, int yb, const fb_pixel_t col) { paintVLineRel(x, ya, yb - ya, col); } From 7f1589770d388f526d892196c365f5a1a8a99755 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 16 May 2013 08:27:48 +0200 Subject: [PATCH 34/56] CComponents: Add corner_type to paintFbItems() => paintBoxFrame() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c5e223a231f7a3288842adc3820995c86cd35031 Author: Michael Liebmann Date: 2013-05-16 (Thu, 16 May 2013) Origin message was: ------------------ * CComponents: Add corner_type to paintFbItems() => paintBoxFrame() ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_base.cpp b/src/gui/components/cc_base.cpp index 777015ee0..70bfb3b44 100644 --- a/src/gui/components/cc_base.cpp +++ b/src/gui/components/cc_base.cpp @@ -129,7 +129,7 @@ void CComponents::paintFbItems(bool do_save_bg) if (fbtype != CC_FBDATA_TYPE_BGSCREEN && paint_bg){ if (fbtype == CC_FBDATA_TYPE_FRAME) { if (v_fbdata[i].frame_thickness > 0) - frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, v_fbdata[i].frame_thickness, v_fbdata[i].color, v_fbdata[i].r); + frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, v_fbdata[i].frame_thickness, v_fbdata[i].color, v_fbdata[i].r, corner_type); } else if (fbtype == CC_FBDATA_TYPE_BACKGROUND) frameBuffer->paintBackgroundBoxRel(x, y, v_fbdata[i].dx, v_fbdata[i].dy); From 00157271f0b71cf4e1cdb3c1a681a89e1a269b2b Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 16 May 2013 22:40:52 +0200 Subject: [PATCH 35/56] supplement to 3cc3eec0ed66508772fd782bafbf5c9825558c17, THX Gaucho316 for correction Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/4a461c180194a7f86796f119be6215da885f9aa3 Author: Jacek Jendrzej Date: 2013-05-16 (Thu, 16 May 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index d3b959879..766590f5a 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -1294,7 +1294,7 @@ int CEventFinderMenu::showMenu(void) } else if(*m_search_list == CNeutrinoEventList::SEARCH_LIST_BOUQUET) { - if(bouquetList->Bouquets.size() < *m_search_bouquet_id ){ + if (*m_search_bouquet_id >= bouquetList->Bouquets.size()) *m_search_bouquet_id = bouquetList->getActiveBouquetNumber();; } if(!bouquetList->Bouquets.empty()) @@ -1344,7 +1344,7 @@ bool CEventFinderMenu::changeNotify(const neutrino_locale_t OptionName, void *) } else if (*m_search_list == CNeutrinoEventList::SEARCH_LIST_BOUQUET) { - if(bouquetList->Bouquets.size() < *m_search_bouquet_id ){ + if (*m_search_bouquet_id >= bouquetList->Bouquets.size()) *m_search_bouquet_id = bouquetList->getActiveBouquetNumber(); } if(!bouquetList->Bouquets.empty()){ From 878c06c09e880068464834f6ab00368d6e40f6d6 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 16 May 2013 22:43:51 +0200 Subject: [PATCH 36/56] supplement to 3cc3eec0ed66508772fd782bafbf5c9825558c17 typo Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/017b2d58d9429fab926eb7ba25779d67acee2335 Author: Jacek Jendrzej Date: 2013-05-16 (Thu, 16 May 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 766590f5a..c46a491fb 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -1294,7 +1294,7 @@ int CEventFinderMenu::showMenu(void) } else if(*m_search_list == CNeutrinoEventList::SEARCH_LIST_BOUQUET) { - if (*m_search_bouquet_id >= bouquetList->Bouquets.size()) + if (*m_search_bouquet_id >= bouquetList->Bouquets.size()){ *m_search_bouquet_id = bouquetList->getActiveBouquetNumber();; } if(!bouquetList->Bouquets.empty()) @@ -1344,7 +1344,7 @@ bool CEventFinderMenu::changeNotify(const neutrino_locale_t OptionName, void *) } else if (*m_search_list == CNeutrinoEventList::SEARCH_LIST_BOUQUET) { - if (*m_search_bouquet_id >= bouquetList->Bouquets.size()) + if (*m_search_bouquet_id >= bouquetList->Bouquets.size()){ *m_search_bouquet_id = bouquetList->getActiveBouquetNumber(); } if(!bouquetList->Bouquets.empty()){ From f2e040072866cc7e815415f5e7e3d64e84cc68a2 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 16 May 2013 22:11:36 +0200 Subject: [PATCH 37/56] CAudioMute: replace unnecessary declaration/definition/ usages frameBuffer is already definied by inherited CComponentsPicture() attributes. Attributes like "x, y, width, height" are usable without a function. See also http://www.tuxbox.org/neutrinohd/doc/html/class_c_components.html section: "Protected Attributes" Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/999c659b3ca53a06516e741209629da00fa33877 Author: Thilo Graf Date: 2013-05-16 (Thu, 16 May 2013) ------------------ This commit was generated by Migit --- src/gui/audiomute.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/gui/audiomute.cpp b/src/gui/audiomute.cpp index fa22f6714..97a383bd2 100644 --- a/src/gui/audiomute.cpp +++ b/src/gui/audiomute.cpp @@ -62,33 +62,32 @@ void CAudioMute::AudioMute(int newValue, bool isEvent) if( isEvent && ( neutrino->getMode() != CNeutrinoApp::mode_scart ) && ( neutrino->getMode() != CNeutrinoApp::mode_audio) && ( neutrino->getMode() != CNeutrinoApp::mode_pic)) { - CFrameBuffer *framebuffer = CFrameBuffer::getInstance(); CVolumeHelper::getInstance()->getMuteIconDimensions(&x, &y, &width, &height); if ((y_old != y)) { if (do_paint_mute_icon) { - framebuffer->fbNoCheck(true); + frameBuffer->fbNoCheck(true); this->hide(true); - framebuffer->fbNoCheck(false); + frameBuffer->fbNoCheck(false); } - framebuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1); + frameBuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1); y_old = y; } if ((g_settings.mode_clock) && (doInit)) CInfoClock::getInstance()->ClearDisplay(); - framebuffer->fbNoCheck(true); + frameBuffer->fbNoCheck(true); if (newValue) { if (do_paint_mute_icon) this->paint(); - framebuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1, this->getXPos(), this->getYPos(), this->getWidth(), this->getHeight()); + frameBuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1, x, y, width, height); } else { if (do_paint_mute_icon) this->hide(true); - framebuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1); + frameBuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1); } - framebuffer->fbNoCheck(false); + frameBuffer->fbNoCheck(false); if (doInit) CVolumeHelper::getInstance()->refresh(); @@ -98,9 +97,8 @@ void CAudioMute::AudioMute(int newValue, bool isEvent) void CAudioMute::enableMuteIcon(bool enable) { CNeutrinoApp *neutrino = CNeutrinoApp::getInstance(); - CFrameBuffer *framebuffer = CFrameBuffer::getInstance(); if (enable) { - framebuffer->doPaintMuteIcon(true); + frameBuffer->doPaintMuteIcon(true); do_paint_mute_icon = true; if (neutrino->isMuted()) this->paint(); @@ -108,7 +106,7 @@ void CAudioMute::enableMuteIcon(bool enable) else { if (neutrino->isMuted()) this->hide(true); - framebuffer->doPaintMuteIcon(false); + frameBuffer->doPaintMuteIcon(false); do_paint_mute_icon = false; } } From 96873536d13cc37e58ba8e40879cac6044cf4fb7 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 17 May 2013 21:08:09 +0200 Subject: [PATCH 38/56] CNeutrinoEventList::findEvents - add search all epg option Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/35bac1ff40ed6e88754d8c8543080a7f7fd9b4b0 Author: Jacek Jendrzej Date: 2013-05-17 (Fri, 17 May 2013) ------------------ 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/eitd/sectionsd.cpp | 52 ++++++++++++++++++++------------------ src/eitd/sectionsd.h | 2 +- src/gui/eventlist.cpp | 13 +++++----- src/gui/eventlist.h | 50 ++++++++++++++++++------------------ src/system/locals.h | 1 + src/system/locals_intern.h | 1 + 8 files changed, 63 insertions(+), 58 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 6d6c306af..ec8b2a846 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -316,6 +316,7 @@ epgviewer.nodetailed Keine ausführlichen Informationen verfügbar epgviewer.notfound Keine Programminformationen (EPG) gefunden eventfinder.head EPG-Suche eventfinder.keyword Suche nach Textpassage +eventfinder.search_all_epg Ganze eventfinder.search Suche eventfinder.search_within_epg Suche innerhalb EPG-Daten eventfinder.search_within_list Suche innerhalb Text diff --git a/data/locale/english.locale b/data/locale/english.locale index 12f357934..9046f2087 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -317,6 +317,7 @@ epgviewer.notfound No EPG found eventfinder.head Search in EPG eventfinder.keyword Keyword eventfinder.search Search +eventfinder.search_all_epg whole eventfinder.search_within_epg Search within eventfinder.search_within_list Search within eventfinder.searching Search for keyword in EPG... diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 95bd0bc38..78d90d089 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -2233,50 +2233,52 @@ printf("SIevent size: %d\n", (int)sizeof(SIevent)); } /* was: commandAllEventsChannelID sendAllEvents */ -void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search, std::string search_text) +void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search, std::string search_text,bool all_chann) { dprintf("sendAllEvents for " PRINTF_CHANNEL_ID_TYPE "\n", serviceUniqueKey); - if(!eList.empty() && search == 0)//skip on search mode eList.clear(); t_channel_id serviceUniqueKey64 = serviceUniqueKey& 0xFFFFFFFFFFFFULL; //0xFFFFFFFFFFFFULL for CREATE_CHANNEL_ID64 - if(serviceUniqueKey64 == 0) + if(serviceUniqueKey64 == 0 && !all_chann) return; // service Found readLockEvents(); int serviceIDfound = 0; - if (search_text.length()) std::transform(search_text.begin(), search_text.end(), search_text.begin(), tolower); for (MySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey::iterator e = mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.begin(); e != mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.end(); ++e) { - if ((*e)->get_channel_id() == serviceUniqueKey64 || (serviceUniqueKey64 == 1)) { + if ((*e)->get_channel_id() == serviceUniqueKey64 || (all_chann)) { serviceIDfound = 1; bool copy = true; - if(search == 0); // nothing to do here - else if(search == 1) { - std::string eName = (*e)->getName(); - std::transform(eName.begin(), eName.end(), eName.begin(), tolower); - if(eName.find(search_text) == std::string::npos) - copy = false; + if(search){ + if((search == 1) || (search == 5)) {//SEARCH_EPG_TITLE == 1 SEARCH_EPG_ALL == 5 defined in eventlist.h + std::string eName = (*e)->getName(); + std::transform(eName.begin(), eName.end(), eName.begin(), tolower); + if(eName.find(search_text) == std::string::npos) + copy = false; + } + if((search == 2) || (!copy && search == 5)) {//SEARCH_EPG_INFO1 == 2 + std::string eText = (*e)->getText(); + std::transform(eText.begin(), eText.end(), eText.begin(), tolower); + if(eText.find(search_text) == std::string::npos) + copy = false; + else if(search == 5) + copy = true; + } + if((search == 3) || (!copy && search == 5)) {//SEARCH_EPG_INFO2 == 3 + std::string eExtendedText = (*e)->getExtendedText(); + std::transform(eExtendedText.begin(), eExtendedText.end(), eExtendedText.begin(), tolower); + if(eExtendedText.find(search_text) == std::string::npos) + copy = false; + else if(search == 5) + copy = true; + } } - else if(search == 2) { - std::string eText = (*e)->getText(); - std::transform(eText.begin(), eText.end(), eText.begin(), tolower); - if(eText.find(search_text) == std::string::npos) - copy = false; - } - else if(search == 3) { - std::string eExtendedText = (*e)->getExtendedText(); - std::transform(eExtendedText.begin(), eExtendedText.end(), eExtendedText.begin(), tolower); - if(eExtendedText.find(search_text) == std::string::npos) - copy = false; - } - if(copy) { for (SItimes::iterator t = (*e)->times.begin(); t != (*e)->times.end(); ++t) { @@ -2289,7 +2291,7 @@ void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEve aEvent.text = (*e)->getExtendedText().substr(0, 120); else aEvent.text = (*e)->getText(); - if(serviceUniqueKey64 == 1)//hack for all channel search + if(all_chann)//hack for all channel search aEvent.channelID = (*e)->get_channel_id(); else aEvent.channelID = serviceUniqueKey; diff --git a/src/eitd/sectionsd.h b/src/eitd/sectionsd.h index 2181502f6..9f82b216a 100644 --- a/src/eitd/sectionsd.h +++ b/src/eitd/sectionsd.h @@ -55,7 +55,7 @@ class CEitManager : public OpenThreads::Thread, public OpenThreads::Mutex bool Stop(); void SetConfig(CSectionsdClient::epg_config &cfg) { config = cfg; }; - void getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = ""); + void getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = "", bool all_chann=false); void getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next ); bool getEPGidShort(event_id_t epgID, CShortEPGData * epgdata); bool getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata); diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index c46a491fb..ca9b314b1 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -92,7 +92,6 @@ CNeutrinoEventList::CNeutrinoEventList() sort_mode = 0; m_search_list = SEARCH_LIST_NONE; - m_search_epg_item = SEARCH_LIST_NONE; m_search_epg_item = SEARCH_EPG_TITLE; m_search_channel_id = 1; m_search_bouquet_id= 1; @@ -1034,7 +1033,6 @@ bool CNeutrinoEventList::findEvents(void) hide(); menu.exec(NULL,""); search_head_name = g_Locale->getText(LOCALE_EVENTFINDER_SEARCH); - if(event == 1) { res = true; @@ -1071,7 +1069,7 @@ bool CNeutrinoEventList::findEvents(void) for (it = v.begin(); it != v.end(); ++it){ ch_id_map[*it & 0xFFFFFFFFFFFFULL] = *it; } - CEitManager::getInstance()->getEventsServiceKey(1/*hack*/,evtlist, m_search_epg_item,m_search_keyword); + CEitManager::getInstance()->getEventsServiceKey(0,evtlist, m_search_epg_item,m_search_keyword, true);//all_chann std::map::iterator map_it; CChannelEventList::iterator e; @@ -1167,14 +1165,15 @@ const CMenuOptionChooser::keyval SEARCH_LIST_OPTIONS[SEARCH_LIST_OPTION_COUNT] = }; -#define SEARCH_EPG_OPTION_COUNT 3 +#define SEARCH_EPG_OPTION_COUNT 4 const CMenuOptionChooser::keyval SEARCH_EPG_OPTIONS[SEARCH_EPG_OPTION_COUNT] = { // { CNeutrinoEventList::SEARCH_EPG_NONE, LOCALE_PICTUREVIEWER_RESIZE_NONE }, { CNeutrinoEventList::SEARCH_EPG_TITLE, LOCALE_FONTSIZE_EPG_TITLE }, { CNeutrinoEventList::SEARCH_EPG_INFO1, LOCALE_FONTSIZE_EPG_INFO1 }, - { CNeutrinoEventList::SEARCH_EPG_INFO2, LOCALE_FONTSIZE_EPG_INFO2 } -// ,{ CNeutrinoEventList::SEARCH_EPG_GENRE, LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR } + { CNeutrinoEventList::SEARCH_EPG_INFO2, LOCALE_FONTSIZE_EPG_INFO2 }, +// { CNeutrinoEventList::SEARCH_EPG_GENRE, LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR }, + { CNeutrinoEventList::SEARCH_EPG_ALL, LOCALE_EVENTFINDER_SEARCH_ALL_EPG } }; @@ -1203,7 +1202,6 @@ int CEventFinderMenu::exec(CMenuTarget* parent, const std::string &actionkey) { int res = menu_return::RETURN_REPAINT; - if(actionkey =="") { if(parent != NULL) @@ -1335,6 +1333,7 @@ int CEventFinderMenu::showMenu(void) bool CEventFinderMenu::changeNotify(const neutrino_locale_t OptionName, void *) /************************************************************************************************/ { + if (ARE_LOCALES_EQUAL(OptionName, LOCALE_EVENTFINDER_SEARCH_WITHIN_LIST)) { if (*m_search_list == CNeutrinoEventList::SEARCH_LIST_CHANNEL) diff --git a/src/gui/eventlist.h b/src/gui/eventlist.h index c39d5f1eb..8eff085db 100644 --- a/src/gui/eventlist.h +++ b/src/gui/eventlist.h @@ -46,32 +46,32 @@ class CNeutrinoEventList { - // Eventfinder start - public: - typedef enum - { - SEARCH_EPG_NONE, - SEARCH_EPG_TITLE, - SEARCH_EPG_INFO1, - SEARCH_EPG_INFO2, - SEARCH_EPG_GENRE, - SEARCH_EPG_ALL - }SEARCH_EPG; - typedef enum - { - SEARCH_LIST_NONE, - SEARCH_LIST_CHANNEL, - SEARCH_LIST_BOUQUET, - SEARCH_LIST_ALL - }SEARCH_LIST; - private: - int m_search_epg_item; - std::string m_search_keyword; + // Eventfinder start + public: + typedef enum + { + SEARCH_EPG_NONE, + SEARCH_EPG_TITLE, + SEARCH_EPG_INFO1, + SEARCH_EPG_INFO2, + SEARCH_EPG_GENRE, + SEARCH_EPG_ALL + }SEARCH_EPG; + typedef enum + { + SEARCH_LIST_NONE, + SEARCH_LIST_CHANNEL, + SEARCH_LIST_BOUQUET, + SEARCH_LIST_ALL + }SEARCH_LIST; + private: + int m_search_epg_item; + std::string m_search_keyword; std::string m_search_autokeyword; - int m_search_list; - t_channel_id m_search_channel_id; - t_bouquet_id m_search_bouquet_id; - bool m_showChannel; + int m_search_list; + t_channel_id m_search_channel_id; + t_bouquet_id m_search_bouquet_id; + bool m_showChannel; int FunctionBarHeight; int oldIndex; event_id_t oldEventID; diff --git a/src/system/locals.h b/src/system/locals.h index 7e8d1f76c..5ef52ea1e 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -344,6 +344,7 @@ typedef enum LOCALE_EVENTFINDER_HEAD, LOCALE_EVENTFINDER_KEYWORD, LOCALE_EVENTFINDER_SEARCH, + LOCALE_EVENTFINDER_SEARCH_ALL_EPG, LOCALE_EVENTFINDER_SEARCH_WITHIN_EPG, LOCALE_EVENTFINDER_SEARCH_WITHIN_LIST, LOCALE_EVENTFINDER_SEARCHING, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index d241acc6f..fe8eedd57 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -344,6 +344,7 @@ const char * locale_real_names[] = "eventfinder.head", "eventfinder.keyword", "eventfinder.search", + "eventfinder.search_all_epg", "eventfinder.search_within_epg", "eventfinder.search_within_list", "eventfinder.searching", From c44be31bf61dcfc015788bbd063b2eff90774323 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sat, 18 May 2013 08:18:06 +0200 Subject: [PATCH 39/56] Sort deutsch.locale Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f6d72f64487db00962458ad2024ee70b051c6a21 Author: Michael Liebmann Date: 2013-05-18 (Sat, 18 May 2013) Origin message was: ------------------ * Sort deutsch.locale ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index ec8b2a846..31f868f67 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -316,8 +316,8 @@ epgviewer.nodetailed Keine ausführlichen Informationen verfügbar epgviewer.notfound Keine Programminformationen (EPG) gefunden eventfinder.head EPG-Suche eventfinder.keyword Suche nach Textpassage -eventfinder.search_all_epg Ganze eventfinder.search Suche +eventfinder.search_all_epg Ganze eventfinder.search_within_epg Suche innerhalb EPG-Daten eventfinder.search_within_list Suche innerhalb Text eventfinder.searching Suche... From fc2fd28825391b4d0f9c411cec67d1c115c4e8cd Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Fri, 17 May 2013 19:37:16 +0200 Subject: [PATCH 40/56] Mute icon: Fix minor bugs - Fix display the mute icon when leaving the audio player - Disable mute icon in channellist when 'Quickzap in list' active or allow - Fix hide the mute icon in movie browser, picture viewer, file browser and upnp browser - Font::RenderString(): Use correct value of y for CFrameBuffer::checkFbArea() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5eb7f4aea8a7dfc379d953cf17cc6688fcd09af3 Author: Michael Liebmann Date: 2013-05-17 (Fri, 17 May 2013) Origin message was: ------------------ * Mute icon: Fix minor bugs - Fix display the mute icon when leaving the audio player - Disable mute icon in channellist when 'Quickzap in list' active or allow - Fix hide the mute icon in movie browser, picture viewer, file browser and upnp browser - Font::RenderString(): Use correct value of y for CFrameBuffer::checkFbArea() ------------------ This commit was generated by Migit --- src/driver/fontrenderer.cpp | 4 ++-- src/gui/audiomute.cpp | 8 ++++++++ src/gui/movieplayer.cpp | 2 ++ src/neutrino.cpp | 4 ++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index b92accfa7..28e62a17b 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -372,7 +372,7 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u if (!frameBuffer->getActive()) return; - frameBuffer->checkFbArea(x, y, width, height, true); + frameBuffer->checkFbArea(x, y-height, width, height, true); pthread_mutex_lock( &renderer->render_mutex ); @@ -622,7 +622,7 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u } //printf("RenderStat: %d %d %d \n", renderer->cacheManager->num_nodes, renderer->cacheManager->num_bytes, renderer->cacheManager->max_bytes); pthread_mutex_unlock( &renderer->render_mutex ); - frameBuffer->checkFbArea(x, y, width, height, false); + frameBuffer->checkFbArea(x, y-height, width, height, false); } void Font::RenderString(int x, int y, const int width, const std::string & text, const unsigned char color, const int boxheight, const bool utf8_encoded) diff --git a/src/gui/audiomute.cpp b/src/gui/audiomute.cpp index 97a383bd2..f5309230e 100644 --- a/src/gui/audiomute.cpp +++ b/src/gui/audiomute.cpp @@ -92,11 +92,18 @@ void CAudioMute::AudioMute(int newValue, bool isEvent) if (doInit) CVolumeHelper::getInstance()->refresh(); } + else if (neutrino->getMode() == CNeutrinoApp::mode_audio) { + if (newValue) + frameBuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1, x, y, width, height); + else + frameBuffer->setFbArea(CFrameBuffer::FB_PAINTAREA_MUTEICON1); + } } void CAudioMute::enableMuteIcon(bool enable) { CNeutrinoApp *neutrino = CNeutrinoApp::getInstance(); + frameBuffer->fbNoCheck(true); if (enable) { frameBuffer->doPaintMuteIcon(true); do_paint_mute_icon = true; @@ -109,4 +116,5 @@ void CAudioMute::enableMuteIcon(bool enable) frameBuffer->doPaintMuteIcon(false); do_paint_mute_icon = false; } + frameBuffer->fbNoCheck(false); } diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index b9d04a81c..2a78bc7a4 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -359,6 +359,7 @@ bool CMoviePlayerGui::SelectFile() menu_ret = moviebrowser->getMenuRet(); } else { // filebrowser + CAudioMute::getInstance()->enableMuteIcon(false); if (filebrowser->exec(Path_local.c_str()) == true) { Path_local = filebrowser->getCurrentDir(); CFile *file; @@ -394,6 +395,7 @@ bool CMoviePlayerGui::SelectFile() } } else menu_ret = filebrowser->getMenuRet(); + CAudioMute::getInstance()->enableMuteIcon(true); } if(ret && file_name.empty()) { std::string::size_type pos = full_name.find_last_of('/'); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 20bfdebd6..acecfe9bc 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2371,10 +2371,14 @@ _show: //_show: if(msg == CRCInput::RC_ok) { + if (g_settings.channellist_new_zap_mode > 0) /* allow or active */ + g_audioMute->enableMuteIcon(false); if( !bouquetList->Bouquets.empty() && bouquetList->Bouquets[old_b]->channelList->getSize() > 0) nNewChannel = bouquetList->Bouquets[old_b]->channelList->exec();//with ZAP! else nNewChannel = bouquetList->exec(true); + if (g_settings.channellist_new_zap_mode > 0) /* allow or active */ + g_audioMute->enableMuteIcon(true); } else if(msg == CRCInput::RC_sat) { SetChannelMode(LIST_MODE_SAT); nNewChannel = bouquetList->exec(true); From 647030f669eda6225ab74028e913d1d6a804ef9d Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Fri, 17 May 2013 19:44:16 +0200 Subject: [PATCH 41/56] CFrameBuffer::waitForIdle: Added a parameter to identify the execution at Debug Output - For example: name of the calling function Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d460c50bd54237f4512691ee3032aae0cbac2395 Author: Michael Liebmann Date: 2013-05-17 (Fri, 17 May 2013) Origin message was: ------------------ * CFrameBuffer::waitForIdle: Added a parameter to identify the execution at Debug Output - For example: name of the calling function ------------------ This commit was generated by Migit --- src/driver/fontrenderer.cpp | 2 +- src/driver/framebuffer.cpp | 12 ++++++++---- src/driver/framebuffer.h | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index 28e62a17b..970124b73 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -443,7 +443,7 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u /* the GXA seems to do it's job asynchonously, so we need to wait until it's ready, otherwise the font will sometimes "be overwritten" with background color or bgcolor will be wrong */ - frameBuffer->waitForIdle(); + frameBuffer->waitForIdle("Font::RenderString"); #endif /* fetch bgcolor from framebuffer, using lower left edge of the font... */ fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x + diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index b49788b58..e7a8299e6 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -145,7 +145,7 @@ void CFrameBuffer::add_gxa_sync_marker(void) } /* wait until the current marker comes out of the GXA command queue */ -void CFrameBuffer::waitForIdle(void) +void CFrameBuffer::waitForIdle(const char* func) { unsigned int cfg, count = 0; do { @@ -159,8 +159,12 @@ void CFrameBuffer::waitForIdle(void) //fprintf(stderr, "%s: read %02x, expected %02x\n", __FUNCTION__, cfg, _mark); } while(++count < 2048); /* don't deadlock here if there is an error */ - if (count > 512) /* more than 100 are unlikely, */ - fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%d)!\n", count); + if (count > 512) /* more than 100 are unlikely, */{ + if (func != NULL) + fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%04d) [%s]!\n", count, func); + else + fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%d)!\n", count); + } } #endif /* USE_NEVIS_GXA */ @@ -1213,7 +1217,7 @@ void CFrameBuffer::paintBoxFrame(const int x, const int y, const int dx, const i if (type && radius) { radius = limitRadius(dx, dy, radius); int line = 0; - waitForIdle(); + waitForIdle("CFrameBuffer::paintBoxFrame"); while (line < dy) { int ofs = 0, ofs_i = 0; // inner box diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h index 6b37f3ffe..0c711fa49 100644 --- a/src/driver/framebuffer.h +++ b/src/driver/framebuffer.h @@ -235,7 +235,7 @@ class CFrameBuffer bool Locked(void) { return locked; }; #ifdef USE_NEVIS_GXA void add_gxa_sync_marker(void); - void waitForIdle(void); + void waitForIdle(const char* func=NULL); #else inline void waitForIdle(void) {}; #endif From a698ce281fc08a45cd8e4d4f0e3d53e02d5a83e4 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Fri, 17 May 2013 19:42:50 +0200 Subject: [PATCH 42/56] Fix CComponents::getScreen()/hide() & CComponentsItem::hideCCItem() - Use CFrameBuffer::waitForIdle() to ensure that all GXA commands are finished before SaveScreen() / RestoreScreen() is executed Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/072097cd06e5690cd11e1ab7884ec1b7ee235c43 Author: Michael Liebmann Date: 2013-05-17 (Fri, 17 May 2013) Origin message was: ------------------ * Fix CComponents::getScreen()/hide() & CComponentsItem::hideCCItem() - Use CFrameBuffer::waitForIdle() to ensure that all GXA commands are finished before SaveScreen() / RestoreScreen() is executed ------------------ This commit was generated by Migit --- src/gui/components/cc_base.cpp | 2 ++ src/gui/components/cc_item.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/gui/components/cc_base.cpp b/src/gui/components/cc_base.cpp index 70bfb3b44..8e0d7a5da 100644 --- a/src/gui/components/cc_base.cpp +++ b/src/gui/components/cc_base.cpp @@ -145,6 +145,7 @@ void CComponents::paintFbItems(bool do_save_bg) inline fb_pixel_t* CComponents::getScreen(int ax, int ay, int dx, int dy) { fb_pixel_t* pixbuf = new fb_pixel_t[dx * dy]; + frameBuffer->waitForIdle("CComponents::getScreen()"); frameBuffer->SaveScreen(ax, ay, dx, dy, pixbuf); return pixbuf; } @@ -154,6 +155,7 @@ inline void CComponents::hide() { for(size_t i =0; i< v_fbdata.size() ;i++) { if (v_fbdata[i].pixbuf != NULL){ + frameBuffer->waitForIdle("CComponents::hide()"); frameBuffer->RestoreScreen(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, v_fbdata[i].pixbuf); delete[] v_fbdata[i].pixbuf; v_fbdata[i].pixbuf = NULL; diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 0e9985814..8da3b5ac2 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -112,6 +112,7 @@ void CComponentsItem::hideCCItem(bool no_restore) is_painted = false; if (saved_screen.pixbuf) { + frameBuffer->waitForIdle("CComponentsItem::hideCCItem()"); frameBuffer->RestoreScreen(saved_screen.x, saved_screen.y, saved_screen.dx, saved_screen.dy, saved_screen.pixbuf); if (no_restore) { delete[] saved_screen.pixbuf; From efdedf8e6a80b3ebac9798f32a7ea70405be9a8d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 18 May 2013 23:59:06 +0200 Subject: [PATCH 43/56] channellist: colored_events to right infobox Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/273a83fa3f502436bcaa9ba76062768577fdcf83 Author: vanhofen Date: 2013-05-18 (Sat, 18 May 2013) Origin message was: ------------------ - channellist: colored_events to right infobox ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index b1ee4e771..75b8da6b9 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2262,16 +2262,19 @@ void CChannelList::paint_events(int index) if ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height)) { bool first = false; + fb_pixel_t color = COL_MENUCONTENTDARK; if (e->eventID) { first = (i == 1); + if ((first) && (g_settings.colored_events_channellist == 1 /* current */) || (!first) && (g_settings.colored_events_channellist == 2 /* next */)) + color = COL_COLORED_EVENTS_CHANNELLIST; struct tm *tmStartZeit = localtime(&e->startTime); strftime(startTime, sizeof(startTime), "%H:%M", tmStartZeit ); //printf("%s %s\n", startTime, e->description.c_str()); startTimeWidth = eventStartTimeWidth; - g_Font[eventFont]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, startTimeWidth, startTime, (g_settings.colored_events_channellist == 2 /* next */) ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTINACTIVE, 0, true); + g_Font[eventFont]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, startTimeWidth, startTime, color, 0, true); } - g_Font[eventFont]->RenderString(x+ width+5+startTimeWidth, y+ theight+ pig_height + i*ffheight, infozone_width - startTimeWidth - 20, e->description, (first) ? COL_MENUHEAD : COL_MENUCONTENTDARK, 0, true); + g_Font[eventFont]->RenderString(x+ width+5+startTimeWidth, y+ theight+ pig_height + i*ffheight, infozone_width - startTimeWidth - 20, e->description, color, 0, true); } else { From 4bbf0e81cdde0e3da8a060f6d5b85b52019ccbdc Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sun, 19 May 2013 05:36:52 +0200 Subject: [PATCH 44/56] CChannelList: prevent possible compile error Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a48e7fa200e77215ca0a2fcdbb4af56349c68c84 Author: Michael Liebmann Date: 2013-05-19 (Sun, 19 May 2013) Origin message was: ------------------ * CChannelList: prevent possible compile error ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 75b8da6b9..bfd7dcebf 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2266,7 +2266,7 @@ void CChannelList::paint_events(int index) if (e->eventID) { first = (i == 1); - if ((first) && (g_settings.colored_events_channellist == 1 /* current */) || (!first) && (g_settings.colored_events_channellist == 2 /* next */)) + if ((first && g_settings.colored_events_channellist == 1 /* current */) || (!first && g_settings.colored_events_channellist == 2 /* next */)) color = COL_COLORED_EVENTS_CHANNELLIST; struct tm *tmStartZeit = localtime(&e->startTime); strftime(startTime, sizeof(startTime), "%H:%M", tmStartZeit ); From 2fbf843d7971534044a548a200055bd4a8529159 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 20 May 2013 12:07:04 +0200 Subject: [PATCH 45/56] CFileHelpers::copyFile - prevent possible compile error Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/476b89697229e0b57f68c0ea263b8be933a689ae Author: Jacek Jendrzej Date: 2013-05-20 (Mon, 20 May 2013) Origin message was: ------------------ CFileHelpers::copyFile - prevent possible compile error ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/system/helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index df41e86db..d1ea12352 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -317,7 +317,7 @@ bool CFileHelpers::copyFile(const char *Src, const char *Dst, mode_t mode) unlink(Dst); if ((fd1 = open(Src, O_RDONLY)) < 0) return false; - if ((fd2 = open(Dst, O_WRONLY | O_CREAT)) < 0) { + if ((fd2 = open(Dst, O_WRONLY | O_CREAT, 0666)) < 0) { close(fd1); return false; } From e25b16bcd64d99f1a1deadaba1f6a26a106308b1 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Tue, 21 May 2013 17:12:32 +0200 Subject: [PATCH 46/56] CTestMenu: Add widget id's - Return menu result, to close all menus Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2244e418b7f68eaa57086957dfbf52cf6a614f22 Author: Michael Liebmann Date: 2013-05-21 (Tue, 21 May 2013) Origin message was: ------------------ * CTestMenu: Add widget id's - Return menu result, to close all menus ------------------ This commit was generated by Migit --- src/gui/test_menu.cpp | 19 +++++++------------ src/gui/test_menu.h | 2 +- src/neutrino_menue.h | 6 +++++- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index 1e45f12d5..d96d93236 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include @@ -61,7 +62,6 @@ extern int cs_test_card(int unit, char * str); CTestMenu::CTestMenu() { width = w_max (50, 10); - selected = -1; circle = NULL; sq = NULL; pic= NULL; @@ -529,24 +529,22 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey) } - showTestMenu(); - - return res; + return showTestMenu(); } /* shows entries for proxy settings */ -void CTestMenu::showTestMenu() +int CTestMenu::showTestMenu() { unsigned int system_rev = cs_get_revision(); //init char rev[255]; sprintf(rev, "Test menu, System revision %d %s", system_rev, system_rev == 0 ? "WARNING - INVALID" : ""); - CMenuWidget w_test(rev /*"Test menu"*/, NEUTRINO_ICON_INFO, width); + CMenuWidget w_test(rev /*"Test menu"*/, NEUTRINO_ICON_INFO, width, MN_WIDGET_ID_TESTMENU); w_test.addIntroItems(); //hardware - CMenuWidget * w_hw = new CMenuWidget("Hardware Test", NEUTRINO_ICON_INFO, width); + CMenuWidget * w_hw = new CMenuWidget("Hardware Test", NEUTRINO_ICON_INFO, width, MN_WIDGET_ID_TESTMENU_HARDWARE); w_test.addItem(new CMenuForwarderNonLocalized(w_hw->getName().c_str(), true, NULL, w_hw)); showHWTests(w_hw); @@ -554,18 +552,16 @@ void CTestMenu::showTestMenu() w_test.addItem(new CMenuForwarderNonLocalized("Buttons", true, NULL, this, "buttons")); //components - CMenuWidget * w_cc = new CMenuWidget("OSD-Components Demo", NEUTRINO_ICON_INFO, width); + CMenuWidget * w_cc = new CMenuWidget("OSD-Components Demo", NEUTRINO_ICON_INFO, width, MN_WIDGET_ID_TESTMENU_COMPONENTS); w_test.addItem(new CMenuForwarderNonLocalized(w_cc->getName().c_str(), true, NULL, w_cc)); showCCTests(w_cc); //exit - w_test.exec(NULL, ""); - selected = w_test.getSelected(); + return w_test.exec(NULL, "");; } void CTestMenu::showCCTests(CMenuWidget *widget) { - widget->setSelected(selected); widget->addIntroItems(); widget->addItem(new CMenuForwarderNonLocalized("Button", true, NULL, this, "button")); widget->addItem(new CMenuForwarderNonLocalized("Circle", true, NULL, this, "circle")); @@ -580,7 +576,6 @@ void CTestMenu::showCCTests(CMenuWidget *widget) void CTestMenu::showHWTests(CMenuWidget *widget) { - widget->setSelected(selected); widget->addIntroItems(); widget->addItem(new CMenuForwarderNonLocalized("VFD", true, NULL, this, "vfd")); widget->addItem(new CMenuForwarderNonLocalized("Network", true, NULL, this, "network")); diff --git a/src/gui/test_menu.h b/src/gui/test_menu.h index a086c559e..d51afa955 100644 --- a/src/gui/test_menu.h +++ b/src/gui/test_menu.h @@ -52,7 +52,7 @@ class CTestMenu : public CMenuTarget CComponentsButton *button; int width, selected; - void showTestMenu(); + int showTestMenu(); void showHWTests(CMenuWidget *widget); void showCCTests(CMenuWidget *widget); diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index 0d55a725a..a788adda8 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -171,7 +171,11 @@ enum MN_WIDGET_ID MN_WIDGET_ID_SCAN_MANUAL_SCAN, MN_WIDGET_ID_SCAN_FAST_SCAN, MN_WIDGET_ID_SCAN_CABLE_SCAN, - + + MN_WIDGET_ID_TESTMENU, + MN_WIDGET_ID_TESTMENU_HARDWARE, + MN_WIDGET_ID_TESTMENU_COMPONENTS, + MN_WIDGET_ID_MAX }; From cc8679306ad5542f50093b990136110470a70d12 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Tue, 21 May 2013 17:13:29 +0200 Subject: [PATCH 47/56] CComponentsItem: Set sw_cur = 0 if no shadow Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b8da50443286357eb8fa4d6fde33385b63fa7593 Author: Michael Liebmann Date: 2013-05-21 (Tue, 21 May 2013) Origin message was: ------------------ * CComponentsItem: Set sw_cur = 0 if no shadow ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_item.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 8da3b5ac2..e26ffd46c 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -85,7 +85,9 @@ void CComponentsItem::paintInit(bool do_save_bg) int y_sh = corner_rad>0 ? y+height-2*corner_rad+sw : y+height; //bottom //calculate current shadow width depends of current corner_rad - int sw_cur = corner_rad>0 ? 2*corner_rad : sw; + int sw_cur = sw; + if (shadow) + sw_cur = corner_rad>sw ? 2*corner_rad : sw; comp_fbdata_t fbdata[] = { From c3dde44a1e4cafe1659170daaa19da6cb143f910 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Tue, 21 May 2013 18:37:15 +0200 Subject: [PATCH 48/56] src/gui/components/cc_types.h: Renumbering 'align types' of correct evaluation Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2a6d12c332008337da2b13a5e8b26a7b99faa74e Author: Michael Liebmann Date: 2013-05-21 (Tue, 21 May 2013) Origin message was: ------------------ * src/gui/components/cc_types.h: Renumbering 'align types' of correct evaluation ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_types.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/components/cc_types.h b/src/gui/components/cc_types.h index c416e36b0..bcc5b9ad3 100644 --- a/src/gui/components/cc_types.h +++ b/src/gui/components/cc_types.h @@ -93,12 +93,12 @@ typedef struct comp_screen_data_t //align types enum { - CC_ALIGN_RIGHT = 0, - CC_ALIGN_LEFT = 1, - CC_ALIGN_TOP = 2, - CC_ALIGN_BOTTOM = 4, - CC_ALIGN_HOR_CENTER = 8, - CC_ALIGN_VER_CENTER = 16 + CC_ALIGN_RIGHT = 1, + CC_ALIGN_LEFT = 2, + CC_ALIGN_TOP = 4, + CC_ALIGN_BOTTOM = 8, + CC_ALIGN_HOR_CENTER = 16, + CC_ALIGN_VER_CENTER = 32 }; enum From 8608b0e13383f6fb4d9ed68294118cd9a617dbd4 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Wed, 22 May 2013 07:44:27 +0200 Subject: [PATCH 49/56] CAudioPlayerGui: Fix display mute icon Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ad7bb42fc6dca0a5b01b8a3a5f3a52ada1d0768e Author: Michael Liebmann Date: 2013-05-22 (Wed, 22 May 2013) Origin message was: ------------------ * CAudioPlayerGui: Fix display mute icon ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/audioplayer.cpp | 2 +- src/gui/pictureviewer.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 8f2077a9e..d83e16f91 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1641,7 +1641,7 @@ void CAudioPlayerGui::paintItem(int pos) void CAudioPlayerGui::paintHead() { - if (!m_show_playlist) + if (!m_show_playlist || m_screensaver) return; int c_rad_mid = RADIUS_MID; diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index 5830d25cd..ad651cae3 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -621,7 +621,8 @@ int CPictureViewerGui::show() } hide(); - CAudioMute::getInstance()->enableMuteIcon(true); + if (!audioplayer) + CAudioMute::getInstance()->enableMuteIcon(true); return(res); } From 5c4363d2cc7a91a55316b5cafa51bd393128090d Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Wed, 22 May 2013 21:31:42 +0200 Subject: [PATCH 50/56] CComponentsItem::paintInit(): Corrected calculation of sw_cur - Summarized calculate the values of shadow box Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b1c7c7a34c885a6095741e3694514f58c057820c Author: Michael Liebmann Date: 2013-05-22 (Wed, 22 May 2013) Origin message was: ------------------ * CComponentsItem::paintInit(): Corrected calculation of sw_cur - Summarized calculate the values of shadow box ------------------ This commit was generated by Migit --- src/gui/components/cc_item.cpp | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index e26ffd46c..d621b0cae 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -67,7 +67,6 @@ void CComponentsItem::paintInit(bool do_save_bg) { clear(); - int sw = shadow ? shadow_w : 0; int th = fr_thickness; fb_pixel_t col_frame_cur = col_frame; @@ -80,15 +79,21 @@ void CComponentsItem::paintInit(bool do_save_bg) //calculate current needed corner radius for body box, depends of frame thickness int rad = (corner_rad>th) ? corner_rad-th : corner_rad; - //calculate positon of shadow areas - int x_sh = corner_rad>0 ? x+width-2*corner_rad+sw : x+width; //right - int y_sh = corner_rad>0 ? y+height-2*corner_rad+sw : y+height; //bottom - - //calculate current shadow width depends of current corner_rad - int sw_cur = sw; - if (shadow) - sw_cur = corner_rad>sw ? 2*corner_rad : sw; - + int sw = 0, sw_cur = 0; + int x_sh = x + width; + int y_sh = y + height; + if (shadow) { + sw = shadow_w; + sw_cur = sw; + if (corner_type && corner_rad) { + //calculate positon of shadow areas + x_sh += sw - 2*corner_rad; + y_sh += sw - 2*corner_rad; + //calculate current shadow width depends of current corner_rad + sw_cur = max(2*corner_rad, sw); + } + } + comp_fbdata_t fbdata[] = { {CC_FBDATA_TYPE_BGSCREEN, x, y, width+sw, height+sw, 0, 0, 0, NULL, NULL}, From 5c6d3063616ba9b1587cc1ecdad22867c4f19bfc Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 23 May 2013 14:20:06 +0200 Subject: [PATCH 51/56] CBaseDec::GetMetaDataBase - fix segfault on scroll and any file is played Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/0c68a37b7033dbe4d9c06948a87be809a6649917 Author: Jacek Jendrzej Date: 2013-05-23 (Thu, 23 May 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/audiodec/basedec.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/driver/audiodec/basedec.cpp b/src/driver/audiodec/basedec.cpp index 08dfed926..c38752464 100644 --- a/src/driver/audiodec/basedec.cpp +++ b/src/driver/audiodec/basedec.cpp @@ -191,7 +191,8 @@ bool CBaseDec::GetMetaDataBase(CAudiofile* const in, const bool nice) #ifdef ENABLE_FLAC else if (in->FileType == CFile::FILE_FLAC) { - Status = CFlacDec::getInstance()->GetMetaData(fp, nice, &in->MetaData); + CFlacDec FlacDec; + Status = FlacDec.GetMetaData(fp, nice, &in->MetaData); } #endif if ( fclose( fp ) == EOF ) From 9b259b8e0de233ad90132e08814bdec03af7b4ba Mon Sep 17 00:00:00 2001 From: rhabarber1848 Date: Sun, 28 Feb 2010 17:54:02 +0000 Subject: [PATCH 52/56] Neutrino: Show audio track descriptions and program length in EPG info, patch by Gaucho316: http://www.dbox2-tuning.net/forum/viewtopic.php?f=2&t=49185 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/19d47e04a5e2e4b3ba423c7f58d25f346db15184 Author: rhabarber1848 Date: 2010-02-28 (Sun, 28 Feb 2010) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 4 ++++ data/locale/english.locale | 4 ++++ src/gui/epgview.cpp | 40 +++++++++++++++++++++++++++++++------- src/system/locals.h | 4 ++++ src/system/locals_intern.h | 4 ++++ 5 files changed, 49 insertions(+), 7 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 31f868f67..5ad21a3c1 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -312,6 +312,10 @@ epgextended.year_of_production Produktionsjahr epglist.noevents Keine EPG-Information verfügbar. epgviewer.More_Screenings Weitere Termine auf diesem Kanal epgviewer.More_Screenings_short Weitere Termine +epgviewer.age_rating Altersfreigabe +epgviewer.audio Audio +epgviewer.genre Genre +epgviewer.length Spieldauer (Min.) epgviewer.nodetailed Keine ausführlichen Informationen verfügbar epgviewer.notfound Keine Programminformationen (EPG) gefunden eventfinder.head EPG-Suche diff --git a/data/locale/english.locale b/data/locale/english.locale index 9046f2087..3c06a634c 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -312,6 +312,10 @@ epgextended.year_of_production Year of Production epglist.noevents EPG is not available... epgviewer.More_Screenings More Screenings on this Channel epgviewer.More_Screenings_short More Screenings +epgviewer.age_rating Age rating +epgviewer.audio Audio +epgviewer.genre Genre +epgviewer.length Length (min.) epgviewer.nodetailed No detailed informations available epgviewer.notfound No EPG found eventfinder.head Search in EPG diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index dbe65abf1..13199976f 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -548,28 +548,55 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start else processTextToArray(strEpisode + epgData.info2); + // Add a blank line + processTextToArray(""); + + // 21.07.2005 - rainerk // Show extended information if ( !epgData.itemDescriptions.empty() && !epgData.items.empty()) { char line[256]; std::vector::iterator description; std::vector::iterator item; - processTextToArray(""); // Add a blank line for (description = epgData.itemDescriptions.begin(), item = epgData.items.begin(); description != epgData.itemDescriptions.end(), item != epgData.items.end(); ++description, ++item) { sprintf(line, "%s: %s", (*(description)).c_str(), (*(item)).c_str()); processTextToArray(line); } } + // Show FSK information if (epgData.fsk > 0) { - char _tfsk[11]; - sprintf (_tfsk, "FSK: ab %d", epgData.fsk ); - processTextToArray( _tfsk ); // UTF-8 + char fskInfo[4]; + sprintf(fskInfo, "%d", epgData.fsk); + processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_AGE_RATING)) + ": " + fskInfo); // UTF-8 } + // Show length information + char lengthInfo[11]; + sprintf(lengthInfo, "%d", epgData.epg_times.dauer / 60); + processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_LENGTH)) + ": " + lengthInfo); // UTF-8 + + // Show audio information + std::string audioInfo = ""; + CSectionsdClient::ComponentTagList tags; + bool hasComponentTags = CEitManager::getInstance()->getComponentTagsUniqueKey( epgData.eventID, tags); + if (hasComponentTags) + { + for (unsigned int i = 0; i < tags.size(); i++) + if (tags[i].streamContent == 2) + audioInfo += tags[i].component + ", "; + + if (!audioInfo.empty()) + { + audioInfo.erase(audioInfo.size()-2); + processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_AUDIO)) + ": " + ZapitTools::Latin1_to_UTF8(audioInfo)); // UTF-8 + } + } + + // Show genre information if (epgData.contentClassification.length()> 0) - processTextToArray(GetGenre(epgData.contentClassification[0])); // UTF-8 + processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_GENRE)) + ": " + GetGenre(epgData.contentClassification[0])); // UTF-8 // processTextToArray( epgData.userClassification.c_str() ); @@ -619,11 +646,10 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start showTimerEventBar (true); //show Content&Component for Dolby & 16:9 - CSectionsdClient::ComponentTagList tags; int dummy_h,dummy_w; frameBuffer->getIconSize(NEUTRINO_ICON_16_9_GREY, &dummy_w, &dummy_h); if (dummy_h == 16 && dummy_w == 26){ // show only standard icon size - if (CEitManager::getInstance()->getComponentTagsUniqueKey( epgData.eventID, tags)) + if (hasComponentTags) { for (unsigned int i=0; i< tags.size(); i++) { diff --git a/src/system/locals.h b/src/system/locals.h index 5ef52ea1e..75b97d407 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -339,6 +339,10 @@ typedef enum LOCALE_EPGLIST_NOEVENTS, LOCALE_EPGVIEWER_MORE_SCREENINGS, LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT, + LOCALE_EPGVIEWER_AGE_RATING, + LOCALE_EPGVIEWER_AUDIO, + LOCALE_EPGVIEWER_GENRE, + LOCALE_EPGVIEWER_LENGTH, LOCALE_EPGVIEWER_NODETAILED, LOCALE_EPGVIEWER_NOTFOUND, LOCALE_EVENTFINDER_HEAD, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index fe8eedd57..e0238f57c 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -339,6 +339,10 @@ const char * locale_real_names[] = "epglist.noevents", "epgviewer.More_Screenings", "epgviewer.More_Screenings_short", + "epgviewer.age_rating", + "epgviewer.audio", + "epgviewer.genre", + "epgviewer.length", "epgviewer.nodetailed", "epgviewer.notfound", "eventfinder.head", From d77e22e27135a329657b9d78e83b91e79f14dda5 Mon Sep 17 00:00:00 2001 From: Gaucho316 Date: Wed, 19 Dec 2012 19:19:42 +0100 Subject: [PATCH 53/56] Neutrino EPG Viewer: don't show empty audio track names Signed-off-by: Gaucho316 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/6215d37e427ab60c18092e24ce406d188c78ff15 Author: Gaucho316 Date: 2012-12-19 (Wed, 19 Dec 2012) ------------------ This commit was generated by Migit --- src/gui/epgview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 13199976f..3eecb70f9 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -584,7 +584,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start if (hasComponentTags) { for (unsigned int i = 0; i < tags.size(); i++) - if (tags[i].streamContent == 2) + if (tags[i].streamContent == 2 && !tags[i].component.empty()) audioInfo += tags[i].component + ", "; if (!audioInfo.empty()) From 3a692e2962357ededadce724c429c0a32d0e34e1 Mon Sep 17 00:00:00 2001 From: rhabarber1848 Date: Sat, 27 Feb 2010 20:54:48 +0000 Subject: [PATCH 54/56] Neutrino: Remove trailing comma in movieinfo`s audio track listing, patch by Gaucho316: http://www.dbox2-tuning.net/forum/viewtopic.php?f=2&t=49186 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/995aeaeb18005f9ccb1c8ab22c526fc756f1e5df Author: rhabarber1848 Date: 2010-02-27 (Sat, 27 Feb 2010) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/movieinfo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/movieinfo.cpp b/src/gui/movieinfo.cpp index 4059faa67..d070d7e8d 100644 --- a/src/gui/movieinfo.cpp +++ b/src/gui/movieinfo.cpp @@ -480,6 +480,7 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info) print_buffer += movie_info.audioPids[i].epgAudioPidName; print_buffer += ", "; } + print_buffer.erase(print_buffer.size()-2); } print_buffer += "\n\n"; From 8b6479b9eff3659228f56325f0091617e1c72f07 Mon Sep 17 00:00:00 2001 From: rhabarber1848 Date: Wed, 17 Oct 2012 16:33:50 +0000 Subject: [PATCH 55/56] Neutrino Movieinfo: show genre, patch by Gaucho316: http://www.dbox2-tuning.net/forum/viewtopic.php?p=384587#p384587 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/99221ee19c84c5c484ac4ea46ed6f1ca3f255832 Author: rhabarber1848 Date: 2012-10-17 (Wed, 17 Oct 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/moviebrowser.h | 133 +---------------------------------------- src/gui/movieinfo.cpp | 19 ++++++ src/neutrino.h | 3 + 3 files changed, 23 insertions(+), 132 deletions(-) diff --git a/src/gui/moviebrowser.h b/src/gui/moviebrowser.h index 70f9523a9..a4df89ba4 100644 --- a/src/gui/moviebrowser.h +++ b/src/gui/moviebrowser.h @@ -499,7 +499,7 @@ class CDirMenu : public CMenuWidget }; -// EPG Genre , taken from epgview, TODO: migth be splitted in major/minor to increase handling, might be moved to CMovieInfo +// EPG Genre, taken from epgview, TODO: might be splitted in major/minor to increase handling #define GENRE_ALL_COUNT 76 const CMenuOptionChooser::keyval GENRE_ALL[GENRE_ALL_COUNT] = { @@ -581,137 +581,6 @@ const CMenuOptionChooser::keyval GENRE_ALL[GENRE_ALL_COUNT] = { 0xA7, LOCALE_GENRE_TRAVEL_HOBBIES_7 } }; -#define GENRE_MOVIE_COUNT 9 -const CMenuOptionChooser::keyval genre_movie[GENRE_MOVIE_COUNT] = -{ - { 0, LOCALE_GENRE_MOVIE_0 }, - { 1, LOCALE_GENRE_MOVIE_1 }, - { 2, LOCALE_GENRE_MOVIE_2 }, - { 3, LOCALE_GENRE_MOVIE_3 }, - { 4, LOCALE_GENRE_MOVIE_4 }, - { 5, LOCALE_GENRE_MOVIE_5 }, - { 6, LOCALE_GENRE_MOVIE_6 }, - { 7, LOCALE_GENRE_MOVIE_7 }, - { 8, LOCALE_GENRE_MOVIE_8 } -}; -#define GENRE_NEWS_COUNT 5 -const CMenuOptionChooser::keyval genre_news[GENRE_NEWS_COUNT] = -{ - { 0, LOCALE_GENRE_NEWS_0 }, - { 1, LOCALE_GENRE_NEWS_1 }, - { 2, LOCALE_GENRE_NEWS_2 }, - { 3, LOCALE_GENRE_NEWS_3 }, - { 4, LOCALE_GENRE_NEWS_4 } -}; -#define GENRE_SHOW_COUNT 4 -const CMenuOptionChooser::keyval genre_show[GENRE_SHOW_COUNT] = -{ - { 0, LOCALE_GENRE_SHOW_0 }, - { 1, LOCALE_GENRE_SHOW_1 }, - { 2, LOCALE_GENRE_SHOW_2 }, - { 3, LOCALE_GENRE_SHOW_3 } -}; -#define GENRE_SPORTS_COUNT 12 -const CMenuOptionChooser::keyval genre_sports[GENRE_SPORTS_COUNT] = -{ - { 0, LOCALE_GENRE_SPORTS_0 }, - { 1, LOCALE_GENRE_SPORTS_1 }, - { 2, LOCALE_GENRE_SPORTS_2 }, - { 3, LOCALE_GENRE_SPORTS_3 }, - { 4, LOCALE_GENRE_SPORTS_4 }, - { 5, LOCALE_GENRE_SPORTS_5 }, - { 6, LOCALE_GENRE_SPORTS_6 }, - { 7, LOCALE_GENRE_SPORTS_7 }, - { 8, LOCALE_GENRE_SPORTS_8 }, - { 9, LOCALE_GENRE_SPORTS_9 }, - {10, LOCALE_GENRE_SPORTS_10 }, - {11, LOCALE_GENRE_SPORTS_11 } -}; -#define GENRE_CHILDRENS_PROGRAMMES_COUNT 6 -const CMenuOptionChooser::keyval genre_childrens_programmes[GENRE_CHILDRENS_PROGRAMMES_COUNT] = -{ - { 0, LOCALE_GENRE_CHILDRENS_PROGRAMMES_0 }, - { 1, LOCALE_GENRE_CHILDRENS_PROGRAMMES_1 }, - { 2, LOCALE_GENRE_CHILDRENS_PROGRAMMES_2 }, - { 3, LOCALE_GENRE_CHILDRENS_PROGRAMMES_3 }, - { 4, LOCALE_GENRE_CHILDRENS_PROGRAMMES_4 }, - { 5, LOCALE_GENRE_CHILDRENS_PROGRAMMES_5 } -}; -#define GENRE_MUSIC_DANCE_COUNT 7 -const CMenuOptionChooser::keyval genre_music_dance[GENRE_MUSIC_DANCE_COUNT] = -{ - { 0, LOCALE_GENRE_MUSIC_DANCE_0 }, - { 1, LOCALE_GENRE_MUSIC_DANCE_1 }, - { 2, LOCALE_GENRE_MUSIC_DANCE_2 }, - { 3, LOCALE_GENRE_MUSIC_DANCE_3 }, - { 4, LOCALE_GENRE_MUSIC_DANCE_4 }, - { 5, LOCALE_GENRE_MUSIC_DANCE_5 }, - { 6, LOCALE_GENRE_MUSIC_DANCE_6 } -}; -#define GENRE_ARTS_COUNT 12 -const CMenuOptionChooser::keyval genre_arts_dance[GENRE_ARTS_COUNT] = -{ - { 0, LOCALE_GENRE_ARTS_0 }, - { 1, LOCALE_GENRE_ARTS_1 }, - { 2, LOCALE_GENRE_ARTS_2 }, - { 3, LOCALE_GENRE_ARTS_3 }, - { 4, LOCALE_GENRE_ARTS_4 }, - { 5, LOCALE_GENRE_ARTS_5 }, - { 6, LOCALE_GENRE_ARTS_6 }, - { 7, LOCALE_GENRE_ARTS_7 }, - { 8, LOCALE_GENRE_ARTS_8 }, - { 9, LOCALE_GENRE_ARTS_9 }, - {10, LOCALE_GENRE_ARTS_10 }, - {11, LOCALE_GENRE_ARTS_11 } -}; -#define GENRE_SOCIAL_POLITICAL_COUNT 4 -const CMenuOptionChooser::keyval genre_social_political[GENRE_SOCIAL_POLITICAL_COUNT] = -{ - { 0, LOCALE_GENRE_SOCIAL_POLITICAL_0 }, - { 1, LOCALE_GENRE_SOCIAL_POLITICAL_1 }, - { 2, LOCALE_GENRE_SOCIAL_POLITICAL_2 }, - { 3, LOCALE_GENRE_SOCIAL_POLITICAL_3 } -}; -#define GENRE_DOCUS_MAGAZINES_COUNT 8 -const CMenuOptionChooser::keyval genre_docus_magazines[GENRE_DOCUS_MAGAZINES_COUNT] = -{ - { 0, LOCALE_GENRE_DOCUS_MAGAZINES_0 }, - { 1, LOCALE_GENRE_DOCUS_MAGAZINES_1 }, - { 2, LOCALE_GENRE_DOCUS_MAGAZINES_2 }, - { 3, LOCALE_GENRE_DOCUS_MAGAZINES_3 }, - { 4, LOCALE_GENRE_DOCUS_MAGAZINES_4 }, - { 5, LOCALE_GENRE_DOCUS_MAGAZINES_5 }, - { 6, LOCALE_GENRE_DOCUS_MAGAZINES_6 }, - { 7, LOCALE_GENRE_DOCUS_MAGAZINES_7 } -}; -#define GENRE_TRAVEL_HOBBIES_COUNT 8 -const CMenuOptionChooser::keyval genre_travel_hobbies[GENRE_TRAVEL_HOBBIES_COUNT] = -{ - { 0, LOCALE_GENRE_TRAVEL_HOBBIES_0 }, - { 1, LOCALE_GENRE_TRAVEL_HOBBIES_1 }, - { 2, LOCALE_GENRE_TRAVEL_HOBBIES_2 }, - { 3, LOCALE_GENRE_TRAVEL_HOBBIES_3 }, - { 4, LOCALE_GENRE_TRAVEL_HOBBIES_4 }, - { 5, LOCALE_GENRE_TRAVEL_HOBBIES_5 }, - { 6, LOCALE_GENRE_TRAVEL_HOBBIES_6 }, - { 7, LOCALE_GENRE_TRAVEL_HOBBIES_7 } -}; - -#define GENRE_MAJOR_COUNT 10 -const CMenuOptionChooser::keyval genre_major[GENRE_MAJOR_COUNT] = -{ - { 1, LOCALE_GENRE_MOVIE_0 }, - { 2, LOCALE_GENRE_NEWS_0 }, - { 3, LOCALE_GENRE_SHOW_0 }, - { 4, LOCALE_GENRE_SPORTS_0 }, - { 5, LOCALE_GENRE_CHILDRENS_PROGRAMMES_0 }, - { 6, LOCALE_GENRE_MUSIC_DANCE_0 }, - { 7, LOCALE_GENRE_ARTS_0 }, - { 8, LOCALE_GENRE_SOCIAL_POLITICAL_0 }, - { 9, LOCALE_GENRE_DOCUS_MAGAZINES_0 }, - { 10, LOCALE_GENRE_TRAVEL_HOBBIES_0} -}; - #endif /*MOVIEBROWSER_H_*/ diff --git a/src/gui/movieinfo.cpp b/src/gui/movieinfo.cpp index d070d7e8d..78252c708 100644 --- a/src/gui/movieinfo.cpp +++ b/src/gui/movieinfo.cpp @@ -53,6 +53,8 @@ #include #include +#include + //#define XMLTREE_LIB #ifdef XMLTREE_LIB #include @@ -482,6 +484,23 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info) } print_buffer.erase(print_buffer.size()-2); } + if (movie_info.genreMajor != 0) + { + neutrino_locale_t locale_genre; + unsigned char i = (movie_info.genreMajor & 0x0F0); + if (i >= 0x010 && i < 0x0B0) + { + i >>= 4; + i--; + locale_genre = genre_sub_classes_list[i][((movie_info.genreMajor & 0x0F) < genre_sub_classes[i]) ? (movie_info.genreMajor & 0x0F) : 0]; + } + else + locale_genre = LOCALE_GENRE_UNKNOWN; + print_buffer += "\n"; + print_buffer += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR); + print_buffer += ": "; + print_buffer += g_Locale->getText(locale_genre); + } print_buffer += "\n\n"; print_buffer += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_PREVPLAYDATE); diff --git a/src/neutrino.h b/src/neutrino.h index 76f891516..bf470f6ad 100644 --- a/src/neutrino.h +++ b/src/neutrino.h @@ -82,6 +82,9 @@ typedef struct font_sizes_groups const neutrino_locale_t hint; } font_sizes_groups_struct; +extern const unsigned char genre_sub_classes[]; /* epgview.cpp */ +extern const neutrino_locale_t * genre_sub_classes_list[]; /* epgview.cpp */ + class CNeutrinoApp : public CMenuTarget, CChangeObserver { public: From c0a1e42dceb2a58069e755b7c246eefbe569e685 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Fri, 24 May 2013 06:35:42 +0200 Subject: [PATCH 56/56] CFrameBuffer::paintBoxRel: Skip paint the line, if the calculated width < 0 - When width < 0 GXA overwrites undefined image regions - Skip paint the line, if the calculated width = 0 (unnecessarily) Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/00dd399ff90a21ba009f6d92b9f1a2e5acf2e508 Author: Michael Liebmann Date: 2013-05-24 (Fri, 24 May 2013) Origin message was: ------------------ * CFrameBuffer::paintBoxRel: Skip paint the line, if the calculated width < 0 - When width < 0 GXA overwrites undefined image regions - Skip paint the line, if the calculated width = 0 (unnecessarily) ------------------ This commit was generated by Migit --- src/driver/framebuffer.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index e7a8299e6..2e52808d1 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -675,7 +675,7 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int return; if (dx == 0 || dy == 0) { - printf("paintBoxRel: radius %d, start x %d y %d end x %d y %d\n", radius, x, y, x+dx, y+dy); + printf("[%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __FUNCTION__, __LINE__, radius, x, y, x+dx, y+dy); return; } @@ -721,8 +721,15 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int #endif } - if (dx-ofr-ofl == 0) - printf("paintBoxRel: radius %d, start x %d y %d end x %d y %d\n", radius, x, y, dx-ofr-ofl, y+line); + if (dx-ofr-ofl < 1) { + if (dx-ofr-ofl == 0) + printf("[%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __FUNCTION__, __LINE__, radius, x, y, x+dx-ofr-ofl, y+line); + else + printf("[%s - %04d]: Calculated width: %d\n (radius %d, dx %d, offsetLeft %d, offsetRight %d).\n Width can not be less than 0, abort.\n", + __FUNCTION__, __LINE__, dx-ofr-ofl, radius, dx, ofl, ofr); + line++; + continue; + } #ifdef USE_NEVIS_GXA _write_gxa(gxa_base, GXA_BLT_CONTROL_REG, 0); _write_gxa(gxa_base, cmd, GXA_POINT(x + ofl, y + line)); /* destination x/y */