From 9daa2a61fd50b32d998581f868fec77c997f026f Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Mon, 12 Jun 2017 17:42:18 -0700 Subject: attribution: Allow long comments to wrap We hardcode a wrap width of 600 based on the dialog's default width of 700. https://phabricator.endlessm.com/T17540 --- endless/eosattribution.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'endless/eosattribution.c') diff --git a/endless/eosattribution.c b/endless/eosattribution.c index ca9be4c..f1e4128 100644 --- a/endless/eosattribution.c +++ b/endless/eosattribution.c @@ -10,6 +10,9 @@ #include "eoscellrenderertextlink-private.h" #include "eoslicense.h" +/* less than _CREDITS_DIALOG_DEFAULT_WIDTH from eosapplication.c */ +#define _NOTES_COLUMN_WIDTH 600 + typedef struct { GFile *file; @@ -415,6 +418,11 @@ eos_attribution_init (EosAttribution *self) /* Renderer for general notes */ renderer = gtk_cell_renderer_text_new (); + g_object_set(renderer, + "single-paragraph-mode", TRUE, + "wrap-mode", PANGO_WRAP_WORD_CHAR, + "wrap-width", _NOTES_COLUMN_WIDTH, + NULL); gtk_cell_area_box_pack_start (GTK_CELL_AREA_BOX (area), renderer, FALSE, FALSE, FALSE); gtk_tree_view_column_set_cell_data_func (column, renderer, -- cgit v1.2.3