[gdm] Add API to queue loading of users
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] Add API to queue loading of users
- Date: Fri, 11 Jun 2010 00:20:15 +0000 (UTC)
commit 21a3dca41cf2b1705a4532b44d5220c977bc0850
Author: William Jon McCann <jmccann redhat com>
Date: Wed Jun 9 11:22:26 2010 -0400
Add API to queue loading of users
Don't queue a load on construction in case it isn't needed.
https://bugzilla.gnome.org/show_bug.cgi?id=621131
gui/simple-greeter/gdm-user-chooser-widget.c | 1 +
gui/simple-greeter/gdm-user-manager.c | 10 ++++++++++
gui/simple-greeter/gdm-user-manager.h | 1 +
gui/user-switch-applet/applet.c | 1 +
4 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-user-chooser-widget.c b/gui/simple-greeter/gdm-user-chooser-widget.c
index ce5f361..ac966dc 100644
--- a/gui/simple-greeter/gdm-user-chooser-widget.c
+++ b/gui/simple-greeter/gdm-user-chooser-widget.c
@@ -599,6 +599,7 @@ load_users (GdmUserChooserWidget *widget)
"user-changed",
G_CALLBACK (on_user_changed),
widget);
+ gdm_user_manager_queue_load (widget->priv->manager);
} else {
gdm_chooser_widget_loaded (GDM_CHOOSER_WIDGET (widget));
}
diff --git a/gui/simple-greeter/gdm-user-manager.c b/gui/simple-greeter/gdm-user-manager.c
index bd6e717..30343ea 100644
--- a/gui/simple-greeter/gdm-user-manager.c
+++ b/gui/simple-greeter/gdm-user-manager.c
@@ -1672,6 +1672,16 @@ gdm_set_string_list (char *value, GSList **retval)
g_strfreev (temp_array);
}
+void
+gdm_user_manager_queue_load (GdmUserManager *manager)
+{
+ g_return_if_fail (GDM_IS_USER_MANAGER (manager));
+
+ if (! manager->priv->is_loaded) {
+ queue_load_users (manager);
+ }
+}
+
static void
gdm_user_manager_init (GdmUserManager *manager)
{
diff --git a/gui/simple-greeter/gdm-user-manager.h b/gui/simple-greeter/gdm-user-manager.h
index 3e976ff..35d7423 100644
--- a/gui/simple-greeter/gdm-user-manager.h
+++ b/gui/simple-greeter/gdm-user-manager.h
@@ -69,6 +69,7 @@ GType gdm_user_manager_get_type (void);
GdmUserManager * gdm_user_manager_ref_default (void);
+void gdm_user_manager_queue_load (GdmUserManager *manager);
GSList * gdm_user_manager_list_users (GdmUserManager *manager);
GdmUser * gdm_user_manager_get_user (GdmUserManager *manager,
const char *user_name);
diff --git a/gui/user-switch-applet/applet.c b/gui/user-switch-applet/applet.c
index 8b419f2..4bbed46 100644
--- a/gui/user-switch-applet/applet.c
+++ b/gui/user-switch-applet/applet.c
@@ -1506,6 +1506,7 @@ fill_applet (PanelApplet *applet)
gtk_widget_show (adata->menubar);
adata->manager = gdm_user_manager_ref_default ();
+ gdm_user_manager_queue_load (adata->manager);
setup_current_user (adata);
gconf_client_add_dir (adata->client,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]