~indicator-applet-developers/indicator-session/trunk.0.1

« back to all changes in this revision

Viewing changes to src/users-service.c

  • Committer: Ted Gould
  • Author(s): Cody Russell
  • Date: 2009-09-24 21:54:11 UTC
  • mfrom: (36.1.1 add-user-fix)
  • Revision ID: ted@canonical.com-20090924215411-gz2k045hp9j7u8bn
Merging in Cody's branch for fixing some user issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
251
251
  users_service_dbus_activate_user_session (service, user);
252
252
}
253
253
 
254
 
static void
255
 
remove_menu_item (DbusmenuMenuitem *root, gpointer user_data)
256
 
{
257
 
  DbusmenuMenuitem *child = (DbusmenuMenuitem *)user_data;
258
 
 
259
 
  dbusmenu_menuitem_child_delete (root, child);
260
 
}
261
 
 
262
254
static gint
263
255
compare_users_by_username (const gchar *a,
264
256
                           const gchar *b)
277
269
  GList *u;
278
270
  UserData *user;
279
271
  gboolean can_activate;
 
272
  GList *children;
280
273
 
281
274
  can_activate = users_service_dbus_can_activate_session (service);
282
275
 
283
 
  dbusmenu_menuitem_foreach (root, remove_menu_item, NULL);
 
276
  children = dbusmenu_menuitem_take_children (root);
 
277
  g_list_foreach (children, (GFunc)g_object_unref, NULL);
 
278
  g_list_free (children);
284
279
 
285
280
  mi = dbusmenu_menuitem_new();
286
281
  dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Lock Screen"));