summaryrefslogtreecommitdiff
path: root/daemon/factory-slave-main.c
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2012-05-03 17:54:59 +0200
committerRay Strode <rstrode@redhat.com>2012-07-17 02:25:32 -0400
commit96bccf1ca920bb151c9590b39b5dd9324e02e08e (patch)
treeb331afb8179ef24aed15f3afa97129b0df811774 /daemon/factory-slave-main.c
parent7fe44b0f223b7f992a256165ae354955b7c778c4 (diff)
downloadgdm-96bccf1ca920bb151c9590b39b5dd9324e02e08e.tar.gz
common: Use GDBus for GdmSettings
GdmSettings is a system bus service provided by GDM so that greeters can read custom.conf without parsing the file themselves. This commit changes GdmSettings to use gdbus instead of dbus-glib. https://bugzilla.gnome.org/show_bug.cgi?id=622888
Diffstat (limited to 'daemon/factory-slave-main.c')
-rw-r--r--daemon/factory-slave-main.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/daemon/factory-slave-main.c b/daemon/factory-slave-main.c
index 24412600..6d3b1333 100644
--- a/daemon/factory-slave-main.c
+++ b/daemon/factory-slave-main.c
@@ -34,10 +34,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <glib-object.h>
-
-#define DBUS_API_SUBJECT_TO_CHANGE
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
+#include <gio/gio.h>
#include "gdm-xerrors.h"
#include "gdm-signal-handler.h"
@@ -52,15 +49,14 @@
static GdmSettings *settings = NULL;
static int gdm_return_code = 0;
-static DBusGConnection *
+static GDBusConnection *
get_system_bus (void)
{
GError *error;
- DBusGConnection *bus;
- DBusConnection *connection;
+ GDBusConnection *bus;
error = NULL;
- bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
+ bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
if (bus == NULL) {
g_warning ("Couldn't connect to system bus: %s",
error->message);
@@ -68,8 +64,7 @@ get_system_bus (void)
goto out;
}
- connection = dbus_g_connection_get_connection (bus);
- dbus_connection_set_exit_on_disconnect (connection, FALSE);
+ g_dbus_connection_set_exit_on_close (bus, FALSE);
out:
return bus;
@@ -170,7 +165,7 @@ main (int argc,
{
GMainLoop *main_loop;
GOptionContext *context;
- DBusGConnection *connection;
+ GDBusConnection *connection;
GdmSlave *slave;
static char *display_id = NULL;
GdmSignalHandler *signal_handler;
@@ -259,8 +254,9 @@ main (int argc,
}
out:
-
g_debug ("Slave finished");
+ g_object_unref (connection);
+
return gdm_return_code;
}