summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c2faa43)
raw | patch | inline | side by side (parent: c2faa43)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 21 Jan 2007 03:06:51 +0000 (22:06 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 21 Jan 2007 07:54:21 +0000 (02:54 -0500) |
I'm going to refactor the way file status information gets displayed
so it more closely aligns with the way 'git-runstatus' displays the
differences between HEAD<->index and index<->working directory. To
that end the other file list is going to be changed to be the working
directory difference. So this change renames it.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
so it more closely aligns with the way 'git-runstatus' displays the
differences between HEAD<->index and index<->working directory. To
that end the other file list is going to be changed to be the working
directory difference. So this change renames it.
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 e719314e7b4260a56280ebc5a38924423dfdb51f..df21638cfb7245c9237549819b0afb0be90dcb0f 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
proc rescan {after} {
global HEAD PARENT MERGE_HEAD commit_type
- global ui_index ui_other ui_status_value ui_comm
+ global ui_index ui_workdir ui_status_value ui_comm
global rescan_active file_states
global repo_config
## diff
proc clear_diff {} {
- global ui_diff current_diff ui_index ui_other
+ global ui_diff current_diff ui_index ui_workdir
$ui_diff conf -state normal
$ui_diff delete 0.0 end
set current_diff {}
$ui_index tag remove in_diff 0.0 end
- $ui_other tag remove in_diff 0.0 end
+ $ui_workdir tag remove in_diff 0.0 end
}
proc reshow_diff {} {
## ui helpers
proc mapcol {state path} {
- global all_cols ui_other
+ global all_cols ui_workdir
if {[catch {set r $all_cols($state)}]} {
puts "error: no column for state={$state} $path"
- return $ui_other
+ return $ui_workdir
}
return $r
}
}
proc display_all_files {} {
- global ui_index ui_other
+ global ui_index ui_workdir
global file_states file_lists
global last_clicked selected_paths
$ui_index conf -state normal
- $ui_other conf -state normal
+ $ui_workdir conf -state normal
$ui_index delete 0.0 end
- $ui_other delete 0.0 end
+ $ui_workdir delete 0.0 end
set last_clicked {}
set file_lists($ui_index) [list]
- set file_lists($ui_other) [list]
+ set file_lists($ui_workdir) [list]
foreach path [lsort [array names file_states]] {
set s $file_states($path)
}
$ui_index conf -state disabled
- $ui_other conf -state disabled
+ $ui_workdir conf -state disabled
}
proc update_indexinfo {msg pathList after} {
} -maskdata $filemask
set ui_index .vpane.files.index.list
-set ui_other .vpane.files.other.list
+set ui_workdir .vpane.files.workdir.list
set max_status_desc 0
foreach i {
{__ i plain "Unmodified"}
if {[lindex $i 1] eq {i}} {
set all_cols([lindex $i 0]) $ui_index
} else {
- set all_cols([lindex $i 0]) $ui_other
+ set all_cols([lindex $i 0]) $ui_workdir
}
set all_icons([lindex $i 0]) file_[lindex $i 2]
set all_descs([lindex $i 0]) [lindex $i 3]
}
proc toggle_or_diff {w x y} {
- global file_states file_lists current_diff ui_index ui_other
+ global file_states file_lists current_diff ui_index ui_workdir
global last_clicked selected_paths
set pos [split [$w index @$x,$y] .]
set last_clicked [list $w $lno]
array unset selected_paths
$ui_index tag remove in_sel 0.0 end
- $ui_other tag remove in_sel 0.0 end
+ $ui_workdir tag remove in_sel 0.0 end
if {$col == 0} {
if {$current_diff eq $path} {
pack $ui_index -side left -fill both -expand 1
.vpane.files add .vpane.files.index -sticky nsew
-# -- Other (Add) File List
+# -- Working Directory File List
#
-frame .vpane.files.other -height 100 -width 100
-label .vpane.files.other.title -text {Untracked Files} \
+frame .vpane.files.workdir -height 100 -width 100
+label .vpane.files.workdir.title -text {Untracked Files} \
-background red \
-font font_ui
-text $ui_other -background white -borderwidth 0 \
+text $ui_workdir -background white -borderwidth 0 \
-width 40 -height 10 \
-font font_ui \
-cursor $cursor_ptr \
- -yscrollcommand {.vpane.files.other.sb set} \
+ -yscrollcommand {.vpane.files.workdir.sb set} \
-state disabled
-scrollbar .vpane.files.other.sb -command [list $ui_other yview]
-pack .vpane.files.other.title -side top -fill x
-pack .vpane.files.other.sb -side right -fill y
-pack $ui_other -side left -fill both -expand 1
-.vpane.files add .vpane.files.other -sticky nsew
+scrollbar .vpane.files.workdir.sb -command [list $ui_workdir yview]
+pack .vpane.files.workdir.title -side top -fill x
+pack .vpane.files.workdir.sb -side right -fill y
+pack $ui_workdir -side left -fill both -expand 1
+.vpane.files add .vpane.files.workdir -sticky nsew
-foreach i [list $ui_index $ui_other] {
+foreach i [list $ui_index $ui_workdir] {
$i tag conf in_diff -font font_uibold
$i tag conf in_sel \
-background [$i cget -foreground] \
bind all <$M1B-Key-Q> do_quit
bind all <$M1B-Key-w> {destroy [winfo toplevel %W]}
bind all <$M1B-Key-W> {destroy [winfo toplevel %W]}
-foreach i [list $ui_index $ui_other] {
+foreach i [list $ui_index $ui_workdir] {
bind $i <Button-1> "toggle_or_diff $i %x %y; break"
bind $i <$M1B-Button-1> "add_one_to_selection $i %x %y; break"
bind $i <Shift-Button-1> "add_range_to_selection $i %x %y; break"
unset i
set file_lists($ui_index) [list]
-set file_lists($ui_other) [list]
+set file_lists($ui_workdir) [list]
set HEAD {}
set PARENT {}