Thread: [Commits] : Tuxbox-GIT: apps branch master updated. CVS-Final-202-g748ac5f
Tuxbox Sources
Brought to you by:
dbt1
|
From: Thilo G. <tux...@ne...> - 2013-06-23 18:42:33
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 748ac5faf482b3a475f75530f972074d8e724bad (commit)
via ca75825eda2c655bbbfa44ff7720061e6e81c24a (commit)
via e3067794a3d9cacc8eef78134abcadf7bb238780 (commit)
via 44e467d2069f39618e488cacdbeb8071c76e3436 (commit)
via e825376f3a58902806c4cf96e278bb49b039211f (commit)
via be9752cd5487884fca4bd20d43b849eefeba1b4e (commit)
via a744299f0b646b36c6a1e1d185d76efd7fdcd4eb (commit)
via 98515b993e9fd66795b9e4e83f29d9a914fc4ae0 (commit)
via 8d66985acb23003f08c2adffb5a88208c9220dff (commit)
via 758d8b7e1c3a50b5545aedca33f090045c7063b8 (commit)
via a08eebdc9b737e9987da12a6b906d5f74542303f (commit)
via d680e1d391ea0433d9d979858ca63f3151574f85 (commit)
via e70d4041d96883016bc1a4efe40853194f13ccf6 (commit)
from 2577990c6e8effa45d04738e87c8082cf3ffe52d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 748ac5faf482b3a475f75530f972074d8e724bad
Author: Christian Schuett <Gau...@ho...>
Date: Mon Jun 17 22:42:08 2013 +0200
Neutrino CMenuWidget: move duplicate code into new method updateSelection()
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 0d16b68..99a7d30 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -430,27 +430,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
else
pos = (selected + count) % items.size();
- CMenuItem* item = items[pos];
-
- if (item->isSelectable())
- {
- if ((pos < page_start[current_page + 1]) &&
- (pos >= page_start[current_page]))
- { // Item is currently on screen
- //clear prev. selected
- items[selected]->paint(false);
- //select new
- item->paint(true);
- selected = pos;
- break;
- }
- else
- {
- selected = pos;
- paintItems();
- break;
- }
- }
+ if (updateSelection(pos))
+ break;
}
break;
}
@@ -507,22 +488,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
pos = page_start[current_page] - 1;
for (unsigned int count = pos; count > 0; count--)
{
- CMenuItem* item = items[pos];
- if (item->isSelectable())
- {
- if ((pos < page_start[current_page + 1]) && (pos >= page_start[current_page]))
- {
- items[selected]->paint(false);
- item->paint(true);
- selected = pos;
- }
- else
- {
- selected = pos;
- paintItems();
- }
+ if (updateSelection(pos))
break;
- }
pos--;
}
}
@@ -531,22 +498,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
pos = 0;
for (unsigned int count = 0; count < items.size(); count++)
{
- CMenuItem* item = items[pos];
- if (item->isSelectable())
- {
- if ((pos < page_start[current_page + 1]) && (pos >= page_start[current_page]))
- {
- items[selected]->paint(false);
- item->paint(true);
- selected = pos;
- }
- else
- {
- selected = pos;
- paintItems();
- }
+ if (updateSelection(pos))
break;
- }
pos++;
}
}
@@ -558,22 +511,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
pos = items.size() - 1;
for (unsigned int count = pos; count < items.size(); count++)
{
- CMenuItem* item = items[pos];
- if (item->isSelectable())
- {
- if ((pos < page_start[current_page + 1]) && (pos >= page_start[current_page]))
- {
- items[selected]->paint(false);
- item->paint(true);
- selected = pos;
- }
- else
- {
- selected = pos;
- paintItems();
- }
+ if (updateSelection(pos))
break;
- }
pos++;
}
}
@@ -732,7 +671,7 @@ void CMenuWidget::paintItems()
}
else
{
- ypos = item->paint(selected==((signed int) count) );
+ ypos = item->paint(selected == count);
}
}
else
@@ -743,6 +682,30 @@ void CMenuWidget::paintItems()
}
}
+bool CMenuWidget::updateSelection(int pos)
+{
+ CMenuItem* item = items[pos];
+ if (item->isSelectable())
+ {
+ if ((pos < page_start[current_page + 1]) &&
+ (pos >= page_start[current_page]))
+ { // Item is currently on screen
+ //clear prev. selected
+ items[selected]->paint(false);
+ //select new
+ item->paint(true);
+ selected = pos;
+ }
+ else
+ {
+ selected = pos;
+ paintItems();
+ }
+ return true;
+ }
+ return false;
+}
+
/*adds the typical menu intro with optional subhead, separator, back button and separatorline to menu*/
void CMenuWidget::addIntroItems(neutrino_locale_t subhead_text, neutrino_locale_t section_text, int buttontype)
{
diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h
index bb0d6c4..c1be247 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.h
+++ b/tuxbox/neutrino/src/gui/widget/menue.h
@@ -320,6 +320,7 @@ class CMenuWidget : public CMenuTarget
unsigned int total_pages;
virtual void paintItems();
+ virtual bool updateSelection(int pos);
public:
CMenuWidget();
commit ca75825eda2c655bbbfa44ff7720061e6e81c24a
Author: Stefan Seyfried <se...@tu...>
Date: Mon Jun 17 20:43:49 2013 +0200
Neutrino CMenuWidget: make page_start[] int, avoids lots of casts
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp
index bd4db51..0d16b68 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -434,8 +434,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
if (item->isSelectable())
{
- if ((pos < (int)page_start[current_page + 1]) &&
- (pos >= (int)page_start[current_page]))
+ if ((pos < page_start[current_page + 1]) &&
+ (pos >= page_start[current_page]))
{ // Item is currently on screen
//clear prev. selected
items[selected]->paint(false);
@@ -504,13 +504,13 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
{
if (current_page)
{
- pos = (int)page_start[current_page] - 1;
+ pos = page_start[current_page] - 1;
for (unsigned int count = pos; count > 0; count--)
{
CMenuItem* item = items[pos];
if (item->isSelectable())
{
- if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page]))
+ if ((pos < page_start[current_page + 1]) && (pos >= page_start[current_page]))
{
items[selected]->paint(false);
item->paint(true);
@@ -534,7 +534,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
CMenuItem* item = items[pos];
if (item->isSelectable())
{
- if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page]))
+ if ((pos < page_start[current_page + 1]) && (pos >= page_start[current_page]))
{
items[selected]->paint(false);
item->paint(true);
@@ -553,7 +553,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
}
else if (msg == g_settings.key_menu_pagedown)
{
- pos = (int)page_start[current_page + 1];
+ pos = page_start[current_page + 1];
if (pos >= (int)items.size())
pos = items.size() - 1;
for (unsigned int count = pos; count < items.size(); count++)
@@ -561,7 +561,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
CMenuItem* item = items[pos];
if (item->isSelectable())
{
- if ((pos < (int)page_start[current_page + 1]) && (pos >= (int)page_start[current_page]))
+ if ((pos < page_start[current_page + 1]) && (pos >= page_start[current_page]))
{
items[selected]->paint(false);
item->paint(true);
@@ -703,9 +703,9 @@ void CMenuWidget::paintItems()
//Item not currently on screen
if (selected >= 0)
{
- while(selected < (int)page_start[current_page])
+ while(selected < page_start[current_page])
current_page--;
- while(selected >= (int)page_start[current_page + 1])
+ while(selected >= page_start[current_page + 1])
current_page++;
}
@@ -717,7 +717,7 @@ void CMenuWidget::paintItems()
}
frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0);
int ypos=item_start_y;
- for (unsigned int count = 0; count < items.size(); count++)
+ for (int count = 0; count < (int)items.size(); count++)
{
CMenuItem* item = items[count];
diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h
index 1a0de0a..bb0d6c4 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.h
+++ b/tuxbox/neutrino/src/gui/widget/menue.h
@@ -303,7 +303,7 @@ class CMenuWidget : public CMenuTarget
std::string nameString;
CFrameBuffer *frameBuffer;
std::vector<CMenuItem*> items;
- std::vector<unsigned int> page_start;
+ std::vector<int> page_start;
std::string iconfile;
int width;
commit e3067794a3d9cacc8eef78134abcadf7bb238780
Author: Christian Schuett <Gau...@ho...>
Date: Mon Jun 17 18:38:04 2013 +0200
Neutrino: don't restore old selection in bouquets if cancelled
this is not needed because current bouquet and channel are selected
automatically after closing the channel list, so let's keep current
position in all other bouquets
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index bc41c5c..7b64849 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -108,8 +108,10 @@ CChannelList::CChannelList(const char * const Name, bool hMode, bool UsedInBouqu
CChannelList::~CChannelList()
{
if (!usedInBouquet)
+ {
for (std::vector<CChannel *>::iterator it = chanlist.begin(); it != chanlist.end(); ++it)
delete (*it);
+ }
chanlist.clear();
}
@@ -360,7 +362,8 @@ int CChannelList::show()
if (msg == CRCInput::RC_timeout || msg == g_settings.key_channelList_cancel)
{
- selected = oldselected;
+ if (!usedInBouquet)
+ selected = oldselected;
loop=false;
}
else if (msg_repeatok == CRCInput::RC_up || msg_repeatok == g_settings.key_channelList_pageup)
@@ -414,7 +417,8 @@ int CChannelList::show()
(CRCInput::isNumeric(msg)) )
{
//pushback key if...
- selected = oldselected;
+ if (!usedInBouquet)
+ selected = oldselected;
g_RCInput->postMsg( msg, data );
loop=false;
}
commit 44e467d2069f39618e488cacdbeb8071c76e3436
Author: Christian Schuett <Gau...@ho...>
Date: Sun Jun 16 19:39:49 2013 +0200
Neutrino: store channels only once in memory
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/bouquetlist.h b/tuxbox/neutrino/src/gui/bouquetlist.h
index a541c3c..c5a2d10 100644
--- a/tuxbox/neutrino/src/gui/bouquetlist.h
+++ b/tuxbox/neutrino/src/gui/bouquetlist.h
@@ -61,7 +61,7 @@ class CBouquet
{
unique_key = Unique_key;
bLocked = locked;
- channelList = new CChannelList(Name);
+ channelList = new CChannelList(Name, false, true);
}
~CBouquet()
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index a729c39..bc41c5c 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -88,7 +88,7 @@ CChannelList::CChannel::CChannel(const int _key, const int _number, const std::s
}
-CChannelList::CChannelList(const char * const Name, bool hMode)
+CChannelList::CChannelList(const char * const Name, bool hMode, bool UsedInBouquet)
{
frameBuffer = CFrameBuffer::getInstance();
if (pig == NULL)
@@ -101,15 +101,15 @@ CChannelList::CChannelList(const char * const Name, bool hMode)
tuned=0xfffffff;
zapProtection = NULL;
this->historyMode = hMode;
+ usedInBouquet = UsedInBouquet;
eventFont = SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT;
}
CChannelList::~CChannelList()
{
- for (std::vector<CChannel *>::iterator it = chanlist.begin(); it != chanlist.end(); ++it)
- {
- delete (*it);
- }
+ if (!usedInBouquet)
+ for (std::vector<CChannel *>::iterator it = chanlist.begin(); it != chanlist.end(); ++it)
+ delete (*it);
chanlist.clear();
}
diff --git a/tuxbox/neutrino/src/gui/channellist.h b/tuxbox/neutrino/src/gui/channellist.h
index a39c033..510d9c3 100644
--- a/tuxbox/neutrino/src/gui/channellist.h
+++ b/tuxbox/neutrino/src/gui/channellist.h
@@ -111,6 +111,7 @@ class CChannelList
CEPGData epgData;
bool historyMode;
+ bool usedInBouquet;
bool displayNext;
bool displayList;
@@ -136,7 +137,7 @@ class CChannelList
void processTextToArray(std::string text);
public:
- CChannelList(const char * const Name, bool historyMode = false );
+ CChannelList(const char * const Name, bool historyMode = false, bool UsedInBouquet = false);
~CChannelList();
void addChannel(int key, int number, const std::string& name, const t_satellite_position satellitePosition, t_channel_id ids = 0); // UTF-8
void addChannel(CChannel* chan);
diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp
index b8f7791..232465e 100644
--- a/tuxbox/neutrino/src/neutrino.cpp
+++ b/tuxbox/neutrino/src/neutrino.cpp
@@ -1480,7 +1480,7 @@ void CNeutrinoApp::channelsInit(int init_mode, int _mode)
for (uint j = 0; j < zapitChannels.size(); j++)
{
- CChannelList::CChannel* channel = new CChannelList::CChannel(zapitChannels[j].nr, zapitChannels[j].nr, zapitChannels[j].name, zapitChannels[j].satellitePosition, zapitChannels[j].channel_id); // UTF-8
+ CChannelList::CChannel* channel = channelListTV->getChannel(zapitChannels[j].nr);
/* observe that "bouquetList->Bouquets[i]" refers to the bouquet we just created using bouquetList->addBouquet */
bouquetListTV->Bouquets[i]->channelList->addChannel(channel);
@@ -1528,7 +1528,7 @@ void CNeutrinoApp::channelsInit(int init_mode, int _mode)
for (uint j = 0; j < zapitChannels.size(); j++)
{
- CChannelList::CChannel* channel = new CChannelList::CChannel(zapitChannels[j].nr, zapitChannels[j].nr, zapitChannels[j].name, zapitChannels[j].satellitePosition, zapitChannels[j].channel_id); // UTF-8
+ CChannelList::CChannel* channel = channelListRADIO->getChannel(zapitChannels[j].nr);
/* observe that "bouquetList->Bouquets[i]" refers to the bouquet we just created using bouquetList->addBouquet */
bouquetListRADIO->Bouquets[i]->channelList->addChannel(channel);
@@ -1604,7 +1604,7 @@ void CNeutrinoApp::channelsInit4Record(void)
for (uint j = 0; j < zapitChannels.size(); j++)
{
channel_nr++;
- CChannelList::CChannel* channel = new CChannelList::CChannel(channel_nr, channel_nr, zapitChannels[j].name, zapitChannels[j].satellitePosition, zapitChannels[j].channel_id); // UTF-8
+ CChannelList::CChannel* channel = channelListRecord->getChannel(channel_nr);
/* observe that "bouquetList->Bouquets[i]" refers to the bouquet we just created using bouquetList->addBouquet */
bouquetListRecord->Bouquets[i]->channelList->addChannel(channel);
commit e825376f3a58902806c4cf96e278bb49b039211f
Author: Christian Schuett <Gau...@ho...>
Date: Sun Jun 16 16:31:05 2013 +0200
Neutrino: fix numbering of channels in bouquets while recording
this also fixes some segfaults in channel list when switching channels or
navigating through bouquets while recording
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/bouquetlist.cpp b/tuxbox/neutrino/src/gui/bouquetlist.cpp
index 3a28a1f..c8f35dd 100644
--- a/tuxbox/neutrino/src/gui/bouquetlist.cpp
+++ b/tuxbox/neutrino/src/gui/bouquetlist.cpp
@@ -102,7 +102,7 @@ void CBouquetList::adjustToChannel( int nChannelNr)
{
for (uint i=0; i<Bouquets.size(); i++)
{
- int nChannelPos = CNeutrinoApp::getInstance ()->recordingstatus ?nChannelNr-1: Bouquets[i]->channelList->hasChannel(nChannelNr);
+ int nChannelPos = Bouquets[i]->channelList->hasChannel(nChannelNr);
if (nChannelPos > -1)
{
selected = i;
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index 5663cab..a729c39 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -1315,7 +1315,7 @@ void CChannelList::paintItem(int pos)
title_offset=6;
}
- snprintf((char*) tmp, sizeof(tmp), "%d", this->historyMode ? pos : CNeutrinoApp::getInstance ()->recordingstatus ? curr+1 : chan->number);
+ snprintf((char*) tmp, sizeof(tmp), "%d", this->historyMode ? pos : chan->number);
CChannelEvent *p_event = NULL;
if (displayNext) {
diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp
index 3f4774b..b8f7791 100644
--- a/tuxbox/neutrino/src/neutrino.cpp
+++ b/tuxbox/neutrino/src/neutrino.cpp
@@ -1504,8 +1504,8 @@ void CNeutrinoApp::channelsInit(int init_mode, int _mode)
// same for the RADIO channels
if (channelListRADIO)
delete channelListRADIO;
-
channelListRADIO = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
+
g_Zapit->getChannels(zapitChannels, CZapitClient::MODE_RADIO, CZapitClient::SORT_BOUQUET, true); // UTF-8
for(uint i=0; i<zapitChannels.size(); i++)
{
@@ -1571,22 +1571,26 @@ void CNeutrinoApp::channelsInit4Record(void)
CZapitClient::BouquetChannelList zapitChannels;
CZapitClient::BouquetList zapitBouquets;
+ int channel_nr = 0;
//deleting old channelList for mode-switching.
if (channelListRecord)
delete channelListRecord;
-
channelListRecord = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
+
g_Zapit->getChannels(zapitChannels, CZapitClient::MODE_CURRENT, CZapitClient::SORT_BOUQUET, true); // UTF-8
for(uint i=0; i<zapitChannels.size(); i++)
{
- channelListRecord->addChannel(zapitChannels[i].nr, zapitChannels[i].nr, zapitChannels[i].name, zapitChannels[i].satellitePosition, zapitChannels[i].channel_id); // UTF-8
+ channel_nr++;
+ channelListRecord->addChannel(channel_nr, channel_nr, zapitChannels[i].name, zapitChannels[i].satellitePosition, zapitChannels[i].channel_id); // UTF-8
}
+ channel_nr = 0;
+
if (bouquetListRecord)
delete bouquetListRecord;
bouquetListRecord = new CBouquetList();
- bouquetListRecord ->orgChannelList = channelListRecord;
+ bouquetListRecord->orgChannelList = channelListRecord;
/* load non-empty bouquets only */
g_Zapit->getBouquets(zapitBouquets, false, true); // UTF-8
@@ -1599,7 +1603,8 @@ void CNeutrinoApp::channelsInit4Record(void)
for (uint j = 0; j < zapitChannels.size(); j++)
{
- CChannelList::CChannel* channel = new CChannelList::CChannel(zapitChannels[j].nr, zapitChannels[j].nr, zapitChannels[j].name, zapitChannels[j].satellitePosition, zapitChannels[j].channel_id); // UTF-8
+ channel_nr++;
+ CChannelList::CChannel* channel = new CChannelList::CChannel(channel_nr, channel_nr, zapitChannels[j].name, zapitChannels[j].satellitePosition, zapitChannels[j].channel_id); // UTF-8
/* observe that "bouquetList->Bouquets[i]" refers to the bouquet we just created using bouquetList->addBouquet */
bouquetListRecord->Bouquets[i]->channelList->addChannel(channel);
@@ -2457,9 +2462,9 @@ void CNeutrinoApp::RealRun(CMenuWidget &menu)
int nNewChannel = bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->show();
if(nNewChannel>-1)
{
- recordingstatus ? channelList->zapTo(nNewChannel): channelList->zapTo(bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->getKey(nNewChannel)-1);
+ channelList->zapTo(bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->getKey(nNewChannel)-1);
}
- else if(nNewChannel == -1 && recordingstatus == 0)
+ else if(nNewChannel == -1)
{
bouquetList->adjustToChannel(channelList->getActiveChannelNumber());
}
commit be9752cd5487884fca4bd20d43b849eefeba1b4e
Author: Christian Schuett <Gau...@ho...>
Date: Sat Jun 15 15:39:12 2013 +0200
Neutrino: always show bouquet of current channel first in channel list
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp
index e13acf2..3f4774b 100644
--- a/tuxbox/neutrino/src/neutrino.cpp
+++ b/tuxbox/neutrino/src/neutrino.cpp
@@ -2459,6 +2459,10 @@ void CNeutrinoApp::RealRun(CMenuWidget &menu)
{
recordingstatus ? channelList->zapTo(nNewChannel): channelList->zapTo(bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->getKey(nNewChannel)-1);
}
+ else if(nNewChannel == -1 && recordingstatus == 0)
+ {
+ bouquetList->adjustToChannel(channelList->getActiveChannelNumber());
+ }
}
else
{
commit a744299f0b646b36c6a1e1d185d76efd7fdcd4eb
Author: Christian Schuett <Gau...@ho...>
Date: Sat Jun 15 15:37:44 2013 +0200
Neutrino channel list: don't paint PIG multiple times
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index c0f4a8c..5663cab 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -1545,7 +1545,9 @@ void CChannelList::paint()
if (g_settings.channellist_additional == ADDITIONAL_MTV) // with miniTV
{
- if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_tv) {
+ if (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_tv &&
+ pig->getStatus() == CPIG::HIDE)
+ {
// paint PIG
#if defined BOXMODEL_DM500 || defined HAVE_IPBOX_HARDWARE
// the dm500 seems to like only half / quarter resolution...
commit 98515b993e9fd66795b9e4e83f29d9a914fc4ae0
Author: Christian Schuett <Gau...@ho...>
Date: Sat Jun 15 15:35:39 2013 +0200
Neutrino channel list: make member 'pig' static
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index bb3c215..c0f4a8c 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -74,6 +74,8 @@ extern "C" int tuxtxt_stop();
#define ConnectLineBox_Width 12
+CPIG * CChannelList::pig = NULL;
+
CChannelList::CChannel::CChannel(const int _key, const int _number, const std::string& _name, const t_satellite_position _satellitePosition, const t_channel_id ids)
{
key = _key;
@@ -89,7 +91,8 @@ CChannelList::CChannel::CChannel(const int _key, const int _number, const std::s
CChannelList::CChannelList(const char * const Name, bool hMode)
{
frameBuffer = CFrameBuffer::getInstance();
- pig = new CPIG(0);
+ if (pig == NULL)
+ pig = new CPIG(0);
x = y = 0;
info_height = 0;
name = Name;
@@ -108,7 +111,6 @@ CChannelList::~CChannelList()
delete (*it);
}
chanlist.clear();
- delete pig;
}
int CChannelList::exec()
diff --git a/tuxbox/neutrino/src/gui/channellist.h b/tuxbox/neutrino/src/gui/channellist.h
index 17393d8..a39c033 100644
--- a/tuxbox/neutrino/src/gui/channellist.h
+++ b/tuxbox/neutrino/src/gui/channellist.h
@@ -93,7 +93,7 @@ class CChannelList
int eventFont;
int ffheight;
- CPIG *pig;
+ static CPIG *pig;
std::string name;
std::vector<CChannel*> chanlist;
commit 8d66985acb23003f08c2adffb5a88208c9220dff
Author: Christian Schuett <Gau...@ho...>
Date: Sun Jun 9 19:09:10 2013 +0200
Neutrino: use defines for styles in CNeutrinoApp::SetupFonts()
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp
index 59fcc33..e13acf2 100644
--- a/tuxbox/neutrino/src/neutrino.cpp
+++ b/tuxbox/neutrino/src/neutrino.cpp
@@ -1767,7 +1767,7 @@ void CNeutrinoApp::SetupFonts()
else{
font.filename = strdup(g_settings.font_file);
}
- style[0] = g_fontRenderer->AddFont(font.filename);
+ style[FONT_STYLE_REGULAR] = g_fontRenderer->AddFont(font.filename);
if(font.name != NULL)
free((void *)font.name);
@@ -1776,9 +1776,9 @@ void CNeutrinoApp::SetupFonts()
printf("[neutrino] font family %s\n", font.name);
- style[1] = "Bold Regular";
+ style[FONT_STYLE_BOLD] = "Bold Regular";
- style[2] = g_fontRenderer->AddFont(font.filename, true); // make italics
+ style[FONT_STYLE_ITALIC] = g_fontRenderer->AddFont(font.filename, true); // make italics
for (int i = 0; i < SNeutrinoSettings::FONT_TYPE_COUNT; i++)
{
commit 758d8b7e1c3a50b5545aedca33f090045c7063b8
Author: Christian Schuett <Gau...@ho...>
Date: Fri Jun 7 21:33:30 2013 +0200
Neutrino image info: fix paint with new standard font
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/src/gui/imageinfo.cpp b/tuxbox/neutrino/src/gui/imageinfo.cpp
index e8dc842..9e52ef5 100644
--- a/tuxbox/neutrino/src/gui/imageinfo.cpp
+++ b/tuxbox/neutrino/src/gui/imageinfo.cpp
@@ -607,7 +607,7 @@ void CImageInfo::paint()
ypos += iheight;
//license lines
- ypos += sheight;
+ ypos += iheight;
paintLicense(ypos);
//paint foot
commit a08eebdc9b737e9987da12a6b906d5f74542303f
Author: Christian Schuett <Gau...@ho...>
Date: Fri Jun 7 19:39:03 2013 +0200
Neutrino: fix memleaks when using getFont()
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/lcdapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/lcdapi.cpp
index bc8fc68..722313d 100755
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/lcdapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/lcdapi.cpp
@@ -97,6 +97,7 @@ void CLCDAPI::DrawText(int px, int py, int psize, int pcolor, int pfont, char *p
return;
}
font->RenderString(px, py, 130, pmsg, color, 0, true); // UTF-8
+ delete font;
}
bool CLCDAPI::ShowPng(char *filename)
diff --git a/tuxbox/neutrino/src/driver/lcdd.cpp b/tuxbox/neutrino/src/driver/lcdd.cpp
index 39b4926..3ecd059 100644
--- a/tuxbox/neutrino/src/driver/lcdd.cpp
+++ b/tuxbox/neutrino/src/driver/lcdd.cpp
@@ -68,6 +68,9 @@ CLCD::CLCD()
m_progressLocal = 0;
#endif // LCD_UPDATE
fontRenderer = NULL;
+ fonts.menu = NULL;
+ fonts.time = NULL;
+ fonts.channelname = NULL;
muted = false;
percentOver = 0;
volume = 0;
@@ -199,8 +202,10 @@ const char * const background_path[NUMBER_OF_PATHS] = {
bool CLCD::lcdInit(const char *fontfile, const char *fontfile2, const char *fontfile3)
{
- if (fontRenderer != NULL)
- delete fontRenderer;
+ delete fonts.menu;
+ delete fonts.time;
+ delete fonts.channelname;
+ delete fontRenderer;
fontRenderer = new LcdFontRenderClass(&display);
const char * style_name = fontRenderer->AddFont(fontfile);
commit d680e1d391ea0433d9d979858ca63f3151574f85
Author: Christian Schuett <Gau...@ho...>
Date: Wed Jun 5 18:44:04 2013 +0200
zapit: only change saved last and start channels if needed
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/dvb/zapit/src/zapit.cpp b/dvb/zapit/src/zapit.cpp
index 8375692..8f90097 100644
--- a/dvb/zapit/src/zapit.cpp
+++ b/dvb/zapit/src/zapit.cpp
@@ -716,10 +716,16 @@ void saveSettings(bool write)
if (write) {
config.setBool("saveLastChannel", saveLastChannel);
config.setInt32("lastChannelMode", (currentMode & RADIO_MODE) ? 1 : 0);
- config.setInt32("lastChannelRadio", lastChannelRadio);
- config.setInt32("lastChannelTV", lastChannelTV);
- config.setInt32("startChannelRadio", startChannelRadio);
- config.setInt32("startChannelTV", startChannelTV);
+ if (saveLastChannel)
+ {
+ config.setInt32("lastChannelRadio", lastChannelRadio);
+ config.setInt32("lastChannelTV", lastChannelTV);
+ }
+ else
+ {
+ config.setInt32("startChannelRadio", startChannelRadio);
+ config.setInt32("startChannelTV", startChannelTV);
+ }
config.setBool("saveAudioPIDs", save_audioPIDs);
config.setBool("makeRemainingChannelsBouquet", bouquetManager->remainingChannelsBouquet);
commit e70d4041d96883016bc1a4efe40853194f13ccf6
Author: GetAway <get...@t-...>
Date: Sun Jun 9 14:21:36 2013 +0200
neutrino: move select font from console to menu
Standard Font is now LiberationSans-Regular.
micron_italic.ttf is no longer installed.
FT can handle BOLD and ITALICS by itself.
The command line syntax to select a font for LCD has changed.
Please use now:
[--lcdfont /dir/menu.ttf [/dir/time.ttf [/dir/channelname.ttf]]]
Signed-off-by: Christian Schuett <Gau...@ho...>
Signed-off-by: Thilo Graf <db...@no...>
diff --git a/tuxbox/neutrino/data/fonts/Makefile.am b/tuxbox/neutrino/data/fonts/Makefile.am
index be39404..47f888a 100644
--- a/tuxbox/neutrino/data/fonts/Makefile.am
+++ b/tuxbox/neutrino/data/fonts/Makefile.am
@@ -1,10 +1,5 @@
i...
[truncated message content] |