summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c4ed879)
raw | patch | inline | side by side (parent: c4ed879)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 18 Nov 2006 08:27:23 +0000 (03:27 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 18 Nov 2006 08:27:23 +0000 (03:27 -0500) |
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | patch | blob | history |
index a020895020bf3c658f10bd8672b5b0004327bf1c..c2b4dd70676103db57dea0fa748b7cad0ddfa0c2 100755 (executable)
--- a/git-gui
+++ b/git-gui
set disable_on_lock [list]
set index_lock_type none
-set HEAD {}
-set PARENT {}
-set commit_type {}
-set empty_tree {}
-
proc lock_index {type} {
global index_lock_type disable_on_lock
## ui construction
# -- Menu Bar
+#
menu .mbar -tearoff 0
.mbar add cascade -label Project -menu .mbar.project
.mbar add cascade -label Edit -menu .mbar.edit
. configure -menu .mbar
# -- Project Menu
+#
menu .mbar.project
.mbar.project add command -label Visualize \
-command do_gitk \
-font font_ui
# -- Commit Menu
+#
menu .mbar.commit
.mbar.commit add command -label Rescan \
-command do_rescan \
lappend disable_on_lock \
[list .mbar.commit entryconf [.mbar.commit index last] -state]
+# -- Transport menus
+#
if {!$single_commit} {
- # -- Fetch Menu
menu .mbar.fetch
-
- # -- Pull Menu
menu .mbar.pull
-
- # -- Push Menu
menu .mbar.push
}
# -- Main Window Layout
+#
panedwindow .vpane -orient vertical
panedwindow .vpane.files -orient horizontal
.vpane add .vpane.files -sticky nsew -height 100 -width 400
pack .vpane -anchor n -side top -fill both -expand 1
# -- Index File List
+#
frame .vpane.files.index -height 100 -width 400
label .vpane.files.index.title -text {Modified Files} \
-background green \
.vpane.files add .vpane.files.index -sticky nsew
# -- Other (Add) File List
+#
frame .vpane.files.other -height 100 -width 100
label .vpane.files.other.title -text {Untracked Files} \
-background red \
unset i
# -- Diff and Commit Area
+#
frame .vpane.lower -height 300 -width 400
frame .vpane.lower.commarea
frame .vpane.lower.diff -relief sunken -borderwidth 1
.vpane add .vpane.lower -stick nsew
# -- Commit Area Buttons
+#
frame .vpane.lower.commarea.buttons
label .vpane.lower.commarea.buttons.l -text {} \
-anchor w \
{.vpane.lower.commarea.buttons.commit conf -state}
# -- Commit Message Buffer
+#
frame .vpane.lower.commarea.buffer
set ui_comm .vpane.lower.commarea.buffer.t
set ui_coml .vpane.lower.commarea.buffer.l
-label $ui_coml -text {Commit Message:} \
+label $ui_coml \
-anchor w \
-justify left \
-font font_ui
bind_button3 $ui_comm "tk_popup $ctxm %X %Y"
# -- Diff Header
+#
set current_diff {}
set diff_actions [list]
proc trace_current_diff {varname args} {
bind_button3 .vpane.lower.diff.header.path "tk_popup $ctxm %X %Y"
# -- Diff Body
+#
frame .vpane.lower.diff.body
set ui_diff .vpane.lower.diff.body.t
text $ui_diff -background white -borderwidth 0 \
set file_lists($ui_index) [list]
set file_lists($ui_other) [list]
+
+set HEAD {}
+set PARENT {}
+set commit_type {}
+set empty_tree {}
set current_diff {}
wm title . "$appname ([file normalize [file dirname $gitdir]])"