mirror of
https://github.com/git/git.git
synced 2024-11-29 04:54:56 +08:00
git-gui: Change the main window progress bar to use status_bar
Now that we have a fancy status bar mega-widget we can reuse that within our main window. This opens the door for implementating future improvements like a progress bar. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
b29bd5ca3b
commit
51530d1722
14
git-gui.sh
14
git-gui.sh
@ -438,7 +438,6 @@ set _reponame [lindex [file split \
|
||||
set current_diff_path {}
|
||||
set current_diff_side {}
|
||||
set diff_actions [list]
|
||||
set ui_status_value {Initializing...}
|
||||
|
||||
set HEAD {}
|
||||
set PARENT {}
|
||||
@ -761,13 +760,11 @@ proc mapdesc {state path} {
|
||||
}
|
||||
|
||||
proc ui_status {msg} {
|
||||
set ::ui_status_value $msg
|
||||
$::main_status show $msg
|
||||
}
|
||||
|
||||
proc ui_ready {{test {}}} {
|
||||
if {$test eq {} || $::ui_status_value eq $test} {
|
||||
ui_status Ready.
|
||||
}
|
||||
$::main_status show {Ready.} $test
|
||||
}
|
||||
|
||||
proc escape_path {path} {
|
||||
@ -2207,12 +2204,9 @@ unset ui_diff_applyhunk
|
||||
|
||||
# -- Status Bar
|
||||
#
|
||||
label .status -textvariable ui_status_value \
|
||||
-anchor w \
|
||||
-justify left \
|
||||
-borderwidth 1 \
|
||||
-relief sunken
|
||||
set main_status [::status_bar::new .status]
|
||||
pack .status -anchor w -side bottom -fill x
|
||||
$main_status show {Initializing...}
|
||||
|
||||
# -- Load geometry
|
||||
#
|
||||
|
@ -63,8 +63,10 @@ method stop {msg} {
|
||||
set status $msg
|
||||
}
|
||||
|
||||
method show {msg} {
|
||||
set status $msg
|
||||
method show {msg {test {}}} {
|
||||
if {$test eq {} || $status eq $test} {
|
||||
set status $msg
|
||||
}
|
||||
}
|
||||
|
||||
method _delete {current} {
|
||||
|
Loading…
Reference in New Issue
Block a user