forked from enlightenment/enlightenment
update battery module to use new ecore poller functions and avoid destroying poller objects every few seconds
SVN revision: 49003
This commit is contained in:
parent
4fad3f4501
commit
9a864815ef
|
@ -202,9 +202,8 @@ _battery_udev_battery_update(const char *syspath, Battery *bat)
|
|||
if (!(bat = _battery_battery_find(syspath)))
|
||||
return _battery_udev_battery_add(syspath);
|
||||
}
|
||||
/* reset the poller */
|
||||
ecore_poller_del(bat->poll);
|
||||
bat->poll = ecore_poller_add(ECORE_POLLER_CORE, battery_config->poll_interval, _battery_udev_battery_update_poll, bat);
|
||||
/* update the poller interval */
|
||||
ecore_poller_poller_interval_set(bat->poll, battery_config->poll_interval);
|
||||
|
||||
GET_NUM(bat, present, POWER_SUPPLY_PRESENT);
|
||||
if (!bat->got_prop)
|
||||
|
|
Loading…
Reference in New Issue