[gnome-settings-daemon] power: Only listen to lid-is-closed changing
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Only listen to lid-is-closed changing
- Date: Thu, 17 Oct 2013 15:44:24 +0000 (UTC)
commit 88de071eadadee7be45095bcf16e2f83dd2d2fac
Author: Bastien Nocera <hadess hadess net>
Date: Thu Oct 17 12:12:00 2013 +0200
power: Only listen to lid-is-closed changing
We don't need to listen to all the changed signals from UpClient,
as we're only interested in the lid state changing.
plugins/power/gsd-power-manager.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index d4c5ea6..51fae45 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -1219,7 +1219,7 @@ do_lid_closed_action (GsdPowerManager *manager)
}
static void
-up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
+lid_state_changed_cb (UpClient *client, GParamSpec *pspec, GsdPowerManager *manager)
{
gboolean tmp;
@@ -2304,8 +2304,8 @@ on_rr_screen_acquired (GObject *object,
G_CALLBACK (engine_device_added_cb), manager);
g_signal_connect (manager->priv->up_client, "device-removed",
G_CALLBACK (engine_device_removed_cb), manager);
- g_signal_connect_after (manager->priv->up_client, "changed",
- G_CALLBACK (up_client_changed_cb), manager);
+ g_signal_connect_after (manager->priv->up_client, "notify::lid-is-closed",
+ G_CALLBACK (lid_state_changed_cb), manager);
g_signal_connect (manager->priv->up_client, "notify::on-battery",
G_CALLBACK (up_client_on_battery_cb), manager);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]