[gnome-initial-setup/wip/pwithnall/misc-fixes: 11/70] password: Show the last character when entering the password
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/wip/pwithnall/misc-fixes: 11/70] password: Show the last character when entering the password
- Date: Fri, 11 Sep 2020 13:29:09 +0000 (UTC)
commit 4dc91a99aecfbb8a8222bfd87c9e534a40c9f79a
Author: Alessandro Puccetti <alessandro kinvolk io>
Date: Tue May 9 15:39:20 2017 +0200
password: Show the last character when entering the password
Note for future rebases: There is a ticket open to remove this patch and
instead make all password entries system-wide have this behaviour.
The ticket is https://phabricator.endlessm.com/T27358
https://phabricator.endlessm.com/T3325
gnome-initial-setup/pages/password/gis-password-page.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/gnome-initial-setup/pages/password/gis-password-page.c
b/gnome-initial-setup/pages/password/gis-password-page.c
index d7a62cdf..b0dd805f 100644
--- a/gnome-initial-setup/pages/password/gis-password-page.c
+++ b/gnome-initial-setup/pages/password/gis-password-page.c
@@ -332,6 +332,7 @@ gis_password_page_constructed (GObject *object)
{
GisPasswordPage *page = GIS_PASSWORD_PAGE (object);
GisPasswordPagePrivate *priv = gis_password_page_get_instance_private (page);
+ GtkSettings *settings;
G_OBJECT_CLASS (gis_password_page_parent_class)->constructed (object);
@@ -356,6 +357,12 @@ gis_password_page_constructed (GObject *object)
g_signal_connect (GIS_PAGE (page)->driver, "notify::avatar",
G_CALLBACK (full_name_or_avatar_changed), page);
+ /* show the last character from the password; 600 is the recommended value
+ * in the gtk-entry-password-hint-timeout documentation
+ */
+ settings = gtk_settings_get_default ();
+ g_object_set (G_OBJECT (settings), "gtk-entry-password-hint-timeout", 600, NULL);
+
validate (page);
update_header (page);
@@ -404,6 +411,9 @@ gis_password_page_set_property (GObject *object,
static void
gis_password_page_dispose (GObject *object)
{
+ GtkSettings *settings = gtk_settings_get_default ();
+ g_object_set (G_OBJECT (settings), "gtk-entry-password-hint-timeout", 0, NULL);
+
if (GIS_PAGE (object)->driver) {
g_signal_handlers_disconnect_by_func (GIS_PAGE (object)->driver,
username_changed, object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]