Don't count the "enter directory name" line as a selected file

This commit is contained in:
Benjamin Otte 2009-06-24 22:46:21 +02:00
parent affa8c8459
commit 390a3910f5

View File

@ -2733,14 +2733,21 @@ selection_check_foreach_cb (GtkTreeModel *model,
{
struct selection_check_closure *closure;
gboolean is_folder;
GFile *file;
gtk_tree_model_get (model, iter,
MODEL_COL_FILE, &file,
MODEL_COL_IS_FOLDER, &is_folder,
-1);
if (file == NULL)
return;
g_object_unref (file);
closure = data;
closure->num_selected++;
gtk_tree_model_get (model, iter,
MODEL_COL_IS_FOLDER, &is_folder,
-1);
closure->all_folders = closure->all_folders && is_folder;
closure->all_files = closure->all_files && !is_folder;
}