[gthumb: 14/57] [webalbums] get the selected files or all the files if no one is selected



commit 7d03af0d39b17a1124d0d348c8e8bc402c2a5d01
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Jun 9 21:40:23 2010 +0200

    [webalbums] get the selected files or all the files if no one is selected

 extensions/webalbums/actions.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/extensions/webalbums/actions.c b/extensions/webalbums/actions.c
index c482542..8086787 100644
--- a/extensions/webalbums/actions.c
+++ b/extensions/webalbums/actions.c
@@ -31,5 +31,19 @@ void
 gth_browser_activate_action_export_webalbum (GtkAction  *action,
 					     GthBrowser *browser)
 {
-	dlg_web_exporter (browser);
+	GList *items;
+	GList *file_data_list;
+	GList *file_list;
+
+	items = gth_file_selection_get_selected (GTH_FILE_SELECTION (gth_browser_get_file_list_view (browser)));
+	file_data_list = gth_file_list_get_files (GTH_FILE_LIST (gth_browser_get_file_list (browser)), items);
+	if (file_data_list == NULL)
+		file_data_list = gth_file_store_get_visibles (gth_browser_get_file_store (browser));
+	file_list = gth_file_data_list_to_file_list (file_data_list);
+
+	dlg_web_exporter (browser, file_list);
+
+	_g_object_list_unref (file_list);
+	_g_object_list_unref (file_data_list);
+	_gtk_tree_path_list_free (items);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]