[Thunar-dev] Thunar get all files from standarview
Fernando Maróstica
fmarostica at fmarostica.org
Tue Oct 23 19:51:26 CEST 2007
Benedikt, I'm newbie in Xfce & Thunar Code!
Does standard_view object provides the current_folder?
static void
thunar_standard_view_action_foo (GtkAction *action,
ThunarStandardView *standard_view)
{
GList *files;
GList *selected_items;
_thunar_return_if_fail (GTK_IS_ACTION (action));
_thunar_return_if_fail (THUNAR_IS_STANDARD_VIEW (standard_view));
/* ?? is it ok? */
files = thunar_folder_get_files (standart_view->model->folder);
selected_items = THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->get_selected_items (standard_view);
}
Em Ter, 2007-10-23 às 18:03 +0200, Benedikt Meurer escreveu:
> Fernando Maróstica wrote:
> > Helo guys!
> >
> > Is there another way to get all files in Thunar?
> >
> > GList *all_items;
> > GList *selected_items;
> >
> > all_items = thunar_list_model_get_paths_for_pattern
> > (standard_view->model, "*");
> >
> > selected_items = THUNAR_STANDARD_VIEW_GET_CLASS
> > (standard_view)->get_selected_items (standard_view);
> >
> > The all_items is all files in Thunar and selected_items is the selected
> > files from user. So, Is there another way or correct way to me get all
> > files in Thunar without use thunar_list_model_get_paths_for_pattern?
>
> Query the model from the view and query the folder from that model. The
> folder object includes all files from a certain folder (including the
> hidden ones).
>
> > Cheers.
> > Fernando Maróstica.
>
> Benedikt
> _______________________________________________
> Thunar-dev mailing list
> Thunar-dev at xfce.org
> http://foo-projects.org/mailman/listinfo/thunar-dev
More information about the Thunar-dev
mailing list