summaryrefslogtreecommitdiff
path: root/daemon/gdm-xdmcp-display.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2015-02-03 15:12:49 -0500
committerRay Strode <rstrode@redhat.com>2015-02-18 17:34:10 -0500
commit185db2f61d360a793439ba385dae2fd560789fac (patch)
tree85a50a03ee757a49a2a05736ef996f1cfcfbf85f /daemon/gdm-xdmcp-display.c
parent859ed525623a710fe0a58b59fd5808bcfcaf31e8 (diff)
downloadgdm-185db2f61d360a793439ba385dae2fd560789fac.tar.gz
display: get rid of get_timed_login_details vfunc
Instead introduce an "allow-timed-login" property that subclasses can set to FALSE to disable timed login. https://bugzilla.gnome.org/show_bug.cgi?id=744764
Diffstat (limited to 'daemon/gdm-xdmcp-display.c')
-rw-r--r--daemon/gdm-xdmcp-display.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/daemon/gdm-xdmcp-display.c b/daemon/gdm-xdmcp-display.c
index 27ea00d1..e09a2fdf 100644
--- a/daemon/gdm-xdmcp-display.c
+++ b/daemon/gdm-xdmcp-display.c
@@ -141,35 +141,13 @@ gdm_xdmcp_display_get_property (GObject *object,
}
static void
-gdm_xdmcp_display_get_timed_login_details (GdmDisplay *display,
- gboolean *enabledp,
- char **usernamep,
- int *delayp)
-{
- *enabledp = FALSE;
- *usernamep = g_strdup ("");
- *delayp = 0;
- gboolean allow_remote_autologin;
-
- allow_remote_autologin = FALSE;
- gdm_settings_direct_get_boolean (GDM_KEY_ALLOW_REMOTE_AUTOLOGIN, &allow_remote_autologin);
-
- if ( allow_remote_autologin ) {
- GDM_DISPLAY_CLASS (gdm_xdmcp_display_parent_class)->get_timed_login_details (display, enabledp, usernamep, delayp);
- }
-}
-
-static void
gdm_xdmcp_display_class_init (GdmXdmcpDisplayClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GdmDisplayClass *display_class = GDM_DISPLAY_CLASS (klass);
object_class->get_property = gdm_xdmcp_display_get_property;
object_class->set_property = gdm_xdmcp_display_set_property;
- display_class->get_timed_login_details = gdm_xdmcp_display_get_timed_login_details;
-
g_type_class_add_private (klass, sizeof (GdmXdmcpDisplayPrivate));
g_object_class_install_property (object_class,
@@ -196,7 +174,14 @@ static void
gdm_xdmcp_display_init (GdmXdmcpDisplay *xdmcp_display)
{
+ gboolean allow_remote_autologin;
+
xdmcp_display->priv = GDM_XDMCP_DISPLAY_GET_PRIVATE (xdmcp_display);
+
+ allow_remote_autologin = FALSE;
+ gdm_settings_direct_get_boolean (GDM_KEY_ALLOW_REMOTE_AUTOLOGIN, &allow_remote_autologin);
+
+ g_object_set (G_OBJECT (xdmcp_display), "allow-timed-login", allow_remote_autologin, NULL);
}
GdmDisplay *