We should have a ThunarxFileInfoList in thunarx, which is then given to plugins, and plugins simply take a reference on the list, rather than having to do a deep copy (this will also be useful inside Thunar!). The datastructure is basicly: typedef struct { gint ref_count; const GList *head; } ThunarxFileInfoList; and we'd have the following methods: thunarx_file_info_list_new() thunarx_file_info_list_wrap() /* takes over ownership of the list */ thunarx_file_info_list_ref() thunarx_file_info_list_unref() thunarx_file_info_list_get_head() thunarx_file_info_list_get_tail()
And of course a boxed type for the ThunarxFileInfoList.
Maybe for 2.0, together with an advanced ThunarxActionProvider[selected-files,ui-manager,current-directory] framework.