=?UTF-8?Q?Let=E2=80=99s?= get back the expander column



Hi,

since bug#316087 seems finally fixed for good, maybe it is time to
re-enable the expander column in the nautilus list view, that was tried
and abandoned in the 2.17 cycle.

I’m attaching a patch for that effect.

Cheers,
-- 
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.
Index: src/file-manager/fm-list-view.c
===================================================================
--- src/file-manager/fm-list-view.c	(révision 14379)
+++ src/file-manager/fm-list-view.c	(copie de travail)
@@ -58,7 +58,6 @@
 #include <libnautilus-private/nautilus-view-factory.h>
 #include <libnautilus-private/nautilus-clipboard.h>
 #include <libnautilus-private/nautilus-cell-renderer-pixbuf-emblem.h>
-#include <libnautilus-private/nautilus-cell-renderer-text-ellipsized.h>
 
 struct FMListViewDetails {
 	GtkTreeView *tree_view;
@@ -1374,7 +1373,7 @@
 
 	for (l = nautilus_columns; l != NULL; l = l->next) {
 		NautilusColumn *nautilus_column;
-		int column_num;		
+		int column_num, font_size;
 		char *name;
 		char *label;
 		float xalign;
@@ -1397,6 +1396,9 @@
 			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);
+			font_size = PANGO_PIXELS (pango_font_description_get_size (GTK_WIDGET(view)->style->font_desc));
+			gtk_tree_view_column_set_min_width (view->details->file_name_column, 20*font_size);
 			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;
@@ -1418,7 +1420,11 @@
 							     "pixbuf_emblem", FM_LIST_MODEL_SMALLEST_EMBLEM_COLUMN,
 							     NULL);
 			
-			cell = nautilus_cell_renderer_text_ellipsized_new ();
+			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);

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=



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