git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-gui: fallback right pane to packed widgets with Tk 8.4

From
BBBenoît Bourbié <benoit.bourbie@gmail.com>
Date
Jan 16, 2014, 16:39 UTC
Message-ID
<CANJSc_uhYU7EPZ89dbEQhc8QM4e-yLj2qhQOJMQyzU-2RdZn8A@mail.gmail.com>
In-Reply-To
<20140114235809.GA15510@wheezy.local>
Hi All,

Max, you are right, my TK version is 8.4. I applied the patch and it now works perfectly.

Thanks!!
Benoît
On Tue, Jan 14, 2014 at 5:58 PM, Max Kirillov <max@max630.net> wrote:
Show 59 quoted lines
> 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>
> ---
>  git-gui/git-gui.sh | 32 +++++++++++++++++++++-----------
>  1 file changed, 21 insertions(+), 11 deletions(-)
>
> diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
> index e2e710e..147be8c 100755
> --- a/git-gui/git-gui.sh
> +++ b/git-gui/git-gui.sh
> @@ -3196,18 +3196,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
> --
> 1.8.4.2.1566.g3c1a064
Previous: Max Kirillov
Message 6 of 6 in “git gui crashes ( v 1.8.5.2)”
  1. Benoît BourbiéJan 14, 2014
  2. Jonathan NiederJan 14, 2014
  3. Benoît BourbiéJan 14, 2014
  4. Max KirillovJan 14, 2014
  5. git-gui: fallback right pane to packed widgets with Tk 8.4Max Kirillov, Jan 14, 2014
  6. Benoît BourbiéJan 16, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.