AmendHub

Download:

jcs

/

amend

/

amendments

/

5

commit_list: Show log line on top in bold, details below


jcs made amendment 5 over 3 years ago
--- commit_list.c Mon Oct 18 13:13:50 2021 +++ commit_list.c Tue Oct 19 14:20:04 2021 @@ -74,25 +74,29 @@ commit_list_draw_cell(ListHandle theList, Cell theCell InsetRect(&textRect, 4, 4); height = FontHeight(applFont, 9); - MoveTo(textRect.left, textRect.bottom - height); + MoveTo(textRect.left, textRect.bottom - height - 1); TextFace(bold); TextFont(applFont); TextSize(9); + HLock(commit->log); + DrawText(*(commit->log), 0, commit->log_len); + HUnlock(commit->log); + ttm = localtime(&commit->date); sprintf(tmp, "%04d-%02d-%02d %02d:%02d:%02d", ttm->tm_year + 1900, ttm->tm_mon + 1, ttm->tm_mday, ttm->tm_hour, ttm->tm_min, ttm->tm_sec); + MoveTo(textRect.left, textRect.bottom - 1); + TextFace(normal); DrawText(tmp, 0, strlen(tmp)); - MoveTo(textRect.left + 140, textRect.bottom - height); + MoveTo(textRect.left + 140, textRect.bottom - 1); DrawText(commit->author, 0, strlen(commit->author)); - MoveTo(textRect.left, textRect.bottom - 1); - HLock(commit->log); - TextFace(normal); - DrawText(*(commit->log), 0, commit->log_len); - HUnlock(commit->log); + sprintf(tmp, "%d (+), %d (-)", commit->adds, commit->subs); + MoveTo(textRect.left + 220, textRect.bottom - 1); + DrawText(tmp, 0, strlen(tmp)); if (selected) InvertRect(cellRect);