Skip to content

Commit

Permalink
git gui: allow for a long recentrepo list
Browse files Browse the repository at this point in the history
The gui.recentrepo list may be longer than the maxrecent setting.
Allow extra space to show any extra entries.

In an ideal world, the git gui would limit the number of entries
to the maxrecent setting, however the recentrepo config list may
have been extended outwith the gui, or the maxrecent setting changed
to a reduced value. Further, when testing the gui's recentrepo
logic it is useful to show these extra, but valid, entries.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
  • Loading branch information
Philip Oakley committed Jan 20, 2017
1 parent e670fce commit 746df94
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/choose_repository.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ constructor pick {} {
-label [mc "Recent Repositories"]
}

if {[set lenrecent [llength $sorted_recent]] < $maxrecent} {
set lenrecent $maxrecent
}

${NS}::label $w_body.space
${NS}::label $w_body.recentlabel \
-anchor w \
Expand All @@ -153,7 +157,7 @@ constructor pick {} {
-background [get_bg_color $w_body.recentlabel] \
-wrap none \
-width 50 \
-height $maxrecent
-height $lenrecent
$w_recentlist tag conf link \
-foreground blue \
-underline 1
Expand Down

0 comments on commit 746df94

Please sign in to comment.