Re: [patch] don't show "(Empty)" in list view when dir not empty
- From: Christof <mail pop2wap net>
- To: Alexander Larsson <alexl redhat com>
- Cc: nautilus-list gnome org
- Subject: Re: [patch] don't show "(Empty)" in list view when dir not empty
- Date: Mon, 05 Feb 2007 13:43:07 +0100
On Mo, 2007-02-05 at 11:05 +0100, Alexander Larsson wrote:
> On Sun, 2007-02-04 at 16:36 +0100, Christof wrote:
> > Hi,
> > I've written a patch to
> > http://bugzilla.gnome.org/show_bug.cgi?id=340495
> > Could someone please take a look at it? It's the first time I was
> > looking on nautilus code, so I'm not sure if the patch is okay.
>
> I think your analysis is right, but the fix isn't. Once you've gotten a
> single add_files you set has_children, and then the directory will seem
> to have children forever, even if they are later removed.
Good point. I haven't thought of that.
I've uploaded a reviewed patch to the bugtracker.
http://bugzilla.gnome.org/show_bug.cgi?id=340495
There's another point still left.
Currently, the dummy entry is replaced by the first file entry added to
the directory. Theoretically, on a device with high latency, it could
happen that the first entry is retrieved quite fast, but some remaining
entries may need some more time, maybe even seconds. The user doesn't
have any visual feedback whether the loading of the directory already
finished or not. For this reason it would be practical if the dummy
entry saying "Loading..." would stay there as long as all pending files
for that directory were handled.
To achieve it without changing the current implementation too much, one
could count the file additions in the new files_added handler and
decrement this counter on each call to add_file. When the counter hits
zero, remove the dummy entry.
Since I'm new to nautilus code, I've no idea if there would be any side
effects and if it is guaruanteed if every queued file to be added will
actually yield a call to add_file.
What do you think about it?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]