summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 24f7c64)
raw | patch | inline | side by side (parent: 24f7c64)
author | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 12 Oct 2007 05:34:36 +0000 (01:34 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 12 Oct 2007 05:34:36 +0000 (01:34 -0400) |
Making a user click twice to select which action they want to perform
when starting git-gui is just wasting their time. Clicking once on a
radio button and then clicking again on the "Next >" button is quite
unnecessary.
Since the recent repository list is shown as a list of hyperlinks we
now offer the 3 basic startup actions as hyperlinks. Clicking on a
link will immediately jump to the next UI panel, saving the user time
as they don't need to click an additional button.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
when starting git-gui is just wasting their time. Clicking once on a
radio button and then clicking again on the "Next >" button is quite
unnecessary.
Since the recent repository list is shown as a list of hyperlinks we
now offer the 3 basic startup actions as hyperlinks. Clicking on a
link will immediately jump to the next UI panel, saving the user time
as they don't need to click an additional button.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/choose_repository.tcl | patch | blob | history |
index 8dc850654449cafa25606c10c8a0efe2ddd40fdb..eb4a6d2851c8b08f9ac41236997185ab54ebba65 100644 (file)
field w
field w_body ; # Widget holding the center content
field w_next ; # Next button
+field w_quit ; # Quit button
field o_cons ; # Console object (if active)
field w_types ; # List of type buttons in clone
field w_recentlist ; # Listbox containing recent repositories
-field action new ; # What action are we going to perform?
field done 0 ; # Finished picking the repository?
field local_path {} ; # Where this repository is locally
field origin_url {} ; # Where we are cloning from
pack [git_logo $w.git_logo] -side left -fill y -padx 10 -pady 10
set w_body $w.body
+ set opts $w_body.options
frame $w_body
- radiobutton $w_body.new \
- -anchor w \
- -text [mc "Create New Repository"] \
- -variable @action \
- -value new
- radiobutton $w_body.clone \
- -anchor w \
- -text [mc "Clone Existing Repository"] \
- -variable @action \
- -value clone
- radiobutton $w_body.open \
- -anchor w \
- -text [mc "Open Existing Repository"] \
- -variable @action \
- -value open
- pack $w_body.new -anchor w -fill x
- pack $w_body.clone -anchor w -fill x
- pack $w_body.open -anchor w -fill x
+ text $opts \
+ -cursor $::cursor_ptr \
+ -relief flat \
+ -background [$w_body cget -background] \
+ -wrap none \
+ -spacing1 5 \
+ -width 50 \
+ -height 3
+ pack $opts -anchor w -fill x
+
+ $opts tag conf link_new -foreground blue -underline 1
+ $opts tag bind link_new <1> [cb _next new]
+ $opts insert end [mc "Create New Repository"] link_new
+ $opts insert end "\n"
+
+ $opts tag conf link_clone -foreground blue -underline 1
+ $opts tag bind link_clone <1> [cb _next clone]
+ $opts insert end [mc "Clone Existing Repository"] link_clone
+ $opts insert end "\n"
+
+ $opts tag conf link_open -foreground blue -underline 1
+ $opts tag bind link_open <1> [cb _next open]
+ $opts insert end [mc "Open Existing Repository"] link_open
+ $opts insert end "\n"
set sorted_recent [_get_recentrepos]
if {[llength $sorted_recent] > 0} {
frame $w.buttons
set w_next $w.buttons.next
- button $w_next \
- -default active \
- -text [mc "Next >"] \
- -command [cb _next]
- pack $w_next -side right -padx 5
- button $w.buttons.quit \
+ set w_quit $w.buttons.quit
+ button $w_quit \
-text [mc "Quit"] \
-command exit
- pack $w.buttons.quit -side right -padx 5
+ pack $w_quit -side right -padx 5
pack $w.buttons -side bottom -fill x -padx 10 -pady 10
bind $top <Return> [cb _invoke_next]
_do_open2 $this
}
-method _next {} {
+method _next {action} {
destroy $w_body
+ if {![winfo exists $w_next]} {
+ button $w_next -default active
+ pack $w_next -side right -padx 5 -before $w_quit
+ }
_do_$action $this
}