summaryrefslogtreecommitdiff
path: root/src/gpm-backlight.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-backlight.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-backlight.c')
-rw-r--r--src/gpm-backlight.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpm-backlight.c b/src/gpm-backlight.c
index 1f1d834..d2938a4 100644
--- a/src/gpm-backlight.c
+++ b/src/gpm-backlight.c
@@ -410,7 +410,11 @@ gpm_settings_key_changed_cb (GSettings *settings, const gchar *key, GpmBacklight
* Does the actions when the ac power source is inserted/removed.
**/
static void
+#if UP_CHECK_VERSION(0, 99, 0)
+gpm_backlight_client_changed_cb (UpClient *client, GParamSpec *pspec, GpmBacklight *backlight)
+#else
gpm_backlight_client_changed_cb (UpClient *client, GpmBacklight *backlight)
+#endif
{
gpm_backlight_brightness_evaluate_and_set (backlight, FALSE, TRUE);
}
@@ -727,8 +731,13 @@ gpm_backlight_init (GpmBacklight *backlight)
/* we use up_client for the ac-adapter-changed signal */
backlight->priv->client = up_client_new ();
+#if UP_CHECK_VERSION(0, 99, 0)
+ g_signal_connect (backlight->priv->client, "notify",
+ G_CALLBACK (gpm_backlight_client_changed_cb), backlight);
+#else
g_signal_connect (backlight->priv->client, "changed",
G_CALLBACK (gpm_backlight_client_changed_cb), backlight);
+#endif
/* gets caps */
backlight->priv->can_dim = gpm_brightness_has_hw (backlight->priv->brightness);