<div dir="ltr">On Fri, Mar 29, 2013 at 9:26 AM, Boudewijn Rempt <span dir="ltr"><<a href="mailto:boud@valdyas.org" target="_blank">boud@valdyas.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On Friday 29 March 2013 Mar 03:24:04 Sven Langkamp wrote:<br>
> I think in there short term we could go with a file that stores the<br>
> shortcuts. I can't reproduce the problems with the disappearing shortcuts,<br>
> so I don't know if that is a Krita or xmlgui problem.<br>
> For a clean fix we likely need to do our own shortcut system as we need to<br>
> integrate the input manager shortcuts at some point.<br>
<br>
</div>We actually sort of do that, already. By default, KDE stores changed shortcuts in the .kde/share/apps/kritarc file. This file is superceded whenever we bump the version of the kritarc file in krita, for instance when adding a new action. Then all shortcuts will be forgotten. So we now save the shortcuts to .kde/share/config/krita.rc, and load those.<br>
</blockquote><div><br></div><div>It's the other way around we save to .kde/share/apps/kritarc and KDE saves to .kde/share/apps/krita/krita.rc (at least on my system). Saving to the kritarc is a problem of it's own. It works with one view, but when you have two views you can regularly see that the shortcuts save in the kritarc are lost. It only works because it can fall back to the KDE system.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
However, we do that on view creation and destruction, and that might be a problem. Ideally, it should be done on creating the first view and destroying the last view, in the current system, or on app startup/shutdown in the new system I'm working on in the calligra-kopluginloader-rempt branch.</blockquote>
<div><br></div><div>I think it should be read on view creation and written when shortcuts have been changed. We also need to save to a separate file, because the kritarc file might break.</div></div></div></div>