[nautilus] list-view: explicitly set cursor on file name cell renderer on rename



commit 5b09cedf434b53a975074b346d511335fc735cba
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Aug 8 02:25:38 2011 +0100

    list-view: explicitly set cursor on file name cell renderer on rename
    
    The file name column has two cell renderers, one for the icon and another for
    the name string. Thus, gtk_tree_view_set_cursor() isn't enough to reliably
    start editing the file name cell since it will try to edit whatever is the
    currently focused cell in the column.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656128

 src/nautilus-list-view.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index e958d2e..4f8f3cd 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -2955,10 +2955,11 @@ nautilus_list_view_start_renaming_file (NautilusView *view,
 				      NULL,
 				      list_view->details->file_name_column,
 				      TRUE, 0.0, 0.0);
-	gtk_tree_view_set_cursor (list_view->details->tree_view,
-				  path,
-				  list_view->details->file_name_column,
-				  TRUE);
+	gtk_tree_view_set_cursor_on_cell (list_view->details->tree_view,
+					  path,
+					  list_view->details->file_name_column,
+					  GTK_CELL_RENDERER (list_view->details->file_name_cell),
+					  TRUE);
 
 	/* set cursor also triggers editing-started, where we save the editable widget */
 	if (list_view->details->editable_widget != NULL) {



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