[gdm/wip/initial-setup2: 10/32] initial-setup: get on session bus
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/initial-setup2: 10/32] initial-setup: get on session bus
- Date: Fri, 13 Apr 2012 22:17:28 +0000 (UTC)
commit 9f3c76b437aa0d7bcce732dcbebdb1869295730a
Author: Ray Strode <rstrode redhat com>
Date: Wed May 18 14:48:05 2011 -0400
initial-setup: get on session bus
This will make sure the program exits when the greeter session
is over, etc.
gui/initial-setup/gdm-initial-setup.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gui/initial-setup/gdm-initial-setup.c b/gui/initial-setup/gdm-initial-setup.c
index b9a09da..9c15991 100644
--- a/gui/initial-setup/gdm-initial-setup.c
+++ b/gui/initial-setup/gdm-initial-setup.c
@@ -1458,12 +1458,17 @@ main (int argc, char *argv[])
gtk_init (&argc, &argv);
+ error = NULL;
+ if (g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error) == NULL) {
+ g_error ("Couldn't get on session bus: %s", error->message);
+ exit (1);
+ };
+
filename = UIDIR "/setup.ui";
if (!g_file_test (filename, G_FILE_TEST_EXISTS))
filename = "setup.ui";
setup->builder = gtk_builder_new ();
- error = NULL;
if (!gtk_builder_add_from_file (setup->builder, filename, &error)) {
g_error ("%s", error->message);
g_error_free (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]