summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3cf0bad)
raw | patch | inline | side by side (parent: 3cf0bad)
author | Eygene Ryabinkin <rea-git@codelabs.ru> | |
Tue, 27 Mar 2007 10:31:02 +0000 (14:31 +0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 4 Apr 2007 15:37:56 +0000 (11:37 -0400) |
Made the default buttons on the dialog active and focused upon the
dialog appearence.
Bound 'Escape' and 'Return' keys to the dialog dismissal where it
was appropriate: mainly for dialogs with only one button and no
editable fields, but on console output dialogs as well.
Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
dialog appearence.
Bound 'Escape' and 'Return' keys to the dialog dismissal where it
was appropriate: mainly for dialogs with only one button and no
editable fields, but on console output dialogs as well.
Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index 8157184381f5122ea02de942d115b693885bf036..6e55bd45fdb2584a1ee7a790b7ac292d4f048731 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
frame $w.buttons
button $w.buttons.create -text Push \
-font font_ui \
+ -default active \
-command [list start_push_anywhere_action $w]
pack $w.buttons.create -side right
button $w.buttons.cancel -text {Cancel} \
-font font_ui \
+ -default normal \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
set push_thin 0
set push_tags 0
- bind $w <Visibility> "grab $w"
+ bind $w <Visibility> "grab $w; focus $w.buttons.create"
bind $w <Key-Escape> "destroy $w"
wm title $w "[appname] ([reponame]): Push"
tkwait window $w
if {[winfo exists $w]} {
$w.m.s conf -background green -text {Success}
$w.ok conf -state normal
+ focus $w.ok
}
} else {
if {![winfo exists $w]} {
}
$w.m.s conf -background red -text {Error: Command Failed}
$w.ok conf -state normal
+ focus $w.ok
}
array unset console_cr $w
frame $w.buttons -border 1
button $w.buttons.close -text Close \
-font font_ui \
+ -default active \
-command [list destroy $w]
button $w.buttons.gc -text {Compress Database} \
-font font_ui \
+ -default normal \
-command "destroy $w;do_gc"
pack $w.buttons.close -side right
pack $w.buttons.gc -side left
}
pack $w.stat -pady 10 -padx 10
- bind $w <Visibility> "grab $w; focus $w"
+ bind $w <Visibility> "grab $w; focus $w.buttons.close"
bind $w <Key-Escape> [list destroy $w]
bind $w <Key-Return> [list destroy $w]
wm title $w "[appname] ([reponame]): Database Statistics"
frame $w.buttons
button $w.buttons.close -text {Close} \
-font font_ui \
+ -default active \
-command [list destroy $w]
pack $w.buttons.close -side right
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
clipboard append -format STRING -type STRING -- \[$w.vers cget -text\]
"
- bind $w <Visibility> "grab $w; focus $w"
+ bind $w <Visibility> "grab $w; focus $w.buttons.close"
bind $w <Key-Escape> "destroy $w"
+ bind $w <Key-Return> "destroy $w"
bind_button3 $w.vers "tk_popup $w.ctxm %X %Y; grab $w; focus $w"
wm title $w "About [appname]"
tkwait window $w
frame $w.buttons
button $w.buttons.restore -text {Restore Defaults} \
-font font_ui \
+ -default normal \
-command do_restore_defaults
pack $w.buttons.restore -side left
button $w.buttons.save -text Save \
-font font_ui \
+ -default active \
-command [list do_save_config $w]
pack $w.buttons.save -side right
button $w.buttons.cancel -text {Cancel} \
-font font_ui \
+ -default normal \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
pack $w.global.$name -side top -anchor w -fill x
}
- bind $w <Visibility> "grab $w; focus $w"
+ bind $w <Visibility> "grab $w; focus $w.buttons.save"
bind $w <Key-Escape> "destroy $w"
wm title $w "[appname] ([reponame]): Options"
tkwait window $w