[gnome-power-manager] Don't export a full text device description in the tuple, the shell doesn't use it and an icon is mu
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-power-manager] Don't export a full text device description in the tuple, the shell doesn't use it and an icon is mu
- Date: Thu, 18 Nov 2010 19:41:06 +0000 (UTC)
commit bb4a434d61d040e73e5986ee8a7375a2ae5f09c7
Author: Richard Hughes <richard hughsie com>
Date: Thu Nov 18 19:40:42 2010 +0000
Don't export a full text device description in the tuple, the shell doesn't use it and an icon is much more interesting
src/gpm-manager.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index d4f4e37..ebd9598 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -2007,22 +2007,23 @@ gpm_manager_control_resume_cb (GpmControl *control, GpmControlAction action, Gpm
static GVariant *
gpm_manager_device_to_variant_blob (UpDevice *device)
{
- gchar *display = NULL;
UpDeviceKind kind;
UpDeviceState state;
gdouble percentage;
guint64 time_state = 0;
guint64 time_empty, time_full;
GVariant *value;
+ GIcon *icon;
+ gchar *device_icon;
- display = gpm_upower_get_device_summary (device);
+ icon = gpm_upower_get_device_icon (device, FALSE);
+ device_icon = g_icon_to_string (icon);
g_object_get (device,
"kind", &kind,
"percentage", &percentage,
"state", &state,
"time-to-empty", &time_empty,
"time-to-full", &time_full,
- /* need icon! */
NULL);
/* only return time for these simple states */
@@ -2035,11 +2036,11 @@ gpm_manager_device_to_variant_blob (UpDevice *device)
value = g_variant_new ("(susdut)",
up_device_get_object_path (device),
kind,
- display,
+ device_icon,
percentage,
state,
time_state);
- g_free (display);
+ g_free (device_icon);
return value;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]