Re: Trash directory on removable media - Bug 138058

On 2/2/07, Alexander Larsson <alexl redhat com> wrote:

Its a bit hard to read the patch with the linebreaking it got in the
mailer. However, some comments:

Thanks for taking the time to comment, this one should be easier to read.

It seems better to use nautilus_file_operations_delete() for the
deletion. Then you automatically get progress bars, it integrates with
NautilusFile (via the sync callbacks), etc. You'll have to add a
callback argument to it so you can unmount when its done/failed, but
that should be simple.


You do synchronous i/o (in e.g. num_entries_in_dir) which is a total
no-no in Nautilus. Furthermore, being the thrash dir this information is
likely already cached in the nautilus async file handling machinery. You
should use NautilusFile/NautilusDirectory to handle this.

Done, I feel a bit sheepish as this was clearly outlined in
nautilus-io.txt and I knew the method I was using was sub par.

The coding style guides are in docs/style-guide.html. You seem to be
lacking spaces in front of parenthesis in a couple of places and do
things like assignment at declaration.



Attachment: nautilus-empty-trash-on-unmount.patch
Description: Binary data

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