[gnome-power-manager] Fix compile for old versions of upower



commit f8b7165959563187f229c29ea50bee713a62bf55
Author: Richard Hughes <richard hughsie com>
Date:   Tue May 11 18:13:15 2010 +0100

    Fix compile for old versions of upower

 src/gpm-prefs-core.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c
index 74a5d82..f08e8d6 100644
--- a/src/gpm-prefs-core.c
+++ b/src/gpm-prefs-core.c
@@ -890,7 +890,13 @@ gpm_prefs_init (GpmPrefs *prefs)
 	/* get values from UpClient */
 	prefs->priv->can_suspend = up_client_get_can_suspend (prefs->priv->client);
 	prefs->priv->can_hibernate = up_client_get_can_hibernate (prefs->priv->client);
+#if UP_CHECK_VERSION(0,9,2)
 	prefs->priv->has_button_lid = up_client_get_lid_is_present (prefs->priv->client);
+#else
+	g_object_get (prefs->priv->client,
+		      "lid-is-present", &prefs->priv->has_button_lid,
+		      NULL);
+#endif
 	prefs->priv->has_button_suspend = TRUE;
 
 	/* find if we have brightness hardware */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]