diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-08-23 12:51:51 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-08-23 12:51:51 +0100 |
commit | 90a91a268a34289aed38215dc9c801365a598e3c (patch) | |
tree | 7e7667329242254c08e049f55c39fea44a6bec9e /src/user-menu-mgr.c | |
parent | 0bae48ead3c94c9c0f699047da716affea8da60f (diff) | |
parent | ca8ee2aec023d95d73e3563d45bc1b660a548f40 (diff) | |
download | ayatana-indicator-session-90a91a268a34289aed38215dc9c801365a598e3c.tar.gz ayatana-indicator-session-90a91a268a34289aed38215dc9c801365a598e3c.tar.bz2 ayatana-indicator-session-90a91a268a34289aed38215dc9c801365a598e3c.zip |
merged user, gsettings and other stuff
Diffstat (limited to 'src/user-menu-mgr.c')
-rw-r--r-- | src/user-menu-mgr.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c index 667ebb4..588d3d0 100644 --- a/src/user-menu-mgr.c +++ b/src/user-menu-mgr.c @@ -76,7 +76,7 @@ user_menu_mgr_init (UserMenuMgr *self) G_CALLBACK (user_change), self); g_signal_connect (G_OBJECT (self->users_dbus_interface), - "user-removed", + "user-deleted", G_CALLBACK (user_change), self); } @@ -92,8 +92,6 @@ static void user_menu_mgr_class_init (UserMenuMgrClass *klass) { GObjectClass* object_class = G_OBJECT_CLASS (klass); - //GObjectClass* parent_class = G_OBJECT_CLASS (klass); - object_class->finalize = user_menu_mgr_finalize; } @@ -212,15 +210,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, conflictedname); g_free(conflictedname); } else { - //g_debug ("%i %s", (gint)user->uid, user->real_name); - //g_debug ("users uid = %i", (gint)user->uid); - //g_debug ("users real name = %s", user->real_name); - if (user == NULL){ - g_debug ("USER pointer is NULL"); - return; - } - g_debug ("%p: %s", user, user->real_name); - + g_debug ("%p: %s", user, user->real_name); dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, user->real_name); @@ -229,9 +219,16 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) USER_ITEM_PROP_LOGGED_IN, user->sessions != NULL); if (user->icon_file != NULL && user->icon_file[0] != '\0') { - dbusmenu_menuitem_property_set(mi, USER_ITEM_PROP_ICON, user->icon_file); + g_debug ("user %s has this icon : %s", + user->user_name, + user->icon_file); + dbusmenu_menuitem_property_set (mi, + USER_ITEM_PROP_ICON, + user->icon_file); } else { - dbusmenu_menuitem_property_set(mi, USER_ITEM_PROP_ICON, USER_ITEM_ICON_DEFAULT); + dbusmenu_menuitem_property_set (mi, + USER_ITEM_PROP_ICON, + USER_ITEM_ICON_DEFAULT); } gboolean logged_in = g_strcmp0 (user->user_name, g_get_user_name()) == 0; @@ -394,9 +391,9 @@ user_change (UsersServiceDbus *service, const gchar *user_id, gpointer user_data) { - //DbusmenuMenuitem *root = (DbusmenuMenuitem *)user_data; - // TODO sort this out. - //rebuild_user_items (root, service); + g_return_if_fail (USER_IS_MENU_MGR (user_data)); + UserMenuMgr* user_mgr = USER_MENU_MGR(user_data); + user_menu_mgr_rebuild_items (user_mgr, FALSE); return; } |