summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserbutton.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-08-13 17:33:55 -0400
committerMatthias Clasen <mclasen@redhat.com>2013-08-13 17:35:28 -0400
commit3923ba160594ad5e6c83f861cd5aeaba5e58129c (patch)
tree5e0ec9bf308caa63c6499757ee639a0299e4f034 /gtk/gtkfilechooserbutton.c
parent40c429c2cbe20f5a471b6594bd0bd163e78628b6 (diff)
downloadgtk+-3923ba160594ad5e6c83f861cd5aeaba5e58129c.tar.gz
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
Diffstat (limited to 'gtk/gtkfilechooserbutton.c')
-rw-r--r--gtk/gtkfilechooserbutton.c2
1 files changed, 2 insertions, 0 deletions
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);
}