mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
neutrino eventlist: move and define some member variables in constructor
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1788 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: c9a5284455
Author: Thilo Graf <dbt@novatux.de>
Date: 2011-10-29 (Sat, 29 Oct 2011)
Origin message was:
------------------
*neutrino eventlist: move and define some member variables in constructor
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1788 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -99,6 +99,14 @@ EventList::EventList()
|
|||||||
m_search_epg_item = SEARCH_EPG_TITLE;
|
m_search_epg_item = SEARCH_EPG_TITLE;
|
||||||
m_search_channel_id = 1;
|
m_search_channel_id = 1;
|
||||||
m_search_bouquet_id= 1;
|
m_search_bouquet_id= 1;
|
||||||
|
|
||||||
|
fw = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth(); //font width
|
||||||
|
fh = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); //font height
|
||||||
|
width = w_max (62 * fw, 40);
|
||||||
|
height = h_max (23 * fh, 20);
|
||||||
|
|
||||||
|
x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - width) / 2;
|
||||||
|
y = frameBuffer->getScreenY() + (frameBuffer->getScreenHeight() - height) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
EventList::~EventList()
|
EventList::~EventList()
|
||||||
@@ -209,10 +217,7 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam
|
|||||||
neutrino_msg_t msg;
|
neutrino_msg_t msg;
|
||||||
neutrino_msg_data_t data;
|
neutrino_msg_data_t data;
|
||||||
bool in_search = false;
|
bool in_search = false;
|
||||||
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth();
|
|
||||||
int fh = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
|
|
||||||
width = w_max (62 * fw, 40);
|
|
||||||
height = h_max (23 * fh, 20);
|
|
||||||
iheight = 30; // info bar height (see below, hard coded at this time)
|
iheight = 30; // info bar height (see below, hard coded at this time)
|
||||||
|
|
||||||
if(iheight < fh)
|
if(iheight < fh)
|
||||||
@@ -244,9 +249,6 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam
|
|||||||
listmaxshow = (height-theight-iheight-0)/fheight;
|
listmaxshow = (height-theight-iheight-0)/fheight;
|
||||||
height = theight+iheight+0+listmaxshow*fheight; // recalc height
|
height = theight+iheight+0+listmaxshow*fheight; // recalc height
|
||||||
|
|
||||||
x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - width) / 2;
|
|
||||||
y = frameBuffer->getScreenY() + (frameBuffer->getScreenHeight() - height) / 2;
|
|
||||||
|
|
||||||
int res = menu_return::RETURN_REPAINT;
|
int res = menu_return::RETURN_REPAINT;
|
||||||
//printf("EventList::exec: channel_id %llx\n", channel_id);
|
//printf("EventList::exec: channel_id %llx\n", channel_id);
|
||||||
if(m_search_list == SEARCH_LIST_NONE) // init globals once only
|
if(m_search_list == SEARCH_LIST_NONE) // init globals once only
|
||||||
@@ -805,8 +807,8 @@ void EventList::paintHead(std::string _channelname, std::string _channelname_pre
|
|||||||
short middle_len = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->getRenderWidth(_channelname.c_str(),true);
|
short middle_len = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->getRenderWidth(_channelname.c_str(),true);
|
||||||
short middle_offset = (width- next_len- prev_len- middle_len-iw-8)/2;
|
short middle_offset = (width- next_len- prev_len- middle_len-iw-8)/2;
|
||||||
if(middle_offset < 0){
|
if(middle_offset < 0){
|
||||||
int fw = g_Font[font_h]->getWidth();
|
int fw_h = g_Font[font_h]->getWidth();
|
||||||
int newsize = abs(middle_offset / fw) + 1;
|
int newsize = abs(middle_offset / fw_h) + 1;
|
||||||
if(_channelname_prev.size() > _channelname_next.size() ){
|
if(_channelname_prev.size() > _channelname_next.size() ){
|
||||||
_channelname_prev.resize( _channelname_prev.size() - newsize);
|
_channelname_prev.resize( _channelname_prev.size() - newsize);
|
||||||
}else{
|
}else{
|
||||||
|
@@ -98,8 +98,8 @@ class EventList
|
|||||||
int key;
|
int key;
|
||||||
std::string search_head_name;
|
std::string search_head_name;
|
||||||
|
|
||||||
int width;
|
int width, fw;
|
||||||
int height;
|
int height, fh;
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
int sort_mode;
|
int sort_mode;
|
||||||
|
Reference in New Issue
Block a user