summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9c5a3c7)
raw | patch | inline | side by side (parent: 9c5a3c7)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 23 Jul 2007 04:36:39 +0000 (00:36 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 23 Jul 2007 04:36:39 +0000 (00:36 -0400) |
The folks working on the i18n version of git-gui have had some
trouble trying to convert these English strings into [mc] calls
due to the double evaluation. Moving this block into a standard
procedure eliminates the double evaluation, making their work
easier.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
trouble trying to convert these English strings into [mc] calls
due to the double evaluation. Moving this block into a standard
procedure eliminates the double evaluation, making their work
easier.
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 67aed3ada53a0f95da342e70df41369a2676268d..2912872d2e81e0f5dfb6a5b9a8a8920d28a87c01 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
$ctxm add separator
$ctxm add command -label {Options...} \
-command do_options
-bind_button3 $ui_diff "
- set cursorX %x
- set cursorY %y
- if {\$ui_index eq \$current_diff_side} {
- $ctxm entryconf $ui_diff_applyhunk -label {Unstage Hunk From Commit}
+proc popup_diff_menu {ctxm x y X Y} {
+ set ::cursorX $x
+ set ::cursorY $y
+ if {$::ui_index eq $::current_diff_side} {
+ $ctxm entryconf $::ui_diff_applyhunk \
+ -label {Unstage Hunk From Commit}
} else {
- $ctxm entryconf $ui_diff_applyhunk -label {Stage Hunk For Commit}
+ $ctxm entryconf $::ui_diff_applyhunk \
+ -label {Stage Hunk For Commit}
}
- tk_popup $ctxm %X %Y
-"
-unset ui_diff_applyhunk
+ tk_popup $ctxm $X $Y
+}
+bind_button3 $ui_diff [list popup_diff_menu $ctxm %x %y %X %Y]
# -- Status Bar
#