mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
Merge branch 'check/next-cc'
it compiles, but is not really tested...
Conflicts:
src/driver/netfile.cpp
src/driver/volume.cpp
src/eitd/sectionsd.cpp
src/gui/audioplayer.cpp
src/gui/bedit/bouqueteditor_bouquets.cpp
src/gui/bedit/bouqueteditor_channels.cpp
src/gui/bookmarkmanager.cpp
src/gui/bouquetlist.cpp
src/gui/eventlist.cpp
src/gui/movieplayer.cpp
src/gui/pictureviewer.cpp
src/gui/scan.cpp
src/gui/test_menu.h
src/gui/timerlist.cpp
src/gui/update.cpp
src/gui/widget/listbox.cpp
src/neutrino.cpp
src/system/flashtool.cpp
src/zapit/src/Makefile.am
src/zapit/src/femanager.cpp
Origin commit data
------------------
Branch: ni/coolstream
Commit: d5d5a60261
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-06-16 (Sun, 16 Jun 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
#include <gui/widget/messagebox.h>
|
||||
#include <gui/components/cc_item_progressbar.h>
|
||||
#include <gui/components/cc.h>
|
||||
#include <gui/components/cc_frm.h>
|
||||
|
||||
#include <system/settings.h>
|
||||
#include <gui/customcolor.h>
|
||||
@@ -95,6 +96,9 @@ extern int old_b_id;
|
||||
|
||||
extern cVideo * videoDecoder;
|
||||
|
||||
static CComponentsFrmClock *headerClock = NULL;
|
||||
static int headerClockWidth = 0;
|
||||
|
||||
CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vlist)
|
||||
{
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
@@ -118,6 +122,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl
|
||||
previous_channellist_additional = -1;
|
||||
eventFont = SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT;
|
||||
dline = NULL;
|
||||
logo_off = 0;
|
||||
//printf("************ NEW LIST %s : %x\n", name.c_str(), (int) this);fflush(stdout);
|
||||
}
|
||||
|
||||
@@ -126,6 +131,15 @@ CChannelList::~CChannelList()
|
||||
//printf("************ DELETE LIST %s : %x\n", name.c_str(), this);fflush(stdout);
|
||||
chanlist.clear();
|
||||
delete dline;
|
||||
if (headerClock) {
|
||||
headerClock->Stop();
|
||||
if (headerClock->isPainted())
|
||||
headerClock->hide();
|
||||
if (headerClock->isClockRun())
|
||||
headerClock->stopThread();
|
||||
delete headerClock;
|
||||
headerClock = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void CChannelList::ClearList(void)
|
||||
@@ -571,6 +585,11 @@ bool CChannelList::updateSelection(int newpos)
|
||||
/* return: >= 0 to zap, -1 on cancel, -3 on list mode change, -4 list edited, -2 zap but no restore old list/chan ?? */
|
||||
int CChannelList::show()
|
||||
{
|
||||
int res = -1;
|
||||
if (chanlist.empty()) {
|
||||
return res;
|
||||
}
|
||||
|
||||
/* temporary debugging stuff */
|
||||
struct timeval t1, t2;
|
||||
gettimeofday(&t1, NULL);
|
||||
@@ -578,10 +597,6 @@ int CChannelList::show()
|
||||
neutrino_msg_t msg;
|
||||
neutrino_msg_data_t data;
|
||||
bool actzap = 0;
|
||||
int res = -1;
|
||||
if (chanlist.empty()) {
|
||||
return res;
|
||||
}
|
||||
|
||||
new_zap_mode = g_settings.channellist_new_zap_mode;
|
||||
|
||||
@@ -927,13 +942,14 @@ int CChannelList::show()
|
||||
}
|
||||
frameBuffer->blit();
|
||||
}
|
||||
if (g_settings.channellist_new_zap_mode != new_zap_mode)
|
||||
g_settings.channellist_new_zap_mode = new_zap_mode;
|
||||
new_zap_mode = 0;
|
||||
|
||||
if (bouquet_changed)
|
||||
res = -5; /* in neutrino.cpp: -5 == "don't change bouquet after adding a channel to fav" */
|
||||
if(!dont_hide){
|
||||
if (new_zap_mode && (g_settings.channellist_new_zap_mode != new_zap_mode))
|
||||
g_settings.channellist_new_zap_mode = new_zap_mode;
|
||||
new_zap_mode = 0;
|
||||
|
||||
hide();
|
||||
fader.Stop();
|
||||
}
|
||||
@@ -943,6 +959,9 @@ int CChannelList::show()
|
||||
printf("CChannelList:: bouquetList->exec res %d\n", res);
|
||||
}
|
||||
|
||||
if (headerClock)
|
||||
headerClock->Stop();
|
||||
|
||||
if(NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode())
|
||||
return -1;
|
||||
|
||||
@@ -961,6 +980,11 @@ void CChannelList::hide()
|
||||
{
|
||||
videoDecoder->Pig(-1, -1, -1, -1);
|
||||
}
|
||||
if (headerClock) {
|
||||
headerClock->Stop();
|
||||
if (headerClock->isPainted())
|
||||
headerClock->hide();
|
||||
}
|
||||
frameBuffer->paintBackgroundBoxRel(x, y, full_width, height + info_height);
|
||||
clearItem2DetailsLine();
|
||||
frameBuffer->blit();
|
||||
@@ -1261,11 +1285,7 @@ void CChannelList::zapToChannel(CZapitChannel *channel, bool force)
|
||||
/* Called only from "all" channel list */
|
||||
int CChannelList::numericZap(int key)
|
||||
{
|
||||
neutrino_msg_t msg;
|
||||
neutrino_msg_data_t data;
|
||||
|
||||
int res = -1;
|
||||
|
||||
if(showEmptyError())
|
||||
return res;
|
||||
|
||||
@@ -1341,6 +1361,8 @@ int CChannelList::numericZap(int key)
|
||||
int lastchan= -1;
|
||||
bool doZap = false;
|
||||
bool showEPG = false;
|
||||
neutrino_msg_t msg;
|
||||
neutrino_msg_data_t data;
|
||||
|
||||
while(1) {
|
||||
if (lastchan != chn) {
|
||||
@@ -1482,12 +1504,12 @@ CZapitChannel* CChannelList::getPrevNextChannel(int key, unsigned int &sl)
|
||||
|
||||
void CChannelList::virtual_zap_mode(bool up)
|
||||
{
|
||||
neutrino_msg_t msg;
|
||||
neutrino_msg_data_t data;
|
||||
|
||||
if(showEmptyError())
|
||||
return;
|
||||
|
||||
neutrino_msg_t msg;
|
||||
neutrino_msg_data_t data;
|
||||
|
||||
unsigned int sl = selected;
|
||||
int old_bactive = bouquetList->getActiveBouquetNumber();
|
||||
int bactive = old_bactive;
|
||||
@@ -1544,17 +1566,21 @@ void CChannelList::virtual_zap_mode(bool up)
|
||||
}
|
||||
}
|
||||
|
||||
void CChannelList::quickZap(int key, bool /* cycle */)
|
||||
bool CChannelList::quickZap(int key, bool /* cycle */)
|
||||
{
|
||||
if(chanlist.empty())
|
||||
return;
|
||||
return true;
|
||||
|
||||
unsigned int sl = selected;
|
||||
/* here selected value doesnt matter, zap will do adjust */
|
||||
CZapitChannel* channel = getPrevNextChannel(key, sl);
|
||||
if(channel)
|
||||
bool ret = false;
|
||||
if(channel && SameTP(channel)) {
|
||||
CNeutrinoApp::getInstance()->channelList->zapToChannel(channel);
|
||||
ret = true;
|
||||
}
|
||||
g_RCInput->clearRCMsg(); //FIXME test for n.103
|
||||
return ret;
|
||||
}
|
||||
|
||||
void CChannelList::paintDetails(int index)
|
||||
@@ -1729,8 +1755,8 @@ struct button_label SChannelListButtons_SMode[NUM_LIST_BUTTONS_SORT] =
|
||||
{ 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_INFO_SMALL, NONEXISTANT_LOCALE},
|
||||
{ NEUTRINO_ICON_BUTTON_MENU_SMALL, NONEXISTANT_LOCALE},
|
||||
{ NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE, NONEXISTANT_LOCALE}
|
||||
};
|
||||
|
||||
@@ -2055,53 +2081,31 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
|
||||
|
||||
void CChannelList::paintHead()
|
||||
{
|
||||
int timestr_len = 0;
|
||||
char timestr[10] = {0};
|
||||
time_t now = time(NULL);
|
||||
struct tm *tm = localtime(&now);
|
||||
CComponentsHeader header(x, y, full_width, theight, name, NULL /*no header icon*/);
|
||||
header.paint(CC_SAVE_SCREEN_NO);
|
||||
|
||||
bool gotTime = g_Sectionsd->getIsTimeSet();
|
||||
if (g_Sectionsd->getIsTimeSet()) {
|
||||
if (headerClock == NULL) {
|
||||
headerClock = new CComponentsFrmClock(0, 0, 0, 0, "%H:%M");
|
||||
headerClock->setClockIntervall(10);
|
||||
headerClock->setClockFontType(SNeutrinoSettings::FONT_TYPE_MENU_TITLE);
|
||||
headerClock->setCornerRadius(RADIUS_LARGE);
|
||||
headerClock->setCornerType(CORNER_TOP_RIGHT);
|
||||
}
|
||||
headerClock->setYPos(y);
|
||||
headerClock->setHeight(theight);
|
||||
headerClock->setTextColor(COL_MENUHEAD);
|
||||
headerClock->setColorBody(COL_MENUHEAD_PLUS_0);
|
||||
headerClock->refresh();
|
||||
headerClockWidth = headerClock->getWidth();
|
||||
headerClock->setXPos(x + full_width - headerClockWidth - 10);
|
||||
headerClockWidth += 6;
|
||||
|
||||
if(gotTime) {
|
||||
strftime(timestr, 10, "%H:%M", tm);
|
||||
timestr_len = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(timestr, true); // UTF-8
|
||||
headerClock->Start();
|
||||
}
|
||||
#if 0
|
||||
int iw1, iw2, iw3, ih = 0;
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_INFO, &iw1, &ih);
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MENU, &iw2, &ih);
|
||||
if (new_zap_mode)
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE, &iw3, &ih);
|
||||
|
||||
// head
|
||||
frameBuffer->paintBoxRel(x,y, full_width,theight+0, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round
|
||||
|
||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_INFO, x + full_width - iw1 - 10, y, theight); //y+ 5 );
|
||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MENU, x + full_width - iw1 - iw2 - 14, y, theight);//y + 5); // icon for bouquet list button
|
||||
if (new_zap_mode)
|
||||
frameBuffer->paintIcon((new_zap_mode == 2 /* active */) ?
|
||||
NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE : NEUTRINO_ICON_BUTTON_MUTE_ZAP_INACTIVE,
|
||||
x + full_width - iw1 - iw2 - iw3 - 18, y, theight);
|
||||
|
||||
if (gotTime) {
|
||||
int iw3x = (new_zap_mode) ? iw3 : -10;
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + full_width - iw1 - iw2 - iw3x - 28 -timestr_len,
|
||||
y+theight, timestr_len, timestr, COL_MENUHEAD, 0, true); // UTF-8
|
||||
timestr_len += 4;
|
||||
}
|
||||
|
||||
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
|
||||
else
|
||||
headerClockWidth = 0;
|
||||
logo_off = headerClockWidth + 10;
|
||||
}
|
||||
|
||||
void CChannelList::paint()
|
||||
|
Reference in New Issue
Block a user