git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] gitk: Make text selectable on Mac
@ 2010-11-14 12:22 Stefan Haller
  2010-12-12  4:27 ` Paul Mackerras
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Haller @ 2010-11-14 12:22 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git

From: Stefan Haller <stefan@haller-berlin.de>

Stolen from git-gui, 23effa79f7 (original log message by
Shawn O. Pearce <spearce@spearce.org> follows):

    git-gui: Force focus to the diff viewer on mouse click.

    Apparently a "feature" of Tcl/Tk on Mac OS X is that a disabled text
    widget cannot receive focus or receive a selection within it.  This
    makes the diff viewer almost useless on that platform as you cannot
    select individual parts of the buffer.

    Now we force focus into the diff viewer when its clicked on with
    button 1.  This works around the feature and allows selection to
    work within the viewer just like it does on other less sane systems,
    like Microsoft Windows.

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
---
 gitk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gitk b/gitk
index 45e3380..14ffde2 100755
--- a/gitk
+++ b/gitk
@@ -2453,6 +2453,7 @@ proc makewindow {} {
     global ctxbut
     bind $cflist $ctxbut {pop_flist_menu %W %X %Y %x %y}
     bind $ctext $ctxbut {pop_diff_menu %W %X %Y %x %y}
+    bind $ctext <Button-1> {focus %W}
 
     set maincursor [. cget -cursor]
     set textcursor [$ctext cget -cursor]
-- 
1.7.3.2.154.gcfae0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gitk: Make text selectable on Mac
  2010-11-14 12:22 [PATCH] gitk: Make text selectable on Mac Stefan Haller
@ 2010-12-12  4:27 ` Paul Mackerras
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mackerras @ 2010-12-12  4:27 UTC (permalink / raw)
  To: Stefan Haller; +Cc: git

On Sun, Nov 14, 2010 at 01:22:56PM +0100, Stefan Haller wrote:
> From: Stefan Haller <stefan@haller-berlin.de>
> 
> Stolen from git-gui, 23effa79f7 (original log message by
> Shawn O. Pearce <spearce@spearce.org> follows):

Thanks, applied.

Paul.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-12  4:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-14 12:22 [PATCH] gitk: Make text selectable on Mac Stefan Haller
2010-12-12  4:27 ` Paul Mackerras

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).