Hi,
shortcut keys defined in profiles for the GTK UI ceased working since 2.40
(Jessie). Until 2.32.x it was working fine.
Finally I found some time to dig into this and found, that now the profiles are
scanned only after the main window is created. So the shortcut keys defined
therein are just unknown to the code creating the main window.
The attached patch fixes this for 2.40 and upwards: it simply moves the call to
scanProfiles() so it gets executed prior to createToplevelWindow().
However there's a little catch: only moving scanProfiles() isn't enough. If
~/.unison doesn't exist yet, unison exits with
-----------8<-------------
../unison
UISTYLE = gtk2
Building for Unix
NATIVE = true
THREADS = false
STATIC = false
OSTYPE =
OSARCH =
Error in listing files:
No such file or directory [opendir(/home/dhrdev/.unison)]
Fatal error: exception Assert_failure("/home/dhrdev/tmp/unison/uigtk2.ml", 143, 14)
-----------8<-------------
So I prepended scanProfiles() with Os.createUnisonDir() and then it runs
smoothly. This might not be the cleanest way of solving this hen-or-egg kind of
problem. I'm looking forward to your suggestions!
I also filed a bug report with upstream. [1]
Let me know if you need more information.
Thanks,
Daniel
[1] https://groups.yahoo.com/neo/groups/unison-users/conversations/messages/11720