[Xfce4-commits] [xfce/xfce4-power-manager] 01/01: Fix logic of xfconf logind inhibition keys

noreply at xfce.org noreply at xfce.org
Wed Sep 3 15:44:18 CEST 2014


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository xfce/xfce4-power-manager.

commit 03193df6cad651841e8d9960335b4a3bf13afdad
Author: Yves-Alexis Perez <corsac at debian.org>
Date:   Wed Sep 3 15:44:06 2014 +0200

    Fix logic of xfconf logind inhibition keys
---
 src/xfpm-manager.c |   18 +++++++++---------
 src/xfpm-xfconf.c  |    8 ++++----
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/xfpm-manager.c b/src/xfpm-manager.c
index a7417a5..d6c533c 100644
--- a/src/xfpm-manager.c
+++ b/src/xfpm-manager.c
@@ -504,22 +504,22 @@ xfpm_manager_get_systemd_events(XfpmManager *manager)
 {
     GSList *events = NULL;
     gchar *what = "";
-    gboolean handle_power_key, handle_suspend_key, handle_hibernate_key, handle_lid_switch;
+    gboolean logind_handle_power_key, logind_handle_suspend_key, logind_handle_hibernate_key, logind_handle_lid_switch;
 
     g_object_get (G_OBJECT (manager->priv->conf),
-        LOGIND_HANDLE_POWER_KEY, &handle_power_key,
-        LOGIND_HANDLE_SUSPEND_KEY, &handle_suspend_key,
-        LOGIND_HANDLE_HIBERNATE_KEY, &handle_hibernate_key,
-        LOGIND_HANDLE_LID_SWITCH, &handle_lid_switch,
+        LOGIND_HANDLE_POWER_KEY, &logind_handle_power_key,
+        LOGIND_HANDLE_SUSPEND_KEY, &logind_handle_suspend_key,
+        LOGIND_HANDLE_HIBERNATE_KEY, &logind_handle_hibernate_key,
+        LOGIND_HANDLE_LID_SWITCH, &logind_handle_lid_switch,
         NULL);
 
-    if (handle_power_key)
+    if (!logind_handle_power_key)
         events = g_slist_append(events, "handle-power-key");
-    if (handle_suspend_key)
+    if (!logind_handle_suspend_key)
         events = g_slist_append(events, "handle-suspend-key");
-    if (handle_hibernate_key)
+    if (!logind_handle_hibernate_key)
         events = g_slist_append(events, "handle-hibernate-key");
-    if (handle_lid_switch)
+    if (!logind_handle_lid_switch)
         events = g_slist_append(events, "handle-lid-switch");
 
     while (events != NULL)
diff --git a/src/xfpm-xfconf.c b/src/xfpm-xfconf.c
index 2603bc1..721d977 100644
--- a/src/xfpm-xfconf.c
+++ b/src/xfpm-xfconf.c
@@ -563,7 +563,7 @@ xfpm_xfconf_class_init (XfpmXfconfClass *klass)
                                      PROP_LOGIND_HANDLE_POWER_KEY,
                                      g_param_spec_boolean (LOGIND_HANDLE_POWER_KEY,
                                                            NULL, NULL,
-                                                           TRUE,
+                                                           FALSE,
                                                            G_PARAM_READWRITE));
 
     /**
@@ -573,7 +573,7 @@ xfpm_xfconf_class_init (XfpmXfconfClass *klass)
                                      PROP_LOGIND_HANDLE_SUSPEND_KEY,
                                      g_param_spec_boolean (LOGIND_HANDLE_SUSPEND_KEY,
                                                            NULL, NULL,
-                                                           TRUE,
+                                                           FALSE,
                                                            G_PARAM_READWRITE));
 
     /**
@@ -583,7 +583,7 @@ xfpm_xfconf_class_init (XfpmXfconfClass *klass)
                                      PROP_LOGIND_HANDLE_HIBERNATE_KEY,
                                      g_param_spec_boolean (LOGIND_HANDLE_HIBERNATE_KEY,
                                                            NULL, NULL,
-                                                           TRUE,
+                                                           FALSE,
                                                            G_PARAM_READWRITE));
 
     /**
@@ -593,7 +593,7 @@ xfpm_xfconf_class_init (XfpmXfconfClass *klass)
                                      PROP_LOGIND_HANDLE_LID_SWITCH,
                                      g_param_spec_boolean (LOGIND_HANDLE_LID_SWITCH,
                                                            NULL, NULL,
-                                                           TRUE,
+                                                           FALSE,
                                                            G_PARAM_READWRITE));
 
     g_type_class_add_private (klass, sizeof (XfpmXfconfPrivate));

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list