[gnome-settings-daemon] power: Simplify engine_ups_discharging()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Simplify engine_ups_discharging()
- Date: Thu, 17 Oct 2013 15:43:49 +0000 (UTC)
commit 6454d340bd0d58e95b1020e3fec0cece73fdccab
Author: Bastien Nocera <hadess hadess net>
Date: Thu Oct 17 11:38:45 2013 +0200
power: Simplify engine_ups_discharging()
It's only ever called for UPS devices.
plugins/power/gsd-power-manager.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 611628c..bdd501a 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -318,21 +318,14 @@ engine_ups_discharging (GsdPowerManager *manager, UpDevice *device)
char *icon_name;
gint64 time_to_empty;
GString *message;
- UpDeviceKind kind;
/* get device properties */
g_object_get (device,
- "kind", &kind,
"percentage", &percentage,
"time-to-empty", &time_to_empty,
"icon-name", &icon_name,
NULL);
- if (kind != UP_DEVICE_KIND_UPS) {
- g_free (icon_name);
- return;
- }
-
main_battery_or_ups_low_changed (manager, TRUE);
/* only show text if there is a valid time */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]