@techee would you be opposed to this if I were to make a pull request? I remember you said before you never implemented it because you wanted to keep the plugin simple [citation needed], but if I were able to make a simple enough patch that used GFileMonitor to watch the top directory, would be OK with it?
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/332
@codebrainz If it's configurable (can be disabled) I'm fine with it. But it will also require that the tree state in the sidebar is remembered (what is expanded, scrolled position) and at least for the Symbol view which does something similar this leads to a quite complex code. Having the tree collapsed/scrolled every time something new appears might be really annoying.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/332#issuecomment-171595112
If you want to add this feature it would be best to insert/delete the individual files to/from the tree individually instead of making a full reload - this way the tree view will stay at its current position.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/332#issuecomment-171597313
I probably won't implement it myself so removing the assignment. If anyone wants to implement it (in a reasonably compact and efficient way), I'll definitely review the patch.
--- 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-plugins/issues/332#issuecomment-231600791
I'm not sure if GFileMonitor supports recursive directory monitoring, so it may not even be possible to do what I was hoping simply enough,...
I implemented an automatic live update in the workbench plugin in PR #695. I can say that it requires a bit effort because recursive directory monitoring is not possible. That means you have to generate a file monitor for each directory and each sub-directory contained in it.
Also a manual re-scan is required sometimes. Let's assume the following situation of existing files and directories: - dir1 - file1.1 - file1.2 - dir2 - file2.1 - file2.2
Now someone copies in a new directory with 2 files in it, so the filesystem would look like this: - dir1 - file1.1 - file1.2 - dir2 - file2.1 - file2.2 - dir3 - file3.1 - file3.2
The file monitoring will only notify you about the new filepath for dir3. But you need to re-scan the directory on that event to also recognizes the files contained in it (and of course create a new file monitor for it to be notified of future changes in dir3).
github-comments@lists.geany.org