[gdm/gnome-2-30] Get dbus connection outside of get_seat_proxy
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/gnome-2-30] Get dbus connection outside of get_seat_proxy
- Date: Fri, 11 Jun 2010 01:51:25 +0000 (UTC)
commit b0b43a263eb57e9c79335b771880f0f631c21708
Author: Ray Strode <rstrode redhat com>
Date: Tue Mar 16 00:41:13 2010 -0400
Get dbus connection outside of get_seat_proxy
While having a connection is a prerequisite for get_seat_proxy,
it could potentially be useful for other purposes, so move it
out.
https://bugzilla.gnome.org/show_bug.cgi?id=610179
gui/simple-greeter/gdm-user-manager.c | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-user-manager.c b/gui/simple-greeter/gdm-user-manager.c
index 68f0738..2ed7c05 100644
--- a/gui/simple-greeter/gdm-user-manager.c
+++ b/gui/simple-greeter/gdm-user-manager.c
@@ -849,18 +849,6 @@ get_seat_proxy (GdmUserManager *manager)
g_assert (manager->priv->seat_proxy == NULL);
- error = NULL;
- manager->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
- if (manager->priv->connection == NULL) {
- if (error != NULL) {
- g_warning ("Failed to connect to the D-Bus daemon: %s", error->message);
- g_error_free (error);
- } else {
- g_warning ("Failed to connect to the D-Bus daemon");
- }
- return;
- }
-
manager->priv->seat_id = get_current_seat_id (manager->priv->connection);
if (manager->priv->seat_id == NULL) {
return;
@@ -1687,6 +1675,7 @@ static void
gdm_user_manager_init (GdmUserManager *manager)
{
char *temp;
+ GError *error;
gboolean res;
manager->priv = GDM_USER_MANAGER_GET_PRIVATE (manager);
@@ -1721,6 +1710,20 @@ gdm_user_manager_init (GdmUserManager *manager)
monitor_local_users (manager);
}
+ g_assert (manager->priv->seat_proxy == NULL);
+
+ error = NULL;
+ manager->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
+ if (manager->priv->connection == NULL) {
+ if (error != NULL) {
+ g_warning ("Failed to connect to the D-Bus daemon: %s", error->message);
+ g_error_free (error);
+ } else {
+ g_warning ("Failed to connect to the D-Bus daemon");
+ }
+ return;
+ }
+
get_seat_proxy (manager);
queue_load_users (manager);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]