mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-08 13:38:01 +02:00
trivial cosmetic changes to DkpSupply
This commit is contained in:
parent
bae6018698
commit
fd884567be
2 changed files with 6 additions and 4 deletions
|
|
@ -39,7 +39,7 @@
|
|||
#include "dkp-supply.h"
|
||||
#include "dkp-history.h"
|
||||
|
||||
#define DK_POWER_MIN_CHARGED_PERCENTAGE 60
|
||||
#define DKP_SUPPLY_REFRESH_TIMEOUT 30L
|
||||
|
||||
struct DkpSupplyPrivate
|
||||
{
|
||||
|
|
@ -450,7 +450,9 @@ dkp_supply_refresh (DkpDevice *device)
|
|||
* if we are charging or discharging */
|
||||
if (obj->battery_state == DKP_SOURCE_STATE_CHARGING ||
|
||||
obj->battery_state == DKP_SOURCE_STATE_DISCHARGING)
|
||||
supply->priv->poll_timer_id = g_timeout_add_seconds (30, (GSourceFunc) dkp_supply_poll_battery, supply);
|
||||
supply->priv->poll_timer_id =
|
||||
g_timeout_add_seconds (DKP_SUPPLY_REFRESH_TIMEOUT,
|
||||
(GSourceFunc) dkp_supply_poll_battery, supply);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ G_BEGIN_DECLS
|
|||
#define DKP_SUPPLY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DKP_TYPE_SUPPLY, DkpSupply))
|
||||
#define DKP_SUPPLY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DKP_TYPE_SUPPLY, DkpSupplyClass))
|
||||
#define DKP_IS_SUPPLY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DKP_TYPE_SUPPLY))
|
||||
#define DKP_IS_SUPPLY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DKP_TYPE_SUPPLY))
|
||||
#define DKP_SUPPLY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DKP_TYPE_SUPPLY, DkpSupplyClass))
|
||||
#define DKP_IS_SUPPLY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DKP_TYPE_SUPPLY))
|
||||
#define DKP_SUPPLY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DKP_TYPE_SUPPLY, DkpSupplyClass))
|
||||
|
||||
typedef struct DkpSupplyPrivate DkpSupplyPrivate;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue