diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index 9748d3f57..25be21191 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -42,7 +42,6 @@ #include "git_version.h" #define GIT_DESC "GIT Desc.:" #define GIT_REV "GIT Build:" -extern cVideo * videoDecoder; extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ @@ -66,7 +65,7 @@ static const neutrino_locale_t info_items[8] = void CImageInfo::Init(void) { frameBuffer = CFrameBuffer::getInstance(); - + pip = NULL; font_head = SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME;; font_small = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL; font_info = SNeutrinoSettings::FONT_TYPE_MENU; @@ -105,7 +104,7 @@ void CImageInfo::Init(void) CImageInfo::~CImageInfo() { - videoDecoder->Pig(-1, -1, -1, -1); + delete pip; } int CImageInfo::exec(CMenuTarget* parent, const std::string &) @@ -121,11 +120,7 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &) paint(); - //paint_pig( width-170, y, 215, 170); - paint_pig (width - width/3 - 10, y + 10, width/3, height/3); - neutrino_msg_t msg; - while (1) { neutrino_msg_data_t data; @@ -159,16 +154,8 @@ int CImageInfo::exec(CMenuTarget* parent, const std::string &) void CImageInfo::hide() { - //frameBuffer->paintBackgroundBoxRel(0,0, max_width,max_height); + pip->hide(true); frameBuffer->paintBackground(); - videoDecoder->Pig(-1, -1, -1, -1); -} - -void CImageInfo::paint_pig(int px, int py, int w, int h) -{ - //frameBuffer->paintBoxRel(px,py,w,h, COL_BACKGROUND); - frameBuffer->paintBackgroundBoxRel(px,py,w,h); - videoDecoder->Pig(px, py, w, h, frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true)); } void CImageInfo::paintLine(int xpos, int font, const char* text) @@ -189,9 +176,7 @@ void CImageInfo::paint() head_string = g_Locale->getText(LOCALE_IMAGEINFO_HEAD); CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, head_string); - - //frameBuffer->paintBoxRel(0, 0, max_width, max_height, COL_MENUHEAD_PLUS_0); - frameBuffer->paintBoxRel(0, 0, max_width, max_height, COL_INFOBAR_PLUS_0); + frameBuffer->paintBoxRel(0, 0, max_width, max_height, COL_INFOBAR_PLUS_0); g_Font[font_head]->RenderString(xpos, ypos+ hheight+1, width, head_string, COL_MENUHEAD, 0, true); ypos += hheight; @@ -250,7 +235,7 @@ void CImageInfo::paint() paintLine(xpos , font_info, GIT_REV); #endif paintLine(xpos+offset, font_info, builddate ); - + ypos += iheight; paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_CREATOR)); paintLine(xpos+offset, font_info, creator); @@ -300,4 +285,8 @@ void CImageInfo::paint() ypos+= sheight; paintLine(xpos+offset, font_small, "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA."); + + if (pip == NULL) + pip = new CComponentsPIP(width-width/3-10, y+10, 30); + pip->paint(); } diff --git a/src/gui/imageinfo.h b/src/gui/imageinfo.h index 8f50abe97..170820f88 100644 --- a/src/gui/imageinfo.h +++ b/src/gui/imageinfo.h @@ -28,6 +28,8 @@ #include #include #include +#include + class CImageInfo : public CMenuTarget { @@ -35,6 +37,7 @@ class CImageInfo : public CMenuTarget void Init(void); CConfigFile * configfile; CFrameBuffer *frameBuffer; + CComponentsPIP * pip; int x; int y; int ypos; @@ -53,7 +56,6 @@ class CImageInfo : public CMenuTarget int font_small; void paint(); - void paint_pig(int x, int y, int w, int h); void paintLine(int xpos, int font, const char* text); public: diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index b9b01188f..8bde0051f 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -56,7 +56,7 @@ extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */ CStreamInfo2::CStreamInfo2 () { frameBuffer = CFrameBuffer::getInstance (); - + pip = NULL; font_head = SNeutrinoSettings::FONT_TYPE_MENU_TITLE; font_info = SNeutrinoSettings::FONT_TYPE_MENU; font_small = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL; @@ -98,7 +98,7 @@ CStreamInfo2::CStreamInfo2 () CStreamInfo2::~CStreamInfo2 () { - videoDecoder->Pig(-1, -1, -1, -1); + delete pip; ts_close(); } @@ -252,17 +252,10 @@ int CStreamInfo2::doSignalStrengthLoop () void CStreamInfo2::hide () { - videoDecoder->Pig(-1, -1, -1, -1); + pip->hide(true); frameBuffer->paintBackgroundBoxRel (0, 0, max_width, max_height); } -void CStreamInfo2::paint_pig (int px, int py, int w, int h) -{ - frameBuffer->paintBackgroundBoxRel (px,py, w, h); - printf("CStreamInfo2::paint_pig x %d y %d w %d h %d\n", px, py, w, h); - videoDecoder->Pig(px, py, w, h, frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true)); -} - void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h) { int y1; @@ -425,7 +418,10 @@ void CStreamInfo2::paint (int /*mode*/) g_Font[font_head]->RenderString (xpos, ypos + hheight + 1, width, head_string, COL_MENUHEAD, 0, true); // UTF-8 ypos += hheight; - paint_pig (width - width/3 - 10, y + 10, width/3, height/3); + if (pip == NULL) + pip = new CComponentsPIP(width-width/3-10, y+10, 30); + pip->paint(); + paint_techinfo (xpos, ypos); paint_signal_fe_box (width - width/3 - 10, (y + 10 + height/3 + hheight), width/3, height/3 + hheight); } else { diff --git a/src/gui/streaminfo2.h b/src/gui/streaminfo2.h index e24c48ca4..014353695 100644 --- a/src/gui/streaminfo2.h +++ b/src/gui/streaminfo2.h @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -36,6 +37,7 @@ class CStreamInfo2 : public CMenuTarget CFrameBuffer *frameBuffer; CFrontend *frontend; + CComponentsPIP * pip; int x; int y; int width; @@ -90,7 +92,6 @@ class CStreamInfo2 : public CMenuTarget int ts_close(); void paint(int mode); - void paint_pig(int x, int y, int w, int h); void paint_techinfo(int x, int y); void paintCASystem(int xpos, int ypos); void paint_signal_fe_box(int x, int y, int w, int h);