Re: Monitoring directory changes with gnomevfs
- From: Hans Petter Jansson <hpj novell com>
- To: Damien Moore <damien moore excite com>
- Cc: gnome-vfs-list gnome org
- Subject: Re: Monitoring directory changes with gnomevfs
- Date: Thu, 04 Sep 2008 15:25:19 -0500
On Thu, 2008-08-28 at 10:01 -0400, Damien Moore wrote:
> Can someone can give me an idea of whether the above should work or
> what I would need to do to that simple example to get it working?
> Looking at the above I don't really understand how glib would know how
> to attach the MonitorCallback to the GMainLoop, which isn't even
> running yet (if I created and started another main loop inside the
> outer loop, would it also generate callbacks?).
You're correct that you must spin the main loop for callbacks to work.
The default main loop is global, so gnome-vfs will be able to find it
and add the callback even if it's not running or passed in.
These days you should be using GIO/GVFS instead of gnome-vfs, though.
Take a look at the documentation here:
http://library.gnome.org/devel/gio/stable/
GIO is part of GLib. You can read more about main loops here:
http://library.gnome.org/devel/glib/stable/glib-The-Main-Event-Loop.html
--
Hans Petter
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]