Opened 16 years ago

Closed 15 years ago

#3044 closed bug (fixed)

[JPEG2000] shows an alert if it can't find his settings (easy)

Reported by: diver Owned by: axeld
Priority: normal Milestone: R1
Component: Add-Ons/Translators Version: R1/pre-alpha1
Keywords: Cc: fredrik@…
Blocked By: Blocking:
Platform: All

Description


Attachments (2)

jpeg2000.png (124.2 KB ) - added by diver 16 years ago.
3304.diff (4.1 KB ) - added by richy_rich 16 years ago.
patch for issue 3044

Download all attachments as: .zip

Change History (12)

by diver, 16 years ago

Attachment: jpeg2000.png added

comment:1 by diver, 16 years ago

Summary: [JPEG2000] shows an alert if it can't find his settings[JPEG2000] shows an alert if it can't find his settings (easy)

comment:2 by modeenf, 16 years ago

Cc: fredrik@… added

And the solution are to remove that alert? or are the image a propose how it can look and the hedline shoul be "show an alert if it can't find his settings"?

comment:3 by diver, 16 years ago

I mean that no other translator show such alert and silently creates one if needed. Also note that alert message is about incompatible settings file, but there were no settings file before, as this is the first time I opened JPEG2000 image.

comment:4 by richy_rich, 16 years ago

Hi, I've attached a path for this.

With this patch the alert is now only shown if the translator attempts to read a settings file and fails (i.e. it's corrupt or otherwise incompatible - as suggested in the message).

In the case of there not being a settings file the translator will silently create the default (this is also the behaviour of the other translators as far as I can see).

Cheers,

Richy

comment:5 by jackburton, 16 years ago

A translator should never show an alert, since it could be used from a command line application. The JPEG translator had also this issue, and was fixed by removing the code which showed the alert. If anything, you could dump a message to the syslog.

comment:6 by richy_rich, 16 years ago

Ok, I'll ammend the patch to remove all the alerts and check the other translators.

comment:7 by richy_rich, 16 years ago

Actually, the jpeg translator can still show an alert in the same circumstances (corrupt or unreadable settings file) just not when it's silently creating one. The attached patch brings the j2k translator into line with this.

Should I remove the other alert from both?

comment:8 by stippi, 16 years ago

Yes, please! Thanks a lot for the work!

by richy_rich, 16 years ago

Attachment: 3304.diff added

patch for issue 3044

comment:9 by richy_rich, 16 years ago

No worries, I'm happy to help and starting with some of these tickets seems a good way to get familiar with the code/build/etc.

I've attached a new patch which removes the alert from both jpeg and jpeg2k translators and also cleans up other BAlert statements that the j2k translator could have popped up (replaced with logging to stderr, which is what the other translators seem to do).

in reply to:  9 comment:10 by jackburton, 15 years ago

Resolution: fixed
Status: newclosed

Replying to richy_rich:

Applied in hrev31873. Thanks!

Note: See TracTickets for help on using tickets.