diff --git a/git-gui b/git-gui index fbbc0caaac..ca7f8dbc41 100755 --- a/git-gui +++ b/git-gui @@ -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