Fossil SCM

Add a setup parameter under Setup/Timeline for configuring the default number of entries in a timeline that lacks an n= query parameter.

drh 2017-11-27 16:03 trunk
Commit eed877c0a50e02326a303af7770342ff357c8f6fecd2173809377f09eb22b055
--- src/setup.c
+++ src/setup.c
@@ -1483,10 +1483,17 @@
14831483
@ timeline entry and the order in which they are displayed. When the [hash]
14841484
@ is omitted but the (details) are included, then the hash is shown as one
14851485
@ of the details. The "comment | (details)" choice means that the
14861486
@ details are displayed in a separate column from the comment.
14871487
@ (Property: "timeline-commit-format")</p>
1488
+
1489
+ @ <hr />
1490
+ entry_attribute("Default Timeline Length", 6, "timeline-default-length", "tldl", "50", 0);
1491
+ @ <p>The default number of entries in a single /timeline that lacks the "n="
1492
+ @ query parameter.
1493
+ @ (Property: "timeline-default-length")
1494
+ @ </p>
14881495
14891496
@ <hr />
14901497
onoff_attribute("Allow block-markup in timeline",
14911498
"timeline-block-markup", "tbm", 0, 0);
14921499
@ <p>In timeline displays, check-in comments can be displayed with or
14931500
--- src/setup.c
+++ src/setup.c
@@ -1483,10 +1483,17 @@
1483 @ timeline entry and the order in which they are displayed. When the [hash]
1484 @ is omitted but the (details) are included, then the hash is shown as one
1485 @ of the details. The "comment&nbsp;|&nbsp;(details)" choice means that the
1486 @ details are displayed in a separate column from the comment.
1487 @ (Property: "timeline-commit-format")</p>
 
 
 
 
 
 
 
1488
1489 @ <hr />
1490 onoff_attribute("Allow block-markup in timeline",
1491 "timeline-block-markup", "tbm", 0, 0);
1492 @ <p>In timeline displays, check-in comments can be displayed with or
1493
--- src/setup.c
+++ src/setup.c
@@ -1483,10 +1483,17 @@
1483 @ timeline entry and the order in which they are displayed. When the [hash]
1484 @ is omitted but the (details) are included, then the hash is shown as one
1485 @ of the details. The "comment&nbsp;|&nbsp;(details)" choice means that the
1486 @ details are displayed in a separate column from the comment.
1487 @ (Property: "timeline-commit-format")</p>
1488
1489 @ <hr />
1490 entry_attribute("Default Timeline Length", 6, "timeline-default-length", "tldl", "50", 0);
1491 @ <p>The default number of entries in a single /timeline that lacks the "n="
1492 @ query parameter.
1493 @ (Property: "timeline-default-length")
1494 @ </p>
1495
1496 @ <hr />
1497 onoff_attribute("Allow block-markup in timeline",
1498 "timeline-block-markup", "tbm", 0, 0);
1499 @ <p>In timeline displays, check-in comments can be displayed with or
1500
--- src/timeline.c
+++ src/timeline.c
@@ -1717,10 +1717,11 @@
17171717
int selectedRid = -9999999; /* Show a highlight on this RID */
17181718
int disableY = 0; /* Disable type selector on submenu */
17191719
17201720
/* Set number of rows to display */
17211721
z = P("n");
1722
+ if( z==0 ) z = db_get("timeline-default-length",0);
17221723
if( z ){
17231724
if( fossil_strcmp(z,"all")==0 ){
17241725
nEntry = 0;
17251726
}else{
17261727
nEntry = atoi(z);
17271728
--- src/timeline.c
+++ src/timeline.c
@@ -1717,10 +1717,11 @@
1717 int selectedRid = -9999999; /* Show a highlight on this RID */
1718 int disableY = 0; /* Disable type selector on submenu */
1719
1720 /* Set number of rows to display */
1721 z = P("n");
 
1722 if( z ){
1723 if( fossil_strcmp(z,"all")==0 ){
1724 nEntry = 0;
1725 }else{
1726 nEntry = atoi(z);
1727
--- src/timeline.c
+++ src/timeline.c
@@ -1717,10 +1717,11 @@
1717 int selectedRid = -9999999; /* Show a highlight on this RID */
1718 int disableY = 0; /* Disable type selector on submenu */
1719
1720 /* Set number of rows to display */
1721 z = P("n");
1722 if( z==0 ) z = db_get("timeline-default-length",0);
1723 if( z ){
1724 if( fossil_strcmp(z,"all")==0 ){
1725 nEntry = 0;
1726 }else{
1727 nEntry = atoi(z);
1728

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button