[gnome-screensaver] Use GIO to launch gdmflexiserver
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-screensaver] Use GIO to launch gdmflexiserver
- Date: Wed, 22 Dec 2010 17:09:23 +0000 (UTC)
commit fd0bca20b56f70e08ff2cbcb39de878ccd51bc21
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Dec 22 12:08:43 2010 -0500
Use GIO to launch gdmflexiserver
It turns out that it needs DISPLAY to work.
src/gs-lock-plug.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
index 68b4158..2ccd8b2 100644
--- a/src/gs-lock-plug.c
+++ b/src/gs-lock-plug.c
@@ -152,8 +152,9 @@ gs_lock_plug_style_set (GtkWidget *widget,
static void
do_user_switch (GSLockPlug *plug)
{
+ GAppInfo *app;
+ GAppLaunchContext *context;
GError *error;
- gboolean res;
char *command;
command = g_strdup_printf ("%s %s",
@@ -161,11 +162,16 @@ do_user_switch (GSLockPlug *plug)
GDM_FLEXISERVER_ARGS);
error = NULL;
- res = g_spawn_command_line_async (command, &error);
+ context = (GAppLaunchContext*)gdk_app_launch_context_new ();
+ app = g_app_info_create_from_commandline (command, "gdmflexiserver", 0, &error);
+ if (app)
+ g_app_info_launch (app, NULL, context, &error);
g_free (command);
+ g_object_unref (context);
+ g_object_unref (app);
- if (! res) {
+ if (!error) {
gs_debug ("Unable to start GDM greeter: %s", error->message);
g_error_free (error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]