From: Pat Thoyts <hidden> Date: 2016-06-15 22:49:30
"Daniel A. Steffen" [off-list ref] writes:
Hi Stefan,
On Sep 6, 2010, at 10:07 AM, Stefan Haller wrote:
quoted
When using Git Gui.app on a Snow Leopard system with Tcl/Tk 8.5,
there are two problems:
1) Menu commands that open a dialog (e.g. "Push" or "Revert changes")
don't work when invoked via their keyboard shortcuts. You get a
dialog without a title bar, and the application then hangs without
further responding to any user input; you need to kill it. Invoking
the same commands with the mouse by choosing from the menu works fine.
first time I hear of this (or see this myself, and I use git gui every
day on Mac OS X); in part this may be due to the fact that many of the
menu shortcuts assigned by git gui conflict with existing OS X
shortcuts and don't work anyway e.g. cmd-A (esp if a text widget is in
focus)...
personally I would hate for my git gui to be downgraded to Tk 8.4 and
Carbon because of this small issue, and I'm unlikely to be alone.
I will not force 8.4 on anyone. If someone wants to force it locally
they can just edit the wish command in their git-gui script file to use
wish8.4.
I'm happy - even eager - to apply patches to improve the MacOSX git gui
experience but I can't test them as I don't have such a system.
This removes the Cmd-J accelerator from the "Revert Changes" menu
item. I assume that just changing the menu command to
{after idle [list do_revert_selection]}
doesn't work either?
Do you want this applied or will you produce a patch that removes more
such inappropriate accelerators?
Also - got any other MacOS specific patches?
--
Pat Thoyts http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
From: Stefan Haller <hidden> Date: 2016-06-15 22:49:30
Pat Thoyts [off-list ref] wrote:
This removes the Cmd-J accelerator from the "Revert Changes" menu
item. I assume that just changing the menu command to
{after idle [list do_revert_selection]}
doesn't work either?
No, but "after 100" does for me; "after 10" does not, and "after 50"
does some of the time. I'm not sure if this would be suitable as a
workaround then.
-Stefan
--
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/
From: Stefan Haller <hidden> Date: 2016-06-15 22:49:32
Stefan Haller [off-list ref] wrote:
Pat Thoyts [off-list ref] wrote:
quoted
This removes the Cmd-J accelerator from the "Revert Changes" menu
item. I assume that just changing the menu command to
{after idle [list do_revert_selection]}
doesn't work either?
No, but "after 100" does for me; "after 10" does not, and "after 50"
does some of the time. I'm not sure if this would be suitable as a
workaround then.
We seem to be stuck with this right now. What can I do to move this
forward? I have little experience with Tcl/Tk, so I'm probably unable
to solve this in a satifactory way myself; but I'd like to do everything
I can to help make progress here.
Do people think that the "after 100" hack would be acceptable, if it's
conditional for {[is_MacOSX] && $::have_tk85}? Would it help if I try
to come up with a patch for that?
-Stefan
(Sorry for the duplicate mail; I used the wrong return address the first
time, so it didn't got to the list.)
--
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/
From: Stefan Haller <hidden> Date: 2016-06-15 22:49:32
Stefan Haller [off-list ref] wrote:
Pat Thoyts [off-list ref] wrote:
quoted
This removes the Cmd-J accelerator from the "Revert Changes" menu
item. I assume that just changing the menu command to
{after idle [list do_revert_selection]}
doesn't work either?
No, but "after 100" does for me; "after 10" does not, and "after 50"
does some of the time. I'm not sure if this would be suitable as a
workaround then.
We seem to be stuck with this right now. What can I do to move this
forward? I have little experience with Tcl/Tk, so I'm probably unable
to solve this in a satifactory way myself; but I'd like to do everything
I can to make progress here.
Do people think that the "after 100" hack would be acceptable, if it's
conditional for {[is_MacOSX] && $::have_tk85}? Would it help if I try
to come up with a patch for that?
-Stefan
--
Stefan Haller
Ableton
http://www.ableton.com/
From: Stefan Haller <hidden> Date: 2016-06-15 22:49:35
Tk 8.5 on Mac OS X has a bug whereby a dialog opened from a key
binding will hang; see issue 3044863 in the Tk issue tracker.
<http://sourceforge.net/tracker/?func=detail&aid=3044863&group_id=12997&atid=112997>
To work around this, we perform commands that open a dialog after
a brief delay; 150 ms seems to be a good compromise between short
enough as to be not annoying, and long enough to reliably work
around the issue.
Signed-off-by: Stefan Haller <redacted>
---
git-gui.sh | 39 +++++++++++++++++++++++++++------------
1 files changed, 27 insertions(+), 12 deletions(-)
@@ -3560,6 +3560,21 @@ if {[info exists repo_config(gui.wmstate)]} {catch{wmstate.$repo_config(gui.wmstate)}}+procmac_freeze_workaround{cmd}{+if{[is_MacOSX]&&$::have_tk85}{+# Tk 8.5 on Mac OS X has a bug whereby a dialog opened from a key+# binding will hang; see issue 3044863 in the Tk issue tracker.+# <http://sourceforge.net/tracker/?func=detail&aid=3044863&group_id=12997&atid=112997>+#+# To work around this, we perform commands that open a dialog after a brief+# delay; 150 ms seems to be a good compromise between short enough as to be+# not annoying, and long enough to reliably work around the issue.+after150$cmd+}else{+$cmd+}+}+# -- Key Bindings#bind$ui_comm<$M1B-Key-Return>{do_commit;break}
From: Stefan Haller <hidden> Date: 2016-06-15 22:49:35
Tk 8.5 on Mac OS X has a bug whereby a dialog opened from a key
binding will hang; see issue 3044863 in the Tk issue tracker.
<http://sourceforge.net/tracker/?func=detail&aid=3044863&group_id=12997&atid=112997>
To work around this, we perform commands that open a dialog after
a brief delay; 150 ms seems to be a good compromise between short
enough as to be not annoying, and long enough to reliably work
around the issue.
Signed-off-by: Stefan Haller <redacted>
---
I already sent this two days ago, but it didn't seem to appear on the
list for some reason, so I'm resending it. Apologies if you see this
twice.
git-gui.sh | 39 +++++++++++++++++++++++++++------------
1 files changed, 27 insertions(+), 12 deletions(-)
@@ -3560,6 +3560,21 @@ if {[info exists repo_config(gui.wmstate)]} {catch{wmstate.$repo_config(gui.wmstate)}}+procmac_freeze_workaround{cmd}{+if{[is_MacOSX]&&$::have_tk85}{+# Tk 8.5 on Mac OS X has a bug whereby a dialog opened from a key+# binding will hang; see issue 3044863 in the Tk issue tracker.+# <http://sourceforge.net/tracker/?func=detail&aid=3044863&group_id=12997&atid=112997>+#+# To work around this, we perform commands that open a dialog after a brief+# delay; 150 ms seems to be a good compromise between short enough as to be+# not annoying, and long enough to reliably work around the issue.+after150$cmd+}else{+$cmd+}+}+# -- Key Bindings#bind$ui_comm<$M1B-Key-Return>{do_commit;break}