static void
photos_view_container_view_selection_changed (PhotosViewContainer *self)
{
  PhotosViewContainerPrivate *priv = self->priv;
  GList *selected_urns;
  GList *selection;

  selection = gd_main_view_get_selection (priv->view);
  selected_urns = photos_utils_get_urns_from_paths (selection, GTK_TREE_MODEL (priv->model));
  photos_selection_controller_set_selection (priv->sel_cntrlr, selected_urns);

  g_list_free_full (selected_urns, g_free);
  g_list_free_full (selection, (GDestroyNotify) gtk_tree_path_free);
}
Exemple #2
0
static void
on_selection_mode_changed_cb (BjbMainView *self)
{
  GList *select;

  /* Workaround if items are selected
   * but selection mode not really active (?) */
  select = gd_main_view_get_selection (self->priv->view);
  if (select)
  {
    g_list_free (select);
    gd_main_view_set_selection_mode (self->priv->view, TRUE);
  }

  /* Any case, tell */
  g_signal_emit (G_OBJECT (self),
                 bjb_main_view_signals[VIEW_SELECTION_CHANGED],0);
}
static void
bjb_selection_toolbar_selection_changed (GdMainView *view, gpointer user_data)
{
  
  BjbSelectionToolbar *self = BJB_SELECTION_TOOLBAR (user_data);
  GList *selection;

  selection = gd_main_view_get_selection(view);

  if (g_list_length (selection) > 0)
  {
    bjb_selection_toolbar_set_item_visibility (self);
    bjb_selection_toolbar_fade_in (self);
  }
  
  else
    bjb_selection_toolbar_fade_out (self);
}
Exemple #4
0
static GList *
get_selected_paths(BjbMainView *self)
{
  return gd_main_view_get_selection ( self->priv->view ) ; 
}