From: "Shawn O. Pearce" <spearce@spearce.org>
To: Eygene Ryabinkin <rea-git@codelabs.ru>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/4] Fix drop-down menus in the git-gui dialogs.
Date: Wed, 4 Apr 2007 12:37:09 -0400 [thread overview]
Message-ID: <20070404163709.GA5167@spearce.org> (raw)
In-Reply-To: <20070327103005.GP14837@codelabs.ru>
git-gui patches should be addressed to me, not Paul.
Eygene Ryabinkin <rea-git@codelabs.ru> wrote:
> If the drop-down menu (for example "Local Branch" from the dialog
> activated by the "Branch/Create..." menu item) is chosen with the
> left mouse button, then the pointer is moved off the drop-down menu
> while the mouse button is still pressed and then the 'Escape' key
> is pressed, the main menu will be broken. Next time when you will
> try to select any main menu item, the Tcl/Tk interpreter will spawn
> an internal error.
>
> Error was fixed by "grab"bing the drop-down menu windows on their
> activation. Now all drop-down menus are disappearing once the mouse
> button is depressed, no matter what is the current position of the
> mouse pointer.
This fix actually horribly breaks on Mac OS X. The problem
appears to be that the <Visibility> event on that system doesn't
get delivered until after the menu is destroyed, yet I'm getting
a %s of VisibilityUnobscured in the event handler. Go figure.
So anyway, I cannot apply this patch as-is, because it breaks
my main development system. I understand and feel your pain,
but you either need to make this binding apply only on your OS,
or find another way to workaround that Tk bug...
> diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
> index 8157184..1f3ee05 100755
> --- a/git-gui/git-gui.sh
> +++ b/git-gui/git-gui.sh
> @@ -2126,6 +2126,7 @@ proc do_create_branch {} {
> -font font_ui
> set lbranchm [eval tk_optionMenu $w.from.head_m create_branch_head \
> $all_heads]
> + bind $lbranchm <Visibility> "grab $lbranchm"
> $lbranchm configure -font font_ui
> $w.from.head_m configure -font font_ui
> grid $w.from.head_r $w.from.head_m -sticky w
--
Shawn.
next prev parent reply other threads:[~2007-04-04 16:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-27 10:30 [PATCH 2/4] Fix drop-down menus in the git-gui dialogs Eygene Ryabinkin
2007-04-04 16:37 ` Shawn O. Pearce [this message]
2007-04-05 12:49 ` Eygene Ryabinkin
2007-04-05 15:32 ` Shawn O. Pearce
2007-04-06 7:42 ` Eygene Ryabinkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070404163709.GA5167@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=rea-git@codelabs.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).