diff options
author | Stefan Seyfried <[email protected]> | 2014-04-09 15:12:17 +0200 |
---|---|---|
committer | Stefan Seyfried <[email protected]> | 2014-04-09 15:12:17 +0200 |
commit | d59f4b8bd38e1628af3a992ae8e96b8e069ab738 (patch) | |
tree | bb895796d71a346eff190714b865928d82980422 /src/gpm-button.c | |
parent | 220a4e0a64aca0579f50e6e57d4eca848b3ac57f (diff) | |
download | mate-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-button.c')
-rw-r--r-- | src/gpm-button.c | 10 |
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 |