aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-09-26 14:53:36 +0100
committerRoss Burton <ross.burton@intel.com>2013-09-26 16:16:01 +0100
commitf3b437fa286192fe3f80322a1e94a605aa06846d (patch)
treef4239a4f3377b9f6d534acaaee50f70e91094046
parentc0b1a2310721d96edbb54279cd6d38bfa30d87dc (diff)
downloadmatchbox-panel-2-f3b437fa286192fe3f80322a1e94a605aa06846d.tar.gz
matchbox-panel-2-f3b437fa286192fe3f80322a1e94a605aa06846d.tar.bz2
matchbox-panel-2-f3b437fa286192fe3f80322a1e94a605aa06846d.zip
battery-acpi: don't warn in normal situations
If the machine doesn't actually have a battery, don't print two warnings to the console. Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--applets/battery/battery-acpi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/applets/battery/battery-acpi.c b/applets/battery/battery-acpi.c
index 6515cb0..c44dd12 100644
--- a/applets/battery/battery-acpi.c
+++ b/applets/battery/battery-acpi.c
@@ -14,8 +14,6 @@ int batt_state, ac_state;
int pm_support(void)
{
if(check_acpi_support() == NOT_SUPPORTED){
- g_warning("No ACPI support\n");
-
return 0;
}
@@ -32,8 +30,9 @@ const char* pm_battery_icon(void)
const char *icon;
battery_t *binfo;
+ /* No battery available (not present, disabled, or something
+ else. Silently do nothing. */
if (batt_state != SUCCESS) {
- g_warning("Couldnt initialize ACPI battery\n");
return NULL;
}