user-accounts: Move default widget visibility and sensitivity into .ui file
This commit is contained in:
parent
1691cd74fc
commit
a4b76204ff
2 changed files with 5 additions and 10 deletions
|
@ -579,22 +579,16 @@ local_init (CcAddUserDialog *self)
|
|||
|
||||
self->local_password_mode = ACT_USER_PASSWORD_MODE_SET_AT_LOGIN;
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (self->local_password), FALSE);
|
||||
g_signal_connect (self->local_password, "notify::text", G_CALLBACK (on_password_changed), self);
|
||||
g_signal_connect_after (self->local_password, "focus-out-event", G_CALLBACK (on_password_focus_out), self);
|
||||
g_signal_connect (self->local_password, "key-press-event", G_CALLBACK (on_password_key_press_cb), self);
|
||||
g_signal_connect_swapped (self->local_password, "activate", G_CALLBACK (dialog_validate), self);
|
||||
g_signal_connect (self->local_password, "icon-press", G_CALLBACK (on_generate), self);
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (self->local_verify), FALSE);
|
||||
g_signal_connect (self->local_verify, "notify::text", G_CALLBACK (on_password_changed), self);
|
||||
g_signal_connect_after (self->local_verify, "focus-out-event", G_CALLBACK (on_password_focus_out), self);
|
||||
g_signal_connect_swapped (self->local_verify, "activate", G_CALLBACK (dialog_validate), self);
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (self->local_strength_indicator), FALSE);
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (self->local_hint), FALSE);
|
||||
|
||||
dialog_validate (self);
|
||||
update_password_strength (self);
|
||||
}
|
||||
|
@ -1346,9 +1340,6 @@ enterprise_init (CcAddUserDialog *self)
|
|||
|
||||
g_signal_connect (self->enterprise_password, "changed", G_CALLBACK (on_entry_changed), self);
|
||||
|
||||
/* Initially we hide the 'Enterprise Login' stuff */
|
||||
gtk_widget_hide (GTK_WIDGET (self->enterprise_button));
|
||||
|
||||
self->realmd_watch = g_bus_watch_name (G_BUS_TYPE_SYSTEM, "org.freedesktop.realmd",
|
||||
G_BUS_NAME_WATCHER_FLAGS_AUTO_START,
|
||||
on_realmd_appeared, on_realmd_disappeared,
|
||||
|
|
|
@ -315,6 +315,7 @@
|
|||
<child>
|
||||
<object class="GtkEntry" id="local_password">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="visibility">False</property>
|
||||
|
@ -334,6 +335,7 @@
|
|||
<child>
|
||||
<object class="GtkLevelBar" id="local_strength_indicator">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="mode">discrete</property>
|
||||
<property name="max-value">5</property>
|
||||
<property name="hexpand">True</property>
|
||||
|
@ -355,6 +357,7 @@
|
|||
<child>
|
||||
<object class="GtkLabel" id="local_hint">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xalign">0</property>
|
||||
|
@ -402,6 +405,7 @@
|
|||
<child>
|
||||
<object class="GtkEntry" id="local_verify">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="visibility">False</property>
|
||||
<property name="invisible_char">●</property>
|
||||
|
@ -759,7 +763,7 @@
|
|||
<child>
|
||||
<object class="GtkToggleButton" id="enterprise_button">
|
||||
<property name="label" translatable="yes">_Enterprise Login</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="visible">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue