[nautilus-actions] Address each occurrence of selected instead of just the first one



commit 8868a073583c80ae3a7ac1da60cb043afb5bf6b0
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sat Aug 21 18:05:42 2010 +0200

    Address each occurrence of selected instead of just the first one

 ChangeLog              |    4 ++++
 src/core/na-icontext.c |    6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index bb4dcf1..9f21821 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-08-21 Pierre Wieser <pwieser trychlos org>
 
+	* src/core/na-icontext.c
+	(is_candidate_for_schemes, is_candidate_for_folders):
+	Address each ocurrence of file instead of just the first one.
+
 	* doc/nact/Makefile.am: Fix PDF distribution.
 
 2010-08-19 Pierre Wieser <pwieser trychlos org>
diff --git a/src/core/na-icontext.c b/src/core/na-icontext.c
index 9aa238a..cd8253a 100644
--- a/src/core/na-icontext.c
+++ b/src/core/na-icontext.c
@@ -862,11 +862,11 @@ is_candidate_for_schemes( const NAIContext *object, guint target, GList *files )
 			GList *it;
 
 			for( it = files ; it && ok ; it = it->next ){
-				gchar *scheme = na_selected_info_get_uri_scheme( NA_SELECTED_INFO( files->data ));
+				gchar *scheme = na_selected_info_get_uri_scheme( NA_SELECTED_INFO( it->data ));
 
 				if( na_core_utils_slist_count( distincts, scheme ) == 0 ){
 					GSList *is;
-					gchar *pattern;
+					gchar *pattern, *scheme;
 					gboolean match, positive;
 
 					match = FALSE;
@@ -944,7 +944,7 @@ is_candidate_for_folders( const NAIContext *object, guint target, GList *files )
 			GList *it;
 
 			for( it = files ; it && ok ; it = it->next ){
-				gchar *dirname = na_selected_info_get_dirname( NA_SELECTED_INFO( files->data ));
+				gchar *dirname = na_selected_info_get_dirname( NA_SELECTED_INFO( it->data ));
 
 				if( na_core_utils_slist_count( distincts, dirname ) == 0 ){
 					g_debug( "%s: distinct dirname=%s", thisfn, dirname );



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