[Xfce4-commits] <xfce4-session:nick/shutdown-cleanup> Add lock screen property in dialog.
Nick Schermer
noreply at xfce.org
Sat Mar 24 22:20:02 CET 2012
Updating branch refs/heads/nick/shutdown-cleanup
to 1c8cedf1cc925ced8ffa40be5622d03d70e8e65e (commit)
from cb75879b71dbdee658173a647c0c82810a389287 (commit)
commit 1c8cedf1cc925ced8ffa40be5622d03d70e8e65e
Author: Nick Schermer <nick at xfce.org>
Date: Sat Mar 24 22:18:55 2012 +0100
Add lock screen property in dialog.
settings/startup-settings.c | 6 +++++
settings/xfce4-session-settings.glade | 38 +++++++++++++++++++++++++++++++++
xfce4-session/xfsm-upower.c | 1 +
3 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/settings/startup-settings.c b/settings/startup-settings.c
index ebaae8f..2d412bc 100644
--- a/settings/startup-settings.c
+++ b/settings/startup-settings.c
@@ -34,6 +34,8 @@
#define ENABLE_TCP_PROP "/security/EnableTcp"
+#define LOCK_SCREEN_PROP "/shutdown/LockScreen"
+
void
startup_settings_init(GtkBuilder *builder)
{
@@ -60,4 +62,8 @@ startup_settings_init(GtkBuilder *builder)
xfconf_g_property_bind(channel, ENABLE_TCP_PROP, G_TYPE_BOOLEAN,
gtk_builder_get_object(builder, "chk_enable_tcp"),
"active");
+
+ xfconf_g_property_bind(channel, LOCK_SCREEN_PROP, G_TYPE_BOOLEAN,
+ gtk_builder_get_object(builder, "chk_lock_screen"),
+ "active");
}
diff --git a/settings/xfce4-session-settings.glade b/settings/xfce4-session-settings.glade
index 367022f..ba106b1 100644
--- a/settings/xfce4-session-settings.glade
+++ b/settings/xfce4-session-settings.glade
@@ -25,6 +25,7 @@
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
@@ -756,6 +757,43 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkFrame" id="frame6">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment7">
+ <property name="visible">True</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkCheckButton" id="chk_lock_screen">
+ <property name="label" translatable="yes">_Lock screen before sleep</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Run xflock4 before suspending or hibernating the system</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Shutdown</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="position">3</property>
diff --git a/xfce4-session/xfsm-upower.c b/xfce4-session/xfsm-upower.c
index 4707acc..9d2aff2 100644
--- a/xfce4-session/xfsm-upower.c
+++ b/xfce4-session/xfsm-upower.c
@@ -22,6 +22,7 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
+#include <libxfsm/xfsm-util.h>
#include <xfce4-session/xfsm-upower.h>
More information about the Xfce4-commits
mailing list