diff options
author | Max Kirillov <max@max630.net> | 2014-01-15 01:58:09 +0200 |
---|---|---|
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | 2014-01-18 16:51:15 +0000 |
commit | 02f6cfbd1628d9e99a241d18d805f3842dc746e7 (patch) | |
tree | 92f56d1cb9f4fc42845b1e39d168e34edf8a838d | |
parent | 1ea11f0e459e55b062d7ffb30c9eb6a10838ebd5 (diff) | |
download | git-02f6cfbd1628d9e99a241d18d805f3842dc746e7.tar.gz |
git-gui: fallback right pane to packed widgets with Tk 8.4
Since 918dbf58, git-gui crashes if started with Tk 8.4. The reason is that
tk < 8.5 does not support -stretch option for panedwindow.
Without the option it's not possible to properly expand the right half -
the commit area is expanded, while desired behavior is to expand the diff
area. So the whole feature should be disabled with Tk
version less than 8.5.
Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
-rwxr-xr-x | git-gui.sh | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/git-gui.sh b/git-gui.sh index db46ac50bf..cf2209b4f2 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -3224,18 +3224,28 @@ unset i # -- Diff and Commit Area # -${NS}::panedwindow .vpane.lower -orient vertical -${NS}::frame .vpane.lower.commarea -${NS}::frame .vpane.lower.diff -relief sunken -borderwidth 1 -height 500 -.vpane.lower add .vpane.lower.diff -.vpane.lower add .vpane.lower.commarea -.vpane add .vpane.lower -if {$use_ttk} { - .vpane.lower pane .vpane.lower.diff -weight 1 - .vpane.lower pane .vpane.lower.commarea -weight 0 +if {$have_tk85} { + ${NS}::panedwindow .vpane.lower -orient vertical + ${NS}::frame .vpane.lower.commarea + ${NS}::frame .vpane.lower.diff -relief sunken -borderwidth 1 -height 500 + .vpane.lower add .vpane.lower.diff + .vpane.lower add .vpane.lower.commarea + .vpane add .vpane.lower + if {$use_ttk} { + .vpane.lower pane .vpane.lower.diff -weight 1 + .vpane.lower pane .vpane.lower.commarea -weight 0 + } else { + .vpane.lower paneconfigure .vpane.lower.diff -stretch always + .vpane.lower paneconfigure .vpane.lower.commarea -stretch never + } } else { - .vpane.lower paneconfigure .vpane.lower.diff -stretch always - .vpane.lower paneconfigure .vpane.lower.commarea -stretch never + frame .vpane.lower -height 300 -width 400 + frame .vpane.lower.commarea + frame .vpane.lower.diff -relief sunken -borderwidth 1 + pack .vpane.lower.diff -fill both -expand 1 + pack .vpane.lower.commarea -side bottom -fill x + .vpane add .vpane.lower + .vpane paneconfigure .vpane.lower -sticky nsew } # -- Commit Area Buttons |