aboutsummaryrefslogtreecommitdiff
path: root/src/session-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/session-service.c')
-rw-r--r--src/session-service.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/session-service.c b/src/session-service.c
index c98ecff..f6b666f 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -44,6 +44,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "gconf-helper.h"
+#include "session-dbus.h"
#include "users-service-dbus.h"
#include "lock-helper.h"
@@ -68,6 +69,7 @@ struct _ActivateData
static DBusGConnection *system_bus = NULL;
static DBusGProxy *gdm_proxy = NULL;
static UsersServiceDbus *dbus_interface = NULL;
+static SessionDbus *session_dbus = NULL;
static DbusmenuMenuitem *lock_menuitem = NULL;
static DbusmenuMenuitem *switch_menuitem = NULL;
@@ -649,6 +651,9 @@ restart_dir_changed (void)
dbusmenu_menuitem_property_set(restart_mi, RESTART_ITEM_LABEL, _("Restart Required..."));
}
dbusmenu_menuitem_property_set(restart_mi, RESTART_ITEM_ICON, "emblem-important");
+ if (session_dbus != NULL) {
+ session_dbus_set_name(session_dbus, ICON_RESTART);
+ }
} else {
if (supress_confirmations()) {
dbusmenu_menuitem_property_set(restart_mi, RESTART_ITEM_LABEL, _("Restart"));
@@ -656,6 +661,9 @@ restart_dir_changed (void)
dbusmenu_menuitem_property_set(restart_mi, RESTART_ITEM_LABEL, _("Restart..."));
}
dbusmenu_menuitem_property_remove(restart_mi, RESTART_ITEM_ICON);
+ if (session_dbus != NULL) {
+ session_dbus_set_name(session_dbus, ICON_DEFAULT);
+ }
}
return;
@@ -695,6 +703,8 @@ main (int argc, char ** argv)
INDICATOR_SERVICE_SIGNAL_SHUTDOWN,
G_CALLBACK(service_shutdown), NULL);
+ session_dbus = session_dbus_new();
+
g_idle_add(lock_screen_setup, NULL);
root_menuitem = dbusmenu_menuitem_new();