mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Added 'summary line length'
SVN revision: 2262
This commit is contained in:
parent
99f23170a5
commit
8ba687be46
@ -2272,6 +2272,12 @@ Options Location = Main Building{a}, New Building{b}, Old Building{c}
|
||||
This specifies the number of text lines displayed in a summary page.
|
||||
Zero displays no text at all. The default is 3.
|
||||
</li>
|
||||
<li>
|
||||
<b><code>Summary line length = x</code></b><br>
|
||||
This specifies the number of charactes of the summary lines. After this
|
||||
number of charactes, a line break is inserted in long lines to keep the
|
||||
column width not too wide. The default is 40.
|
||||
</li>
|
||||
<li>
|
||||
<b><code>Attachment lines = x</code></b><br>
|
||||
This specifies the number of text lines displayed for ASCII attachments.
|
||||
|
||||
@ -16767,7 +16767,7 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
||||
int absolute_link)
|
||||
{
|
||||
char str[NAME_LENGTH], ref[256], *nowrap, sclass[80], format[256], file_name[MAX_PATH_LENGTH], *slist,
|
||||
*svalue, comment[256];
|
||||
*svalue, comment[256], param[80];
|
||||
char display[NAME_LENGTH], attr_icon[80];
|
||||
int i, j, n, i_line, index, colspan, n_attachments, line_len, thumb_status, max_line_len, n_lines,
|
||||
max_n_lines;
|
||||
@ -17333,7 +17333,10 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
||||
if (strieq(mode, "Summary") && n_line > 0 && show_text) {
|
||||
rsprintf("<td class=\"summary\">");
|
||||
|
||||
max_line_len = n_line >= 10 ? 140 : 40;
|
||||
if (getcfg(lbs->name, "Summary line length", param, sizeof(param)))
|
||||
max_line_len = atoi(param);
|
||||
else
|
||||
max_line_len = n_line >= 10 ? 140 : 40;
|
||||
for (i = i_line = line_len = 0; i < (int) sizeof(str) - 1; line_len++, i++) {
|
||||
str[i] = text[i];
|
||||
if (line_break(text + i, encoding)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user