Notify frameworks in Xfce and Thunar
Nick Schermer
nickschermer at gmail.com
Fri Jul 10 23:31:26 CEST 2009
2009/7/10 Brian J. Tarricone <brian at tarricone.org>:
> On 2009/07/10 13:24, Nick Schermer wrote:
>>
>> 2009/7/10 Brian J. Tarricone<brian at tarricone.org>:
>>>
>>> On 2009/07/10 07:02, Pavol Rusnak wrote:
>>>>
>>>> My question is: have you thought about using GIO monitoring API?
>>>
>>> From what I understand, there is no GIO monitoring API. Or, rather,
>>> GFileMonitor exists, but doesn't really do much useful without a backend.
>>> Gvfs provides a backend for it, but that requires a couple gnome
>>> dependencies at this point, so people may not be too happy to install it
>>> on
>>> an Xfce desktop.
>>
>> This is not true, gio also implements a local gvfs, which features
>> inotify. This
>> vfs backend is registered by default so if you load no special backends,
>> it will use this local file vfs, so g_file_new_for_path() works. You could
>> also
>> use something like this (more as a prove):
>>
>> gfile = g_vfs_get_file_for_path (g_vfs_get_local (),
>> "/some/path/to/file"));
>> gmonitor = g_file_monitor_file (gfile, ....);
>
> Gah, I'm being stupid. I was thinking about the volume manager.
>
> Still, though... if you're not on Linux, no file monitoring for you.
Also not true, there is a file monitor for win32, fen (solaris),
inotify, fam and as fallback there is a polling monitor. no monitor
for mac os (and freebsd?) though, gbz 543148. So there is always
*some* sort of file monitoring.
Nick
More information about the Xfce4-dev
mailing list