lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Implement directory watching / auto-refresh for file browser

Open Wallacoloo opened this issue 10 years ago • 5 comments

Under linux, there exists a tool called inotify which allows an application to watch a directory and be notified whenever something about it changes (new file added/deleted, existing file modified, etc).

A natural way to use such a tool is to monitor all the open folders in the file browser and update the UI in real-time as the folders are modified, saving the user from having to manually refresh the directory view, or forgetting to.

inotify is linux only, but a quick search reveals these equivalent cross-platform tools (though I know little of their reputation/usability):

The latter option looks to be better all-around (more actively developed, doesn't require calling "update()" on a regular basis, and it supports slightly more backends), except for the less-permissive license, but LMMS is licensed under the GPL anyway ( :-1: ) so that's pretty much moot.

Wallacoloo avatar Jul 04 '15 00:07 Wallacoloo

Note for anyone wanting to try their luck: This should be relatively easy to implement using QFileSystemWatcher.

lukas-w avatar Oct 31 '19 19:10 lukas-w

I'll work on this!

Cruwal avatar Nov 22 '19 03:11 Cruwal

@Cruwal Any progress on this? Let us know if you need help.

lukas-w avatar Dec 07 '19 15:12 lukas-w

image Also, It would be better if the refresh button refreshes the currently open directory only. As of now, it resets to the home link (/), collapsing all of the directories navigated by the user,

anytizer avatar Sep 15 '21 15:09 anytizer

In LMMS 1.3.0-alpha.1 on Linux Mint 20.3, this feature already seems to be in place. I can add/remove directories and files and the file browser automatically updates. Can anyone else confirm this?

messmerd avatar Jun 28 '22 05:06 messmerd

Works fine in LMMS 1.3.0-alpha on Linux Ubuntu 22.04.3 LTS

MrTopom avatar Aug 29 '23 20:08 MrTopom

This isn't working on my local build of master on Windows. I can't see at a quick glance any code that would implement this feature, either. Are we all definitely talking about the sidebar, and not file dialogs?

DomClark avatar Aug 31 '23 19:08 DomClark

I was talking about files update in file dialogs working on Linux Ubuntu.

MrTopom avatar Sep 01 '23 19:09 MrTopom