[gnome-control-center] user-accounts: Remove password hints feature from UI
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Remove password hints feature from UI
- Date: Thu, 21 Feb 2013 14:14:13 +0000 (UTC)
commit 726332c14f2ab7951c671570730a62ee90a8743b
Author: Bastien Nocera <hadess hadess net>
Date: Wed Feb 20 17:26:41 2013 +0100
user-accounts: Remove password hints feature from UI
As those are not currently used in GDM.
https://bugzilla.gnome.org/show_bug.cgi?id=643445
panels/user-accounts/data/password-dialog.ui | 77 ++------------------------
panels/user-accounts/um-password-dialog.c | 28 +---------
2 files changed, 7 insertions(+), 98 deletions(-)
---
diff --git a/panels/user-accounts/data/password-dialog.ui b/panels/user-accounts/data/password-dialog.ui
index 289210a..81de04f 100644
--- a/panels/user-accounts/data/password-dialog.ui
+++ b/panels/user-accounts/data/password-dialog.ui
@@ -41,92 +41,27 @@
<property name="icon_name">system-users</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
+ <object class="GtkBox" id="dialog-vbox1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkVBox" id="vbox7">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="orientation">vertical</property>
<property name="spacing">16</property>
<child>
<object class="GtkTable" id="table4">
<property name="visible">True</property>
- <property name="n_rows">8</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">7</property>
<property name="n_columns">2</property>
<property name="column_spacing">10</property>
<property name="row_spacing">6</property>
<child>
- <object class="GtkVBox" id="vbox14">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkLabel" id="password-normal-hint-label">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_Hint</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">normal-hint-entry</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label33">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox15">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkEntry" id="normal-hint-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="password-normal-hint-description-label">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">This hint may be displayed at the login
screen. It will be visible to all users of this system. Do <b>not</b> include the password
here.</property>
- <property name="use_markup">True</property>
- <property name="wrap">True</property>
- <attributes>
- <attribute name="scale" value="0.83333333333329995"/>
- </attributes>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- </packing>
+ <placeholder/>
</child>
<child>
<object class="GtkEntry" id="verify-entry">
diff --git a/panels/user-accounts/um-password-dialog.c b/panels/user-accounts/um-password-dialog.c
index 19078d4..041f85f 100644
--- a/panels/user-accounts/um-password-dialog.c
+++ b/panels/user-accounts/um-password-dialog.c
@@ -46,8 +46,6 @@ struct _UmPasswordDialog {
GtkWidget *verify_entry;
GtkWidget *strength_indicator;
GtkWidget *strength_indicator_label;
- GtkWidget *normal_hint_entry;
- GtkWidget *normal_hint_label;
GtkWidget *show_password_button;
GtkWidget *ok_button;
@@ -141,7 +139,6 @@ finish_password_change (UmPasswordDialog *um)
gtk_entry_set_text (GTK_ENTRY (um->password_entry), " ");
gtk_entry_set_text (GTK_ENTRY (um->verify_entry), "");
- gtk_entry_set_text (GTK_ENTRY (um->normal_hint_entry), "");
gtk_entry_set_text (GTK_ENTRY (um->old_password_entry), "");
um_password_dialog_set_user (um, NULL);
@@ -228,7 +225,7 @@ accept_password_dialog (GtkButton *button,
gtk_tree_model_get (model, &iter, 1, &mode, -1);
password = gtk_entry_get_text (GTK_ENTRY (um->password_entry));
- hint = gtk_entry_get_text (GTK_ENTRY (um->normal_hint_entry));
+ hint = NULL;
switch (mode) {
case UM_PASSWORD_DIALOG_MODE_NORMAL:
@@ -346,8 +343,6 @@ action_changed (GtkComboBox *combo,
gtk_entry_set_icon_sensitive (GTK_ENTRY (um->password_entry), GTK_ENTRY_ICON_SECONDARY,
TRUE);
gtk_widget_set_sensitive (um->verify_entry, TRUE);
gtk_widget_set_sensitive (um->old_password_entry, TRUE);
- gtk_widget_set_sensitive (um->normal_hint_entry, TRUE);
- gtk_widget_set_sensitive (um->normal_hint_label, TRUE);
gtk_widget_set_sensitive (um->strength_indicator_label, TRUE);
gtk_widget_set_sensitive (um->show_password_button, TRUE);
@@ -358,8 +353,6 @@ action_changed (GtkComboBox *combo,
gtk_entry_set_icon_sensitive (GTK_ENTRY (um->password_entry), GTK_ENTRY_ICON_SECONDARY,
FALSE);
gtk_widget_set_sensitive (um->verify_entry, FALSE);
gtk_widget_set_sensitive (um->old_password_entry, FALSE);
- gtk_widget_set_sensitive (um->normal_hint_entry, FALSE);
- gtk_widget_set_sensitive (um->normal_hint_label, FALSE);
gtk_widget_set_sensitive (um->strength_indicator_label, FALSE);
gtk_widget_set_sensitive (um->show_password_button, FALSE);
gtk_widget_set_sensitive (um->ok_button, TRUE);
@@ -436,14 +429,6 @@ verify_entry_focus_out (GtkWidget *entry,
}
static void
-entry_size_changed (GtkWidget *entry,
- GtkAllocation *allocation,
- GtkWidget *label)
-{
- gtk_widget_set_size_request (label, allocation->width, -1);
-}
-
-static void
auth_cb (PasswdHandler *handler,
GError *error,
UmPasswordDialog *um)
@@ -619,16 +604,6 @@ um_password_dialog_new (void)
widget = (GtkWidget *) gtk_builder_get_object (builder, "strength-indicator-label");
gtk_label_set_width_chars (GTK_LABEL (widget), len);
- um->normal_hint_entry = (GtkWidget *) gtk_builder_get_object (builder, "normal-hint-entry");
-
- /* Label size hack.
- * This only sort-of works because the dialog is non-resizable.
- */
- widget = (GtkWidget *)gtk_builder_get_object (builder, "password-normal-hint-description-label");
- g_signal_connect (um->normal_hint_entry, "size-allocate",
- G_CALLBACK (entry_size_changed), widget);
- um->normal_hint_label = widget;
-
um->strength_indicator = (GtkWidget *) gtk_builder_get_object (builder, "strength-indicator");
um->strength_indicator_label = (GtkWidget *) gtk_builder_get_object (builder,
"strength-indicator-label");
@@ -698,7 +673,6 @@ um_password_dialog_set_user (UmPasswordDialog *um,
gtk_entry_set_text (GTK_ENTRY (um->password_entry), "");
gtk_entry_set_text (GTK_ENTRY (um->verify_entry), "");
- gtk_entry_set_text (GTK_ENTRY (um->normal_hint_entry), "");
gtk_entry_set_text (GTK_ENTRY (um->old_password_entry), "");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (um->show_password_button), FALSE);
if (act_user_get_uid (um->user) == getuid () &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]