Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : apps/e
Dir : e17/apps/e/src/modules/battery
Modified Files:
e_mod_main.c
Log Message:
Touch up some of the output values.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/modules/battery/e_mod_main.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- e_mod_main.c 18 Aug 2005 05:35:02 -0000 1.40
+++ e_mod_main.c 18 Aug 2005 06:09:43 -0000 1.41
@@ -1408,7 +1408,8 @@
if (CFDictionaryGetValueIfPresent(device_dict,
CFSTR(kIOPSIsChargingKey), &values))
{
stat->has_battery = 1;
- if (CFBooleanGetValue(values))
+ printf("%s: %d\n", kIOPSIsChargingKey, CFBooleanGetValue(values));
+ if (CFBooleanGetValue(values) > 0)
{
stat->state = BATTERY_STATE_CHARGING;
}
@@ -1501,8 +1502,13 @@
/*
* Store the time remaining.
*/
- snprintf(buf, sizeof(buf), "%i:%02i", hours, minutes);
- stat->time = strdup(buf);
+ if (minutes >= 0)
+ {
+ snprintf(buf, sizeof(buf), "%i:%02i", hours, minutes);
+ stat->time = strdup(buf);
+ }
+ else
+ stat->time = strdup("--:--");
CFRelease(sources);
CFRelease(blob);
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs