summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b29bd5c)
raw | patch | inline | side by side (parent: b29bd5c)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 9 Jul 2007 02:06:33 +0000 (22:06 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 9 Jul 2007 02:34:54 +0000 (22:34 -0400) |
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>
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>
git-gui.sh | patch | blob | history | |
lib/status_bar.tcl | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index 1844c9067cb7e7db220adc9aae1febd1ccfee1ad..b2c9a9c6a06581d232b891f3dca578398d0546bb 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
set current_diff_path {}
set current_diff_side {}
set diff_actions [list]
-set ui_status_value {Initializing...}
set HEAD {}
set PARENT {}
}
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} {
# -- 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
#
diff --git a/lib/status_bar.tcl b/lib/status_bar.tcl
index a6dea2900657a569fdd1047753806a9a6d194c23..0e2ac07a5e7a752ce80060379e683a66ecb98fdc 100644 (file)
--- a/lib/status_bar.tcl
+++ b/lib/status_bar.tcl
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} {