Xfce Wiki

Sub domains
 
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2014-09-03 15:44:06 +0200
committerSimon Steinbeiss <simon.steinbeiss@elfenbeinturm.at>2014-09-03 15:44:06 +0200
commit03193df6cad651841e8d9960335b4a3bf13afdad (patch)
treeedfc367f5452525a3846dc551b8877e11395ca02
parent488fc9570f15f45dc43a48e5ad0a23deadffc259 (diff)
downloadxfce4-power-manager-03193df6cad651841e8d9960335b4a3bf13afdad.tar.gz
Fix logic of xfconf logind inhibition keys
-rw-r--r--src/xfpm-manager.c18
-rw-r--r--src/xfpm-xfconf.c8
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));