SF.net SVN: geany:[3731] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Fri Apr 24 19:30:07 UTC 2009


Revision: 3731
          http://geany.svn.sourceforge.net/geany/?rev=3731&view=rev
Author:   eht16
Date:     2009-04-24 19:30:07 +0000 (Fri, 24 Apr 2009)

Log Message:
-----------
Set the "ellipsize" property of GtkCellRendererText to automatically shorten the path and file names in the Documents list.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/treeviews.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-04-24 19:29:45 UTC (rev 3730)
+++ trunk/ChangeLog	2009-04-24 19:30:07 UTC (rev 3731)
@@ -10,6 +10,9 @@
    When the editor menu is opened by the Menu key, use the text cursor
    position for retrieving the current word. This fixes disabled
    Go to Tag items in the menu (#2780044).
+ * src/treeviews.c:
+   Set the "ellipsize" property of GtkCellRendererText to automatically
+   shorten the path and file names in the Documents list.
 
 
 2009-04-21  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/src/treeviews.c
===================================================================
--- trunk/src/treeviews.c	2009-04-24 19:29:45 UTC (rev 3730)
+++ trunk/src/treeviews.c	2009-04-24 19:30:07 UTC (rev 3731)
@@ -241,6 +241,7 @@
 
 	icon_renderer = gtk_cell_renderer_pixbuf_new();
 	text_renderer = gtk_cell_renderer_text_new();
+	g_object_set(text_renderer, "ellipsize", PANGO_ELLIPSIZE_MIDDLE, NULL);
 	column = gtk_tree_view_column_new();
 	gtk_tree_view_column_pack_start(column, icon_renderer, FALSE);
 	gtk_tree_view_column_set_attributes(column, icon_renderer, "stock-id", DOCUMENTS_ICON, NULL);
@@ -368,7 +369,7 @@
 		gtk_tree_view_expand_row(GTK_TREE_VIEW(tv.tree_openfiles), path, TRUE);
 		gtk_tree_path_free(path);
 	}
-	basename = document_get_basename_for_display(doc, 30);
+	basename = g_path_get_basename(DOC_FILENAME(doc));
 	gtk_tree_store_set(store_openfiles, iter, DOCUMENTS_ICON, GTK_STOCK_FILE,
 		DOCUMENTS_SHORTNAME, basename, DOCUMENTS_DOCUMENT, doc, DOCUMENTS_COLOR, color,
 		DOCUMENTS_FILENAME, DOC_FILENAME(doc), -1);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list