[Github-comments] [geany/geany] Plugin-API: extended project API (#2234)

LarsGit223 notifications at xxxxx
Fri Aug 2 13:56:53 UTC 2019


**Update:**
I added the missing doc comments for the return values. I also added a setter and getter function for ```project_prefs.project_session```.

**For what do I need it?**
As written at the top I want to add a functionality in the Workbench plugin to switch between projects. I plan to implement two ways of switching:
1. using the popup menu of the Workbench sidebar
1. on activating of a document that means select/open the project to which the document belongs

Option 1 works fine and does not need the access to ```project_prefs.project_session```. The problem with option 2 was that Geany crashed if I close and open a new project in the callback function for ```document-activate```. Calling it on idle worked but lead to all documents being closed including the just opened one if ```project_prefs.project_session``` is set. So I needed a setter and getter function to shortly disable the option and restore the old value after the new project is opened.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2234#issuecomment-517710447
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190802/c46079a3/attachment.html>


More information about the Github-comments mailing list