Hello Guest

[FIXED] AppletLoader al_logo and al_progressbar parameters should not be required

  • 5 Replies
  • 6400 Views
AppletLoader al_logo and al_progressbar parameters should both have default values: appletlogo.png and appletprogress.gif, letting the user to avoid setting those on his <applet> tag unless he wants to override them. So, if someone uses default values, he will need less applet parameters.

The attached patch shows one possible impl.

Have you thought about this RFE?

*

Offline kappa

  • *****
  • 1314
Yes, this was discussed briefly on IRC just after the 2.7 release but was a bit late to put it in.

I'm a tiny bit uncomfortable with hard coding file names into the code ("appletlogo.png" and "appletprogress.gif") and one of those supports animation (gif) and the others does not (maybe we can just make them both gif).

However the advantage here is pretty clear, it'll make the html code alot nicer and cleaner and it'll also be two parameters developers do not need to worry about until they are ready to customise the AppletLoader (making it easier to pick up).

Unless someone has good reasons why it shouldn't go in, I'd say it should go in.

The patch is wrong a bit, it should be:

Code: [Select]
// load logos, if value is "" then skip
logo = getImage(getParameter("al_logo", "appletlogo.png"));
progressbar = getImage(getParameter("al_progressbar", "appletprogress.gif"));

without the check of:

Code: [Select]
if (getParameter("al_logo").length() > 0) {

and:

Code: [Select]
if (getParameter("al_progressbar").length() > 0) {

Sorry for that.

*

Offline kappa

  • *****
  • 1314
thx for the patch, this is now implemented.

al_logo and al_progress parameters are now optional and default to "appletlogo.gif" and "appletprogress.gif". This should make the appletloader easier and cleaner to use.

Nice, thanks for adding this feature.