summaryrefslogtreecommitdiff
path: root/apps/menus/main_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/menus/main_menu.c')
-rw-r--r--apps/menus/main_menu.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index 4c15b1de4b..b22824d8bd 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -27,6 +27,7 @@
27#include "lang.h" 27#include "lang.h"
28#include "action.h" 28#include "action.h"
29#include "settings.h" 29#include "settings.h"
30#include "power.h"
30#include "powermgmt.h" 31#include "powermgmt.h"
31#include "menu.h" 32#include "menu.h"
32#include "misc.h" 33#include "misc.h"
@@ -199,15 +200,14 @@ static char* info_getname(int selected_item, void *data,
199 if (charge_state == CHARGING) 200 if (charge_state == CHARGING)
200 return (char *)str(LANG_BATTERY_CHARGE); 201 return (char *)str(LANG_BATTERY_CHARGE);
201 else 202 else
202#if CONFIG_CHARGING == CHARGING_CONTROL 203#ifdef ARCHOS_RECORDER
203 if (charge_state == TOPOFF) 204 if (charge_state == TOPOFF)
204 return (char *)str(LANG_BATTERY_TOPOFF_CHARGE); 205 return (char *)str(LANG_BATTERY_TOPOFF_CHARGE);
205 else 206 else if (charge_state == TRICKLE)
206#endif
207 if (charge_state == TRICKLE)
208 return (char *)str(LANG_BATTERY_TRICKLE_CHARGE); 207 return (char *)str(LANG_BATTERY_TRICKLE_CHARGE);
209 else 208 else
210#endif 209#endif /* ARCHOS_RECORDER */
210#endif /* CONFIG_CHARGING = */
211 if (battery_level() >= 0) 211 if (battery_level() >= 0)
212 snprintf(buffer, buffer_len, (char *)str(LANG_BATTERY_TIME), 212 snprintf(buffer, buffer_len, (char *)str(LANG_BATTERY_TIME),
213 battery_level(), battery_time() / 60, battery_time() % 60); 213 battery_level(), battery_time() / 60, battery_time() % 60);
@@ -282,22 +282,21 @@ static int info_speak_item(int selected_item, void * data)
282 } 282 }
283 case INFO_BATTERY: /* battery */ 283 case INFO_BATTERY: /* battery */
284#if CONFIG_CHARGING == CHARGING_SIMPLE 284#if CONFIG_CHARGING == CHARGING_SIMPLE
285 if (charger_input_state == CHARGER) 285 if (charger_inserted())
286 talk_id(LANG_BATTERY_CHARGE, true); 286 talk_id(LANG_BATTERY_CHARGE, true);
287 else 287 else
288#elif CONFIG_CHARGING >= CHARGING_MONITOR 288#elif CONFIG_CHARGING >= CHARGING_MONITOR
289 if (charge_state == CHARGING) 289 if (charge_state == CHARGING)
290 talk_id(LANG_BATTERY_CHARGE, true); 290 talk_id(LANG_BATTERY_CHARGE, true);
291 else 291 else
292#if CONFIG_CHARGING == CHARGING_CONTROL 292#ifdef ARCHOS_RECORDER
293 if (charge_state == TOPOFF) 293 if (charge_state == TOPOFF)
294 talk_id(LANG_BATTERY_TOPOFF_CHARGE, true); 294 talk_id(LANG_BATTERY_TOPOFF_CHARGE, true);
295 else 295 else if (charge_state == TRICKLE)
296#endif
297 if (charge_state == TRICKLE)
298 talk_id(LANG_BATTERY_TRICKLE_CHARGE, true); 296 talk_id(LANG_BATTERY_TRICKLE_CHARGE, true);
299 else 297 else
300#endif 298#endif /* ARCHOS_RECORDER */
299#endif /* CONFIG_CHARGING = */
301 if (battery_level() >= 0) 300 if (battery_level() >= 0)
302 { 301 {
303 talk_id(LANG_BATTERY_TIME, false); 302 talk_id(LANG_BATTERY_TIME, false);