mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
- hintbox: add setDelay() prototype
Signed-off-by: Thilo Graf <dbt@novatux.de> see commit message at: - change some hintboxes
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
#ifndef __C_HINTBOX__
|
#ifndef __C_HINTBOX__
|
||||||
#define __C_HINTBOX__
|
#define __C_HINTBOX__
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
#include <gui/components/cc.h>
|
#include <gui/components/cc.h>
|
||||||
|
|
||||||
#define HINTBOX_MIN_WIDTH 320 // scaled in init
|
#define HINTBOX_MIN_WIDTH 320 // scaled in init
|
||||||
@@ -345,12 +346,15 @@ optional disable/enable background
|
|||||||
class CHint : public CHintBox
|
class CHint : public CHintBox
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
int delay;
|
||||||
|
|
||||||
void initHint(bool enable_bg)
|
void initHint(bool enable_bg)
|
||||||
{
|
{
|
||||||
paint_bg = enable_bg;
|
paint_bg = enable_bg;
|
||||||
ccw_show_header = false;
|
ccw_show_header = false;
|
||||||
ccw_show_footer = false;
|
ccw_show_footer = false;
|
||||||
cc_item_type.name = "wg.hint";
|
cc_item_type.name = "wg.hint";
|
||||||
|
delay = 0;
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
/**CHint Constructor
|
/**CHint Constructor
|
||||||
@@ -368,7 +372,13 @@ class CHint : public CHintBox
|
|||||||
*/
|
*/
|
||||||
CHint(const neutrino_locale_t Text, bool show_background = true);
|
CHint(const neutrino_locale_t Text, bool show_background = true);
|
||||||
|
|
||||||
virtual ~CHint(){};
|
virtual void setDelay(int d) {delay = d;}
|
||||||
|
|
||||||
|
virtual ~CHint()
|
||||||
|
{
|
||||||
|
if (delay)
|
||||||
|
sleep(delay);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5404,11 +5404,11 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
}
|
}
|
||||||
else if (actionKey=="reloadplugins") {
|
else if (actionKey=="reloadplugins") {
|
||||||
CHint *hint = new CHint(LOCALE_SERVICEMENU_GETPLUGINS_HINT);
|
CHint *hint = new CHint(LOCALE_SERVICEMENU_GETPLUGINS_HINT);
|
||||||
|
hint->setDelay(1);
|
||||||
hint->paint();
|
hint->paint();
|
||||||
|
|
||||||
g_Plugins->loadPlugins();
|
g_Plugins->loadPlugins();
|
||||||
|
|
||||||
sleep(1); // small delay for very fast hardware
|
|
||||||
delete hint;
|
delete hint;
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
|
Reference in New Issue
Block a user