summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e5c18f)
raw | patch | inline | side by side (parent: 1e5c18f)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 13 Nov 2006 05:48:44 +0000 (00:48 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 13 Nov 2006 05:48:44 +0000 (00:48 -0500) |
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>
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>
git-gui | patch | blob | history |
index fbbc0caaac5cdeef6c9e5f32cb6567a62b745210..ca7f8dbc414b365a70489a5323f6e9ee440eb5c5 100755 (executable)
--- a/git-gui
+++ b/git-gui
-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