Fossil SCM
Improvements to the no-graph display of timelines.
Commit
085082f18bc8100291471d8c6d028af5ed5de32c183d328fbd7d5d82010e1016
Parent
ddd12b85970f06c…
1 file changed
+12
-4
+12
-4
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -943,11 +943,13 @@ | ||
| 943 | 943 | int omitDescenders; /* True to omit descenders */ |
| 944 | 944 | int scrollToSelect; /* True to scroll to the selection */ |
| 945 | 945 | int dwellTimeout; /* Milliseconds to wait for tooltips to show */ |
| 946 | 946 | int closeTimeout; /* Milliseconds to wait for tooltips to close */ |
| 947 | 947 | u8 *aiMap; /* The rail map */ |
| 948 | + u8 bNoGraph; /* True to show a minimal graph */ | |
| 948 | 949 | |
| 950 | + bNoGraph = (tmFlags & TIMELINE_GRAPH)==0; | |
| 949 | 951 | iRailPitch = atoi(PD("railpitch","0")); |
| 950 | 952 | showArrowheads = skin_detail_boolean("timeline-arrowheads"); |
| 951 | 953 | circleNodes = skin_detail_boolean("timeline-circle-nodes"); |
| 952 | 954 | colorGraph = skin_detail_boolean("timeline-color-graph-lines"); |
| 953 | 955 | iTopRow = pGraph->pFirst ? pGraph->pFirst->idx : 0; |
| @@ -965,11 +967,11 @@ | ||
| 965 | 967 | @ "nomo": %d(PB("nomo")), |
| 966 | 968 | @ "iTopRow": %d(iTopRow), |
| 967 | 969 | @ "omitDescenders": %d(omitDescenders), |
| 968 | 970 | @ "fileDiff": %d(fileDiff), |
| 969 | 971 | @ "scrollToSelect": %d(scrollToSelect), |
| 970 | - @ "nrail": %d(pGraph->mxRail+1), | |
| 972 | + @ "nrail": %d(bNoGraph?1:pGraph->mxRail+1), | |
| 971 | 973 | @ "baseUrl": "%R", |
| 972 | 974 | @ "dwellTimeout": %d(dwellTimeout), |
| 973 | 975 | @ "closeTimeout": %d(closeTimeout), |
| 974 | 976 | @ "hashDigits": %d(hash_digits(1)), |
| 975 | 977 | @ "bottomRowId": "btm-%d(iTableId)", |
| @@ -1027,12 +1029,16 @@ | ||
| 1027 | 1029 | aiMap = pGraph->aiRailMap; |
| 1028 | 1030 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 1029 | 1031 | int k = 0; |
| 1030 | 1032 | cgi_printf("{\"id\":%d,", pRow->idx); |
| 1031 | 1033 | cgi_printf("\"bg\":\"%s\",", pRow->zBgClr); |
| 1032 | - cgi_printf("\"r\":%d,", pRow->iRail>=0 ? aiMap[pRow->iRail] : -1); | |
| 1033 | - if( pRow->bDescender ){ | |
| 1034 | + if( bNoGraph ){ | |
| 1035 | + cgi_printf("\"r\":-1,"); | |
| 1036 | + }else{ | |
| 1037 | + cgi_printf("\"r\":%d,", pRow->iRail>=0 ? aiMap[pRow->iRail] : -1); | |
| 1038 | + } | |
| 1039 | + if( pRow->bDescender && !bNoGraph ){ | |
| 1034 | 1040 | cgi_printf("\"d\":%d,", pRow->bDescender); |
| 1035 | 1041 | } |
| 1036 | 1042 | if( pRow->mergeOut>=0 ){ |
| 1037 | 1043 | cgi_printf("\"mo\":%d,", aiMap[pRow->mergeOut]); |
| 1038 | 1044 | if( pRow->mergeUpto==0 ) pRow->mergeUpto = pRow->idx; |
| @@ -1039,11 +1045,13 @@ | ||
| 1039 | 1045 | cgi_printf("\"mu\":%d,", pRow->mergeUpto); |
| 1040 | 1046 | if( pRow->cherrypickUpto>0 && pRow->cherrypickUpto<=pRow->mergeUpto ){ |
| 1041 | 1047 | cgi_printf("\"cu\":%d,", pRow->cherrypickUpto); |
| 1042 | 1048 | } |
| 1043 | 1049 | } |
| 1044 | - if( pRow->isStepParent ){ | |
| 1050 | + if( bNoGraph ){ | |
| 1051 | + cgi_printf("\"u\":0,"); | |
| 1052 | + }else if( pRow->isStepParent ){ | |
| 1045 | 1053 | cgi_printf("\"sb\":%d,", pRow->aiRiser[pRow->iRail]); |
| 1046 | 1054 | }else{ |
| 1047 | 1055 | cgi_printf("\"u\":%d,", pRow->aiRiser[pRow->iRail]); |
| 1048 | 1056 | } |
| 1049 | 1057 | k = 0; |
| 1050 | 1058 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -943,11 +943,13 @@ | |
| 943 | int omitDescenders; /* True to omit descenders */ |
| 944 | int scrollToSelect; /* True to scroll to the selection */ |
| 945 | int dwellTimeout; /* Milliseconds to wait for tooltips to show */ |
| 946 | int closeTimeout; /* Milliseconds to wait for tooltips to close */ |
| 947 | u8 *aiMap; /* The rail map */ |
| 948 | |
| 949 | iRailPitch = atoi(PD("railpitch","0")); |
| 950 | showArrowheads = skin_detail_boolean("timeline-arrowheads"); |
| 951 | circleNodes = skin_detail_boolean("timeline-circle-nodes"); |
| 952 | colorGraph = skin_detail_boolean("timeline-color-graph-lines"); |
| 953 | iTopRow = pGraph->pFirst ? pGraph->pFirst->idx : 0; |
| @@ -965,11 +967,11 @@ | |
| 965 | @ "nomo": %d(PB("nomo")), |
| 966 | @ "iTopRow": %d(iTopRow), |
| 967 | @ "omitDescenders": %d(omitDescenders), |
| 968 | @ "fileDiff": %d(fileDiff), |
| 969 | @ "scrollToSelect": %d(scrollToSelect), |
| 970 | @ "nrail": %d(pGraph->mxRail+1), |
| 971 | @ "baseUrl": "%R", |
| 972 | @ "dwellTimeout": %d(dwellTimeout), |
| 973 | @ "closeTimeout": %d(closeTimeout), |
| 974 | @ "hashDigits": %d(hash_digits(1)), |
| 975 | @ "bottomRowId": "btm-%d(iTableId)", |
| @@ -1027,12 +1029,16 @@ | |
| 1027 | aiMap = pGraph->aiRailMap; |
| 1028 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 1029 | int k = 0; |
| 1030 | cgi_printf("{\"id\":%d,", pRow->idx); |
| 1031 | cgi_printf("\"bg\":\"%s\",", pRow->zBgClr); |
| 1032 | cgi_printf("\"r\":%d,", pRow->iRail>=0 ? aiMap[pRow->iRail] : -1); |
| 1033 | if( pRow->bDescender ){ |
| 1034 | cgi_printf("\"d\":%d,", pRow->bDescender); |
| 1035 | } |
| 1036 | if( pRow->mergeOut>=0 ){ |
| 1037 | cgi_printf("\"mo\":%d,", aiMap[pRow->mergeOut]); |
| 1038 | if( pRow->mergeUpto==0 ) pRow->mergeUpto = pRow->idx; |
| @@ -1039,11 +1045,13 @@ | |
| 1039 | cgi_printf("\"mu\":%d,", pRow->mergeUpto); |
| 1040 | if( pRow->cherrypickUpto>0 && pRow->cherrypickUpto<=pRow->mergeUpto ){ |
| 1041 | cgi_printf("\"cu\":%d,", pRow->cherrypickUpto); |
| 1042 | } |
| 1043 | } |
| 1044 | if( pRow->isStepParent ){ |
| 1045 | cgi_printf("\"sb\":%d,", pRow->aiRiser[pRow->iRail]); |
| 1046 | }else{ |
| 1047 | cgi_printf("\"u\":%d,", pRow->aiRiser[pRow->iRail]); |
| 1048 | } |
| 1049 | k = 0; |
| 1050 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -943,11 +943,13 @@ | |
| 943 | int omitDescenders; /* True to omit descenders */ |
| 944 | int scrollToSelect; /* True to scroll to the selection */ |
| 945 | int dwellTimeout; /* Milliseconds to wait for tooltips to show */ |
| 946 | int closeTimeout; /* Milliseconds to wait for tooltips to close */ |
| 947 | u8 *aiMap; /* The rail map */ |
| 948 | u8 bNoGraph; /* True to show a minimal graph */ |
| 949 | |
| 950 | bNoGraph = (tmFlags & TIMELINE_GRAPH)==0; |
| 951 | iRailPitch = atoi(PD("railpitch","0")); |
| 952 | showArrowheads = skin_detail_boolean("timeline-arrowheads"); |
| 953 | circleNodes = skin_detail_boolean("timeline-circle-nodes"); |
| 954 | colorGraph = skin_detail_boolean("timeline-color-graph-lines"); |
| 955 | iTopRow = pGraph->pFirst ? pGraph->pFirst->idx : 0; |
| @@ -965,11 +967,11 @@ | |
| 967 | @ "nomo": %d(PB("nomo")), |
| 968 | @ "iTopRow": %d(iTopRow), |
| 969 | @ "omitDescenders": %d(omitDescenders), |
| 970 | @ "fileDiff": %d(fileDiff), |
| 971 | @ "scrollToSelect": %d(scrollToSelect), |
| 972 | @ "nrail": %d(bNoGraph?1:pGraph->mxRail+1), |
| 973 | @ "baseUrl": "%R", |
| 974 | @ "dwellTimeout": %d(dwellTimeout), |
| 975 | @ "closeTimeout": %d(closeTimeout), |
| 976 | @ "hashDigits": %d(hash_digits(1)), |
| 977 | @ "bottomRowId": "btm-%d(iTableId)", |
| @@ -1027,12 +1029,16 @@ | |
| 1029 | aiMap = pGraph->aiRailMap; |
| 1030 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 1031 | int k = 0; |
| 1032 | cgi_printf("{\"id\":%d,", pRow->idx); |
| 1033 | cgi_printf("\"bg\":\"%s\",", pRow->zBgClr); |
| 1034 | if( bNoGraph ){ |
| 1035 | cgi_printf("\"r\":-1,"); |
| 1036 | }else{ |
| 1037 | cgi_printf("\"r\":%d,", pRow->iRail>=0 ? aiMap[pRow->iRail] : -1); |
| 1038 | } |
| 1039 | if( pRow->bDescender && !bNoGraph ){ |
| 1040 | cgi_printf("\"d\":%d,", pRow->bDescender); |
| 1041 | } |
| 1042 | if( pRow->mergeOut>=0 ){ |
| 1043 | cgi_printf("\"mo\":%d,", aiMap[pRow->mergeOut]); |
| 1044 | if( pRow->mergeUpto==0 ) pRow->mergeUpto = pRow->idx; |
| @@ -1039,11 +1045,13 @@ | |
| 1045 | cgi_printf("\"mu\":%d,", pRow->mergeUpto); |
| 1046 | if( pRow->cherrypickUpto>0 && pRow->cherrypickUpto<=pRow->mergeUpto ){ |
| 1047 | cgi_printf("\"cu\":%d,", pRow->cherrypickUpto); |
| 1048 | } |
| 1049 | } |
| 1050 | if( bNoGraph ){ |
| 1051 | cgi_printf("\"u\":0,"); |
| 1052 | }else if( pRow->isStepParent ){ |
| 1053 | cgi_printf("\"sb\":%d,", pRow->aiRiser[pRow->iRail]); |
| 1054 | }else{ |
| 1055 | cgi_printf("\"u\":%d,", pRow->aiRiser[pRow->iRail]); |
| 1056 | } |
| 1057 | k = 0; |
| 1058 |