static void
remove_button_clicked (GtkWidget *widget,
                       gpointer user_data)
{
  GtkWidget *list_box = user_data;
  GtkWidget *child;
  Place *place;
  GPtrArray *new_values;

  child = egg_list_box_get_selected_child (EGG_LIST_BOX (list_box));
  place = g_object_get_data (G_OBJECT (child), "place");
  new_values = place_get_new_settings_values (place, TRUE);
  g_settings_set_strv (tracker_preferences, place->settings_key, (const gchar **) new_values->pdata);

  g_ptr_array_unref (new_values);
}
static gint
egg_list_box_accessible_get_selection_count (AtkSelection *selection)
{
  GtkWidget *box;
  GtkWidget *widget;

  box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
  if (box == NULL)
    return 0;

  widget = egg_list_box_get_selected_child (EGG_LIST_BOX (box));
  if (widget == NULL)
    return 0;

  return 1;
}
static gboolean
egg_list_box_accessible_is_child_selected (AtkSelection *selection,
                                           gint          idx)
{
  GtkWidget *box;
  GtkWidget *widget;
  GList *children;
  GtkWidget *child;

  box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
  if (box == NULL)
    return FALSE;

  widget = egg_list_box_get_selected_child (EGG_LIST_BOX (box));
  if (widget == NULL)
    return FALSE;

  children = gtk_container_get_children (GTK_CONTAINER (box));
  child = g_list_nth_data (children, idx);
  g_list_free (children);
  return child == widget;
}
static AtkObject *
egg_list_box_accessible_ref_selection (AtkSelection *selection,
                                       gint          idx)
{
  GtkWidget *box;
  GtkWidget *widget;
  AtkObject *accessible;

  if (idx != 0)
    return NULL;

  box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
  if (box == NULL)
    return NULL;

  widget = egg_list_box_get_selected_child (EGG_LIST_BOX (box));
  if (widget == NULL)
    return NULL;

  accessible = gtk_widget_get_accessible (widget);
  g_object_ref (accessible);
  return accessible;
}