diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 867101920..7969867ce 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -888,6 +888,8 @@ fsk.to_16 bis 16 fsk.to_7 bis 7 glcd.brightness Helligkeit glcd.brightness_standby Helligkeit in Standby +glcd.clock.analog analog +glcd.clock.digital_hm digital glcd.color.amber Amber glcd.color.black Schwarz glcd.color.blue Blau diff --git a/data/locale/english.locale b/data/locale/english.locale index 1bcc260c1..c498e3ecd 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -888,6 +888,8 @@ fsk.to_16 to 16 fsk.to_7 to 7 glcd.brightness Brightness glcd.brightness_standby Brightness in standby +glcd.clock.analog analog +glcd.clock.digital_hm digital glcd.color.amber Amber glcd.color.black Black glcd.color.blue Blue diff --git a/src/driver/nglcd.cpp b/src/driver/nglcd.cpp index f7d15220f..83f63840c 100644 --- a/src/driver/nglcd.cpp +++ b/src/driver/nglcd.cpp @@ -240,9 +240,9 @@ void nGLCD::Exec() { if (percent_time_standby) { std::string Time; - if (g_settings.glcd_time_in_standby == 3) + if (g_settings.glcd_time_in_standby == CLOCK_ANALOG) LcdAnalogClock(bitmap->Width()/2, bitmap->Height()/2, 200); - else if (g_settings.glcd_time_in_standby == 2) + else if (g_settings.glcd_time_in_standby == CLOCK_DIGITAL_HMS) Time = strftime("%H:%M:%S", tm); else Time = strftime("%H:%M", tm); @@ -795,7 +795,7 @@ void nGLCD::Update() { void nGLCD::StandbyMode(bool b) { if (nglcd) { - if (g_settings.glcd_time_in_standby) { + if (g_settings.glcd_time_in_standby != CLOCK_OFF) { nglcd->doStandbyTime = b; nglcd->doStandby = false; } else { diff --git a/src/driver/nglcd.h b/src/driver/nglcd.h index 309445684..7c910e096 100644 --- a/src/driver/nglcd.h +++ b/src/driver/nglcd.h @@ -114,6 +114,14 @@ class nGLCD static void Lock(); static void Unlock(); public: + enum + { + CLOCK_OFF = 0, + CLOCK_DIGITAL_HM = 1, + CLOCK_DIGITAL_HMS = 2, + CLOCK_ANALOG = 3 + }; + nGLCD(); ~nGLCD(); void DeInit(); diff --git a/src/gui/glcdsetup.cpp b/src/gui/glcdsetup.cpp index 5fc46f551..83e5919df 100644 --- a/src/gui/glcdsetup.cpp +++ b/src/gui/glcdsetup.cpp @@ -221,10 +221,10 @@ bool GLCD_Menu::changeNotify (const neutrino_locale_t OptionName, void *Data) #define ONOFFSEC_OPTION_COUNT 3 static const CMenuOptionChooser::keyval ONOFFSEC_OPTIONS[ONOFFSEC_OPTION_COUNT] = { - { 0, LOCALE_OPTIONS_OFF }, - { 1, LOCALE_OPTIONS_ON }, -// { 2, LOCALE_CLOCK_SECONDS }, - { 3, LOCALE_OPTIONS_ON } // FIXME + { nGLCD::CLOCK_OFF, LOCALE_OPTIONS_OFF }, + { nGLCD::CLOCK_DIGITAL_HM, LOCALE_GLCD_CLOCK_DIGITAL_HM }, +// { nGLCD::CLOCK_DIGITAL_HMS, LOCALE_GLCD_CLOCK_DIGITAL_HMS }, + { nGLCD::CLOCK_ANALOG, LOCALE_GLCD_CLOCK_ANALOG } }; void GLCD_Menu::GLCD_Menu_Settings() diff --git a/src/system/locals.h b/src/system/locals.h index fad6db99e..33f5c7779 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -915,6 +915,8 @@ typedef enum LOCALE_FSK_TO_7, LOCALE_GLCD_BRIGHTNESS, LOCALE_GLCD_BRIGHTNESS_STANDBY, + LOCALE_GLCD_CLOCK_ANALOG, + LOCALE_GLCD_CLOCK_DIGITAL_HM, LOCALE_GLCD_COLOR_AMBER, LOCALE_GLCD_COLOR_BLACK, LOCALE_GLCD_COLOR_BLUE, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 164e03695..b56a704dd 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -915,6 +915,8 @@ const char * locale_real_names[] = "fsk.to_7", "glcd.brightness", "glcd.brightness_standby", + "glcd.clock.analog", + "glcd.clock.digital_hm", "glcd.color.amber", "glcd.color.black", "glcd.color.blue",