move FLAGDIR definition to global.h; ...

... use CTouchFileNotifier to handle .hddpower flagfile


Origin commit data
------------------
Branch: ni/coolstream
Commit: 0cdacc196e
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-05-25 (Wed, 25 May 2016)

Origin message was:
------------------
- move FLAGDIR definition to global.h; ...

... use CTouchFileNotifier to handle .hddpower flagfile


------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-05-25 23:15:37 +02:00
parent 35fbab6f4c
commit 22158b9e17
4 changed files with 7 additions and 19 deletions

View File

@@ -56,8 +56,6 @@
#include "gui/lcd4l.h"
extern CLCD4l *LCD4l;
#define FLAG_DIR "/var/etc/"
const CMenuOptionChooser::keyval LCD4L_SUPPORT_OPTIONS[] =
{
{ 0, LOCALE_LCD4L_SUPPORT_OFF },
@@ -146,14 +144,14 @@ int CLCD4lSetup::show()
mc->setHint(NEUTRINO_ICON_HINT_LCD4L, LOCALE_MENU_HINT_LCD4L_SKIN);
lcd4lSetup->addItem(mc);
const char *flag_lcd4l_weather = FLAG_DIR ".lcd-weather";
const char *flag_lcd4l_weather = FLAGDIR "/.lcd-weather";
int fake_lcd4l_weather = file_exists(flag_lcd4l_weather);
CTouchFileNotifier * lcd_weather = new CTouchFileNotifier(flag_lcd4l_weather);
mc = new CMenuOptionChooser(LOCALE_LCD4L_WEATHER, &fake_lcd4l_weather, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, (file_exists("/share/lcd/scripts/weather")), lcd_weather, CRCInput::convertDigitToKey(shortcut++));
mc->setHint(NEUTRINO_ICON_HINT_LCD4L, LOCALE_MENU_HINT_LCD4L_WEATHER);
lcd4lSetup->addItem(mc);
const char *flag_lcd4l_clock_a = FLAG_DIR ".lcd-clock_a";
const char *flag_lcd4l_clock_a = FLAGDIR "/.lcd-clock_a";
int fake_lcd4l_clock_a = file_exists(flag_lcd4l_clock_a);
CTouchFileNotifier * lcd_clock_a = new CTouchFileNotifier(flag_lcd4l_clock_a);
mc = new CMenuOptionChooser(LOCALE_LCD4L_CLOCK_A, &fake_lcd4l_clock_a, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, lcd_clock_a, CRCInput::convertDigitToKey(shortcut++));