Set the "ellipsize" property of GtkCellRendererText to automatically shorten the path and file names in the Documents list.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3731 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
e4dfd09d7c
commit
52e733e305
@ -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>
|
||||
|
@ -241,6 +241,7 @@ static void prepare_openfiles(void)
|
||||
|
||||
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 @@ void treeviews_openfiles_add(GeanyDocument *doc)
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user