[gnome-control-center] user-accounts: Consolidate now simpler init functions
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Consolidate now simpler init functions
- Date: Fri, 9 Nov 2018 20:46:02 +0000 (UTC)
commit 74cf3bcda16f77da83398599f6df80ed8582f9a2
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Nov 7 14:21:49 2018 +1300
user-accounts: Consolidate now simpler init functions
panels/user-accounts/cc-add-user-dialog.c | 41 ++++++++++++-------------------
1 file changed, 16 insertions(+), 25 deletions(-)
---
diff --git a/panels/user-accounts/cc-add-user-dialog.c b/panels/user-accounts/cc-add-user-dialog.c
index a0af1b51a..516e40e3f 100644
--- a/panels/user-accounts/cc-add-user-dialog.c
+++ b/panels/user-accounts/cc-add-user-dialog.c
@@ -549,14 +549,6 @@ local_password_radio_changed_cb (CcAddUserDialog *self)
dialog_validate (self);
}
-static void
-local_init (CcAddUserDialog *self)
-{
- self->local_password_mode = ACT_USER_PASSWORD_MODE_SET_AT_LOGIN;
- dialog_validate (self);
- update_password_strength (self);
-}
-
static void
local_prepare (CcAddUserDialog *self)
{
@@ -1286,21 +1278,6 @@ enterprise_password_changed_cb (CcAddUserDialog *self)
clear_entry_validation_error (self->enterprise_password);
}
-static void
-enterprise_init (CcAddUserDialog *self)
-{
- GNetworkMonitor *monitor;
- enterprise_check_domain (self);
-
- 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,
- self, NULL);
-
- monitor = g_network_monitor_get_default ();
- g_signal_connect_object (monitor, "network-changed", G_CALLBACK (on_network_changed), self, 0);
-}
-
static void
enterprise_prepare (CcAddUserDialog *self)
{
@@ -1364,10 +1341,24 @@ enterprise_button_toggled_cb (CcAddUserDialog *self)
static void
cc_add_user_dialog_init (CcAddUserDialog *self)
{
+ GNetworkMonitor *monitor;
+
gtk_widget_init_template (GTK_WIDGET (self));
- local_init (self);
- enterprise_init (self);
+ self->local_password_mode = ACT_USER_PASSWORD_MODE_SET_AT_LOGIN;
+ dialog_validate (self);
+ update_password_strength (self);
+
+ enterprise_check_domain (self);
+
+ 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,
+ self, NULL);
+
+ monitor = g_network_monitor_get_default ();
+ g_signal_connect_object (monitor, "network-changed", G_CALLBACK (on_network_changed), self, 0);
+
join_init (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]