Scripting continued
Anders Lund <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kate |
|---|---|
| Organization | Saguaro |
| Message-ID | <[email protected]> |
Hi,
I have changed KateMainWindow::setupScripts() to use
KStandardDirs::findAllRessources("data", "<appName>/scripts/*.desktop",
false, true);
That means that both the local (writable) and global dirs will be searched,
and that the local version is preferred (hm, rather than the newest) in case
multiple desktop files with the same name is found.
I also dropped the sanity checking there, as that would just be repeated by
the script manager.
Optimally, I think an app should just instantiate the script manager, and put
some action in it's menus somewhere. The ScriptLoader class seems to be
designed for that, but it is not used yet?
This is one more place where autoadding menu accels would come in handy:)
I think at some point, it would be cool if there was a "reload scripts"
method, and maybe watching the scripts dir and add/remove scripts automatic
would be an idear?
-anders