[Xfce4-commits] [apps/xfce4-screensaver] 379/425: Drop org.xfce.lockdown.gschema.xml

noreply at xfce.org noreply at xfce.org
Mon Oct 15 01:53:46 CEST 2018


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

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit d51c3c6da2a6661381fb0c744dd34a054b5af76f
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Mon Oct 8 06:51:31 2018 -0400

    Drop org.xfce.lockdown.gschema.xml
---
 data/Makefile.am                      |  2 +-
 data/org.xfce.lockdown.gschema.xml.in | 49 ---------------------------------
 po/POTFILES.in                        |  1 -
 src/gs-monitor.c                      |  6 ++--
 src/gs-prefs.c                        | 52 -----------------------------------
 src/gs-prefs.h                        |  2 --
 src/xfce4-screensaver-preferences.c   | 44 -----------------------------
 7 files changed, 4 insertions(+), 152 deletions(-)

diff --git a/data/Makefile.am b/data/Makefile.am
index 3d1daf3..13d0f3f 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -43,7 +43,7 @@ dbussessionservice_DATA = org.xfce.ScreenSaver.service
 @GSETTINGS_RULES@
 @INTLTOOL_XML_NOMERGE_RULE@
 
-gsettingsschema_in_files = org.xfce.screensaver.gschema.xml.in org.xfce.lockdown.gschema.xml.in org.xfce.session.gschema.xml.in
+gsettingsschema_in_files = org.xfce.screensaver.gschema.xml.in org.xfce.session.gschema.xml.in
 gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
 
 EXTRA_DIST = 				\
diff --git a/data/org.xfce.lockdown.gschema.xml.in b/data/org.xfce.lockdown.gschema.xml.in
deleted file mode 100644
index 65c0a1a..0000000
--- a/data/org.xfce.lockdown.gschema.xml.in
+++ /dev/null
@@ -1,49 +0,0 @@
-<schemalist gettext-domain="@GETTEXT_PACKAGE@">
-  <schema id="org.xfce.lockdown" path="/org/xfce/desktop/lockdown/">
-    <key name="disable-command-line" type="b">
-      <default>false</default>
-      <summary>Disable command line</summary>
-      <description>Prevent the user from accessing the terminal or specifying a command line to be executed. For example, this would disable access to the panel's "Run Application" dialog.</description>
-    </key>
-    <key name="disable-save-to-disk" type="b">
-      <default>false</default>
-      <summary>Disable saving files to disk</summary>
-      <description>Prevent the user from saving files to disk. For example, this would disable access to all applications' "Save as" dialogs.</description>
-    </key>
-    <key name="disable-printing" type="b">
-      <default>false</default>
-      <summary>Disable printing</summary>
-      <description>Prevent the user from printing. For example, this would disable access to all applications' "Print" dialogs.</description>
-    </key>
-    <key name="disable-print-setup" type="b">
-      <default>false</default>
-      <summary>Disable print setup</summary>
-      <description>Prevent the user from modifying print settings. For example, this would disable access to all applications' "Print Setup" dialogs.</description>
-    </key>
-    <key name="disable-user-switching" type="b">
-      <default>false</default>
-      <summary>Disable user switching</summary>
-      <description>Prevent the user from switching to another account while his session is active.</description>
-    </key>
-    <key name="disable-lock-screen" type="b">
-      <default>false</default>
-      <summary>Disable lock screen</summary>
-      <description>Prevent the user from locking the screen.</description>
-    </key>
-    <key name="disable-application-handlers" type="b">
-      <default>false</default>
-      <summary>Disable URL and MIME type handlers</summary>
-      <description>Prevent running any URL or MIME type handler applications.</description>
-    </key>
-    <key name="disable-theme-settings" type="b">
-      <default>false</default>
-      <summary>Disable theme settings</summary>
-      <description>Prevent the user from changing theme settings.</description>
-    </key>
-    <key name="disable-log-out" type="b">
-      <default>false</default>
-      <summary>Disable log out</summary>
-      <description>Prevent the user from logging out.</description>
-    </key>
-  </schema>
-</schemalist>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 76d6b42..d02c8df 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,7 +2,6 @@
 # Please keep this file sorted alphabetically.
 data/images/cosmos/cosmos.xml.in.in
 [type: gettext/glade]data/lock-dialog-default.ui
