diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-10-17 09:04:03 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-10-17 09:04:03 +0200 |
commit | db31456921f9977d8fef8ed1dcee6517107358ff (patch) | |
tree | dcd098e7365d3d1b2fb8bc2170a4cf29c1a92a3c /tools | |
parent | a7870229ee32616ac9e55edbab1045d1dac171be (diff) | |
download | upower-db31456921f9977d8fef8ed1dcee6517107358ff.tar.gz |
all: Add GetCriticalAction daemon method
This allows desktop front-ends to get which action will
actually be taken when we hit critical battery.
This is not a property as availability of actions might
change over the course of the run of the system, and
we didn't want to make unnecessary D-Bus calls on startup.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/up-tool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/up-tool.c b/tools/up-tool.c index 99dba78..8e58d00 100644 --- a/tools/up-tool.c +++ b/tools/up-tool.c @@ -124,6 +124,7 @@ up_client_print (UpClient *client) gboolean lid_is_closed; gboolean lid_is_present; gboolean is_docked; + char *action; g_object_get (client, "daemon-version", &daemon_version, @@ -138,6 +139,9 @@ up_client_print (UpClient *client) g_print (" lid-is-closed: %s\n", lid_is_closed ? "yes" : "no"); g_print (" lid-is-present: %s\n", lid_is_present ? "yes" : "no"); g_print (" is-docked: %s\n", is_docked ? "yes" : "no"); + action = up_client_get_critical_action (client); + g_print (" critical-action: %s\n", action); + g_free (action); g_free (daemon_version); } |