Re: GQview 1.3.7-1.5.7 - buggy file refresh/image change interaction

Steven Mueller <[email protected]> Mon, 7 Feb 2005 01:04:53 -0800
Newsgroups gmane.comp.gnome.apps.gqview.devel
Message-ID <[email protected]>
Hello John,

Thanks for the quick reaction; I should have reported this long ago.
:)  Anyway, the patch seems to have done the trick.

On Fri, Feb 04, 2005 at 08:28:03PM -0500, John Ellis wrote:
> Steven Mueller wrote:
> > While previewing series of images while they are being downloaded,
> > I've noticed that occasionally, if a directory-refresh occurs at just
> > the right time when I'm switching from one image to another, the next
> > image will load up all black, and then the next flip-image operation
> > will skip either to the first image or, rarely, the last image in the
> 
> Please try the attached patch for view_file_list.c and let me know if it solves
> the issue.
> 
> 
> The selection changed signal for the file list is sent in an idle function (for
> performance purposes, such as when deleting many images). The problem is that
> the pointer to the selected image used by the idle function is not updated when
> the file list is refreshed, so it becomes invalid. A timed event has priority
> over an idle event, so the automatic timed refresh can occur when the idle
> selection 'event' is still pending.

Ah, I thought something like that might be happening.  I'm glad that
it was such a short fix!

> The patch adds a fix to update the selection pointer during a refresh, and adds
> a sanity check to throw away the selection 'event' if the image pointer is no
> longer valid (to avoid blanking the display if the selected image no longer
> exists after a refresh).

That's pretty cool, though it kinda seems a bit odd to be still
displaying an image after it's been deleted.  Perhaps the broken image
icon could be shown instead?

> I could not repeat the bug with the file list in icon mode, so if you have ever
> seen it there too please let me know so I can investigate a little more.

Hmm, I've rarely used that mode, so I haven't noticed it.  I've
checked it a bit this weekend and haven't found anything odd, so
either the race is much closer, or there isn't a problem there.  :)
I'll post a note if I notice anything.

Thanks again,
Steve

-- 
Steven Mueller
[email protected]


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl