diff options
author | discomfitor <discomfitor> | 2011-08-01 20:30:29 +0000 |
---|---|---|
committer | discomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33> | 2011-08-01 20:30:29 +0000 |
commit | 18e059b0c58c536949777205f2d857d5149b93c3 (patch) | |
tree | ab08212536ad2df46f1ce7bd9829c19be2598715 /src/lib | |
parent | 8b7872a4a27860df7d3905faa2400a5b89e2b308 (diff) | |
download | eeze-18e059b0c58c536949777205f2d857d5149b93c3.tar.gz eeze-18e059b0c58c536949777205f2d857d5149b93c3.tar.bz2 eeze-18e059b0c58c536949777205f2d857d5149b93c3.zip |
try something new for battery/ac detection. this may break some stuff, so ping me if your battery gadget stops working...
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eeze@61967 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/eeze_udev_watch.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/eeze_udev_watch.c b/src/lib/eeze_udev_watch.c index a071f2a..cebfaab 100644 --- a/src/lib/eeze_udev_watch.c +++ b/src/lib/eeze_udev_watch.c @@ -216,9 +216,8 @@ _get_syspath_from_watch(void *data, || (strcmp(test, "power_supply"))) goto error; #endif - if (!(test = udev_device_get_property_value(device, "POWER_SUPPLY_TYPE")) - || (strcmp("Mains", test))) - goto error; + test = udev_device_get_property_value(device, "POWER_SUPPLY_ONLINE"); + if (!test) goto error; break; case EEZE_UDEV_TYPE_POWER_BAT: @@ -227,9 +226,8 @@ _get_syspath_from_watch(void *data, || (strcmp(test, "power_supply"))) goto error; #endif - if (!(test = udev_device_get_property_value(device, "POWER_SUPPLY_TYPE")) - || (strcmp("Battery", test))) - goto error; + test = udev_device_get_property_value(device, "POWER_SUPPLY_PRESENT"); + if (!test) goto error; break; case EEZE_UDEV_TYPE_NET: |