From 372c2f8d2922add987683a24b5d69902e05e2f97 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 12 Feb 2013 11:00:21 +0000 Subject: Add a --enable-deprecated configure argument This is turned off by default. If this is not set, then any calls to Suspend(), SuspendAllowed(), Hibernate() or HibernateAllowed() will fail with an error. The error mesage tells the user what new method to port to in logind. I'm expecting to set --enable-deprecated for Fedora 17 and 18, but turn it off for Fedora 19, so other distributions probably want to follow suit to find out what other stuff needs to be ported to the new APIs early. GNOME should already be fine, but KDE will need some solid porting as I understand it. See http://lists.freedesktop.org/archives/devkit-devel/2013-January/001339.html for more information on future plans and for rationale. --- tools/up-tool.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/up-tool.c b/tools/up-tool.c index fcdc28b..87051e3 100644 --- a/tools/up-tool.c +++ b/tools/up-tool.c @@ -118,8 +118,10 @@ static void up_client_print (UpClient *client) { gchar *daemon_version; +#ifdef ENABLE_DEPRECATED gboolean can_suspend; gboolean can_hibernate; +#endif gboolean on_battery; gboolean on_low_battery; gboolean lid_is_closed; @@ -128,8 +130,10 @@ up_client_print (UpClient *client) g_object_get (client, "daemon-version", &daemon_version, +#ifdef ENABLE_DEPRECATED "can-suspend", &can_suspend, "can-hibernate", &can_hibernate, +#endif "on-battery", &on_battery, "on-low_battery", &on_low_battery, "lid-is-closed", &lid_is_closed, @@ -138,8 +142,10 @@ up_client_print (UpClient *client) NULL); g_print (" daemon-version: %s\n", daemon_version); +#ifdef ENABLE_DEPRECATED g_print (" can-suspend: %s\n", can_suspend ? "yes" : "no"); g_print (" can-hibernate: %s\n", can_hibernate ? "yes" : "no"); +#endif g_print (" on-battery: %s\n", on_battery ? "yes" : "no"); g_print (" on-low-battery: %s\n", on_low_battery ? "yes" : "no"); g_print (" lid-is-closed: %s\n", lid_is_closed ? "yes" : "no"); -- cgit v1.2.1