From 051fd09c69f61f49768c750ab2dd59bb39e49d75 Mon Sep 17 00:00:00 2001 From: Brian Cameron Date: Wed, 14 Nov 2007 22:36:23 +0000 Subject: Reversing last commit since it broke string freeze. 2007-11-14 Brian Cameron * Reversing last commit since it broke string freeze. svn path=/branches/gnome-2-20/; revision=5508 --- gui/gdmlogin.c | 2 + gui/gdmsetup.c | 29 ++++++++-- gui/gdmsetup.glade | 113 ++++++++++++++++++++++++++++++++++---- gui/greeter/greeter_canvas_item.c | 2 + 4 files changed, 131 insertions(+), 15 deletions(-) (limited to 'gui') diff --git a/gui/gdmlogin.c b/gui/gdmlogin.c index a3ad5508..f673ddff 100644 --- a/gui/gdmlogin.c +++ b/gui/gdmlogin.c @@ -2536,6 +2536,8 @@ gdm_login_gui_init (void) gtk_entry_set_invisible_char (GTK_ENTRY (entry), 0); else if (gdm_config_get_bool (GDM_KEY_ENTRY_CIRCLES)) gtk_entry_set_invisible_char (GTK_ENTRY (entry), 0x25cf); + else + gtk_entry_set_invisible_char (GTK_ENTRY (entry), '*'); gtk_entry_set_max_length (GTK_ENTRY (entry), PW_ENTRY_SIZE); gtk_widget_set_size_request (entry, 250, -1); diff --git a/gui/gdmsetup.c b/gui/gdmsetup.c index c06b9c4e..8fe176d4 100644 --- a/gui/gdmsetup.c +++ b/gui/gdmsetup.c @@ -512,7 +512,14 @@ toggle_timeout (GtkWidget *toggle) const char *key = g_object_get_data (G_OBJECT (toggle), "key"); gboolean val = gdm_config_get_bool ((gchar *)key); - if (strcmp (ve_sure_string (key), GDM_KEY_GLOBAL_FACE_DIR) == 0) { + if (strcmp (ve_sure_string (key), GDM_KEY_ENTRY_INVISIBLE) == 0) { + /* This is a lil bit back to front + true is false and false is true in this case */ + if ( bool_equal (val, GTK_TOGGLE_BUTTON (toggle)->active)) { + gdm_setup_config_set_bool (key, !GTK_TOGGLE_BUTTON (toggle)->active); + } + } + else if (strcmp (ve_sure_string (key), GDM_KEY_GLOBAL_FACE_DIR) == 0) { /* Once enabled write the curently selected item in the filechooser widget, otherwise disable the config entry, i.e. write an empty string */ @@ -2195,11 +2202,20 @@ setup_notify_toggle (const char *name, g_signal_connect (G_OBJECT (toggle), "toggled", G_CALLBACK (timedlogin_allow_remote_toggled), timedlogin_allow_remote); } - else if (strcmp ("hide_vis_feedback_passwd_checkbox", ve_sure_string (name)) == 0) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), val); + else if (strcmp ("vis_feedback_passwd_checkbox", ve_sure_string (name)) == 0) { + /* This one is a lil bit back to front + true is false and false is true */ + GtkWidget *use_circles_in_passwd; + use_circles_in_passwd = glade_xml_get_widget (xml, "use_circles_passwd_checkbox"); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), !val); + gtk_widget_set_sensitive (use_circles_in_passwd, !val); g_signal_connect (G_OBJECT (toggle), "toggled", - G_CALLBACK (toggle_toggled), toggle); + G_CALLBACK (toggle_toggled), toggle); + g_signal_connect (G_OBJECT (toggle), "toggled", + G_CALLBACK (toggle_toggled_sensitivity_positive), use_circles_in_passwd); + } else if (strcmp ("local_set_pos_checkbox", ve_sure_string (name)) == 0) { @@ -7446,7 +7462,10 @@ setup_general_tab (void) /* Setup use visual feedback in the passwotrd entry */ - setup_notify_toggle ("hide_vis_feedback_passwd_checkbox", GDM_KEY_ENTRY_INVISIBLE); + setup_notify_toggle ("vis_feedback_passwd_checkbox", GDM_KEY_ENTRY_INVISIBLE); + + /* Setup use circles in the password entry */ + setup_notify_toggle ("use_circles_passwd_checkbox", GDM_KEY_ENTRY_CIRCLES); /* Setup always login current session entry */ setup_notify_toggle ("a_login_curr_session_checkbutton", GDM_KEY_ALWAYS_LOGIN_CURRENT_SESSION); diff --git a/gui/gdmsetup.glade b/gui/gdmsetup.glade index 9c69f8e6..46e63d10 100644 --- a/gui/gdmsetup.glade +++ b/gui/gdmsetup.glade @@ -2,6 +2,7 @@ + Login Window Preferences @@ -89,17 +90,109 @@ 3 - + True - Hide visual feedback in the password entry. Turning this option on can increase security, as the length of your password cannot be guessed by people looking at your screen. - True - _Hide visual feedback in the password entry - True - GTK_RELIEF_NORMAL - True - False - False - True + False + 0 + + + + True + 2 + 1 + False + 3 + 12 + + + + True + Show visual feedback in the password entry. Turning this option on can be a security hazard as the length of your password can be guessed. + True + _Show visual feedback (asterisks) in the password entry + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + False + 0 + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + Use circles instead of asterisks in the password entry. This may not work with all fonts however. + True + _Use circles instead of asterisks in the password entry + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + 0 + 1 + 1 + 2 + fill + + + + + 0 + False + False + + 0 diff --git a/gui/greeter/greeter_canvas_item.c b/gui/greeter/greeter_canvas_item.c index 18dcf702..56e7fd1a 100644 --- a/gui/greeter/greeter_canvas_item.c +++ b/gui/greeter/greeter_canvas_item.c @@ -468,6 +468,8 @@ greeter_item_create_canvas_item (GreeterItemInfo *item) gtk_entry_set_invisible_char (GTK_ENTRY (entry), 0); else if (gdm_config_get_bool (GDM_KEY_ENTRY_CIRCLES)) gtk_entry_set_invisible_char (GTK_ENTRY (entry), 0x25cf); + else + gtk_entry_set_invisible_char (GTK_ENTRY (entry), '*'); gtk_widget_modify_font (entry, item->data.text.fonts[GREETER_ITEM_STATE_NORMAL]); -- cgit v1.2.1