diff options
author | Pratyush Yadav <me@yadavpratyush.com> | 2019-12-06 00:25:27 +0530 |
---|---|---|
committer | Pratyush Yadav <me@yadavpratyush.com> | 2019-12-06 00:40:55 +0530 |
commit | 276353004822918d1f45cfc36d0717b878fff600 (patch) | |
tree | 6a1ac62bd5b56df6a8c4020c0d0ac19751ff09a4 /git-gui.sh | |
parent | Merge branch 'ka/japanese-translation' (diff) | |
parent | git-gui: revert untracked files by deleting them (diff) | |
download | tgif-276353004822918d1f45cfc36d0717b878fff600.tar.xz |
Merge branch 'jg/revert-untracked'
git-gui learned to delete untracked files when the "Revert Changes"
option is selected. Since there are two types of revert operations (one
for tracked files and one for untracked ones), the "checkout" and
"deletion" operations are done in parallel. The status bar is updated
to allow both to use it in parallel.
* jg/revert-untracked:
git-gui: revert untracked files by deleting them
git-gui: update status bar to track operations
git-gui: consolidate naming conventions
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-x | git-gui.sh | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/git-gui.sh b/git-gui.sh index 0d21f5688b..6dcf6551b6 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -30,8 +30,8 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.}] ## ## Tcl/Tk sanity check -if {[catch {package require Tcl 8.4} err] - || [catch {package require Tk 8.4} err] +if {[catch {package require Tcl 8.6} err] + || [catch {package require Tk 8.6} err] } { catch {wm withdraw .} tk_messageBox \ @@ -1797,10 +1797,10 @@ proc ui_status {msg} { } } -proc ui_ready {{test {}}} { +proc ui_ready {} { global main_status if {[info exists main_status]} { - $main_status show [mc "Ready."] $test + $main_status show [mc "Ready."] } } @@ -2150,8 +2150,6 @@ proc incr_font_size {font {amt 1}} { ## ## ui commands -set starting_gitk_msg [mc "Starting gitk... please wait..."] - proc do_gitk {revs {is_submodule false}} { global current_diff_path file_states current_diff_side ui_index global _gitdir _gitworktree @@ -2206,10 +2204,11 @@ proc do_gitk {revs {is_submodule false}} { set env(GIT_WORK_TREE) $_gitworktree cd $pwd - ui_status $::starting_gitk_msg - after 10000 { - ui_ready $starting_gitk_msg - } + set status_operation [$::main_status \ + start \ + [mc "Starting %s... please wait..." "gitk"]] + + after 3500 [list $status_operation stop] } } @@ -2240,10 +2239,11 @@ proc do_git_gui {} { set env(GIT_WORK_TREE) $_gitworktree cd $pwd - ui_status $::starting_gitk_msg - after 10000 { - ui_ready $starting_gitk_msg - } + set status_operation [$::main_status \ + start \ + [mc "Starting %s... please wait..." "git-gui"]] + + after 3500 [list $status_operation stop] } } @@ -4159,6 +4159,9 @@ if {$picked && [is_config_true gui.autoexplore]} { do_explore } +# Clear "Initializing..." status +after 500 {$main_status show ""} + # Local variables: # mode: tcl # indent-tabs-mode: t |