Merge branch 'er/ui'
* er/ui: Always bind the return key to the default button Do not break git-gui messages into multiple lines. Improve look-and-feel of the git-gui tool. Teach git-gui to use the user-defined UI font everywhere. Allow wish interpreter to be defined with TCLTK_PATH
This commit is contained in:
commit
d025d1e322
3
Makefile
3
Makefile
@ -28,6 +28,8 @@ ifndef V
|
|||||||
QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
|
QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
TCLTK_PATH ?= wish
|
||||||
|
|
||||||
ifeq ($(findstring $(MAKEFLAGS),s),s)
|
ifeq ($(findstring $(MAKEFLAGS),s),s)
|
||||||
QUIET_GEN =
|
QUIET_GEN =
|
||||||
QUIET_BUILT_IN =
|
QUIET_BUILT_IN =
|
||||||
@ -55,6 +57,7 @@ all:: $(ALL_PROGRAMS)
|
|||||||
|
|
||||||
install: all
|
install: all
|
||||||
$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
|
$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
|
||||||
|
sed -i .bak -e'1,3s|^exec .* "$$0"|exec '"$(TCLTK_PATH)"' "$$0"|' git-gui && rm git-gui.bak
|
||||||
$(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'
|
$(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'
|
||||||
$(foreach p,$(GITGUI_BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
|
$(foreach p,$(GITGUI_BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
|
||||||
|
|
||||||
|
149
git-gui.sh
149
git-gui.sh
@ -242,6 +242,8 @@ proc error_popup {msg} {
|
|||||||
if {[reponame] ne {}} {
|
if {[reponame] ne {}} {
|
||||||
append title " ([reponame])"
|
append title " ([reponame])"
|
||||||
}
|
}
|
||||||
|
option add *Dialog.msg.font font_ui
|
||||||
|
option add *Button.font font_ui
|
||||||
set cmd [list tk_messageBox \
|
set cmd [list tk_messageBox \
|
||||||
-icon error \
|
-icon error \
|
||||||
-type ok \
|
-type ok \
|
||||||
@ -258,6 +260,8 @@ proc warn_popup {msg} {
|
|||||||
if {[reponame] ne {}} {
|
if {[reponame] ne {}} {
|
||||||
append title " ([reponame])"
|
append title " ([reponame])"
|
||||||
}
|
}
|
||||||
|
option add *Dialog.msg.font font_ui
|
||||||
|
option add *Button.font font_ui
|
||||||
set cmd [list tk_messageBox \
|
set cmd [list tk_messageBox \
|
||||||
-icon warning \
|
-icon warning \
|
||||||
-type ok \
|
-type ok \
|
||||||
@ -274,6 +278,8 @@ proc info_popup {msg {parent .}} {
|
|||||||
if {[reponame] ne {}} {
|
if {[reponame] ne {}} {
|
||||||
append title " ([reponame])"
|
append title " ([reponame])"
|
||||||
}
|
}
|
||||||
|
option add *Dialog.msg.font font_ui
|
||||||
|
option add *Button.font font_ui
|
||||||
tk_messageBox \
|
tk_messageBox \
|
||||||
-parent $parent \
|
-parent $parent \
|
||||||
-icon info \
|
-icon info \
|
||||||
@ -287,6 +293,8 @@ proc ask_popup {msg} {
|
|||||||
if {[reponame] ne {}} {
|
if {[reponame] ne {}} {
|
||||||
append title " ([reponame])"
|
append title " ([reponame])"
|
||||||
}
|
}
|
||||||
|
option add *Dialog.msg.font font_ui
|
||||||
|
option add *Button.font font_ui
|
||||||
return [tk_messageBox \
|
return [tk_messageBox \
|
||||||
-parent . \
|
-parent . \
|
||||||
-icon question \
|
-icon question \
|
||||||
@ -727,12 +735,9 @@ proc handle_empty_diff {} {
|
|||||||
|
|
||||||
[short_path $path] has no changes.
|
[short_path $path] has no changes.
|
||||||
|
|
||||||
The modification date of this file was updated
|
The modification date of this file was updated by another application, but the content within the file was not changed.
|
||||||
by another application, but the content within
|
|
||||||
the file was not changed.
|
|
||||||
|
|
||||||
A rescan will be automatically started to find
|
A rescan will be automatically started to find other files which may have the same state."
|
||||||
other files which may have the same state."
|
|
||||||
|
|
||||||
clear_diff
|
clear_diff
|
||||||
display_file $path __
|
display_file $path __
|
||||||
@ -1033,8 +1038,7 @@ proc load_last_commit {} {
|
|||||||
if {[llength $PARENT] == 0} {
|
if {[llength $PARENT] == 0} {
|
||||||
error_popup {There is nothing to amend.
|
error_popup {There is nothing to amend.
|
||||||
|
|
||||||
You are about to create the initial commit.
|
You are about to create the initial commit. There is no commit before this to amend.
|
||||||
There is no commit before this to amend.
|
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -1043,10 +1047,7 @@ There is no commit before this to amend.
|
|||||||
if {$curType eq {merge}} {
|
if {$curType eq {merge}} {
|
||||||
error_popup {Cannot amend while merging.
|
error_popup {Cannot amend while merging.
|
||||||
|
|
||||||
You are currently in the middle of a merge that
|
You are currently in the middle of a merge that has not been fully completed. You cannot amend the prior commit unless you first abort the current merge activity.
|
||||||
has not been fully completed. You cannot amend
|
|
||||||
the prior commit unless you first abort the
|
|
||||||
current merge activity.
|
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -1136,9 +1137,7 @@ proc commit_tree {} {
|
|||||||
} elseif {$commit_type ne $curType || $HEAD ne $curHEAD} {
|
} elseif {$commit_type ne $curType || $HEAD ne $curHEAD} {
|
||||||
info_popup {Last scanned state does not match repository state.
|
info_popup {Last scanned state does not match repository state.
|
||||||
|
|
||||||
Another Git program has modified this repository
|
Another Git program has modified this repository since the last scan. A rescan must be performed before another commit can be created.
|
||||||
since the last scan. A rescan must be performed
|
|
||||||
before another commit can be created.
|
|
||||||
|
|
||||||
The rescan will be automatically started now.
|
The rescan will be automatically started now.
|
||||||
}
|
}
|
||||||
@ -1159,8 +1158,7 @@ The rescan will be automatically started now.
|
|||||||
U? {
|
U? {
|
||||||
error_popup "Unmerged files cannot be committed.
|
error_popup "Unmerged files cannot be committed.
|
||||||
|
|
||||||
File [short_path $path] has merge conflicts.
|
File [short_path $path] has merge conflicts. You must resolve them and add the file before committing.
|
||||||
You must resolve them and add the file before committing.
|
|
||||||
"
|
"
|
||||||
unlock_index
|
unlock_index
|
||||||
return
|
return
|
||||||
@ -1276,8 +1274,7 @@ proc commit_committree {fd_wt curHEAD msg} {
|
|||||||
if {$tree_id eq $old_tree} {
|
if {$tree_id eq $old_tree} {
|
||||||
info_popup {No changes to commit.
|
info_popup {No changes to commit.
|
||||||
|
|
||||||
No files were modified by this commit and it
|
No files were modified by this commit and it was not a merge commit.
|
||||||
was not a merge commit.
|
|
||||||
|
|
||||||
A rescan will be automatically started now.
|
A rescan will be automatically started now.
|
||||||
}
|
}
|
||||||
@ -2116,7 +2113,10 @@ proc do_create_branch {} {
|
|||||||
-value head \
|
-value head \
|
||||||
-variable create_branch_revtype \
|
-variable create_branch_revtype \
|
||||||
-font font_ui
|
-font font_ui
|
||||||
eval tk_optionMenu $w.from.head_m create_branch_head $all_heads
|
set lbranchm [eval tk_optionMenu $w.from.head_m create_branch_head \
|
||||||
|
$all_heads]
|
||||||
|
$lbranchm configure -font font_ui
|
||||||
|
$w.from.head_m configure -font font_ui
|
||||||
grid $w.from.head_r $w.from.head_m -sticky w
|
grid $w.from.head_r $w.from.head_m -sticky w
|
||||||
set all_trackings [all_tracking_branches]
|
set all_trackings [all_tracking_branches]
|
||||||
if {$all_trackings ne {}} {
|
if {$all_trackings ne {}} {
|
||||||
@ -2126,9 +2126,11 @@ proc do_create_branch {} {
|
|||||||
-value tracking \
|
-value tracking \
|
||||||
-variable create_branch_revtype \
|
-variable create_branch_revtype \
|
||||||
-font font_ui
|
-font font_ui
|
||||||
eval tk_optionMenu $w.from.tracking_m \
|
set tbranchm [eval tk_optionMenu $w.from.tracking_m \
|
||||||
create_branch_trackinghead \
|
create_branch_trackinghead \
|
||||||
$all_trackings
|
$all_trackings]
|
||||||
|
$tbranchm configure -font font_ui
|
||||||
|
$w.from.tracking_m configure -font font_ui
|
||||||
grid $w.from.tracking_r $w.from.tracking_m -sticky w
|
grid $w.from.tracking_r $w.from.tracking_m -sticky w
|
||||||
}
|
}
|
||||||
set all_tags [load_all_tags]
|
set all_tags [load_all_tags]
|
||||||
@ -2139,9 +2141,11 @@ proc do_create_branch {} {
|
|||||||
-value tag \
|
-value tag \
|
||||||
-variable create_branch_revtype \
|
-variable create_branch_revtype \
|
||||||
-font font_ui
|
-font font_ui
|
||||||
eval tk_optionMenu $w.from.tag_m \
|
set tagsm [eval tk_optionMenu $w.from.tag_m \
|
||||||
create_branch_tag \
|
create_branch_tag \
|
||||||
$all_tags
|
$all_tags]
|
||||||
|
$tagsm configure -font font_ui
|
||||||
|
$w.from.tag_m configure -font font_ui
|
||||||
grid $w.from.tag_r $w.from.tag_m -sticky w
|
grid $w.from.tag_r $w.from.tag_m -sticky w
|
||||||
}
|
}
|
||||||
radiobutton $w.from.exp_r \
|
radiobutton $w.from.exp_r \
|
||||||
@ -2335,7 +2339,11 @@ proc do_delete_branch {} {
|
|||||||
-value head \
|
-value head \
|
||||||
-variable delete_branch_checktype \
|
-variable delete_branch_checktype \
|
||||||
-font font_ui
|
-font font_ui
|
||||||
eval tk_optionMenu $w.validate.head_m delete_branch_head $all_heads
|
set mergedlocalm [eval tk_optionMenu $w.validate.head_m \
|
||||||
|
delete_branch_head \
|
||||||
|
$all_heads]
|
||||||
|
$mergedlocalm configure -font font_ui
|
||||||
|
$w.validate.head_m configure -font font_ui
|
||||||
grid $w.validate.head_r $w.validate.head_m -sticky w
|
grid $w.validate.head_r $w.validate.head_m -sticky w
|
||||||
set all_trackings [all_tracking_branches]
|
set all_trackings [all_tracking_branches]
|
||||||
if {$all_trackings ne {}} {
|
if {$all_trackings ne {}} {
|
||||||
@ -2345,9 +2353,11 @@ proc do_delete_branch {} {
|
|||||||
-value tracking \
|
-value tracking \
|
||||||
-variable delete_branch_checktype \
|
-variable delete_branch_checktype \
|
||||||
-font font_ui
|
-font font_ui
|
||||||
eval tk_optionMenu $w.validate.tracking_m \
|
set mergedtrackm [eval tk_optionMenu $w.validate.tracking_m \
|
||||||
delete_branch_trackinghead \
|
delete_branch_trackinghead \
|
||||||
$all_trackings
|
$all_trackings]
|
||||||
|
$mergedtrackm configure -font font_ui
|
||||||
|
$w.validate.tracking_m configure -font font_ui
|
||||||
grid $w.validate.tracking_r $w.validate.tracking_m -sticky w
|
grid $w.validate.tracking_r $w.validate.tracking_m -sticky w
|
||||||
}
|
}
|
||||||
radiobutton $w.validate.always_r \
|
radiobutton $w.validate.always_r \
|
||||||
@ -2382,9 +2392,7 @@ proc switch_branch {new_branch} {
|
|||||||
} elseif {$commit_type ne $curType || $HEAD ne $curHEAD} {
|
} elseif {$commit_type ne $curType || $HEAD ne $curHEAD} {
|
||||||
info_popup {Last scanned state does not match repository state.
|
info_popup {Last scanned state does not match repository state.
|
||||||
|
|
||||||
Another Git program has modified this repository
|
Another Git program has modified this repository since the last scan. A rescan must be performed before the current branch can be changed.
|
||||||
since the last scan. A rescan must be performed
|
|
||||||
before the current branch can be changed.
|
|
||||||
|
|
||||||
The rescan will be automatically started now.
|
The rescan will be automatically started now.
|
||||||
}
|
}
|
||||||
@ -2475,12 +2483,9 @@ Staying on branch '$current_branch'."
|
|||||||
if {[catch {git symbolic-ref HEAD "refs/heads/$new_branch"} err]} {
|
if {[catch {git symbolic-ref HEAD "refs/heads/$new_branch"} err]} {
|
||||||
error_popup "Failed to set current branch.
|
error_popup "Failed to set current branch.
|
||||||
|
|
||||||
This working directory is only partially switched.
|
This working directory is only partially switched. We successfully updated your files, but failed to update an internal Git file.
|
||||||
We successfully updated your files, but failed to
|
|
||||||
update an internal Git file.
|
|
||||||
|
|
||||||
This should not have occurred. [appname] will now
|
This should not have occurred. [appname] will now close and give up.
|
||||||
close and give up.
|
|
||||||
|
|
||||||
$err"
|
$err"
|
||||||
do_quit
|
do_quit
|
||||||
@ -2684,10 +2689,12 @@ proc do_push_anywhere {} {
|
|||||||
frame $w.buttons
|
frame $w.buttons
|
||||||
button $w.buttons.create -text Push \
|
button $w.buttons.create -text Push \
|
||||||
-font font_ui \
|
-font font_ui \
|
||||||
|
-default active \
|
||||||
-command [list start_push_anywhere_action $w]
|
-command [list start_push_anywhere_action $w]
|
||||||
pack $w.buttons.create -side right
|
pack $w.buttons.create -side right
|
||||||
button $w.buttons.cancel -text {Cancel} \
|
button $w.buttons.cancel -text {Cancel} \
|
||||||
-font font_ui \
|
-font font_ui \
|
||||||
|
-default normal \
|
||||||
-command [list destroy $w]
|
-command [list destroy $w]
|
||||||
pack $w.buttons.cancel -side right -padx 5
|
pack $w.buttons.cancel -side right -padx 5
|
||||||
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
|
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
|
||||||
@ -2721,7 +2728,10 @@ proc do_push_anywhere {} {
|
|||||||
-value remote \
|
-value remote \
|
||||||
-variable push_urltype \
|
-variable push_urltype \
|
||||||
-font font_ui
|
-font font_ui
|
||||||
eval tk_optionMenu $w.dest.remote_m push_remote $all_remotes
|
set remmenu [eval tk_optionMenu $w.dest.remote_m push_remote \
|
||||||
|
$all_remotes]
|
||||||
|
$remmenu configure -font font_ui
|
||||||
|
$w.dest.remote_m configure -font font_ui
|
||||||
grid $w.dest.remote_r $w.dest.remote_m -sticky w
|
grid $w.dest.remote_r $w.dest.remote_m -sticky w
|
||||||
if {[lsearch -sorted -exact $all_remotes origin] != -1} {
|
if {[lsearch -sorted -exact $all_remotes origin] != -1} {
|
||||||
set push_remote origin
|
set push_remote origin
|
||||||
@ -2775,8 +2785,9 @@ proc do_push_anywhere {} {
|
|||||||
set push_thin 0
|
set push_thin 0
|
||||||
set push_tags 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"
|
bind $w <Key-Escape> "destroy $w"
|
||||||
|
bind $w <Key-Return> [list start_push_anywhere_action $w]
|
||||||
wm title $w "[appname] ([reponame]): Push"
|
wm title $w "[appname] ([reponame]): Push"
|
||||||
tkwait window $w
|
tkwait window $w
|
||||||
}
|
}
|
||||||
@ -2791,8 +2802,7 @@ proc can_merge {} {
|
|||||||
if {[string match amend* $commit_type]} {
|
if {[string match amend* $commit_type]} {
|
||||||
info_popup {Cannot merge while amending.
|
info_popup {Cannot merge while amending.
|
||||||
|
|
||||||
You must finish amending this commit before
|
You must finish amending this commit before starting any type of merge.
|
||||||
starting any type of merge.
|
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -2806,9 +2816,7 @@ starting any type of merge.
|
|||||||
if {$commit_type ne $curType || $HEAD ne $curHEAD} {
|
if {$commit_type ne $curType || $HEAD ne $curHEAD} {
|
||||||
info_popup {Last scanned state does not match repository state.
|
info_popup {Last scanned state does not match repository state.
|
||||||
|
|
||||||
Another Git program has modified this repository
|
Another Git program has modified this repository since the last scan. A rescan must be performed before a merge can be performed.
|
||||||
since the last scan. A rescan must be performed
|
|
||||||
before a merge can be performed.
|
|
||||||
|
|
||||||
The rescan will be automatically started now.
|
The rescan will be automatically started now.
|
||||||
}
|
}
|
||||||
@ -2827,9 +2835,7 @@ The rescan will be automatically started now.
|
|||||||
|
|
||||||
File [short_path $path] has merge conflicts.
|
File [short_path $path] has merge conflicts.
|
||||||
|
|
||||||
You must resolve them, add the file, and commit to
|
You must resolve them, add the file, and commit to complete the current merge. Only then can you begin another merge.
|
||||||
complete the current merge. Only then can you
|
|
||||||
begin another merge.
|
|
||||||
"
|
"
|
||||||
unlock_index
|
unlock_index
|
||||||
return 0
|
return 0
|
||||||
@ -2839,9 +2845,7 @@ begin another merge.
|
|||||||
|
|
||||||
File [short_path $path] is modified.
|
File [short_path $path] is modified.
|
||||||
|
|
||||||
You should complete the current commit before
|
You should complete the current commit before starting a merge. Doing so will help you abort a failed merge, should the need arise.
|
||||||
starting a merge. Doing so will help you abort
|
|
||||||
a failed merge, should the need arise.
|
|
||||||
"
|
"
|
||||||
unlock_index
|
unlock_index
|
||||||
return 0
|
return 0
|
||||||
@ -2917,13 +2921,11 @@ proc finish_merge {revcnt w ok} {
|
|||||||
|
|
||||||
Your merge of $revcnt branches has failed.
|
Your merge of $revcnt branches has failed.
|
||||||
|
|
||||||
There are file-level conflicts between the
|
There are file-level conflicts between the branches which must be resolved manually.
|
||||||
branches which must be resolved manually.
|
|
||||||
|
|
||||||
The working directory will now be reset.
|
The working directory will now be reset.
|
||||||
|
|
||||||
You can attempt this merge again
|
You can attempt this merge again by merging only one branch at a time." $w
|
||||||
by merging only one branch at a time." $w
|
|
||||||
|
|
||||||
set fd [open "| git read-tree --reset -u HEAD" r]
|
set fd [open "| git read-tree --reset -u HEAD" r]
|
||||||
fconfigure $fd -blocking 0 -translation binary
|
fconfigure $fd -blocking 0 -translation binary
|
||||||
@ -3036,8 +3038,7 @@ You must finish amending this commit.
|
|||||||
|
|
||||||
if {[ask_popup "Abort $op?
|
if {[ask_popup "Abort $op?
|
||||||
|
|
||||||
Aborting the current $op will cause
|
Aborting the current $op will cause *ALL* uncommitted changes to be lost.
|
||||||
*ALL* uncommitted changes to be lost.
|
|
||||||
|
|
||||||
Continue with aborting the current $op?"] eq {yes}} {
|
Continue with aborting the current $op?"] eq {yes}} {
|
||||||
set fd [open "| git read-tree --reset -u HEAD" r]
|
set fd [open "| git read-tree --reset -u HEAD" r]
|
||||||
@ -4109,6 +4110,7 @@ proc console_done {args} {
|
|||||||
if {[winfo exists $w]} {
|
if {[winfo exists $w]} {
|
||||||
$w.m.s conf -background green -text {Success}
|
$w.m.s conf -background green -text {Success}
|
||||||
$w.ok conf -state normal
|
$w.ok conf -state normal
|
||||||
|
focus $w.ok
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if {![winfo exists $w]} {
|
if {![winfo exists $w]} {
|
||||||
@ -4116,6 +4118,7 @@ proc console_done {args} {
|
|||||||
}
|
}
|
||||||
$w.m.s conf -background red -text {Error: Command Failed}
|
$w.m.s conf -background red -text {Error: Command Failed}
|
||||||
$w.ok conf -state normal
|
$w.ok conf -state normal
|
||||||
|
focus $w.ok
|
||||||
}
|
}
|
||||||
|
|
||||||
array unset console_cr $w
|
array unset console_cr $w
|
||||||
@ -4183,9 +4186,11 @@ proc do_stats {} {
|
|||||||
frame $w.buttons -border 1
|
frame $w.buttons -border 1
|
||||||
button $w.buttons.close -text Close \
|
button $w.buttons.close -text Close \
|
||||||
-font font_ui \
|
-font font_ui \
|
||||||
|
-default active \
|
||||||
-command [list destroy $w]
|
-command [list destroy $w]
|
||||||
button $w.buttons.gc -text {Compress Database} \
|
button $w.buttons.gc -text {Compress Database} \
|
||||||
-font font_ui \
|
-font font_ui \
|
||||||
|
-default normal \
|
||||||
-command "destroy $w;do_gc"
|
-command "destroy $w;do_gc"
|
||||||
pack $w.buttons.close -side right
|
pack $w.buttons.close -side right
|
||||||
pack $w.buttons.gc -side left
|
pack $w.buttons.gc -side left
|
||||||
@ -4214,7 +4219,7 @@ proc do_stats {} {
|
|||||||
}
|
}
|
||||||
pack $w.stat -pady 10 -padx 10
|
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-Escape> [list destroy $w]
|
||||||
bind $w <Key-Return> [list destroy $w]
|
bind $w <Key-Return> [list destroy $w]
|
||||||
wm title $w "[appname] ([reponame]): Database Statistics"
|
wm title $w "[appname] ([reponame]): Database Statistics"
|
||||||
@ -4511,6 +4516,7 @@ proc do_about {} {
|
|||||||
frame $w.buttons
|
frame $w.buttons
|
||||||
button $w.buttons.close -text {Close} \
|
button $w.buttons.close -text {Close} \
|
||||||
-font font_ui \
|
-font font_ui \
|
||||||
|
-default active \
|
||||||
-command [list destroy $w]
|
-command [list destroy $w]
|
||||||
pack $w.buttons.close -side right
|
pack $w.buttons.close -side right
|
||||||
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
|
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
|
||||||
@ -4556,8 +4562,9 @@ $copyright" \
|
|||||||
clipboard append -format STRING -type STRING -- \[$w.vers cget -text\]
|
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-Escape> "destroy $w"
|
||||||
|
bind $w <Key-Return> "destroy $w"
|
||||||
bind_button3 $w.vers "tk_popup $w.ctxm %X %Y; grab $w; focus $w"
|
bind_button3 $w.vers "tk_popup $w.ctxm %X %Y; grab $w; focus $w"
|
||||||
wm title $w "About [appname]"
|
wm title $w "About [appname]"
|
||||||
tkwait window $w
|
tkwait window $w
|
||||||
@ -4594,14 +4601,17 @@ proc do_options {} {
|
|||||||
frame $w.buttons
|
frame $w.buttons
|
||||||
button $w.buttons.restore -text {Restore Defaults} \
|
button $w.buttons.restore -text {Restore Defaults} \
|
||||||
-font font_ui \
|
-font font_ui \
|
||||||
|
-default normal \
|
||||||
-command do_restore_defaults
|
-command do_restore_defaults
|
||||||
pack $w.buttons.restore -side left
|
pack $w.buttons.restore -side left
|
||||||
button $w.buttons.save -text Save \
|
button $w.buttons.save -text Save \
|
||||||
-font font_ui \
|
-font font_ui \
|
||||||
|
-default active \
|
||||||
-command [list do_save_config $w]
|
-command [list do_save_config $w]
|
||||||
pack $w.buttons.save -side right
|
pack $w.buttons.save -side right
|
||||||
button $w.buttons.cancel -text {Cancel} \
|
button $w.buttons.cancel -text {Cancel} \
|
||||||
-font font_ui \
|
-font font_ui \
|
||||||
|
-default normal \
|
||||||
-command [list destroy $w]
|
-command [list destroy $w]
|
||||||
pack $w.buttons.cancel -side right -padx 5
|
pack $w.buttons.cancel -side right -padx 5
|
||||||
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
|
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
|
||||||
@ -4688,9 +4698,11 @@ proc do_options {} {
|
|||||||
frame $w.global.$name
|
frame $w.global.$name
|
||||||
label $w.global.$name.l -text "$text:" -font font_ui
|
label $w.global.$name.l -text "$text:" -font font_ui
|
||||||
pack $w.global.$name.l -side left -anchor w -fill x
|
pack $w.global.$name.l -side left -anchor w -fill x
|
||||||
eval tk_optionMenu $w.global.$name.family \
|
set fontmenu [eval tk_optionMenu $w.global.$name.family \
|
||||||
global_config_new(gui.$font^^family) \
|
global_config_new(gui.$font^^family) \
|
||||||
$all_fonts
|
$all_fonts]
|
||||||
|
$w.global.$name.family configure -font font_ui
|
||||||
|
$fontmenu configure -font font_ui
|
||||||
spinbox $w.global.$name.size \
|
spinbox $w.global.$name.size \
|
||||||
-textvariable global_config_new(gui.$font^^size) \
|
-textvariable global_config_new(gui.$font^^size) \
|
||||||
-from 2 -to 80 -increment 1 \
|
-from 2 -to 80 -increment 1 \
|
||||||
@ -4702,8 +4714,9 @@ proc do_options {} {
|
|||||||
pack $w.global.$name -side top -anchor w -fill x
|
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"
|
bind $w <Key-Escape> "destroy $w"
|
||||||
|
bind $w <Key-Return> [list do_save_config $w]
|
||||||
wm title $w "[appname] ([reponame]): Options"
|
wm title $w "[appname] ([reponame]): Options"
|
||||||
tkwait window $w
|
tkwait window $w
|
||||||
}
|
}
|
||||||
@ -5085,18 +5098,18 @@ set ui_comm {}
|
|||||||
# -- Menu Bar
|
# -- Menu Bar
|
||||||
#
|
#
|
||||||
menu .mbar -tearoff 0
|
menu .mbar -tearoff 0
|
||||||
.mbar add cascade -label Repository -menu .mbar.repository
|
.mbar add cascade -label Repository -menu .mbar.repository -font font_ui
|
||||||
.mbar add cascade -label Edit -menu .mbar.edit
|
.mbar add cascade -label Edit -menu .mbar.edit -font font_ui
|
||||||
if {[is_enabled branch]} {
|
if {[is_enabled branch]} {
|
||||||
.mbar add cascade -label Branch -menu .mbar.branch
|
.mbar add cascade -label Branch -menu .mbar.branch -font font_ui
|
||||||
}
|
}
|
||||||
if {[is_enabled multicommit] || [is_enabled singlecommit]} {
|
if {[is_enabled multicommit] || [is_enabled singlecommit]} {
|
||||||
.mbar add cascade -label Commit -menu .mbar.commit
|
.mbar add cascade -label Commit -menu .mbar.commit -font font_ui
|
||||||
}
|
}
|
||||||
if {[is_enabled transport]} {
|
if {[is_enabled transport]} {
|
||||||
.mbar add cascade -label Merge -menu .mbar.merge
|
.mbar add cascade -label Merge -menu .mbar.merge -font font_ui
|
||||||
.mbar add cascade -label Fetch -menu .mbar.fetch
|
.mbar add cascade -label Fetch -menu .mbar.fetch -font font_ui
|
||||||
.mbar add cascade -label Push -menu .mbar.push
|
.mbar add cascade -label Push -menu .mbar.push -font font_ui
|
||||||
}
|
}
|
||||||
. configure -menu .mbar
|
. configure -menu .mbar
|
||||||
|
|
||||||
@ -5372,7 +5385,7 @@ if {[is_MacOSX]} {
|
|||||||
|
|
||||||
# -- Help Menu
|
# -- Help Menu
|
||||||
#
|
#
|
||||||
.mbar add cascade -label Help -menu .mbar.help
|
.mbar add cascade -label Help -menu .mbar.help -font font_ui
|
||||||
menu .mbar.help
|
menu .mbar.help
|
||||||
|
|
||||||
if {![is_MacOSX]} {
|
if {![is_MacOSX]} {
|
||||||
@ -6034,9 +6047,7 @@ if {[is_enabled multicommit]} {
|
|||||||
if {[ask_popup \
|
if {[ask_popup \
|
||||||
"This repository currently has $objects_current loose objects.
|
"This repository currently has $objects_current loose objects.
|
||||||
|
|
||||||
To maintain optimal performance it is strongly
|
To maintain optimal performance it is strongly recommended that you compress the database when more than $object_limit loose objects exist.
|
||||||
recommended that you compress the database
|
|
||||||
when more than $object_limit loose objects exist.
|
|
||||||
|
|
||||||
Compress the database now?"] eq yes} {
|
Compress the database now?"] eq yes} {
|
||||||
do_gc
|
do_gc
|
||||||
|
Loading…
Reference in New Issue
Block a user