[patch] [bug 408155] ellipsize filename column



Hi,

attached patch implements ellipsisation for the filename column. I had
to make the column expand because otherwise it would come up with just
the "..." shown for each filename; this way it always fills the
available space which looks better.

Ok to commit?

Btw, I noticed that nautilus doesn't store/restore the column widths if
you resize them; is that on purpose?

Regards,
	Christian
Index: src/file-manager/fm-list-view.c
===================================================================
--- src/file-manager/fm-list-view.c	(révision 12751)
+++ src/file-manager/fm-list-view.c	(copie de travail)
@@ -1360,6 +1360,7 @@ create_and_set_up_tree_view (FMListView 
 			view->details->pixbuf_cell = (GtkCellRendererPixbuf *)cell;
 			
 			view->details->file_name_column = gtk_tree_view_column_new ();
+                        gtk_tree_view_column_set_expand (view->details->file_name_column, TRUE);
 			g_object_ref (view->details->file_name_column);
 			gtk_object_sink (GTK_OBJECT (view->details->file_name_column));
 			view->details->file_name_column_num = column_num;
@@ -1382,6 +1383,10 @@ create_and_set_up_tree_view (FMListView 
 							     NULL);
 			
 			cell = gtk_cell_renderer_text_new ();
+                        g_object_set (cell,
+                                      "ellipsize", PANGO_ELLIPSIZE_END,
+                                      "ellipsize-set", TRUE,
+                                      NULL);
 			view->details->file_name_cell = (GtkCellRendererText *)cell;
 			g_signal_connect (cell, "edited", G_CALLBACK (cell_renderer_edited), view);
 			g_signal_connect (cell, "editing-canceled", G_CALLBACK (cell_renderer_editing_canceled), view);


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