diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-12-09 14:57:00 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-09 14:57:00 -0800 |
commit | 3d252a9c598b87f86d3370fcf285a31973d6ceb6 (patch) | |
tree | d9d019693397a890e2c079bc0a5d50b1d27f947b /git-gui/lib/choose_repository.tcl | |
parent | ec418bcfd0196a1d02827a703faeb846c89592d3 (diff) | |
parent | 73fd416b291cdd70e30cb889e9ebcf10188d2342 (diff) | |
download | git-3d252a9c598b87f86d3370fcf285a31973d6ceb6.tar.gz |
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui:
git-gui: correct spelling errors in comments
git-gui: add menu item to launch a bash shell on Windows.
git-gui: corrected setup of git worktree under cygwin.
git-gui: right half window is paned
git-gui: Add gui.displayuntracked option
git-gui: show the maxrecentrepo config option in the preferences dialog
git-gui: added gui.maxrecentrepo to extend the number of remembered repos
git-gui: Improve font rendering on retina macbooks
Diffstat (limited to 'git-gui/lib/choose_repository.tcl')
-rw-r--r-- | git-gui/lib/choose_repository.tcl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/git-gui/lib/choose_repository.tcl b/git-gui/lib/choose_repository.tcl index ee58981f53..3c10bc656d 100644 --- a/git-gui/lib/choose_repository.tcl +++ b/git-gui/lib/choose_repository.tcl @@ -24,6 +24,10 @@ field sorted_recent ; # recent repositories (sorted) constructor pick {} { global M1T M1B use_ttk NS + if {[set maxrecent [get_config gui.maxrecentrepo]] eq {}} { + set maxrecent 10 + } + make_dialog top w wm title $top [mc "Git Gui"] @@ -148,7 +152,7 @@ constructor pick {} { -background [get_bg_color $w_body.recentlabel] \ -wrap none \ -width 50 \ - -height 10 + -height $maxrecent $w_recentlist tag conf link \ -foreground blue \ -underline 1 @@ -264,7 +268,11 @@ proc _append_recentrepos {path} { git config --global --add gui.recentrepo $path load_config 1 - while {[llength $recent] > 10} { + if {[set maxrecent [get_config gui.maxrecentrepo]] eq {}} { + set maxrecent 10 + } + + while {[llength $recent] > $maxrecent} { _unset_recentrepo [lindex $recent 0] set recent [lrange $recent 1 end] } |