aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-08-23 18:17:54 +0100
committerConor Curran <conor.curran@canonical.com>2011-08-23 18:17:54 +0100
commit430f5bce4eef7194f260496a31a18c24e16969b4 (patch)
tree4c8f9439127c35224dca279ed3c0ffa9e266225c /src
parentc8335dabc0de12258ff397924e264cc02ae86554 (diff)
downloadayatana-indicator-session-430f5bce4eef7194f260496a31a18c24e16969b4.tar.gz
ayatana-indicator-session-430f5bce4eef7194f260496a31a18c24e16969b4.tar.bz2
ayatana-indicator-session-430f5bce4eef7194f260496a31a18c24e16969b4.zip
set the alert state on the apt item when reboot is required
Diffstat (limited to 'src')
-rw-r--r--src/apt-watcher.c3
-rw-r--r--src/user-menu-mgr.c10
2 files changed, 11 insertions, 2 deletions
diff --git a/src/apt-watcher.c b/src/apt-watcher.c
index 7d706a0..a4298a8 100644
--- a/src/apt-watcher.c
+++ b/src/apt-watcher.c
@@ -279,6 +279,9 @@ apt_watcher_transaction_state_update_cb (AptTransaction* trans,
dbusmenu_menuitem_property_set (self->apt_item,
DBUSMENU_MENUITEM_PROP_LABEL,
_("Reboot Required"));
+ dbusmenu_menuitem_property_set (self->apt_item,
+ DBUSMENU_MENUITEM_PROP_DISPOSITION,
+ DBUSMENU_MENUITEM_DISPOSITION_ALERT);
session_dbus_restart_required (self->session_dbus_interface);
}
g_debug ("Finished with a reboot value of %i", reboot);
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c
index 424706e..aa02b01 100644
--- a/src/user-menu-mgr.c
+++ b/src/user-menu-mgr.c
@@ -236,16 +236,22 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode)
}
gboolean logged_in = g_strcmp0 (user->user_name, g_get_user_name()) == 0;
+
+ g_debug ("user name = %s and g user name = %s",
+ user->user_name,
+ g_get_user_name());
+
dbusmenu_menuitem_property_set_bool (mi,
USER_ITEM_PROP_IS_CURRENT_USER,
logged_in);
if (logged_in == TRUE){
- if (check_guest_session() == TRUE){
+ if (check_guest_session()){
g_debug ("about to set the users real name to %s for user %s",
user->real_name, user->user_name);
session_dbus_set_users_real_name (self->session_dbus_interface, user->real_name);
}
else{
+ g_debug ("about to set the users real name to GUEST");
session_dbus_set_users_real_name (self->session_dbus_interface,
_("Guest"));
}
@@ -429,7 +435,7 @@ static gboolean
check_guest_session (void)
{
if (geteuid() < 500) {
- /* System users shouldn't have guest account shown. Mosly
+ /* System users shouldn't have guest account shown. Mostly
this would be the case of the guest user itself. */
return FALSE;
}