From 3923ba160594ad5e6c83f861cd5aeaba5e58129c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 13 Aug 2013 17:33:55 -0400 Subject: [PATCH] Avoid overlong file chooser buttons When bookmarks are long, the file chooser button would grow too much. This can be avoided by ellipsizing. Patch by Ritesh Khadgaray, https://bugzilla.gnome.org/show_bug.cgi?id=672220 --- gtk/gtkfilechooserbutton.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index 81551f7eef..3cd560fd1a 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -2328,6 +2328,8 @@ name_cell_data_func (GtkCellLayout *layout, if (type == ROW_TYPE_CURRENT_FOLDER) g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL); + else if (type == ROW_TYPE_BOOKMARK || type == ROW_TYPE_SHORTCUT) + g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_MIDDLE, NULL); else g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_NONE, NULL); }