summaryrefslogtreecommitdiff
path: root/git-gui/lib/choose_repository.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'git-gui/lib/choose_repository.tcl')
-rw-r--r--git-gui/lib/choose_repository.tcl25
1 files changed, 11 insertions, 14 deletions
diff --git a/git-gui/lib/choose_repository.tcl b/git-gui/lib/choose_repository.tcl
index 64f0674..657f7d5 100644
--- a/git-gui/lib/choose_repository.tcl
+++ b/git-gui/lib/choose_repository.tcl
@@ -100,12 +100,17 @@ constructor pick {} {
$opts insert end [mc "Clone Existing Repository"] link_clone
$opts insert end "\n"
if {$m_repo ne {}} {
+ if {[tk windowingsystem] eq "win32"} {
+ set key L
+ } else {
+ set key C
+ }
$m_repo add command \
-command [cb _next clone] \
- -accelerator $M1T-C \
+ -accelerator $M1T-$key \
-label [mc "Clone..."]
- bind $top <$M1B-c> [cb _next clone]
- bind $top <$M1B-C> [cb _next clone]
+ bind $top <$M1B-[string tolower $key]> [cb _next clone]
+ bind $top <$M1B-[string toupper $key]> [cb _next clone]
}
$opts tag conf link_open -foreground blue -underline 1
@@ -209,14 +214,6 @@ constructor pick {} {
}
}
-proc _home {} {
- if {[catch {set h $::env(HOME)}]
- || ![file isdirectory $h]} {
- set h .
- }
- return $h
-}
-
method _center {} {
set nx [winfo reqwidth $top]
set ny [winfo reqheight $top]
@@ -415,7 +412,7 @@ method _new_local_path {} {
if {$local_path ne {}} {
set p [file dirname $local_path]
} else {
- set p [_home]
+ set p [pwd]
}
set p [tk_chooseDirectory \
@@ -536,7 +533,7 @@ method _open_origin {} {
if {$origin_url ne {} && [file isdirectory $origin_url]} {
set p $origin_url
} else {
- set p [_home]
+ set p [pwd]
}
set p [tk_chooseDirectory \
@@ -1037,7 +1034,7 @@ method _open_local_path {} {
if {$local_path ne {}} {
set p $local_path
} else {
- set p [_home]
+ set p [pwd]
}
set p [tk_chooseDirectory \