[evince] Set max width for page numbers in index
- From: GermÃn Poà CaamaÃo <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] Set max width for page numbers in index
- Date: Sat, 6 Oct 2012 09:25:09 +0000 (UTC)
commit 36d7e9ec3306b48803787d1d1ed79756677b93dd
Author: GermÃn Poo-CaamaÃo <gpoo gnome org>
Date: Fri Oct 5 20:33:05 2012 -0700
Set max width for page numbers in index
The table of contents can have text as page numbers. If the text
is text for the page is too long, it does not allow to see the
table of contents.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=660113
Signed-off-by: GermÃn Poo-CaamaÃo <gpoo gnome org>
shell/ev-sidebar-links.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/shell/ev-sidebar-links.c b/shell/ev-sidebar-links.c
index c220f69..050ff7d 100644
--- a/shell/ev-sidebar-links.c
+++ b/shell/ev-sidebar-links.c
@@ -426,8 +426,11 @@ ev_sidebar_links_construct (EvSidebarLinks *ev_sidebar_links)
"markup", EV_DOCUMENT_LINKS_COLUMN_MARKUP,
NULL);
-
- renderer = gtk_cell_renderer_text_new ();
+ renderer = (GtkCellRenderer*)
+ g_object_new (GTK_TYPE_CELL_RENDERER_TEXT,
+ "ellipsize", PANGO_ELLIPSIZE_MIDDLE,
+ "max-width-chars", 12,
+ NULL);
gtk_tree_view_column_pack_end (GTK_TREE_VIEW_COLUMN (column), renderer, FALSE);
gtk_tree_view_column_set_attributes (GTK_TREE_VIEW_COLUMN (column), renderer,
"text", EV_DOCUMENT_LINKS_COLUMN_PAGE_LABEL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]