From 853ad495b863c179792044f1a74e8556d04e32db Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 9 Aug 2011 09:59:20 +0100 Subject: and the actual code --- src/session-dbus.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/session-dbus.c') diff --git a/src/session-dbus.c b/src/session-dbus.c index 9aa75ef..1cf73ac 100644 --- a/src/session-dbus.c +++ b/src/session-dbus.c @@ -293,3 +293,25 @@ session_dbus_set_user_menu_visibility (SessionDbus* session, } } } + +void session_dbus_restart_required (SessionDbus* session) +{ + SessionDbusPrivate * priv = SESSION_DBUS_GET_PRIVATE(session); + GError * error = NULL; + + if (priv->bus != NULL) { + g_dbus_connection_emit_signal (priv->bus, + NULL, + INDICATOR_SESSION_SERVICE_DBUS_OBJECT, + INDICATOR_SESSION_SERVICE_DBUS_IFACE, + "RebootRequired", + NULL, + &error); + + if (error != NULL) { + g_warning("Unable to send reboot-required signal: %s", error->message); + g_error_free(error); + } + } + +} -- cgit v1.2.3