diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index 1403a9dcf..6feb496fd 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -2,7 +2,7 @@ installdir = $(DATADIR)/neutrino/icons install_DATA = \ 0.png 1.png 2.png 3.png 4.png 5.png 6.png 7.png 8.png 9.png \ - audio.png 16_9.png 16_9_gray.png ats.png \ + audio.png 16_9.png 16_9_gray.png ats.png ats_gray.png \ language.png bayrisch.png ch-baslerdeutsch.png ch-berndeutsch.png czech.png deutsch.png dutch.png bosanski.png \ ellinika.png english.png francais.png french.png hungarian.png italiano.png norsk.png \ polski.png portugues.png romania.png russkij.png nederlands.png slovak.png suomi.png svenska.png \ @@ -19,7 +19,7 @@ install_DATA = \ mp3.png mute.png mute_small.png mute_zap_gray.png mute_zap_green.png \ network.png not_mounted.png notyet.png numericpad.png ok.png power.png \ radar_red.pal radar.pal radar0.raw radar1.raw radar2.raw radar3.raw radar4.raw \ - radar5.raw radar6.raw radar7.raw radar8.raw radar9.raw movieplayer.raw rec.png recording.png \ + radar5.raw radar6.raw radar7.raw radar8.raw radar9.raw movieplayer.raw rec.png rec_gray.png recording.png \ res_1920.png res_1280.png res_1440.png res_1080.png res_720.png res_704.png res_576.png \ res_528.png res_544.png res_480.png res_382.png res_352.png res_288.png res_000.png \ res_hd.png res_sd.png \ diff --git a/src/driver/record.cpp b/src/driver/record.cpp index cd62ff2a8..774896a72 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -670,6 +670,19 @@ CRecordInstance * CRecordManager::FindInstance(t_channel_id channel_id) return NULL; } +bool CRecordManager::IsTimeshift(t_channel_id channel_id) +{ + bool ret; + mutex.lock(); + CRecordInstance * inst = FindInstance(channel_id); + mutex.unlock(); + if(inst && inst->Timeshift()) + ret = true; + else + ret = false; + return ret; +} + MI_MOVIE_INFO * CRecordManager::GetMovieInfo(t_channel_id channel_id) { //FIXME copy MI_MOVIE_INFO ? diff --git a/src/driver/record.h b/src/driver/record.h index be33db4d8..0f3a6ab74 100644 --- a/src/driver/record.h +++ b/src/driver/record.h @@ -192,5 +192,6 @@ class CRecordManager : public CMenuTarget, public CChangeObserver bool doGuiRecord(); bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/); int GetRecmapSize() { return recmap.size(); }; + bool IsTimeshift(t_channel_id channel_id); }; #endif diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 5decf1076..b34a553c7 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -288,9 +288,19 @@ void CInfoViewer::paintTime (bool show_dot, bool firstPaint) void CInfoViewer::showRecordIcon (const bool show) { - recordModeActive = CRecordManager::getInstance()->RecordingStatus() || CRecordManager::getInstance()->Timeshift(); - if (recordModeActive) { - CRecordManager * crm = CRecordManager:: getInstance(); + CRecordManager * crm = CRecordManager::getInstance(); + recordModeActive = crm->RecordingStatus() || crm->Timeshift(); + if (recordModeActive) + { + std::string Icon_Rec = NEUTRINO_ICON_REC_GRAY, Icon_Ts = NEUTRINO_ICON_AUTO_SHIFT_GRAY; + t_channel_id cci = g_RemoteControl->current_channel_id; + bool status_ts = crm->IsTimeshift(cci); + bool status_rec = crm->RecordingStatus(cci) && !status_ts; + if (status_ts) + Icon_Ts = NEUTRINO_ICON_AUTO_SHIFT; + if (status_rec) + Icon_Rec = NEUTRINO_ICON_REC; + int records = crm->GetRecmapSize(); bool modus_rec = crm->RecordingStatus() && !crm->Timeshift(); bool modus_ts = crm->Timeshift() && (records == 1); @@ -301,8 +311,8 @@ void CInfoViewer::showRecordIcon (const bool show) const int ChanName_X = BoxStartX + ChanWidth + SHADOW_OFFSET; const int icon_space = 3, box_posY = 12; int box_len = 0, rec_icon_posX = 0, ts_icon_posX = 0; - frameBuffer->getIconSize(NEUTRINO_ICON_REC, &rec_icon_w, &rec_icon_h); - frameBuffer->getIconSize(NEUTRINO_ICON_AUTO_SHIFT, &ts_icon_w, &ts_icon_h); + frameBuffer->getIconSize(Icon_Rec.c_str(), &rec_icon_w, &rec_icon_h); + frameBuffer->getIconSize(Icon_Ts.c_str(), &ts_icon_w, &ts_icon_h); int chanH = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight () * (g_settings.screen_yres / 100); if (chanH < rec_icon_h) @@ -335,19 +345,19 @@ void CInfoViewer::showRecordIcon (const bool show) frameBuffer->paintBoxRel(box_posX + SHADOW_OFFSET, BoxStartY + box_posY + SHADOW_OFFSET, box_len, chanH, COL_INFOBAR_SHADOW_PLUS_0, radius); frameBuffer->paintBoxRel(box_posX, BoxStartY + box_posY , box_len, chanH, COL_INFOBAR_PLUS_0, radius); g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (rec_icon_posX + rec_icon_w + icon_space, BoxStartY + box_posY + chanH, box_len, records_msg, COL_INFOBAR, 0, true); - frameBuffer->paintIcon (NEUTRINO_ICON_REC, rec_icon_posX, BoxStartY + box_posY + (chanH - rec_icon_h)/2); + frameBuffer->paintIcon(Icon_Rec, rec_icon_posX, BoxStartY + box_posY + (chanH - rec_icon_h)/2); }else if (modus_ts) { frameBuffer->paintBoxRel(box_posX + SHADOW_OFFSET, BoxStartY + box_posY + SHADOW_OFFSET, box_len, chanH, COL_INFOBAR_SHADOW_PLUS_0, radius); frameBuffer->paintBoxRel(box_posX, BoxStartY + box_posY , box_len, chanH, COL_INFOBAR_PLUS_0, radius); - frameBuffer->paintIcon(NEUTRINO_ICON_AUTO_SHIFT, ts_icon_posX, BoxStartY + box_posY + (chanH - ts_icon_h)/2); + frameBuffer->paintIcon(Icon_Ts, ts_icon_posX, BoxStartY + box_posY + (chanH - ts_icon_h)/2); }else if (modus_ts_rec) { frameBuffer->paintBoxRel(box_posX + SHADOW_OFFSET, BoxStartY + box_posY + SHADOW_OFFSET, box_len, chanH, COL_INFOBAR_SHADOW_PLUS_0, radius); frameBuffer->paintBoxRel(box_posX, BoxStartY + box_posY , box_len, chanH, COL_INFOBAR_PLUS_0, radius); g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rec_icon_posX + rec_icon_w + icon_space, BoxStartY + box_posY + chanH, box_len, records_msg, COL_INFOBAR, 0, true); - frameBuffer->paintIcon(NEUTRINO_ICON_REC, rec_icon_posX, BoxStartY + box_posY + (chanH - rec_icon_h)/2); - frameBuffer->paintIcon(NEUTRINO_ICON_AUTO_SHIFT, ts_icon_posX, BoxStartY + box_posY + (chanH - ts_icon_h)/2); + frameBuffer->paintIcon(Icon_Rec, rec_icon_posX, BoxStartY + box_posY + (chanH - rec_icon_h)/2); + frameBuffer->paintIcon(Icon_Ts, ts_icon_posX, BoxStartY + box_posY + (chanH - ts_icon_h)/2); } }else { diff --git a/src/gui/widget/icons.h b/src/gui/widget/icons.h index 12ee3717a..70fe6bcbd 100644 --- a/src/gui/widget/icons.h +++ b/src/gui/widget/icons.h @@ -96,6 +96,7 @@ #define NEUTRINO_ICON_RADIOMODE "radiomode" #define NEUTRINO_ICON_RECORDING "recording" #define NEUTRINO_ICON_REC "rec" +#define NEUTRINO_ICON_REC_GRAY "rec_gray" #define NEUTRINO_ICON_SETTINGS "settings" #define NEUTRINO_ICON_SHELL "shell" #define NEUTRINO_ICON_STREAMING "streaming" @@ -115,6 +116,7 @@ #define NEUTRINO_ICON_SUBT "subt" #define NEUTRINO_ICON_SUBT_GREY "subt_gray" #define NEUTRINO_ICON_AUTO_SHIFT "ats" +#define NEUTRINO_ICON_AUTO_SHIFT_GRAY "ats_gray" #define NEUTRINO_ICON_NUMERIC_PAD "numericpad" #define NEUTRINO_ICON_SCRAMBLED "ca" #define NEUTRINO_ICON_SCRAMBLED2 "ca2"