summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Oakley <philipoakley@iee.org>2015-12-14 12:56:40 +0000
committerPhilip Oakley <philipoakley@iee.org>2017-01-20 21:11:18 +0000
commit746df946f30a32945117049b9419d586193e54e0 (patch)
tree20025ba4f78018bd8833e369d44ef076c417999d
parente670fce17f79f6305f17f2a91732565909c678dd (diff)
downloadgit-746df946f30a32945117049b9419d586193e54e0.tar.gz
git gui: allow for a long recentrepo list
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>
-rw-r--r--lib/choose_repository.tcl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/choose_repository.tcl b/lib/choose_repository.tcl
index f39636f989..80f5a59bbb 100644
--- a/lib/choose_repository.tcl
+++ b/lib/choose_repository.tcl
@@ -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 \
@@ -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