Code

git-gui: Add the Show SSH Key item to the clone dialog.
authorAlexander Gavrilov <angavrilov@gmail.com>
Sun, 9 Nov 2008 15:51:16 +0000 (18:51 +0300)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 11 Nov 2008 17:29:36 +0000 (09:29 -0800)
The user might need to see the key before cloning a repository.
This patch makes the relevant menu item available in the Select
Repository/Clone dialog.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh
lib/choose_repository.tcl

index 12b496bec9233a86da18a45073d964bd559f059c..cf9ef6ee07244b28ab7725aec8fb595ee613644a 100755 (executable)
@@ -997,6 +997,17 @@ citool {
 }
 }
 
+######################################################################
+##
+## execution environment
+
+set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}]
+
+# Suggest our implementation of askpass, if none is set
+if {![info exists env(SSH_ASKPASS)]} {
+       set env(SSH_ASKPASS) [gitexec git-gui--askpass]
+}
+
 ######################################################################
 ##
 ## repository setup
@@ -1073,15 +1084,6 @@ set selected_commit_type new
 set nullid "0000000000000000000000000000000000000000"
 set nullid2 "0000000000000000000000000000000000000001"
 
-set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}]
-
-######################################################################
-
-# Suggest our implementation of askpass, if none is set
-if {![info exists env(SSH_ASKPASS)]} {
-       set env(SSH_ASKPASS) [gitexec git-gui--askpass]
-}
-
 ######################################################################
 ##
 ## task management
index 909131689ea837cb67bd587a6acc8b5eb3127c4e..f9ff62a3b22fcc481c88dc35268d06d2fc4a5795 100644 (file)
@@ -43,12 +43,18 @@ constructor pick {} {
                        $w.mbar.apple add command \
                                -label [mc "About %s" [appname]] \
                                -command do_about
+                       $w.mbar.apple add command \
+                               -label [mc "Show SSH Key"] \
+                               -command do_ssh_key
                } else {
                        $w.mbar add cascade -label [mc Help] -menu $w.mbar.help
                        menu $w.mbar.help
                        $w.mbar.help add command \
                                -label [mc "About %s" [appname]] \
                                -command do_about
+                       $w.mbar.help add command \
+                               -label [mc "Show SSH Key"] \
+                               -command do_ssh_key
                }
 
                wm protocol $top WM_DELETE_WINDOW exit