diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 22c45674e..abc4595a6 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -469,7 +469,7 @@ int CRCInput::addTimer(uint64_t Interval, bool oneshot, bool correct_time ) _newtimer.correct_time = correct_time; -//printf("adding timer %d (0x%llx, 0x%llx)\n", _newtimer.id, _newtimer.times_out, Interval); +printf("adding timer %d (0x%llx, 0x%llx)\n", _newtimer.id, _newtimer.times_out, Interval); std::vector::iterator e; for ( e= timers.begin(); e!= timers.end(); ++e ) @@ -482,7 +482,7 @@ int CRCInput::addTimer(uint64_t Interval, bool oneshot, bool correct_time ) void CRCInput::killTimer(uint32_t &id) { -//printf("killing timer %d\n", id); +printf("killing timer %d\n", id); if(id == 0) return; diff --git a/src/driver/scanepg.cpp b/src/driver/scanepg.cpp index 7367175d2..da91163ea 100644 --- a/src/driver/scanepg.cpp +++ b/src/driver/scanepg.cpp @@ -39,7 +39,7 @@ #include #include -#define EPG_RESCAN_TIME (24*60*60) +//#define EPG_RESCAN_TIME (24*60*60) extern CBouquetList * bouquetList; extern CBouquetList * TVfavList; @@ -322,8 +322,9 @@ int CEpgScan::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data) void CEpgScan::AddTimer() { if (rescan_timer == 0) - rescan_timer = g_RCInput->addTimer(EPG_RESCAN_TIME*1000ULL*1000ULL, true); + rescan_timer = g_RCInput->addTimer((g_settings.epg_scan_rescan*60*60)*1000ULL*1000ULL, true); INFO("rescan timer id %d", rescan_timer); + INFO("rescan time is %d*60*60", g_settings.epg_scan_rescan); } void CEpgScan::EnterStandby() diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 0cf2422f1..65dfff0c7 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -297,6 +297,7 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey) m_meta_height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); m_title_height = 3*OFFSET_INNER_SMALL + 2*m_item_height + m_meta_height; + m_cover_width = 0; m_info_height = 2*OFFSET_INNER_SMALL + 2*g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight(); m_button_height = ::paintButtons(AudioPlayerButtons[0], 4, 0, 0, 0, 0, 0, false, NULL, NULL); @@ -1701,7 +1702,21 @@ void CAudioPlayerGui::paintCover() cover = meta.cover; if (access(cover.c_str(), F_OK) == 0) - g_PicViewer->DisplayImage(cover, m_x + OFFSET_INNER_MID, m_y + OFFSET_INNER_SMALL, m_title_height - 2*OFFSET_INNER_SMALL, m_title_height - 2*OFFSET_INNER_SMALL, m_frameBuffer->TM_NONE); + { + int cover_x = m_x + OFFSET_INNER_MID; + int cover_y = m_y + OFFSET_INNER_SMALL; + m_cover_width = 0; + CComponentsPicture *cover_object = new CComponentsPicture(cover_x, cover_y, cover); + if (cover_object) + { + cover_object->doPaintBg(false); + cover_object->SetTransparent(CFrameBuffer::TM_BLACK); + cover_object->setHeight(m_title_height - 2*OFFSET_INNER_SMALL, true); + cover_object->paint(); + + m_cover_width = cover_object->getWidth() + OFFSET_INNER_MID; + } + } } void CAudioPlayerGui::paintTitleBox() @@ -1743,13 +1758,11 @@ void CAudioPlayerGui::paintTitleBox() tmp += sNr ; } - // FIXME - there's no cover-check; so we maybe paint over the cover - int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp); int xstart = (m_width - w)/2; - if (xstart < OFFSET_INNER_MID) - xstart = OFFSET_INNER_MID; - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + OFFSET_INNER_SMALL + 1*m_item_height, m_width - 2*OFFSET_INNER_MID, tmp, COL_MENUHEAD_TEXT); //caption "current track" + if (xstart < OFFSET_INNER_MID + m_cover_width) + xstart = OFFSET_INNER_MID + m_cover_width; + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + OFFSET_INNER_SMALL + 1*m_item_height, m_width - OFFSET_INNER_MID - xstart, tmp, COL_MENUHEAD_TEXT); //caption "current track" // second line (Artist/Title...) GetMetaData(m_curr_audiofile); @@ -1772,9 +1785,9 @@ void CAudioPlayerGui::paintTitleBox() } w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp); xstart = (m_width - w)/2; - if (xstart < OFFSET_INNER_MID) - xstart = OFFSET_INNER_MID; - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + OFFSET_INNER_SMALL + 2*m_item_height, m_width - 2*OFFSET_INNER_MID, tmp, COL_MENUHEAD_TEXT); //artist - title + if (xstart < OFFSET_INNER_MID + m_cover_width) + xstart = OFFSET_INNER_MID + m_cover_width; + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + OFFSET_INNER_SMALL + 2*m_item_height, m_width - OFFSET_INNER_MID - xstart, tmp, COL_MENUHEAD_TEXT); //artist - title // reset so fields get painted always m_metainfo.clear(); @@ -2113,8 +2126,7 @@ void CAudioPlayerGui::updateMetaData() if (updateMeta || updateScreen) { - int cover_width = m_title_height + 2*OFFSET_INNER_MID; - m_frameBuffer->paintBoxRel(m_x + cover_width, m_y + OFFSET_INNER_SMALL + 2*m_item_height + OFFSET_INNER_SMALL, m_width - OFFSET_INNER_MID - cover_width, m_meta_height, m_titlebox->getColorBody()); + m_frameBuffer->paintBoxRel(m_x + OFFSET_INNER_MID + m_cover_width, m_y + OFFSET_INNER_SMALL + 2*m_item_height + OFFSET_INNER_SMALL, m_width - 2*OFFSET_INNER_MID - m_cover_width, m_meta_height, m_titlebox->getColorBody()); int w = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(m_metainfo); int xstart = (m_width - w)/2; diff --git a/src/gui/audioplayer.h b/src/gui/audioplayer.h index 8cb914a12..86810d109 100644 --- a/src/gui/audioplayer.h +++ b/src/gui/audioplayer.h @@ -98,6 +98,7 @@ class CAudioPlayerGui : public CMenuTarget int m_meta_height; int m_button_height; int m_title_height; + int m_cover_width; int m_info_height; int m_key_level; bool m_visible; diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index bcece667b..9bdc9c69b 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -1393,6 +1393,13 @@ void EpgPlus::hide() delete this->header->head; this->header->head = NULL; } + + if (this->selectedChannelEntry->detailsLine) { + this->selectedChannelEntry->detailsLine->kill(); + delete this->selectedChannelEntry->detailsLine; + this->selectedChannelEntry->detailsLine = NULL; + } + this->frameBuffer->paintBackgroundBoxRel(this->usableScreenX, this->usableScreenY, this->usableScreenWidth + OFFSET_SHADOW, this->usableScreenHeight + OFFSET_SHADOW); } diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index cceea6b44..4d0cc6e45 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -1252,8 +1252,8 @@ bool CMovieBrowser::getSelectedFiles(CFileList &flist, P_MI_MOVIE_LIST &mlist) { flist.clear(); mlist.clear(); - P_MI_MOVIE_LIST *handle_list = &m_vHandleBrowserList; + P_MI_MOVIE_LIST *handle_list = &m_vHandleBrowserList; if (m_windowFocus == MB_FOCUS_LAST_PLAY) handle_list = &m_vHandlePlayList; if (m_windowFocus == MB_FOCUS_LAST_RECORD) @@ -2480,18 +2480,26 @@ bool CMovieBrowser::onDelete(bool cursor_only) MI_MOVIE_INFO *movieinfo; movieinfo = NULL; + getSelectedFiles(filelist, movielist); + + printf("CMovieBrowser::onDelete(%s) filelist size: %d\n", cursor_only ? "true" : "false", filelist.size()); + printf("CMovieBrowser::onDelete(%s) movielist size: %d\n", cursor_only ? "true" : "false", movielist.size()); + if (cursor_only || (filelist.empty() || movielist.empty())) { + printf("CMovieBrowser::onDelete(%s) clearing the lists\n", cursor_only ? "true" : "false"); + filelist.clear(); movielist.clear(); + printf("CMovieBrowser::onDelete(%s) add the m_movieSelectionHandler\n", cursor_only ? "true" : "false"); + // just add the m_movieSelectionHandler filelist.push_back(m_movieSelectionHandler->file); movielist.push_back(m_movieSelectionHandler); - } - else - { - getSelectedFiles(filelist, movielist); + + printf("CMovieBrowser::onDelete(%s) filelist size: %d\n", cursor_only ? "true" : "false", filelist.size()); + printf("CMovieBrowser::onDelete(%s) movielist size: %d\n", cursor_only ? "true" : "false", movielist.size()); } MI_MOVIE_LIST dellist; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 5aa5d5c54..bd0d0cc54 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -608,6 +608,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.epg_scan = CEpgScan::SCAN_CURRENT; g_settings.epg_scan_mode = CEpgScan::MODE_OFF; } + g_settings.epg_scan_rescan = configfile.getInt32("epg_scan_rescan", 24); g_settings.epg_save_mode = configfile.getInt32("epg_save_mode", 0); //widget settings g_settings.widget_fade = false; @@ -1280,6 +1281,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32("epg_read_frequently", g_settings.epg_read_frequently); configfile.setInt32("epg_scan", g_settings.epg_scan); configfile.setInt32("epg_scan_mode", g_settings.epg_scan_mode); + configfile.setInt32("epg_scan_rescan", g_settings.epg_scan_rescan); configfile.setInt32("epg_save_mode", g_settings.epg_save_mode); configfile.setInt32("epg_cache_time" ,g_settings.epg_cache ); configfile.setInt32("epg_extendedcache_time" ,g_settings.epg_extendedcache); @@ -3560,6 +3562,8 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) skipShutdownTimer = (ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_SHUTDOWNTIMER_ANNOUNCE, CMsgBox::mbrNo, CMsgBox::mbYes | CMsgBox::mbNo, NULL, 450, 5) == CMsgBox::mbrYes); } else if( msg == NeutrinoMessages::SHUTDOWN ) { + if(CStreamManager::getInstance()->StreamStatus()) + skipShutdownTimer = true; if(!skipShutdownTimer) { ExitRun(g_info.hw_caps->can_shutdown); } diff --git a/src/system/localize.h b/src/system/localize.h index b12b430fd..0794ff499 100644 --- a/src/system/localize.h +++ b/src/system/localize.h @@ -69,6 +69,7 @@ class CLocaleManager loadLocale_ret_t loadLocale(const char * const locale, bool asdefault = false); const char * getText(const neutrino_locale_t keyName) const; + std::string getTextAsString(const neutrino_locale_t keyName) const {return (static_cast(getText(keyName)));} static neutrino_locale_t getMonth (const struct tm * struct_tm_p); static neutrino_locale_t getMonth (const int mon); diff --git a/src/system/settings.h b/src/system/settings.h index ba7367e4e..26a927ee2 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -295,6 +295,7 @@ struct SNeutrinoSettings std::string epg_dir; int epg_scan; int epg_scan_mode; + int epg_scan_rescan; int epg_save_mode; int epg_search_history_size;