[nautilus] list-view: hook up the previewer in list view



commit 034eeb090458443b97fbe9b601a045defb5435f9
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Apr 25 10:48:25 2011 -0400

    list-view: hook up the previewer in list view
    
    No support for icon locations yet, but it's not implemented in the previewer
    either.

 src/nautilus-list-view.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 3c243a4..e8632f3 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -236,6 +236,18 @@ tree_view_has_selection (GtkTreeView *view)
 }
 
 static void
+preview_selected_items (NautilusListView *view)
+{
+	GList *file_list;
+	
+	file_list = nautilus_list_view_get_selection (NAUTILUS_VIEW (view));
+
+	nautilus_view_preview_files (NAUTILUS_VIEW (view),
+				     file_list, NULL);
+	nautilus_file_list_free (file_list);
+}
+
+static void
 activate_selected_items (NautilusListView *view)
 {
 	GList *file_list;
@@ -1050,7 +1062,7 @@ key_press_callback (GtkWidget *widget, GdkEventKey *event, gpointer callback_dat
 		if ((event->state & GDK_SHIFT_MASK) != 0) {
 			activate_selected_items_alternate (NAUTILUS_LIST_VIEW (view), NULL, TRUE);
 		} else {
-			activate_selected_items (NAUTILUS_LIST_VIEW (view));
+			preview_selected_items (NAUTILUS_LIST_VIEW (view));
 		}
 		handled = TRUE;
 		break;



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