Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1101 closed bug (fixed)

Cannot add background image

Reported by: kaliber Owned by: korli
Priority: normal Milestone: R1
Component: Preferences/Backgrounds Version: R1/pre-alpha1
Keywords: Cc: axeld, bonefish
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Adding a new background image doesn't work. I can choose a file but the list "Image" has only "None" and "Other..." values.

Change History (8)

comment:1 by korli, 13 years ago

Could you elaborate on your way of reproducing this bug ? I'm sorry, it's working here :)

comment:2 by kaliber, 13 years ago

Thank you for replay. Now I realized what the problem is. I've downloaded png image via wget and I was trying to set background. This was not working because the image does not have a mime type set, so I opened the image with ShowImage and I now can set background. Is it a bug? Where?

comment:3 by korli, 13 years ago

Cc: axeld added

Axel, do you have a hint on what needs to be changed to correctly identify a file ?

comment:4 by bonefish, 13 years ago

I suppose a good start would be to change wget (and apps that could cause the same problem, like browsers etc.) to invoke update_mime_info() after a file has been downloaded.

A real solution in this case would be to modify the file panel filter to do a BMimeType::GuessMimeType() (or even a update_mime_info()), if a file doesn't have a MIME type yet. Don't know how expensive that would be in the end -- since usually all files on a BFS volume will have a MIME type it might be not that bad.

comment:5 by bonefish, 13 years ago

Cc: bonefish added

Oh, I just looked into the Backgrounds code. The filter is already doing a GuessMimeType(). Our MIME DB should also know the type (image/png is there and has both sniffer rule and extension). No idea what goes wrong then.

comment:6 by kaliber, 13 years ago

Maybe somewhere update_mime_info() should be called?

comment:7 by korli, 13 years ago

Resolution: fixed
Status: newclosed

Should be fixed in hrev20400. Though there are still weird things happening with mime types : I don't manage to have my test image (a jpg) defaultly opened by ShowImage, it is opened with MediaPlayer (due to a recognized video type).

comment:8 by axeld, 13 years ago

If that JPEG is shareable, can you open another bug for this and attach it?

Note: See TracTickets for help on using tickets.