diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2006-11-13 00:48:44 -0500 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2006-11-13 00:48:44 -0500 |
commit | fce89e466ae75961018ab88fec7000568f981d46 (patch) | |
tree | b9a82a61f30f2881a5bc06fb255655c906cc2335 /git-gui | |
parent | 1e5c18fb431c2d2493996e24ea68408e59ef6c16 (diff) | |
download | git-fce89e466ae75961018ab88fec7000568f981d46.tar.gz |
git-gui: Reverted file name text field to a label.
So although a text field with a flat relief looks like a label on
Windows it doesn't on Mac OS X. The Aqua version of Tk is still
drawing a border around the text field and that makes the diff pane
header look pretty ugly.
Earlier I had made the file name area into a text widget so the user
could highlight parts of it and copy them onto the clipboard; but with
the context menu being present this isn't quite as necessary as the user
can copy the file name to the clipboard using that instead. So although
this is a small loss in functionality for non-Mac OS X systems I think it
is still reasonable.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui')
-rwxr-xr-x | git-gui | 34 |
1 files changed, 12 insertions, 22 deletions
@@ -2290,33 +2290,23 @@ label .vpane.lower.diff.header.l1 -text {File:} \ -background orange \ -font font_ui set ui_fname .vpane.lower.diff.header.l2 -text $ui_fname \ +label $ui_fname \ + -textvariable ui_fname_value \ -background orange \ - -height 1 \ - -wrap none \ - -relief flat \ - -state disabled \ + -anchor w \ + -justify left \ -font font_ui menu $ui_fname.ctxm -tearoff 0 -$ui_fname.ctxm add command -label "Copy Only Selection" \ +$ui_fname.ctxm add command -label "Copy" \ -font font_ui \ - -command "tk_textCopy $ui_fname" -$ui_fname.ctxm add command -label "Copy Complete Name" \ - -font font_ui \ - -command " - $ui_fname tag add sel 0.0 {end -1c} - tk_textCopy $ui_fname - $ui_fname tag remove sel 0.0 end - " + -command { + clipboard clear + clipboard append \ + -format STRING \ + -type STRING \ + -- $ui_fname_value + } bind_button3 $ui_fname "tk_popup $ui_fname.ctxm %X %Y" -trace add variable ui_fname_value write $ui_fname.update -proc $ui_fname.update {varname args} { - global ui_fname ui_fname_value - $ui_fname configure -state normal - $ui_fname delete 0.0 end - $ui_fname insert end [escape_path $ui_fname_value] - $ui_fname configure -state disabled -} pack .vpane.lower.diff.header.l4 -side left pack .vpane.lower.diff.header.l1 -side left pack $ui_fname -fill x |