Commit aa9164dc authored by Committed by Sergio Costas
Notify changes in metadata
When a program (like Nautilus) modifies the metadata in a file (like metadata::custom-icon) there is no way of detecting that change from other programs: neither inotify generates an event in the file or the directory holding it, nor is possible to use it in the files at, or the folder itself, ~/.local/share/gvfs-metadata, because writting in them is delayed for nearly a minute. Unfortunately, there are cases where it is needed to be able to detect that. An example (and the reason for this patch) is when Nautilus (or another file manager) modifies the custom icon in a file from the desktop, and the desktop is managed by a different program (in this case, Desktop Icons NG), because the later can't detect the change made by the former and, thus, the file will keep the old icon until the whole desktop is refreshed. To fix this, this patch proposes to add a signal to the org.gtk.vfs.Metadata DBus interface, which will be triggered whenever a key is modified. To avoid saturating the system in case of modifying a lot of keys, it is triggered up to once per second.
Showing with 90 additions and 3 deletions