summaryrefslogtreecommitdiff
path: root/src/gpm-button.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpm-button.c')
-rw-r--r--src/gpm-button.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gpm-button.c b/src/gpm-button.c
index 1e38173..b331cf6 100644
--- a/src/gpm-button.c
+++ b/src/gpm-button.c
@@ -324,7 +324,11 @@ gpm_button_reset_time (GpmButton *button)
* gpm_button_client_changed_cb
**/
static void
+#if UP_CHECK_VERSION(0, 99, 0)
+gpm_button_client_changed_cb (UpClient *client, GParamSpec *pspec, GpmButton *button)
+#else
gpm_button_client_changed_cb (UpClient *client, GpmButton *button)
+#endif
{
gboolean lid_is_closed;
@@ -363,9 +367,13 @@ gpm_button_init (GpmButton *button)
button->priv->client = up_client_new ();
button->priv->lid_is_closed = up_client_get_lid_is_closed (button->priv->client);
+#if UP_CHECK_VERSION(0, 99, 0)
+ g_signal_connect (button->priv->client, "notify",
+ G_CALLBACK (gpm_button_client_changed_cb), button);
+#else
g_signal_connect (button->priv->client, "changed",
G_CALLBACK (gpm_button_client_changed_cb), button);
-
+#endif
/* register the brightness keys */
gpm_button_xevent_key (button, XF86XK_PowerOff, GPM_BUTTON_POWER);
#ifdef HAVE_XF86XK_SUSPEND