Menus shadow; 0 calls timer-list in event-list; Fix exit from sleeptimer set; Testing backup/restore settings

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@647 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: c2cfa8862b
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-07-03 (Sat, 03 Jul 2010)



------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2010-07-03 13:09:40 +00:00
parent 5283167785
commit 6f6827297a
18 changed files with 111 additions and 51 deletions

View File

@@ -84,6 +84,7 @@ CMenuWidget::CMenuWidget()
iconOffset = 0;
offx = offy = 0;
from_wizard = false;
fade = true;
}
CMenuWidget::CMenuWidget(const neutrino_locale_t Name, const std::string & Icon, const int mwidth, const int mheight)
@@ -125,6 +126,7 @@ void CMenuWidget::Init(const std::string & Icon, const int mwidth, const int /*m
current_page=0;
offx = offy = 0;
from_wizard = false;
fade = true;
}
void CMenuWidget::move(int xoff, int yoff)
@@ -177,7 +179,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
height = frameBuffer->getScreenHeight() / 20 * 18; /* make sure its a multiple of 2 */
wanted_height = height;
bool fadeIn = g_settings.widget_fade;
bool fadeIn = g_settings.widget_fade && fade;
bool fadeOut = false;
uint32_t fadeTimer = 0;
int fadeValue = g_settings.menu_Content_alpha;
@@ -375,6 +377,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
msg = CRCInput::RC_timeout;
break;
case menu_return::RETURN_REPAINT:
case menu_return::RETURN_EXIT_REPAINT:
paint();
break;
}
@@ -413,7 +416,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
fadeTimer = 0;
fadeIn = false;
}
if ((!fadeOut) && g_settings.widget_fade) {
if ((!fadeOut) && g_settings.widget_fade && fade) {
fadeOut = true;
fadeTimer = g_RCInput->addTimer( FADE_TIME, false );
timeoutEnd = CRCInput::calcTimeoutEnd( 1 );
@@ -455,7 +458,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
void CMenuWidget::hide()
{
frameBuffer->paintBackgroundBoxRel(x, y, width+15,height+10 );
frameBuffer->paintBackgroundBoxRel(x, y, width+15+SHADOW_OFFSET,height+10+SHADOW_OFFSET);
}
void CMenuWidget::paint()
@@ -557,6 +560,7 @@ void CMenuWidget::paint()
}
//frameBuffer->paintBoxRel(x,y, width+sb_width,hheight, COL_MENUHEAD_PLUS_0);
frameBuffer->paintBoxRel(x+SHADOW_OFFSET, y+SHADOW_OFFSET, width+sb_width, height, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE); //FIXME rounded
frameBuffer->paintBoxRel(x, y, width+sb_width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP); //FIXME rounded
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+38,y+hheight+1, width-40, l_name, COL_MENUHEAD, 0, true); // UTF-8

View File

@@ -47,7 +47,8 @@ struct menu_return
RETURN_NONE = 0,
RETURN_REPAINT = 1,
RETURN_EXIT = 2,
RETURN_EXIT_ALL = 4
RETURN_EXIT_ALL = 4,
RETURN_EXIT_REPAINT = 5
};
};
@@ -64,14 +65,12 @@ class CChangeObserver
class CMenuTarget
{
public:
CMenuTarget(){}
virtual ~CMenuTarget(){}
virtual void hide(){}
virtual int exec(CMenuTarget* parent, const std::string & actionKey) = 0;
};
class CMenuItem
{
protected:
@@ -347,9 +346,10 @@ class CMenuWidget : public CMenuTarget
unsigned int total_pages;
bool exit_pressed;
bool from_wizard;
bool fade;
void Init(const std::string & Icon, const int mwidth, const int mheight);
virtual void paintItems();
public:
CMenuWidget();
/* TODO: mheight is not used anymore. remove if nobody misses it */
@@ -368,6 +368,7 @@ class CMenuWidget : public CMenuTarget
void move(int xoff, int yoff);
int getSelectedLine(void){return exit_pressed ? -1 : selected;};
void setWizardMode(bool _from_wizard) { from_wizard = _from_wizard;};
void enableFade(bool _enable) { fade = _enable; };
};
class CPINProtection

View File

@@ -412,6 +412,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
strncpy(value, oldval, size);
loop=false;
res = menu_return::RETURN_EXIT_REPAINT;
}
else if ((msg ==CRCInput::RC_sat) || (msg == CRCInput::RC_favorites))
{