mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
Merge remote-tracking branch 'check/next-cc'
needs some build-fixing and merge errors are likely :-(
Conflicts:
configure.ac
data/icons/start.jpg
data/locale/deutsch.locale
data/locale/unmaintained/dutch.locale
lib/libdvbsub/Makefile.am
lib/libdvbsub/dvbsubtitle.cpp
lib/libtuxtxt/Makefile.am
src/Makefile.am
src/daemonc/Makefile.am
src/driver/audiodec/Makefile.am
src/driver/framebuffer.cpp
src/driver/framebuffer.h
src/driver/pictureviewer/Makefile.am
src/driver/rcinput.cpp
src/driver/streamts.cpp
src/driver/volume.cpp
src/eitd/Makefile.am
src/gui/Makefile.am
src/gui/audioplayer.cpp
src/gui/bedit/Makefile.am
src/gui/bedit/bouqueteditor_chanselect.cpp
src/gui/bouquetlist.cpp
src/gui/channellist.cpp
src/gui/components/Makefile.am
src/gui/epgview.cpp
src/gui/eventlist.cpp
src/gui/infoviewer.cpp
src/gui/infoviewer_bb.cpp
src/gui/keybind_setup.cpp
src/gui/moviebrowser.cpp
src/gui/movieplayer.cpp
src/gui/scan.cpp
src/gui/scan_setup.cpp
src/gui/test_menu.cpp
src/gui/test_menu.h
src/gui/update.cpp
src/gui/videosettings.cpp
src/gui/widget/Makefile.am
src/gui/widget/buttons.cpp
src/gui/widget/stringinput.cpp
src/neutrino.cpp
src/nhttpd/tuxboxapi/coolstream/Makefile.am
src/system/Makefile.am
src/system/setting_helpers.cpp
src/system/settings.h
src/zapit/include/zapit/client/zapitclient.h
src/zapit/include/zapit/femanager.h
src/zapit/include/zapit/getservices.h
src/zapit/lib/zapitclient.cpp
src/zapit/src/Makefile.am
src/zapit/src/capmt.cpp
src/zapit/src/femanager.cpp
src/zapit/src/frontend.cpp
src/zapit/src/getservices.cpp
Origin commit data
------------------
Branch: ni/coolstream
Commit: 8253c4d67c
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-05-10 (Fri, 10 May 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -522,19 +522,6 @@ void CChannelList::calcSize()
|
||||
const int pic_h = 39;
|
||||
theight = std::max(theight, pic_h);
|
||||
|
||||
int icol_w, icol_h;
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_HELP, &icol_w, &icol_h);
|
||||
theight = std::max(theight, icol_h);
|
||||
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MENU, &icol_w, &icol_h);
|
||||
theight = std::max(theight, icol_h);
|
||||
|
||||
if(new_zap_mode)
|
||||
{
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE, &icol_w, &icol_h);
|
||||
theight = std::max(theight, icol_h);
|
||||
}
|
||||
|
||||
// calculate max entrys in mainbox
|
||||
listmaxshow = (height - theight - footerHeight) / fheight;
|
||||
|
||||
@@ -663,7 +650,7 @@ int CChannelList::show()
|
||||
|
||||
}
|
||||
#endif
|
||||
if(SameTP()) {
|
||||
if((g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) && SameTP()) {
|
||||
printf("[neutrino channellist] start direct recording...\n");
|
||||
hide();
|
||||
if (!CRecordManager::getInstance()->Record(chanlist[selected]->channel_id)) {
|
||||
@@ -809,8 +796,11 @@ int CChannelList::show()
|
||||
break;
|
||||
|
||||
}
|
||||
#if 0
|
||||
paintHead();
|
||||
showChannelLogo();
|
||||
#endif
|
||||
paintButtonBar(SameTP());
|
||||
}
|
||||
}
|
||||
else if (CRCInput::isNumeric(msg) && (this->historyMode || g_settings.sms_channel)) {
|
||||
@@ -893,11 +883,24 @@ int CChannelList::show()
|
||||
if(g_settings.channellist_sort_mode > SORT_MAX-1)
|
||||
g_settings.channellist_sort_mode = SORT_ALPHA;
|
||||
CNeutrinoApp::getInstance()->SetChannelMode(mode);
|
||||
oldselected = selected;
|
||||
paintHead(); // update button bar
|
||||
paint();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_PIP
|
||||
else if ((msg == CRCInput::RC_play) || (msg == (neutrino_msg_t) g_settings.key_pip_close)) {
|
||||
if(SameTP()) {
|
||||
if (CZapit::getInstance()->GetPipChannelID() == chanlist[selected]->getChannelID()) {
|
||||
g_Zapit->stopPip();
|
||||
paint();
|
||||
} else {
|
||||
if(CNeutrinoApp::getInstance()->StartPip(chanlist[selected]->getChannelID()))
|
||||
paint();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else if ((msg == CRCInput::RC_info) || (msg == CRCInput::RC_help)) {
|
||||
hide();
|
||||
CChannelEvent *p_event=NULL;
|
||||
@@ -1064,7 +1067,6 @@ bool CChannelList::adjustToChannelID(const t_channel_id channel_id, bool bToo)
|
||||
|
||||
selected_chid = channel_id;
|
||||
printf("CChannelList::adjustToChannelID me %p [%s] list size %d channel_id %" PRIx64 "\n", this, getName(), (int)chanlist.size(), channel_id);
|
||||
fflush(stdout);
|
||||
for (i = 0; i < chanlist.size(); i++) {
|
||||
if(chanlist[i] == NULL) {
|
||||
printf("CChannelList::adjustToChannelID REPORT BUG !! ******************************** %d is NULL !!\n", i);
|
||||
@@ -1074,35 +1076,55 @@ bool CChannelList::adjustToChannelID(const t_channel_id channel_id, bool bToo)
|
||||
selected = i;
|
||||
tuned = i;
|
||||
|
||||
lastChList.store (selected, channel_id, false);
|
||||
//lastChList.store (selected, channel_id, false);
|
||||
|
||||
if (bToo) {
|
||||
lastChList.store (selected, channel_id, false);
|
||||
|
||||
int old_mode = CNeutrinoApp::getInstance()->GetChannelMode();
|
||||
int new_mode = old_mode;
|
||||
bool has_channel;
|
||||
first_mode_found = -1;
|
||||
if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_tv) {
|
||||
has_channel = TVfavList->adjustToChannelID(channel_id);
|
||||
if (has_channel && first_mode_found < 0)
|
||||
first_mode_found = LIST_MODE_FAV;
|
||||
if(!has_channel && old_mode == LIST_MODE_FAV)
|
||||
new_mode = LIST_MODE_PROV;
|
||||
|
||||
has_channel = TVbouquetList->adjustToChannelID(channel_id);
|
||||
if(!has_channel && old_mode == LIST_MODE_PROV) {
|
||||
if (has_channel && first_mode_found < 0)
|
||||
first_mode_found = LIST_MODE_PROV;
|
||||
if(!has_channel && old_mode == LIST_MODE_PROV)
|
||||
new_mode = LIST_MODE_SAT;
|
||||
}
|
||||
|
||||
has_channel = TVsatList->adjustToChannelID(channel_id);
|
||||
if (has_channel && first_mode_found < 0)
|
||||
first_mode_found = LIST_MODE_SAT;
|
||||
if(!has_channel && old_mode == LIST_MODE_SAT)
|
||||
new_mode = LIST_MODE_ALL;
|
||||
|
||||
has_channel = TVallList->adjustToChannelID(channel_id);
|
||||
}
|
||||
else if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio) {
|
||||
has_channel = RADIOfavList->adjustToChannelID(channel_id);
|
||||
if (has_channel && first_mode_found < 0)
|
||||
first_mode_found = LIST_MODE_FAV;
|
||||
if(!has_channel && old_mode == LIST_MODE_FAV)
|
||||
new_mode = LIST_MODE_PROV;
|
||||
|
||||
has_channel = RADIObouquetList->adjustToChannelID(channel_id);
|
||||
if (has_channel && first_mode_found < 0)
|
||||
first_mode_found = LIST_MODE_PROV;
|
||||
if(!has_channel && old_mode == LIST_MODE_PROV)
|
||||
new_mode = LIST_MODE_SAT;
|
||||
|
||||
has_channel = RADIOsatList->adjustToChannelID(channel_id);
|
||||
if (has_channel && first_mode_found < 0)
|
||||
first_mode_found = LIST_MODE_SAT;
|
||||
if(!has_channel && old_mode == LIST_MODE_SAT)
|
||||
new_mode = LIST_MODE_ALL;
|
||||
|
||||
has_channel = RADIOallList->adjustToChannelID(channel_id);
|
||||
}
|
||||
if(old_mode != new_mode)
|
||||
@@ -1155,12 +1177,12 @@ void CChannelList::setSelected( int nChannelNr)
|
||||
}
|
||||
|
||||
// -- Zap to channel with channel_id
|
||||
bool CChannelList::zapTo_ChannelID(const t_channel_id channel_id)
|
||||
bool CChannelList::zapTo_ChannelID(const t_channel_id channel_id, bool force)
|
||||
{
|
||||
printf("**************************** CChannelList::zapTo_ChannelID %" PRIx64 "\n", channel_id);
|
||||
for (unsigned int i = 0; i < chanlist.size(); i++) {
|
||||
if (chanlist[i]->channel_id == channel_id) {
|
||||
zapTo(i);
|
||||
zapTo(i, force);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1178,7 +1200,7 @@ bool CChannelList::showEmptyError()
|
||||
|
||||
/* forceStoreToLastChannels defaults to false */
|
||||
/* TODO make this private to call only from "current" list, where selected/pos not means channel number */
|
||||
void CChannelList::zapTo(int pos, bool /* forceStoreToLastChannels */)
|
||||
void CChannelList::zapTo(int pos, bool force)
|
||||
{
|
||||
if(showEmptyError())
|
||||
return;
|
||||
@@ -1188,7 +1210,7 @@ void CChannelList::zapTo(int pos, bool /* forceStoreToLastChannels */)
|
||||
}
|
||||
CZapitChannel* chan = chanlist[pos];
|
||||
|
||||
zapToChannel(chan);
|
||||
zapToChannel(chan, force);
|
||||
tuned = pos;
|
||||
if(new_zap_mode == 2 /* active */)
|
||||
selected_in_new_mode = pos;
|
||||
@@ -1197,7 +1219,7 @@ void CChannelList::zapTo(int pos, bool /* forceStoreToLastChannels */)
|
||||
}
|
||||
|
||||
/* to replace zapTo_ChannelID and zapTo from "whole" list ? */
|
||||
void CChannelList::zapToChannel(CZapitChannel *channel)
|
||||
void CChannelList::zapToChannel(CZapitChannel *channel, bool force)
|
||||
{
|
||||
if(showEmptyError())
|
||||
return;
|
||||
@@ -1215,7 +1237,7 @@ void CChannelList::zapToChannel(CZapitChannel *channel)
|
||||
if(tuned < chanlist.size())
|
||||
selected_chid = chanlist[tuned]->getChannelID();
|
||||
|
||||
if(selected_chid != channel->getChannelID()) {
|
||||
if(force || (selected_chid != channel->getChannelID())) {
|
||||
if ((g_settings.radiotext_enable) && ((CNeutrinoApp::getInstance()->getMode()) == NeutrinoMessages::mode_radio) && (g_Radiotext))
|
||||
{
|
||||
// stop radiotext PES decoding before zapping
|
||||
@@ -1260,12 +1282,12 @@ int CChannelList::numericZap(int key)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
if ((key == g_settings.key_zaphistory) || (key == CRCInput::RC_games)) {
|
||||
if((!autoshift && CNeutrinoApp::getInstance()->recordingstatus) || (key == CRCInput::RC_games)) {
|
||||
if ((key == g_settings.key_zaphistory) || (key == g_settings.key_current_transponder)) {
|
||||
if((!autoshift && CNeutrinoApp::getInstance()->recordingstatus) || (key == g_settings.key_current_transponder)) {
|
||||
CChannelList * orgList = CNeutrinoApp::getInstance()->channelList;
|
||||
CChannelList * channelList = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_CURRENT_TP), false, true);
|
||||
|
||||
if(key == CRCInput::RC_games) {
|
||||
if(key == g_settings.key_current_transponder) {
|
||||
t_channel_id recid = chanlist[selected]->channel_id >> 16;
|
||||
for ( unsigned int i = 0 ; i < orgList->chanlist.size(); i++) {
|
||||
if((orgList->chanlist[i]->channel_id >> 16) == recid)
|
||||
@@ -1393,6 +1415,10 @@ int CChannelList::numericZap(int key)
|
||||
|
||||
if(chan && SameTP(chan)) {
|
||||
zapToChannel(chan);
|
||||
if (g_settings.channellist_numeric_adjust && first_mode_found >= 0) {
|
||||
CNeutrinoApp::getInstance()->SetChannelMode(first_mode_found);
|
||||
CNeutrinoApp::getInstance()->channelList->getLastChannels().set_mode(chan->channel_id);
|
||||
}
|
||||
res = 0;
|
||||
} else
|
||||
g_InfoViewer->killTitle();
|
||||
@@ -1549,7 +1575,8 @@ void CChannelList::paintDetails(int index)
|
||||
p_event = &chanlist[index]->currentEvent;
|
||||
}
|
||||
|
||||
frameBuffer->paintBoxRel(x+2, y + height + 2, full_width-4, info_height - 4, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE);//round
|
||||
frameBuffer->paintBoxRel(x+1, y + height + 1, full_width-2, info_height - 2, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE);//round
|
||||
frameBuffer->paintBoxFrame(x, y + height, full_width, info_height, 2, COL_MENUCONTENT_PLUS_6, RADIUS_LARGE);
|
||||
|
||||
if (!p_event->description.empty()) {
|
||||
char cNoch[50] = {0}; // UTF-8
|
||||
@@ -1654,32 +1681,20 @@ void CChannelList::clearItem2DetailsLine()
|
||||
void CChannelList::paintItem2DetailsLine (int pos)
|
||||
{
|
||||
int xpos = x - ConnectLineBox_Width;
|
||||
int ypos1 = y + theight + pos*fheight;
|
||||
int ypos2 = y + height;
|
||||
int ypos1a = ypos1 + (fheight/2)-2;
|
||||
int ypos2a = ypos2 + (info_height/2)-2;
|
||||
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
|
||||
int ypos1 = y + theight + pos*fheight + (fheight/2)-2;
|
||||
int ypos2 = y + height + (info_height/2)-2;
|
||||
|
||||
if (dline){
|
||||
dline->kill(); //kill details line
|
||||
delete dline;
|
||||
dline = NULL;
|
||||
}
|
||||
// // Clear
|
||||
// frameBuffer->paintBackgroundBoxRel(xpos,y, ConnectLineBox_Width, height+info_height + 1);
|
||||
|
||||
// paint Line if detail info (and not valid list pos)
|
||||
if (pos >= 0) { //pos >= 0 && chanlist[ch_index]->currentEvent.description != "") {
|
||||
if(1) // FIXME why -> ? (!g_settings.channellist_extended)
|
||||
{
|
||||
//details line
|
||||
if (dline == NULL)
|
||||
dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, fheight/2+1, info_height-RADIUS_LARGE*2);
|
||||
dline->paint();
|
||||
|
||||
//info box frame
|
||||
frameBuffer->paintBoxFrame(x, ypos2, full_width, info_height, 2, col1, RADIUS_LARGE);
|
||||
}
|
||||
if (pos >= 0) {
|
||||
if (dline == NULL)
|
||||
dline = new CComponentsDetailLine(xpos, ypos1, ypos2, fheight/2+1, info_height-RADIUS_LARGE*2);
|
||||
dline->paint();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1700,107 +1715,115 @@ void CChannelList::showChannelLogo()
|
||||
}
|
||||
}
|
||||
|
||||
#define NUM_LIST_BUTTONS 4
|
||||
struct button_label SChannelListButtons[NUM_LIST_BUTTONS] =
|
||||
{
|
||||
{ NEUTRINO_ICON_BUTTON_RED, LOCALE_INFOVIEWER_EVENTLIST},
|
||||
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_BOUQUETLIST_HEAD},
|
||||
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_INFOVIEWER_NEXT},
|
||||
{ NEUTRINO_ICON_BUTTON_RECORD_INACTIVE, NONEXISTANT_LOCALE}
|
||||
};
|
||||
#define NUM_LIST_BUTTONS_SORT 5
|
||||
#define NUM_LIST_BUTTONS_SORT 9
|
||||
struct button_label SChannelListButtons_SMode[NUM_LIST_BUTTONS_SORT] =
|
||||
{
|
||||
{ NEUTRINO_ICON_BUTTON_RED, LOCALE_INFOVIEWER_EVENTLIST},
|
||||
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_CHANNELLIST_FOOT_SORT_ALPHA},
|
||||
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_BOUQUETLIST_HEAD},
|
||||
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_INFOVIEWER_NEXT},
|
||||
{ NEUTRINO_ICON_BUTTON_RECORD_INACTIVE, NONEXISTANT_LOCALE}
|
||||
{ NEUTRINO_ICON_BUTTON_RED, LOCALE_INFOVIEWER_EVENTLIST},
|
||||
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_CHANNELLIST_FOOT_SORT_ALPHA},
|
||||
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_BOUQUETLIST_HEAD},
|
||||
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_INFOVIEWER_NEXT},
|
||||
{ NEUTRINO_ICON_BUTTON_RECORD_INACTIVE, NONEXISTANT_LOCALE},
|
||||
{ NEUTRINO_ICON_BUTTON_PLAY, LOCALE_EXTRA_KEY_PIP_CLOSE},
|
||||
{ NEUTRINO_ICON_BUTTON_INFO, NONEXISTANT_LOCALE},
|
||||
{ NEUTRINO_ICON_BUTTON_MENU, NONEXISTANT_LOCALE},
|
||||
{ NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE, NONEXISTANT_LOCALE}
|
||||
};
|
||||
|
||||
void CChannelList::paintButtonBar(bool is_current)
|
||||
{
|
||||
//printf("[neutrino channellist] %s...%d, selected %d\n", __FUNCTION__, __LINE__, selected);
|
||||
unsigned int smode = CNeutrinoApp::getInstance()->GetChannelMode();
|
||||
int num_buttons = smode != LIST_MODE_FAV ? NUM_LIST_BUTTONS_SORT : NUM_LIST_BUTTONS;
|
||||
|
||||
#if 0
|
||||
int num_buttons = smode != LIST_MODE_FAV ? NUM_LIST_BUTTONS_SORT : NUM_LIST_BUTTONS;
|
||||
struct button_label Button[num_buttons];
|
||||
const neutrino_locale_t button_ids[] = {LOCALE_INFOVIEWER_NOW,LOCALE_INFOVIEWER_NEXT,LOCALE_MAINMENU_RECORDING,LOCALE_MAINMENU_RECORDING_STOP,NONEXISTANT_LOCALE,
|
||||
const neutrino_locale_t button_ids[] = {LOCALE_INFOVIEWER_NOW,LOCALE_INFOVIEWER_NEXT,LOCALE_MAINMENU_RECORDING,LOCALE_MAINMENU_RECORDING_STOP,LOCALE_EXTRA_KEY_PIP_CLOSE,
|
||||
LOCALE_CHANNELLIST_FOOT_SORT_ALPHA,LOCALE_CHANNELLIST_FOOT_SORT_FREQ,LOCALE_CHANNELLIST_FOOT_SORT_SAT,LOCALE_CHANNELLIST_FOOT_SORT_CHNUM};
|
||||
const std::vector<neutrino_locale_t> buttonID_rest (button_ids, button_ids + sizeof(button_ids) / sizeof(neutrino_locale_t) );
|
||||
|
||||
for (int i = 0;i<num_buttons;i++)
|
||||
{
|
||||
if(smode)
|
||||
Button[i] = SChannelListButtons_SMode[i];
|
||||
else
|
||||
Button[i] = SChannelListButtons[i];
|
||||
}
|
||||
|
||||
int Bindex = 2 + (smode ? 1:0);
|
||||
|
||||
//manage now/next button
|
||||
if (g_settings.channellist_additional)
|
||||
{
|
||||
if (displayList)
|
||||
Button[Bindex].locale = LOCALE_FONTSIZE_CHANNELLIST_DESCR;
|
||||
else
|
||||
Button[Bindex].locale = LOCALE_FONTMENU_EVENTLIST;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (displayNext)
|
||||
Button[Bindex].locale = LOCALE_INFOVIEWER_NOW;
|
||||
else
|
||||
Button[Bindex].locale = LOCALE_INFOVIEWER_NEXT;
|
||||
}
|
||||
|
||||
Bindex++;
|
||||
//manage record button
|
||||
#endif
|
||||
struct button_label Button[NUM_LIST_BUTTONS_SORT];
|
||||
bool do_record = CRecordManager::getInstance()->RecordingStatus(getActiveChannel_ChannelID());
|
||||
|
||||
if (g_settings.recording_type != RECORDING_OFF && !displayNext){
|
||||
if (is_current && !do_record){
|
||||
Button[Bindex].locale = LOCALE_MAINMENU_RECORDING;
|
||||
Button[Bindex].button = NEUTRINO_ICON_BUTTON_RECORD_ACTIVE;
|
||||
}else if (do_record){
|
||||
Button[Bindex].locale = LOCALE_MAINMENU_RECORDING_STOP;
|
||||
Button[Bindex].button = NEUTRINO_ICON_BUTTON_STOP;
|
||||
}else{
|
||||
Button[Bindex].locale = NONEXISTANT_LOCALE;
|
||||
Button[Bindex].button = NEUTRINO_ICON_BUTTON_RECORD_INACTIVE;
|
||||
int bcnt = 0;
|
||||
for (int i = 0; i < NUM_LIST_BUTTONS_SORT; i++) {
|
||||
Button[bcnt] = SChannelListButtons_SMode[i];
|
||||
if (i == 1) {
|
||||
/* check green / sort */
|
||||
if(smode) {
|
||||
switch (g_settings.channellist_sort_mode) {
|
||||
case SORT_ALPHA:
|
||||
Button[bcnt].locale = LOCALE_CHANNELLIST_FOOT_SORT_ALPHA;
|
||||
break;
|
||||
case SORT_TP:
|
||||
Button[bcnt].locale = LOCALE_CHANNELLIST_FOOT_SORT_FREQ;
|
||||
break;
|
||||
case SORT_SAT:
|
||||
Button[bcnt].locale = LOCALE_CHANNELLIST_FOOT_SORT_SAT;
|
||||
break;
|
||||
case SORT_CH_NUMBER:
|
||||
Button[bcnt].locale = LOCALE_CHANNELLIST_FOOT_SORT_CHNUM;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if(smode)
|
||||
{
|
||||
switch (g_settings.channellist_sort_mode)
|
||||
{
|
||||
case SORT_ALPHA:
|
||||
Button[1].locale = LOCALE_CHANNELLIST_FOOT_SORT_ALPHA;
|
||||
break;
|
||||
case SORT_TP:
|
||||
Button[1].locale = LOCALE_CHANNELLIST_FOOT_SORT_FREQ;
|
||||
break;
|
||||
case SORT_SAT:
|
||||
Button[1].locale = LOCALE_CHANNELLIST_FOOT_SORT_SAT;
|
||||
break;
|
||||
case SORT_CH_NUMBER:
|
||||
Button[1].locale = LOCALE_CHANNELLIST_FOOT_SORT_CHNUM;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (i == 3) {
|
||||
//manage now/next button
|
||||
if (g_settings.channellist_additional) {
|
||||
if (displayList)
|
||||
Button[bcnt].locale = LOCALE_FONTSIZE_CHANNELLIST_DESCR;
|
||||
else
|
||||
Button[bcnt].locale = LOCALE_FONTMENU_EVENTLIST;
|
||||
} else {
|
||||
if (displayNext)
|
||||
Button[bcnt].locale = LOCALE_INFOVIEWER_NOW;
|
||||
else
|
||||
Button[bcnt].locale = LOCALE_INFOVIEWER_NEXT;
|
||||
}
|
||||
}
|
||||
if (i == 4) {
|
||||
//manage record button
|
||||
if (g_settings.recording_type == RECORDING_OFF)
|
||||
continue;
|
||||
if (!displayNext){
|
||||
if (do_record){
|
||||
Button[bcnt].locale = LOCALE_MAINMENU_RECORDING_STOP;
|
||||
Button[bcnt].button = NEUTRINO_ICON_BUTTON_STOP;
|
||||
} else if (is_current) {
|
||||
Button[bcnt].locale = LOCALE_MAINMENU_RECORDING;
|
||||
Button[bcnt].button = NEUTRINO_ICON_BUTTON_RECORD_ACTIVE;
|
||||
} else {
|
||||
Button[bcnt].locale = NONEXISTANT_LOCALE;
|
||||
Button[bcnt].button = NEUTRINO_ICON_BUTTON_RECORD_INACTIVE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i == 5) {
|
||||
//manage pip button
|
||||
#ifdef ENABLE_PIP
|
||||
if (!is_current)
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == 8) {
|
||||
/* check mute / zap mode */
|
||||
if (new_zap_mode)
|
||||
Button[bcnt].button = new_zap_mode == 2 /* active */ ?
|
||||
NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE : NEUTRINO_ICON_BUTTON_MUTE_ZAP_INACTIVE;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
bcnt++;
|
||||
}
|
||||
//paint buttons
|
||||
int y_foot = y + (height - footerHeight);
|
||||
#if 0
|
||||
::paintButtons(x, y_foot, full_width,num_buttons, Button, footerHeight,0,false,COL_INFOBAR_SHADOW,NULL,0,true, buttonID_rest);
|
||||
#endif
|
||||
::paintButtons(x, y_foot, full_width, num_buttons, Button, full_width, footerHeight);
|
||||
::paintButtons(x, y_foot, full_width, bcnt, Button, full_width, footerHeight);
|
||||
}
|
||||
|
||||
void CChannelList::paintItem(int pos)
|
||||
void CChannelList::paintItem(int pos, const bool firstpaint)
|
||||
{
|
||||
int ypos = y+ theight + pos*fheight;
|
||||
uint8_t color;
|
||||
@@ -1809,7 +1832,7 @@ void CChannelList::paintItem(int pos)
|
||||
bool paintbuttons = false;
|
||||
unsigned int curr = liststart + pos;
|
||||
int rec_mode;
|
||||
|
||||
fb_pixel_t c_rad_small = 0;
|
||||
#if 0
|
||||
if(CNeutrinoApp::getInstance()->recordingstatus && !autoshift && curr < chanlist.size()) {
|
||||
iscurrent = (chanlist[curr]->channel_id >> 16) == (rec_channel_id >> 16);
|
||||
@@ -1824,12 +1847,15 @@ void CChannelList::paintItem(int pos)
|
||||
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
|
||||
paintItem2DetailsLine (pos);
|
||||
paintDetails(curr);
|
||||
frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, RADIUS_LARGE);
|
||||
c_rad_small = RADIUS_LARGE;
|
||||
paintbuttons = true;
|
||||
} else {
|
||||
color = iscurrent ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE;
|
||||
bgcolor = iscurrent ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0;
|
||||
frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, 0);
|
||||
}
|
||||
|
||||
if(!firstpaint || (curr == selected)){
|
||||
frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, c_rad_small);
|
||||
}
|
||||
|
||||
if(curr < chanlist.size()) {
|
||||
@@ -1890,12 +1916,19 @@ void CChannelList::paintItem(int pos)
|
||||
rec_mode = CRecordManager::getInstance()->GetRecordMode(chanlist[curr]->channel_id);
|
||||
|
||||
//set recording icon
|
||||
const char * rec_icon = "";
|
||||
std::string rec_icon;
|
||||
if (rec_mode & CRecordManager::RECMODE_REC)
|
||||
rec_icon = NEUTRINO_ICON_REC;
|
||||
else if (rec_mode & CRecordManager::RECMODE_TSHIFT)
|
||||
rec_icon = NEUTRINO_ICON_AUTO_SHIFT;
|
||||
|
||||
#ifdef ENABLE_PIP
|
||||
else if (chanlist[curr]->channel_id == CZapit::getInstance()->GetPipChannelID()) {
|
||||
int h;
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_PIP, &ChannelList_Rec, &h);
|
||||
rec_icon = NEUTRINO_ICON_PIP;
|
||||
ChannelList_Rec += 8;
|
||||
}
|
||||
#endif
|
||||
//calculating icons
|
||||
int icon_x = (x+width-15-2) - RADIUS_LARGE/2;
|
||||
int r_icon_w=0; int s_icon_h=0; int s_icon_w=0;
|
||||
@@ -1909,7 +1942,8 @@ void CChannelList::paintItem(int pos)
|
||||
r_icon_x = r_icon_x - s_icon_w;
|
||||
|
||||
//paint recording icon
|
||||
if (rec_mode != CRecordManager::RECMODE_OFF)
|
||||
//if (rec_mode != CRecordManager::RECMODE_OFF)
|
||||
if (!rec_icon.empty())
|
||||
frameBuffer->paintIcon(rec_icon, r_icon_x - r_icon_w, ypos, fheight);//ypos + (fheight - 16)/2);
|
||||
|
||||
//paint buttons
|
||||
@@ -2027,7 +2061,7 @@ void CChannelList::paintHead()
|
||||
strftime(timestr, 10, "%H:%M", tm);
|
||||
timestr_len = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(timestr, true); // UTF-8
|
||||
}
|
||||
|
||||
#if 0
|
||||
int iw1, iw2, iw3, ih = 0;
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_INFO, &iw1, &ih);
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MENU, &iw2, &ih);
|
||||
@@ -2054,6 +2088,13 @@ void CChannelList::paintHead()
|
||||
timestr_len += iw1 + iw2 + 12;
|
||||
if (new_zap_mode)
|
||||
timestr_len += iw3 + 10;
|
||||
#endif
|
||||
frameBuffer->paintBoxRel(x,y, full_width,theight+0, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round
|
||||
if (gotTime) {
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + full_width - timestr_len - 10,
|
||||
y+theight, timestr_len, timestr, COL_MENUHEAD, 0, true); // UTF-8
|
||||
timestr_len += 4;
|
||||
}
|
||||
logo_off = timestr_len + 10;
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, full_width - timestr_len, name, COL_MENUHEAD, 0, true); // UTF-8
|
||||
}
|
||||
@@ -2072,7 +2113,7 @@ void CChannelList::paint()
|
||||
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);
|
||||
paintItem(count, true);
|
||||
}
|
||||
const int ypos = y+ theight;
|
||||
const int sb = height - theight - footerHeight; // paint scrollbar over full height of main box
|
||||
@@ -2089,12 +2130,18 @@ void CChannelList::paint()
|
||||
// paint box for miniTV again - important!
|
||||
frameBuffer->paintBoxRel(x+width, y+theight , pig_width, pig_height, COL_MENUCONTENT_PLUS_0);
|
||||
// 5px offset - same value as in list below
|
||||
#if 0
|
||||
/* focus: its possible now to scale video with still image, but on nevis
|
||||
artifacts possible on SD osd */
|
||||
paint_pig(x+width+5, y+theight+5, pig_width-10, pig_height-10);
|
||||
#else
|
||||
if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_tv) {
|
||||
paint_pig(x+width+5, y+theight+5, pig_width-10, pig_height-10);
|
||||
}
|
||||
else if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio) {
|
||||
g_PicViewer->DisplayImage(DATADIR "/neutrino/icons/radiomode.jpg", x+width+5, y+theight+5, pig_width-10, pig_height-10, frameBuffer->TM_NONE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user