From b9940103a2be950018a93dec6d6b42114ef7b64b Mon Sep 17 00:00:00 2001 From: thilo Date: Sat, 1 Oct 2011 21:11:21 +0000 Subject: [PATCH] *neutrino multirec: manage recordings also with channellist - Now you can start or stopping recordings from selected channel in channellist. - Current running recordings are marked with rec-icon in the channellist - add button icons for 'record' an 'stop' git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1719 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- data/icons/Makefile.am | 4 +++ data/icons/btn_record_active_16x16.png | Bin 0 -> 834 bytes data/icons/btn_record_inactive_16x16.png | Bin 0 -> 753 bytes data/icons/btn_stop_16x16.png | Bin 0 -> 605 bytes src/gui/channellist.cpp | 42 +++++++++++++++++++++-- src/gui/widget/icons.h | 4 +++ 6 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 data/icons/btn_record_active_16x16.png create mode 100644 data/icons/btn_record_inactive_16x16.png create mode 100644 data/icons/btn_stop_16x16.png 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 0000000000000000000000000000000000000000..d0702a94a95645b5411c293634054128d133cb9f GIT binary patch literal 834 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!6%)r1HuVsG}Nc9K!gt!{})SLO%hJ=KKhK7cP zhQ!50RysSE1O~bU<%h?lg~k;oB_yP!rlh5%WoD#iWu|9kW#s@tZf;I~eo0Dld0JX^ zN=iXNeqmvLR&HTRZe4CsQ9(gLVPRnr5R{eyK~-U4X=P+3$Ir2J1v z_+MDaVmgh(d>XIiBu0~&wRH{U4Gq;o`-MSFT*SdiClxYk+9Y+O=!fuUorr-MWn%H*VUrY4hgI+qP}nzJ2?S z9XodJ+_?*gcJ11|d-wmPOAj8{cktlBLx&EXJbCiesZ*y zzI^%W)vMR8UAuAP#{K*E-@SWx@yRqMU_9BE1o;L3rwB0gsnv)Bjp8iuh%9Dc;5!V$ zjK}j=qyVFy&(p;*q+*V4pT9R#qQJ5AYtKtljWa(^DCy9!S>htg^*TXd-Y(bWc8-DZ z>-1!~tV&n3tcVa0TGS(O^Te%^yZ?WGld_wh{^RT!KU<_QIBQX?l`u9+O+C4a2*p~?}d<(d;q z^cPs~)kwY{@|&PugU-b literal 0 HcmV?d00001 diff --git a/data/icons/btn_record_inactive_16x16.png b/data/icons/btn_record_inactive_16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..1c89e9eaabe4b5d97263bcc01bfc3d51c97fbda8 GIT binary patch literal 753 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!6%)r1HuVsG}Lt5Hz>7wE_WIQ+{-rl~xzW)CH2@@tvoH%j9#7Pq; zPXdC;lP6CBVGx))b?UTf)20K_^yxEZ%$PZI=B!z>=FFKhZ{EE5^X4sDxM0zuMT-|N zUa?}u%9SfuuU@?dh}NuGyLRomb?Y{6Sif=O#!Z_xZQi_j+qP}nw{PFEW5>>&J9h!m zu3fu#?>=~7-+==M4jw#s=+L2)Cr_R_b?Wr#(`SI_%$c)i&z?JX?&8IZmoHzwdiCnH zYu9evxN-mf{de!)Ro-g&3=DVmk|4j}|3m?X=CJ8Efm%2VJR*x382Ao@Fyrz36)C_d zWA$`#45^r-+jrXQaDYV1fBTuYJhm8$EfjMNS(P9r%Ek3A<_FWdE9@U6YZ(@nC}yne zUgp*nv?4IGYNPGWxyej(uYNGB;pvn5q4Q|khs7JJo>eSxez7C5$najpnuaJd$Jn(d ziLrgp?sdv3aXrqud4E>(iyH=6wukPWo~&|-$)eQNrBM30oYiY4if5IzHE*~!bXWE%TsvFjyE%aKm@ywpAUp$7AM}8DZzj0mO z#Vmj1%;bl2#UkYAR?WJ-Ny4q#c;aQRIwf|lK8dxRQj1gt{5&06$}T_QdBMDLr>CK* oSc-1T{6)WhPczUxy!3Cq^Uo}{lbVFVdQ&MBb@0FkDH00000 literal 0 HcmV?d00001 diff --git a/data/icons/btn_stop_16x16.png b/data/icons/btn_stop_16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..86a874de91a85150487516cb951db19b4fc157f4 GIT binary patch literal 605 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!6%)r1HuVsG}Na+Olgt!8Mo12@vySs;nho`5f zmzS5fx3`avkFT$9KtMoXU|?`?aCmrlY+PJMMn-OKZeCtqetv#IK|x_*VNp?0adB~J zX=zzmS$TPRWo2beO-*fWORXwIt>V>PoF+x#*CRWXU>{6YxeBf^XAQ)KY#wBMT?d#Tef1w zij^x@u3EKf?b@~L)~#E=e*MOc8#is*v}Mbdty{P5+O_M@p+iTG9652~#Oc$g&z?Pd z?%cWa=g(ibaN*LWOP4QSzH;TtwQJXI-MV%6?%jL$?mc<( z{Y$cTV}kxE1re3iw=Z09oqKiX_PY|b1~S@f&zmlmWtmd^v{u2ybM^O4hn}C}%X*)o zd0=PY3BALf%R_wix_Li;lGw#-F~_L*P1ky@sO0GX2m6KDmK3FK4_WhHFh0fhdTQNo ZR^1v?j;)U_<^$c$;OXk;vd$@?2>=bHBR~KE literal 0 HcmV?d00001 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"