[gdm] data: move extension settings to common code
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] data: move extension settings to common code
- Date: Mon, 19 Sep 2011 03:13:56 +0000 (UTC)
commit 95d2c142053f1703baecc71f85f2b9871b4b321a
Author: Ray Strode <rstrode redhat com>
Date: Sun Sep 18 22:37:30 2011 -0400
data: move extension settings to common code
The shell greeter needs to be able to disable fingerprint
authentication, just as the fallback greeter does. This
commit moves that setting (and its cousin for smartcards)
to a central location.
https://bugzilla.gnome.org/show_bug.cgi?id=657823
data/Makefile.am | 6 +++++
data/org.gnome.login-screen.gschema.xml.in | 24 ++++++++++++++++++++
.../extensions/fingerprint/Makefile.am | 9 +-----
.../fingerprint/gdm-fingerprint-extension.c | 4 +-
...y-manager.extensions.fingerprint.gschema.xml.in | 9 -------
.../extensions/smartcard/Makefile.am | 9 +-----
.../extensions/smartcard/gdm-smartcard-extension.c | 4 +-
...lay-manager.extensions.smartcard.gschema.xml.in | 9 -------
8 files changed, 38 insertions(+), 36 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 8036f79..937d922 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -40,6 +40,10 @@ dbusconf_in_files = gdm.conf.in
dbusconf_DATA = $(dbusconf_in_files:.conf.in=.conf)
@INTLTOOL_SCHEMAS_RULE@
+ INTLTOOL_XML_NOMERGE_RULE@
+
+gsettings_SCHEMAS = org.gnome.login-screen.gschema.xml
+ GSETTINGS_RULES@
schemasdir = $(pkgdatadir)
schemas_in_files = gdm.schemas.in
@@ -105,6 +109,7 @@ EXTRA_DIST = \
gdm-shell.session.in \
make-dconf-override-db.sh \
dconf-profile \
+ org.gnome.login-screen.gschema.xml.in \
$(NULL)
CLEANFILES = \
@@ -114,6 +119,7 @@ CLEANFILES = \
PreSession \
PostSession \
dconf-override-db \
+ $(gsettings_SCHEMAS) \
$(NULL)
DISTCLEANFILES = \
diff --git a/data/org.gnome.login-screen.gschema.xml.in b/data/org.gnome.login-screen.gschema.xml.in
new file mode 100644
index 0000000..0f2c0d8
--- /dev/null
+++ b/data/org.gnome.login-screen.gschema.xml.in
@@ -0,0 +1,24 @@
+<schemalist>
+ <schema id="org.gnome.login-screen" path="/org/gnome/login-screen/">
+ <key name="enable-fingerprint-authentication" type="b">
+ <default>true</default>
+ <_summary>
+ Whether or not to allow fingerprint readers for login
+ </_summary>
+ <_description>
+ The login screen can optionally allow users who have enrolled
+ their fingerprints to log in using those prints.
+ </_description>
+ </key>
+ <key name="enable-smartcard-authentication" type="b">
+ <default>false</default>
+ <_summary>
+ Whether or not to allow smartcard readers for login
+ </_summary>
+ <_description>
+ The login screen can optionally allow users who have smartcards
+ to log in using those smartcards.
+ </_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/gui/simple-greeter/extensions/fingerprint/Makefile.am b/gui/simple-greeter/extensions/fingerprint/Makefile.am
index ca65f4b..e263e15 100644
--- a/gui/simple-greeter/extensions/fingerprint/Makefile.am
+++ b/gui/simple-greeter/extensions/fingerprint/Makefile.am
@@ -3,10 +3,6 @@ SUBDIRS = icons
NULL =
PAM_SERVICE_NAME = gdm-fingerprint
-gsettings_SCHEMAS =org.gnome.display-manager.extensions.fingerprint.gschema.xml
- INTLTOOL_XML_NOMERGE_RULE@
- GSETTINGS_RULES@
-
extensiondir = $(GDM_SIMPLE_GREETER_EXTENSIONS_DATA_DIR)/fingerprint
extension_DATA = page.ui
@@ -49,11 +45,10 @@ $(PAM_SERVICE_NAME): $(PAM_SERVICE_NAME).pam
pamdir = $(PAM_PREFIX)/pam.d
pam_DATA = $(PAM_SERVICE_NAME)
-EXTRA_DIST = $(extension_DATA) $(gsettings_SCHEMAS).in $(gsettings_SCHEMAS) $(PAM_SERVICE_NAME).pam
-CLEANFILES = $(PAM_SERVICE_NAME) $(gsettings_SCHEMAS)
+EXTRA_DIST = $(extension_DATA) $(gsettings_SCHEMAS) $(PAM_SERVICE_NAME).pam
+CLEANFILES = $(PAM_SERVICE_NAME)
MAINTAINERCLEANFILES = \
*~ \
$(PAM_SERVICE_NAME) \
- $(gsettings_SCHEMAS) \
Makefile.in
diff --git a/gui/simple-greeter/extensions/fingerprint/gdm-fingerprint-extension.c b/gui/simple-greeter/extensions/fingerprint/gdm-fingerprint-extension.c
index 0e2e83d..ef0e001 100644
--- a/gui/simple-greeter/extensions/fingerprint/gdm-fingerprint-extension.c
+++ b/gui/simple-greeter/extensions/fingerprint/gdm-fingerprint-extension.c
@@ -307,7 +307,7 @@ gdm_fingerprint_extension_is_visible (GdmLoginExtension *login_extension)
char *contents, **lines;
int i;
- if (!g_settings_get_boolean (extension->priv->settings, "active")) {
+ if (!g_settings_get_boolean (extension->priv->settings, "enable-fingerprint-authentication")) {
return FALSE;
}
@@ -443,7 +443,7 @@ gdm_fingerprint_extension_init (GdmFingerprintExtension *extension)
extension->priv->message_queue = g_queue_new ();
- extension->priv->settings = g_settings_new ("org.gnome.display-manager.extensions.fingerprint");
+ extension->priv->settings = g_settings_new ("org.gnome.login-screen");
extension->priv->bus_connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
gdm_fingerprint_extension_reset (GDM_LOGIN_EXTENSION (extension));
diff --git a/gui/simple-greeter/extensions/smartcard/Makefile.am b/gui/simple-greeter/extensions/smartcard/Makefile.am
index 1ab76b5..695ce13 100644
--- a/gui/simple-greeter/extensions/smartcard/Makefile.am
+++ b/gui/simple-greeter/extensions/smartcard/Makefile.am
@@ -3,10 +3,6 @@ SUBDIRS = icons
NULL =
PAM_SERVICE_NAME = gdm-smartcard
-gsettings_SCHEMAS =org.gnome.display-manager.extensions.smartcard.gschema.xml
- INTLTOOL_XML_NOMERGE_RULE@
- GSETTINGS_RULES@
-
extensiondir = $(GDM_SIMPLE_GREETER_EXTENSIONS_DATA_DIR)/smartcard
extension_DATA = page.ui
@@ -69,11 +65,10 @@ $(PAM_SERVICE_NAME): $(PAM_SERVICE_NAME).pam
pamdir = $(PAM_PREFIX)/pam.d
pam_DATA = $(PAM_SERVICE_NAME)
-EXTRA_DIST = $(extension_DATA) $(gsettings_SCHEMAS).in $(gsettings_SCHEMAS) $(PAM_SERVICE_NAME).pam
-CLEANFILES = $(PAM_SERVICE_NAME) $(gsettings_SCHEMAS)
+EXTRA_DIST = $(extension_DATA) $(PAM_SERVICE_NAME).pam
+CLEANFILES = $(PAM_SERVICE_NAME)
MAINTAINERCLEANFILES = \
*~ \
$(PAM_SERVICE_NAME) \
- $(gsettings_SCHEMAS) \
Makefile.in
diff --git a/gui/simple-greeter/extensions/smartcard/gdm-smartcard-extension.c b/gui/simple-greeter/extensions/smartcard/gdm-smartcard-extension.c
index 825683e..6378d09 100644
--- a/gui/simple-greeter/extensions/smartcard/gdm-smartcard-extension.c
+++ b/gui/simple-greeter/extensions/smartcard/gdm-smartcard-extension.c
@@ -430,7 +430,7 @@ gdm_smartcard_extension_is_visible (GdmLoginExtension *login_extension)
guint i;
pid_t pid;
- if (!g_settings_get_boolean (extension->priv->settings, "active")) {
+ if (!g_settings_get_boolean (extension->priv->settings, "enable-smartcard-authentication")) {
return FALSE;
}
@@ -586,7 +586,7 @@ gdm_smartcard_extension_init (GdmSmartcardExtension *extension)
extension->priv->message_queue = g_queue_new ();
- extension->priv->settings = g_settings_new ("org.gnome.display-manager.extensions.smartcard");
+ extension->priv->settings = g_settings_new ("org.gnome.login-screen");
gdm_smartcard_extension_reset (GDM_LOGIN_EXTENSION (extension));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]