[gtk+] Avoid overlong file chooser buttons
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Avoid overlong file chooser buttons
- Date: Tue, 13 Aug 2013 21:35:41 +0000 (UTC)
commit 3923ba160594ad5e6c83f861cd5aeaba5e58129c
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Aug 13 17:33:55 2013 -0400
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 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index 81551f7..3cd560f 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]