-[type: gettext/gsettings]data/org.xfce.lockdown.gschema.xml.in
 [type: gettext/gsettings]data/org.xfce.screensaver.gschema.xml.in
 [type: gettext/gsettings]data/org.xfce.session.gschema.xml.in
 data/xfce4-screensaver-preferences.desktop.in
diff --git a/src/gs-monitor.c b/src/gs-monitor.c
index d2d92a6..f3176dc 100644
--- a/src/gs-monitor.c
+++ b/src/gs-monitor.c
@@ -209,7 +209,7 @@ static void gs_monitor_simulate_user_activity(GSMonitor* monitor)
 
 static void listener_lock_cb(GSListener* listener, GSMonitor* monitor)
 {
-	if (!monitor->priv->prefs->lock_disabled)
+	if (monitor->priv->prefs->lock_enabled)
 	{
 		gs_monitor_lock_screen(monitor);
 	}
@@ -289,8 +289,8 @@ static void _gs_monitor_update_from_prefs(GSMonitor* monitor, GSPrefs* prefs)
 	gboolean lock_enabled;
 	gboolean user_switch_enabled;
 
-	lock_enabled = (monitor->priv->prefs->lock_enabled && !monitor->priv->prefs->lock_disabled);
-	user_switch_enabled = (monitor->priv->prefs->user_switch_enabled && !monitor->priv->prefs->user_switch_disabled);
+	lock_enabled = monitor->priv->prefs->lock_enabled;
+	user_switch_enabled = monitor->priv->prefs->user_switch_enabled;
 
 	gs_manager_set_lock_enabled(monitor->priv->manager, lock_enabled);
 	gs_manager_set_lock_timeout(monitor->priv->manager, monitor->priv->prefs->lock_timeout);
diff --git a/src/gs-prefs.c b/src/gs-prefs.c
index 1ce4687..c071a36 100644
--- a/src/gs-prefs.c
+++ b/src/gs-prefs.c
@@ -34,10 +34,6 @@ static void gs_prefs_class_init (GSPrefsClass *klass);
 static void gs_prefs_init       (GSPrefs      *prefs);
 static void gs_prefs_finalize   (GObject      *object);
 
-#define LOCKDOWN_SETTINGS_SCHEMA "org.xfce.lockdown"
-#define KEY_LOCK_DISABLE "disable-lock-screen"
-#define KEY_USER_SWITCH_DISABLE "disable-user-switching"
-
 #define SESSION_SETTINGS_SCHEMA "org.xfce.session"
 #define KEY_IDLE_DELAY "idle-delay"
 
@@ -62,7 +58,6 @@ static void gs_prefs_finalize   (GObject      *object);
 struct GSPrefsPrivate
 {
 	GSettings *settings;
-	GSettings *lockdown_settings;
 	GSettings *session_settings;
 };
 
@@ -234,20 +229,6 @@ _gs_prefs_set_lock_enabled (GSPrefs *prefs,
 }
 
 static void
-_gs_prefs_set_lock_disabled (GSPrefs *prefs,
-                             gboolean value)
-{
-	prefs->lock_disabled = value;
-}
-
-static void
-_gs_prefs_set_user_switch_disabled (GSPrefs *prefs,
-                                    gboolean value)
-{
-	prefs->user_switch_disabled = value;
-}
-
-static void
 _gs_prefs_set_keyboard_enabled (GSPrefs *prefs,
                                 gboolean value)
 {
@@ -335,12 +316,6 @@ gs_prefs_load_from_settings (GSPrefs *prefs)
 	bvalue = g_settings_get_boolean (prefs->priv->settings, KEY_LOCK_ENABLED);
 	_gs_prefs_set_lock_enabled (prefs, bvalue);
 
-	bvalue = g_settings_get_boolean (prefs->priv->lockdown_settings, KEY_LOCK_DISABLE);
-	_gs_prefs_set_lock_disabled (prefs, bvalue);
-
-	bvalue = g_settings_get_boolean (prefs->priv->lockdown_settings, KEY_USER_SWITCH_DISABLE);
-	_gs_prefs_set_user_switch_disabled (prefs, bvalue);
-
 	value = g_settings_get_int (prefs->priv->session_settings, KEY_IDLE_DELAY);
 	_gs_prefs_set_timeout (prefs, value);
 
@@ -451,22 +426,6 @@ key_changed_cb (GSettings *settings,
 		_gs_prefs_set_lock_enabled (prefs, enabled);
 
 	}
-	else if (strcmp (key, KEY_LOCK_DISABLE) == 0)
-	{
-		gboolean disabled;
-
-		disabled = g_settings_get_boolean (settings, key);
-		_gs_prefs_set_lock_disabled (prefs, disabled);
-
-	}
-	else if (strcmp (key, KEY_USER_SWITCH_DISABLE) == 0)
-	{
-		gboolean disabled;
-
-		disabled = g_settings_get_boolean (settings, key);
-		_gs_prefs_set_user_switch_disabled (prefs, disabled);
-
-	}
 	else if (strcmp (key, KEY_CYCLE_DELAY) == 0)
 	{
 		int delay;
@@ -549,11 +508,6 @@ gs_prefs_init (GSPrefs *prefs)
 			  "changed",
 			  G_CALLBACK (key_changed_cb),
 			  prefs);
-	prefs->priv->lockdown_settings = g_settings_new (LOCKDOWN_SETTINGS_SCHEMA);
-	g_signal_connect (prefs->priv->lockdown_settings,
-			  "changed",
-			  G_CALLBACK (key_changed_cb),
-			  prefs);
 	prefs->priv->session_settings = g_settings_new (SESSION_SETTINGS_SCHEMA);
 	g_signal_connect (prefs->priv->session_settings,
 			  "changed::" KEY_IDLE_DELAY,
@@ -562,7 +516,6 @@ gs_prefs_init (GSPrefs *prefs)
 
 	prefs->idle_activation_enabled = TRUE;
 	prefs->lock_enabled            = TRUE;
-	prefs->lock_disabled           = FALSE;
 	prefs->logout_enabled          = FALSE;
 	prefs->user_switch_enabled     = FALSE;
 
@@ -595,11 +548,6 @@ gs_prefs_finalize (GObject *object)
 		prefs->priv->settings = NULL;
 	}
 
-	if (prefs->priv->lockdown_settings) {
-		g_object_unref (prefs->priv->lockdown_settings);
-		prefs->priv->lockdown_settings = NULL;
-	}
-
 	if (prefs->priv->session_settings) {
 		g_object_unref (prefs->priv->session_settings);
 		prefs->priv->session_settings = NULL;
diff --git a/src/gs-prefs.h b/src/gs-prefs.h
index 3b5957d..95729bf 100644
--- a/src/gs-prefs.h
+++ b/src/gs-prefs.h
@@ -52,8 +52,6 @@ typedef struct
 	guint            idle_activation_enabled : 1; /* whether to activate when idle */
 	guint            lock_enabled : 1;              /* whether to lock when active */
 	guint            logout_enabled : 1;    /* Whether to offer the logout option */
-	guint            lock_disabled : 1;     /* Whether locking the system is disabled */
-	guint            user_switch_disabled : 1;      /* Whether user switching is disabled */
 	guint            user_switch_enabled : 1;       /* Whether to offer the user switch option */
 	guint            keyboard_enabled : 1;  /* Whether to try to embed a keyboard */
 	guint            status_message_enabled : 1; /* show the status message in the lock */
diff --git a/src/xfce4-screensaver-preferences.c b/src/xfce4-screensaver-preferences.c
index abfe09a..8ae7fa1 100644
--- a/src/xfce4-screensaver-preferences.c
+++ b/src/xfce4-screensaver-preferences.c
@@ -50,9 +50,6 @@
 
 #define GTK_BUILDER_FILE "xfce4-screensaver-preferences.ui"
 
-#define LOCKDOWN_SETTINGS_SCHEMA "org.xfce.lockdown"
-#define KEY_LOCK_DISABLE "disable-lock-screen"
-
 #define SESSION_SETTINGS_SCHEMA "org.xfce.session"
 #define KEY_IDLE_DELAY "idle-delay"
 
@@ -91,7 +88,6 @@ static GSThemeManager *theme_manager = NULL;
 static GSJob          *job = NULL;
 static GSettings      *screensaver_settings = NULL;
 static GSettings      *session_settings = NULL;
-static GSettings      *lockdown_settings = NULL;
 
 static gint32
 config_get_activate_delay (gboolean *is_writable)
@@ -285,12 +281,6 @@ config_get_lock (gboolean *is_writable)
 	return lock;
 }
 
-static gboolean
-config_get_lock_disabled ()
-{
-	return g_settings_get_boolean (lockdown_settings, KEY_LOCK_DISABLE);
-}
-
 static void
 config_set_lock (gboolean lock)
 {
@@ -1090,24 +1080,10 @@ enabled_checkbox_toggled (GtkToggleButton *button, gpointer user_data)
 }
 
 static void
-ui_disable_lock (gboolean disable)
-{
-	GtkWidget *widget;
-
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "lock_checkbox"));
-	gtk_widget_set_sensitive (widget, !disable);
-	if (disable)
-	{
-		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
-	}
-}
-
-static void
 ui_set_lock (gboolean enabled)
 {
 	GtkWidget *widget;
 	gboolean   active;
-	gboolean   lock_disabled;
 
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "lock_checkbox"));
 
