diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index 5587c1bf8..b15405433 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -25,6 +25,9 @@ install_DATA = \ border_lr.png \ border_ul.png \ bosanski.png \ + btn_record_active_16x16.png \ + btn_record_inactive_16x16.png \ + btn_stop_16x16.png \ ca.png \ ca2.png \ ca2_gray.png \ @@ -84,6 +87,7 @@ install_DATA = \ mainmenue.png \ mounted.png \ movie.png \ + movieplayer.raw \ mp_b-skip.png \ mp_f-skip.png \ mp_pause.png \ diff --git a/data/icons/btn_record_active_16x16.png b/data/icons/btn_record_active_16x16.png new file mode 100644 index 000000000..d0702a94a Binary files /dev/null and b/data/icons/btn_record_active_16x16.png differ diff --git a/data/icons/btn_record_inactive_16x16.png b/data/icons/btn_record_inactive_16x16.png new file mode 100644 index 000000000..1c89e9eaa Binary files /dev/null and b/data/icons/btn_record_inactive_16x16.png differ diff --git a/data/icons/btn_stop_16x16.png b/data/icons/btn_stop_16x16.png new file mode 100644 index 000000000..86a874de9 Binary files /dev/null and b/data/icons/btn_stop_16x16.png differ diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index b6453ac8a..eae00b549 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -578,6 +578,25 @@ int CChannelList::show() } else loop=false; } + else if( msg == CRCInput::RC_record) { //start direct recording from channellist + if(!CRecordManager::getInstance()->RecordingStatus(chanlist[selected]->channel_id)) + { + printf("[neutrino channellist] start direct recording...\n"); + CRecordManager::getInstance()->Record(chanlist[selected]->channel_id); + loop = false; + } + + } + else if( msg == CRCInput::RC_stop ) { //stopp recording + if(CRecordManager::getInstance()->RecordingStatus()) + { + if (CRecordManager::getInstance()->AskToStop(chanlist[selected]->channel_id)) + { + CRecordManager::getInstance()->Stop(chanlist[selected]->channel_id); + paint(); + } + } + } else if ((msg == CRCInput::RC_red) || (msg == CRCInput::RC_epg)) { hide(); @@ -1793,10 +1812,26 @@ void CChannelList::paintItem(int pos) } else { p_event = &chan->currentEvent; } - + + //calculating icons + int icon_x = (x+width-15-2) - RADIUS_LARGE/2; + int r_icon_h=0; int r_icon_w=0; int s_icon_h=0; int s_icon_w=0; + frameBuffer->getIconSize(NEUTRINO_ICON_SCRAMBLED, &s_icon_w, &s_icon_h); + frameBuffer->getIconSize(NEUTRINO_ICON_REC, &r_icon_w, &r_icon_h); + int r_icon_x = icon_x; + + //paint scramble icon if(chan->scrambled) - frameBuffer->paintIcon(NEUTRINO_ICON_SCRAMBLED, x+width- 15 - 28, ypos, fheight);//ypos + (fheight - 16)/2); + if (frameBuffer->paintIcon(NEUTRINO_ICON_SCRAMBLED, icon_x - s_icon_w, ypos, fheight))//ypos + (fheight - 16)/2); + r_icon_x = r_icon_x - s_icon_w; + + //paint recording icon + if (CRecordManager::getInstance()->RecordingStatus(chanlist[curr]->channel_id)) + frameBuffer->paintIcon(NEUTRINO_ICON_REC, r_icon_x - r_icon_w, ypos, fheight);//ypos + (fheight - 16)/2); + + int icon_space = r_icon_w+s_icon_w; + //number int numpos = x+5+numwidth- g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth(tmp); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->RenderString(numpos,ypos+fheight, numwidth+5, tmp, color, fheight); @@ -1816,7 +1851,8 @@ void CChannelList::paintItem(int pos) int max_desc_len = width - numwidth - prg_offset - ch_name_len - 15 - 20; // 15 = scrollbar, 20 = spaces if (chan->scrambled || (g_settings.channellist_extended ||g_settings.channellist_epgtext_align_right)) - max_desc_len -= 28; /* do we need space for the lock icon? */ + max_desc_len -= icon_space; /* do we need space for the lock/rec icon? */ + if (max_desc_len < 0) max_desc_len = 0; if ((int) ch_desc_len > max_desc_len) diff --git a/src/gui/widget/icons.h b/src/gui/widget/icons.h index 8085212bb..82a88f5bd 100644 --- a/src/gui/widget/icons.h +++ b/src/gui/widget/icons.h @@ -59,6 +59,10 @@ #define NEUTRINO_ICON_BUTTON_DOWN_SMALL "down_small" #define NEUTRINO_ICON_BUTTON_LEFT "left" +#define NEUTRINO_ICON_BUTTON_RECORD_ACTIVE_16 "btn_record_active_16x16" +#define NEUTRINO_ICON_BUTTON_RECORD_INACTIVE_16 "btn_record_inactive_16x16" +#define NEUTRINO_ICON_BUTTON_STOP_16 "btn_stop_16x16" + #define NEUTRINO_ICON_BUTTON_PLUS "plus" #define NEUTRINO_ICON_BUTTON_MINUS "minus"