{"thread":{"id":"25742","subject":"[PATCH] gitk: Make text selectable on Mac","startedAt":"2010-11-14T12:22:56Z","lastAt":"2010-12-12T04:27:58Z","messageCount":2,"participants":["Stefan Haller","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"155843","messageId":"1289737376-33373-1-git-send-email-lists@haller-berlin.de","threadId":"25742","inReplyTo":null,"subject":"[PATCH] gitk: Make text selectable on Mac","fromName":"Stefan Haller","fromEmail":"lists@haller-berlin.de","sentAt":"2010-11-14T12:22:56Z","receivedAt":"2010-11-14T12:22:56Z","isPatch":true,"sender":{"key":"lists@haller-berlin.de","avatar":null},"body":"From: Stefan Haller <stefan@haller-berlin.de>\n\nStolen from git-gui, 23effa79f7 (original log message by\nShawn O. Pearce <spearce@spearce.org> follows):\n\n    git-gui: Force focus to the diff viewer on mouse click.\n\n    Apparently a \"feature\" of Tcl/Tk on Mac OS X is that a disabled text\n    widget cannot receive focus or receive a selection within it.  This\n    makes the diff viewer almost useless on that platform as you cannot\n    select individual parts of the buffer.\n\n    Now we force focus into the diff viewer when its clicked on with\n    button 1.  This works around the feature and allows selection to\n    work within the viewer just like it does on other less sane systems,\n    like Microsoft Windows.\n\nSigned-off-by: Stefan Haller <stefan@haller-berlin.de>\n---\n gitk |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 45e3380..14ffde2 100755\n--- a/gitk\n+++ b/gitk\n@@ -2453,6 +2453,7 @@ proc makewindow {} {\n     global ctxbut\n     bind $cflist $ctxbut {pop_flist_menu %W %X %Y %x %y}\n     bind $ctext $ctxbut {pop_diff_menu %W %X %Y %x %y}\n+    bind $ctext <Button-1> {focus %W}\n \n     set maincursor [. cget -cursor]\n     set textcursor [$ctext cget -cursor]\n-- \n1.7.3.2.154.gcfae0\n"},{"id":"157874","messageId":"20101212042758.GB7296@brick.ozlabs.ibm.com","threadId":"25742","inReplyTo":"1289737376-33373-1-git-send-email-lists@haller-berlin.de","subject":"Re: [PATCH] gitk: Make text selectable on Mac","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2010-12-12T04:27:58Z","receivedAt":"2010-12-12T04:27:58Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Sun, Nov 14, 2010 at 01:22:56PM +0100, Stefan Haller wrote:\n> From: Stefan Haller <stefan@haller-berlin.de>\n> \n> Stolen from git-gui, 23effa79f7 (original log message by\n> Shawn O. Pearce <spearce@spearce.org> follows):\n\nThanks, applied.\n\nPaul.\n"}]}