@matheusbsbs / matheus-bagliano / commits / 3baee1f3bf
Fork 0

git-gui: Focus insertion point at end of strings in repository chooser

When selecting a local working directory for a new repository or a location to clone an existing repository into we now set the insert point at the end of the selected path, allowing the user to type in any additional parts of the path if they so desire. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Feb 11, 2008 at 00:53 UTC 3baee1f3bf8e30f0fc67bbb1a49877bf0660fd29
1 file changed +4
lib/choose_repository.tcl
+4
@@ -11,6 +11,7 @@ field w_quit ; # Quit button
11 field o_cons ; # Console object (if active)
12 field w_types ; # List of type buttons in clone
13 field w_recentlist ; # Listbox containing recent repositories
14 +field w_localpath ; # Entry widget bound to local_path
15
16 field done 0 ; # Finished picking the repository?
17 field local_path {} ; # Where this repository is locally
@@ -385,6 +386,7 @@ method _do_new {} {
386 button $w_body.where.b \
387 -text [mc "Browse"] \
388 -command [cb _new_local_path]
389 + set w_localpath $w_body.where.t
390
391 pack $w_body.where.b -side right
392 pack $w_body.where.l -side left
@@ -416,6 +418,7 @@ method _new_local_path {} {
418 return
419 }
420 set local_path $p
421 + $w_localpath icursor end
422 }
423
424 method _do_new2 {} {
@@ -481,6 +484,7 @@ method _do_clone {} {
484 -text [mc "Browse"] \
485 -command [cb _new_local_path]
486 grid $args.where_l $args.where_t $args.where_b -sticky ew
487 + set w_localpath $args.where_t
488
489 label $args.type_l -text [mc "Clone Type:"]
490 frame $args.type_f