summaryrefslogtreecommitdiff
path: root/src/gpm-manager.c
diff options
context:
space:
mode:
authorStefan Seyfried <[email protected]>2014-04-09 15:12:17 +0200
committerStefan Seyfried <[email protected]>2014-04-09 15:12:17 +0200
commitd59f4b8bd38e1628af3a992ae8e96b8e069ab738 (patch)
treebb895796d71a346eff190714b865928d82980422 /src/gpm-manager.c
parent220a4e0a64aca0579f50e6e57d4eca848b3ac57f (diff)
downloadmate-power-manager-d59f4b8bd38e1628af3a992ae8e96b8e069ab738.tar.bz2
mate-power-manager-d59f4b8bd38e1628af3a992ae8e96b8e069ab738.tar.xz
port mate-power-manager to upower-0.99 API
fix mate-power-manager for current upower versions
Diffstat (limited to 'src/gpm-manager.c')
-rw-r--r--src/gpm-manager.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index c4d0530..df84cac 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -971,7 +971,11 @@ gpm_manager_get_spindown_timeout (GpmManager *manager)
* gpm_manager_client_changed_cb:
**/
static void
+#if UP_CHECK_VERSION(0, 99, 0)
+gpm_manager_client_changed_cb (UpClient *client, GParamSpec *pspec, GpmManager *manager)
+#else
gpm_manager_client_changed_cb (UpClient *client, GpmManager *manager)
+#endif
{
gboolean event_when_closed;
gint timeout;
@@ -1853,8 +1857,13 @@ gpm_manager_init (GpmManager *manager)
g_signal_connect (manager->priv->settings, "changed",
G_CALLBACK (gpm_manager_settings_changed_cb), manager);
manager->priv->client = up_client_new ();
+#if UP_CHECK_VERSION(0, 99, 0)
+ g_signal_connect (manager->priv->client, "notify",
+ G_CALLBACK (gpm_manager_client_changed_cb), manager);
+#else
g_signal_connect (manager->priv->client, "changed",
G_CALLBACK (gpm_manager_client_changed_cb), manager);
+#endif
/* use libmatenotify */
notify_init (GPM_NAME);