Fossil SCM
Make the repeated-ticket suppressor output text ("N similar events omitted") appear at the end of the first line in the timeline, rather than on a separate line. Less obtrusive this way.
Commit
dccb97fc344a0c353fd29e4e77ff7b8fd4022099
Parent
d66057762f7e570…
1 file changed
+9
-3
+9
-3
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -202,10 +202,11 @@ | ||
| 202 | 202 | GraphContext *pGraph = 0; |
| 203 | 203 | int prevWasDivider = 0; /* True if previous output row was <hr> */ |
| 204 | 204 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 205 | 205 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| 206 | 206 | static Stmt qbranch; |
| 207 | + int pendingEndTr = 0; /* True if a </td></tr> is needed */ | |
| 207 | 208 | |
| 208 | 209 | zPrevDate[0] = 0; |
| 209 | 210 | mxWikiLen = db_get_int("timeline-max-comment", 0); |
| 210 | 211 | if( db_get_boolean("timeline-block-markup", 0) ){ |
| 211 | 212 | wikiFlags = WIKI_INLINE; |
| @@ -253,14 +254,17 @@ | ||
| 253 | 254 | } |
| 254 | 255 | } |
| 255 | 256 | } |
| 256 | 257 | prevTagid = tagid; |
| 257 | 258 | if( suppressCnt ){ |
| 258 | - @ <tr><td /><td /><td> | |
| 259 | 259 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 260 | 260 | @ event%s(suppressCnt>1?"s":"") omitted.</span></td></tr> |
| 261 | 261 | suppressCnt = 0; |
| 262 | + } | |
| 263 | + if( pendingEndTr ){ | |
| 264 | + @ </td></tr> | |
| 265 | + pendingEndTr = 0; | |
| 262 | 266 | } |
| 263 | 267 | if( fossil_strcmp(zType,"div")==0 ){ |
| 264 | 268 | if( !prevWasDivider ){ |
| 265 | 269 | @ <tr><td colspan="3"><hr /></td></tr> |
| 266 | 270 | } |
| @@ -461,17 +465,19 @@ | ||
| 461 | 465 | db_reset(&fchngQuery); |
| 462 | 466 | if( inUl ){ |
| 463 | 467 | @ </ul> |
| 464 | 468 | } |
| 465 | 469 | } |
| 466 | - @ </td></tr> | |
| 470 | + pendingEndTr = 1; | |
| 467 | 471 | } |
| 468 | 472 | if( suppressCnt ){ |
| 469 | - @ <tr><td /><td /><td> | |
| 470 | 473 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 471 | 474 | @ event%s(suppressCnt>1?"s":"") omitted.</span></td></tr> |
| 472 | 475 | suppressCnt = 0; |
| 476 | + } | |
| 477 | + if( pendingEndTr ){ | |
| 478 | + @ </td></tr> | |
| 473 | 479 | } |
| 474 | 480 | if( pGraph ){ |
| 475 | 481 | graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0); |
| 476 | 482 | if( pGraph->nErr ){ |
| 477 | 483 | graph_free(pGraph); |
| 478 | 484 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -202,10 +202,11 @@ | |
| 202 | GraphContext *pGraph = 0; |
| 203 | int prevWasDivider = 0; /* True if previous output row was <hr> */ |
| 204 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 205 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| 206 | static Stmt qbranch; |
| 207 | |
| 208 | zPrevDate[0] = 0; |
| 209 | mxWikiLen = db_get_int("timeline-max-comment", 0); |
| 210 | if( db_get_boolean("timeline-block-markup", 0) ){ |
| 211 | wikiFlags = WIKI_INLINE; |
| @@ -253,14 +254,17 @@ | |
| 253 | } |
| 254 | } |
| 255 | } |
| 256 | prevTagid = tagid; |
| 257 | if( suppressCnt ){ |
| 258 | @ <tr><td /><td /><td> |
| 259 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 260 | @ event%s(suppressCnt>1?"s":"") omitted.</span></td></tr> |
| 261 | suppressCnt = 0; |
| 262 | } |
| 263 | if( fossil_strcmp(zType,"div")==0 ){ |
| 264 | if( !prevWasDivider ){ |
| 265 | @ <tr><td colspan="3"><hr /></td></tr> |
| 266 | } |
| @@ -461,17 +465,19 @@ | |
| 461 | db_reset(&fchngQuery); |
| 462 | if( inUl ){ |
| 463 | @ </ul> |
| 464 | } |
| 465 | } |
| 466 | @ </td></tr> |
| 467 | } |
| 468 | if( suppressCnt ){ |
| 469 | @ <tr><td /><td /><td> |
| 470 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 471 | @ event%s(suppressCnt>1?"s":"") omitted.</span></td></tr> |
| 472 | suppressCnt = 0; |
| 473 | } |
| 474 | if( pGraph ){ |
| 475 | graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0); |
| 476 | if( pGraph->nErr ){ |
| 477 | graph_free(pGraph); |
| 478 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -202,10 +202,11 @@ | |
| 202 | GraphContext *pGraph = 0; |
| 203 | int prevWasDivider = 0; /* True if previous output row was <hr> */ |
| 204 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 205 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| 206 | static Stmt qbranch; |
| 207 | int pendingEndTr = 0; /* True if a </td></tr> is needed */ |
| 208 | |
| 209 | zPrevDate[0] = 0; |
| 210 | mxWikiLen = db_get_int("timeline-max-comment", 0); |
| 211 | if( db_get_boolean("timeline-block-markup", 0) ){ |
| 212 | wikiFlags = WIKI_INLINE; |
| @@ -253,14 +254,17 @@ | |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | prevTagid = tagid; |
| 258 | if( suppressCnt ){ |
| 259 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 260 | @ event%s(suppressCnt>1?"s":"") omitted.</span></td></tr> |
| 261 | suppressCnt = 0; |
| 262 | } |
| 263 | if( pendingEndTr ){ |
| 264 | @ </td></tr> |
| 265 | pendingEndTr = 0; |
| 266 | } |
| 267 | if( fossil_strcmp(zType,"div")==0 ){ |
| 268 | if( !prevWasDivider ){ |
| 269 | @ <tr><td colspan="3"><hr /></td></tr> |
| 270 | } |
| @@ -461,17 +465,19 @@ | |
| 465 | db_reset(&fchngQuery); |
| 466 | if( inUl ){ |
| 467 | @ </ul> |
| 468 | } |
| 469 | } |
| 470 | pendingEndTr = 1; |
| 471 | } |
| 472 | if( suppressCnt ){ |
| 473 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 474 | @ event%s(suppressCnt>1?"s":"") omitted.</span></td></tr> |
| 475 | suppressCnt = 0; |
| 476 | } |
| 477 | if( pendingEndTr ){ |
| 478 | @ </td></tr> |
| 479 | } |
| 480 | if( pGraph ){ |
| 481 | graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0); |
| 482 | if( pGraph->nErr ){ |
| 483 | graph_free(pGraph); |
| 484 |