Opened 12 years ago

Last modified 4 years ago

#8524 new bug

Renaming the currently viewed file trips ShowImage

Reported by: mmadia Owned by: leavengood
Priority: normal Milestone: R1
Component: Applications/ShowImage Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

hrev44078-gcc2h

Browse some images with ShowImage. Rename the image that's currently being viewed. ShowImage will not notice the changed filename (judging by its title bar) and will not be able navigate the remaining files.

Change History (3)

comment:1 by hometue, 11 years ago

(GCI-2012 Participant) Haiku revision: hrev44702 Still valid. This can be prevented by not allowing users edit the name of open files. System: Haiku R1-alpha4 on Virtualbox 4.1.20 on windows 7 64 bit

comment:2 by eml, 4 years ago

Would it not be better to detect file changes, and update the window title plus have the logic that determines next/previous react to it as well?

comment:3 by leavengood, 4 years ago

Yes, watching for the file name change is the plan. The reason this has not been done yet is apparently no one else has been interested, and I have not had much time for Haiku for a while. I hope to be able to work on ShowImage again soon.

But besides the above there is a more technical excuse: the structure of ShowImage code makes this fairly difficult. The ShowImage view and window which actually display the image don't have the necessary knowledge about the file. My plan is to introduce an ImageModel or similar idea to represent the image data, and that can "own" the file information and watch for file name changes, etc.

Doing this will allow for solving several other longstanding bugs in ShowImage as well.

I hope I can do this before the next release, which probably will be Beta 3.

Note: See TracTickets for help on using tickets.