diff options
author | Ted Gould <ted@canonical.com> | 2009-07-22 12:31:39 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-07-22 12:31:39 -0500 |
commit | c9cfcc8a9aefd2122e80e3674c0da96ffe849a34 (patch) | |
tree | f78d25254d733f3452d7ab25fa5b29f15e005426 /src | |
parent | e43d5e49b26a96f1b3f3d16e1a42b3466862d6b1 (diff) | |
download | ayatana-indicator-session-c9cfcc8a9aefd2122e80e3674c0da96ffe849a34.tar.gz ayatana-indicator-session-c9cfcc8a9aefd2122e80e3674c0da96ffe849a34.tar.bz2 ayatana-indicator-session-c9cfcc8a9aefd2122e80e3674c0da96ffe849a34.zip |
Executing the helper, but it needs to be the one in the libexec path.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/session-service.c | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index cf18aaa..ab79f0f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -59,7 +59,7 @@ indicator_users_service_LDADD = $(USERSSERVICE_LIBS) ################# indicator_session_service_SOURCES = session-service.c -indicator_session_service_CFLAGS = $(SESSIONSERVICE_CFLAGS) +indicator_session_service_CFLAGS = $(SESSIONSERVICE_CFLAGS) -DLIBEXECDIR=\"$(libexecdir)\" indicator_session_service_LDADD = $(SESSIONSERVICE_LIBS) ############### diff --git a/src/session-service.c b/src/session-service.c index 55e60df..b301baf 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -15,7 +15,19 @@ static GMainLoop * mainloop = NULL; static void show_dialog (DbusmenuMenuitem * mi, gchar * type) { - g_debug("Showing dialog '%s'", type); + gchar * helper = g_build_path(LIBEXECDIR, "gtk-logout-helper", NULL); + gchar * dialog_line = g_strdup_printf("%s --%s", helper, type); + g_free(helper); + + g_debug("Showing dialog '%s'", dialog_line); + + GError * error = NULL; + if (!g_spawn_command_line_async(dialog_line, &error)) { + g_warning("Unable to show dialog: %s", error->message); + g_error_free(error); + } + + g_free(dialog_line); return; } |