Re: What to return in async transfer callbacks?



Christian Neumair wrote:
You can't simply return one "by default". You'll have to handle all
members of GnomeVFSXferProgressStatus. For
GNOME_VFS_XFER_PROGRESS_STATUS_OK, you can return TRUE. It's just
important to not return FALSE (which is 0, i.e. the value of
GNOME_VFS_OK, and the reason why that failed), because FALSE always
means "abort now!".
Oha, that explains a lot indeed! I didn't expect GNOME_VFS_OK to equal 0, maybe because I was too much into the C/C++ thinking of 0==false and !0==true. But on a second thought, since a return value of 0 usually indicates success for programs on posix systems (if I remember correctly here), it actually does make sense.
Anyway, thanks!

libnautilus-private/nautilus-file-operations.c
Ah great. Yes... I merely looked at the src/ folder. Thanks Christian.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]