From 62d5071180e89c16c32d7b1bfee4410d37bee5f5 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 23 Aug 2011 16:54:52 +0100 Subject: removed bluetooth item and labels on webcams and scanners are now manufacturer specific --- src/user-menu-mgr.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/user-menu-mgr.c') diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c index 588d3d0..9d76b8b 100644 --- a/src/user-menu-mgr.c +++ b/src/user-menu-mgr.c @@ -49,6 +49,10 @@ static gint compare_users_by_username (const gchar *a, static void activate_online_accounts (DbusmenuMenuitem *mi, guint timestamp, gpointer user_data); +static void activate_user_accounts (DbusmenuMenuitem *mi, + guint timestamp, + gpointer user_data); + static void user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode); static gboolean check_new_session (); -- cgit v1.2.3 From c8335dabc0de12258ff397924e264cc02ae86554 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 23 Aug 2011 17:14:35 +0100 Subject: user menu now shown if guest session is possible also guest name has been set on the panel --- src/user-menu-mgr.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/user-menu-mgr.c') diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c index 9d76b8b..424706e 100644 --- a/src/user-menu-mgr.c +++ b/src/user-menu-mgr.c @@ -173,7 +173,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) gboolean user_menu_is_visible = FALSE; if (!greeter_mode){ - user_menu_is_visible = self->user_count > 1; + user_menu_is_visible = self->user_count > 1 || check_guest_session(); } session_dbus_set_user_menu_visibility (self->session_dbus_interface, @@ -240,9 +240,15 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) USER_ITEM_PROP_IS_CURRENT_USER, logged_in); if (logged_in == TRUE){ - 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); + if (check_guest_session() == TRUE){ + 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{ + session_dbus_set_users_real_name (self->session_dbus_interface, + _("Guest")); + } } dbusmenu_menuitem_child_append (self->root_item, mi); -- cgit v1.2.3 From 430f5bce4eef7194f260496a31a18c24e16969b4 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 23 Aug 2011 18:17:54 +0100 Subject: set the alert state on the apt item when reboot is required --- src/user-menu-mgr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/user-menu-mgr.c') 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; } -- cgit v1.2.3