Overview of changes in lightdm 1.1.7
- * Add a seat option greeter-allow-guest which controls if the
- greeter should show a guest option
+ * Add a seat option greeter-allow-guest which controls if the greeter should
+ provide an option to access the guest account.
+ * Add a seat option greeter-show-manual-login which hints to a greeter if it
+ should show a manual username entry if a user list is already present.
Overview of changes in lightdm 1.1.6
# greeter-session = Session to load for greeter
# greeter-hide-users = True to hide the user list
# greeter-show-guest = True if the greeter should show a guest login option
+# greeter-show-manual-login = True if the greeter should offer a manual login option
# user-session = Session to load for users
# allow-guest = True if guest login is allowed
# guest-session = Session to load for guests (overrides user-session)
#greeter-session=example-gtk-gnome
#greeter-hide-users=false
#greeter-show-guest=true
+#greeter-show-manual-login=false
#user-session=default
#allow-guest=true
#guest-session=UNIMPLEMENTED
PROP_0,
PROP_DEFAULT_SESSION_HINT,
PROP_HIDE_USERS_HINT,
+ PROP_SHOW_MANUAL_LOGIN_HINT,
PROP_LOCK_HINT,
PROP_HAS_GUEST_ACCOUNT_HINT,
PROP_SELECT_USER_HINT,
return g_strcmp0 (value, "true") == 0;
}
+/**
+ * lightdm_greeter_get_show_manual_login_hint:
+ * @greeter: A #LightDMGreeter
+ *
+ * Check if a manual login option should be shown. If set the GUI
+ * should provide a way for a username to be entered manually.
+ * Without this hint a greeter which is showing a user list can
+ * limit logins to only those users.
+ *
+ * Return value: #TRUE if a manual login option should be shown.
+ */
+gboolean
+lightdm_greeter_get_show_manual_login_hint (LightDMGreeter *greeter)
+{
+ const gchar *value;
+
+ g_return_val_if_fail (LIGHTDM_IS_GREETER (greeter), FALSE);
+ value = lightdm_greeter_get_hint (greeter, "show-manual-login");
+
+ return g_strcmp0 (value, "true") == 0;
+}
+
/**
* lightdm_greeter_get_lock_hint:
* @greeter: A #LightDMGreeter
case PROP_HIDE_USERS_HINT:
g_value_set_boolean (value, lightdm_greeter_get_hide_users_hint (self));
break;
+ case PROP_SHOW_MANUAL_LOGIN_HINT:
+ g_value_set_boolean (value, lightdm_greeter_get_show_manual_login_hint (self));
+ break;
case PROP_LOCK_HINT:
g_value_set_boolean (value, lightdm_greeter_get_lock_hint (self));
break;
FALSE,
G_PARAM_READABLE));
+ g_object_class_install_property (object_class,
+ PROP_SHOW_MANUAL_LOGIN_HINT,
+ g_param_spec_boolean ("show-manual-login-hint",
+ "show-manual-login-hint",
+ "Show manual login hint",
+ FALSE,
+ G_PARAM_READABLE));
+
g_object_class_install_property (object_class,
PROP_LOCK_HINT,
g_param_spec_boolean ("lock-hint",
public unowned string get_hint (string name);
public unowned string default_session_hint { get; }
public bool hide_users_hint { get; }
+ public bool show_manual_login_hint { get; }
public bool lock_hint { get; }
public bool has_guest_account_hint { get; }
public unowned string select_user_hint { get; }
gboolean lightdm_greeter_get_hide_users_hint (LightDMGreeter *greeter);
+gboolean lightdm_greeter_get_show_manual_login_hint (LightDMGreeter *greeter);
+
gboolean lightdm_greeter_get_lock_hint (LightDMGreeter *greeter);
gboolean lightdm_greeter_get_has_guest_account_hint (LightDMGreeter *greeter);
/* TRUE if the user list should be shown */
gboolean greeter_hide_users;
+ /* TRUE if a manual login option should be shown */
+ gboolean greeter_show_manual_login;
+
/* TRUE if the greeter is a lock screen */
gboolean greeter_is_lock;
display->priv->greeter_hide_users = hide_users;
}
+void
+display_set_show_manual_login_hint (Display *display, gboolean show_manual_login)
+{
+ g_return_if_fail (display != NULL);
+ display->priv->greeter_show_manual_login = show_manual_login;
+}
+
void
display_set_lock_hint (Display *display, gboolean is_lock)
{
greeter_set_allow_guest (display->priv->greeter, display->priv->allow_guest);
greeter_set_hint (display->priv->greeter, "has-guest-account", (display->priv->allow_guest && display->priv->greeter_allow_guest) ? "true" : "false");
greeter_set_hint (display->priv->greeter, "hide-users", display->priv->greeter_hide_users ? "true" : "false");
+ greeter_set_hint (display->priv->greeter, "show-manual-login", display->priv->greeter_show_manual_login ? "true" : "false");
if (display->priv->greeter_is_lock)
greeter_set_hint (display->priv->greeter, "lock-screen", "true");
void display_set_hide_users_hint (Display *display, gboolean hide_users);
+void display_set_show_manual_login_hint (Display *display, gboolean show_manual);
+
void display_set_lock_hint (Display *display, gboolean is_lock);
void display_set_user_session (Display *display, const gchar *session_name);
display_set_greeter_session (display, seat_get_string_property (seat, "greeter-session"));
display_set_session_wrapper (display, seat_get_string_property (seat, "session-wrapper"));
display_set_hide_users_hint (display, seat_get_boolean_property (seat, "greeter-hide-users"));
+ display_set_show_manual_login_hint (display, seat_get_boolean_property (seat, "greeter-show-manual-login"));
if (is_lock)
display_set_lock_hint (display, TRUE);
display_set_allow_guest (display, seat_get_allow_guest (seat));