diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-04-18 11:13:03 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-04-18 11:13:03 -0500 |
commit | 67218e58889b101ceb5a50bcb40c37045fb2855d (patch) | |
tree | ba37f8f02116e8b2aefa23bf2be0509d53367e6a /src/main.c | |
parent | d79745bdb2e9bbd02e162a5209de9f227d1dbbc3 (diff) | |
download | ayatana-indicator-session-67218e58889b101ceb5a50bcb40c37045fb2855d.tar.gz ayatana-indicator-session-67218e58889b101ceb5a50bcb40c37045fb2855d.tar.bz2 ayatana-indicator-session-67218e58889b101ceb5a50bcb40c37045fb2855d.zip |
indicator-session-service should exit when it loses ownership of its name on the bus.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -60,6 +60,13 @@ parse_command_line (int * argc, char *** argv) **** ***/ +static void +on_name_lost (gpointer instance, gpointer loop) +{ + g_debug ("exiting: service couldn't acquire or lost ownership of busname"); + g_main_loop_quit ((GMainLoop*)loop); +} + int main (int argc, char ** argv) { @@ -76,6 +83,8 @@ main (int argc, char ** argv) /* run */ service = indicator_session_service_new (replace); loop = g_main_loop_new (NULL, FALSE); + g_signal_connect (service, INDICATOR_SESSION_SERVICE_SIGNAL_NAME_LOST, + G_CALLBACK(on_name_lost), loop); g_main_loop_run (loop); /* cleanup */ |