@@ -1116,8 +1092,6 @@ ui_set_lock (gboolean enabled)
 	{
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), enabled);
 	}
-	lock_disabled = config_get_lock_disabled ();
-	ui_disable_lock (lock_disabled);
 }
 
 static void
@@ -1126,7 +1100,6 @@ ui_set_enabled (gboolean enabled)
 	GtkWidget *widget;
 	gboolean   active;
 	gboolean   is_writable;
-	gboolean   lock_disabled;
 
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "enable_checkbox"));
 	active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
@@ -1141,8 +1114,6 @@ ui_set_enabled (gboolean enabled)
 	{
 		gtk_widget_set_sensitive (widget, enabled);
 	}
-	lock_disabled = config_get_lock_disabled ();
-	ui_disable_lock(lock_disabled);
 }
 
 static void
@@ -1173,14 +1144,6 @@ key_changed_cb (GSettings *settings, const gchar *key, gpointer data)
 
 			ui_set_lock (enabled);
 	}
-	else if (strcmp (key, KEY_LOCK_DISABLE) == 0)
-	{
-		        gboolean disabled;
-
-			disabled = g_settings_get_boolean (settings, key);
-
-			ui_disable_lock (disabled);
-	}
 	else if (strcmp (key, KEY_THEMES) == 0)
 	{
 		        GtkWidget *treeview;
@@ -1611,12 +1574,6 @@ init_capplet (void)
 	                  G_CALLBACK (key_changed_cb),
 	                  NULL);
 
-	lockdown_settings = g_settings_new (LOCKDOWN_SETTINGS_SCHEMA);
-	g_signal_connect (lockdown_settings,
-	                  "changed::" KEY_LOCK_DISABLE,
-	                  G_CALLBACK (key_changed_cb),
-	                  NULL);
-
 	activate_delay = config_get_activate_delay (&is_writable);
 	ui_set_delay (activate_delay);
 	if (! is_writable)
@@ -1707,7 +1664,6 @@ finalize_capplet (void)
 {
 	g_object_unref (screensaver_settings);
 	g_object_unref (session_settings);
-	g_object_unref (lockdown_settings);
 }
 
 int

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


More information about the Xfce4-commits mailing list