Changeset 4437


Ignore:
Timestamp:
2003-05-30T14:55:24+12:00 (21 years ago)
Author:
jmt12
Message:

Removed some no longer necessary code used to load images from the resource directory (now they are loaded from the jar).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r4364 r4437  
    591591    ImageIcon image = null;
    592592    try {
    593         image = new ImageIcon(ClassLoader.getSystemResource("images/" + Gatherer.dictionary.get("Version") + File.separator + filename));
    594     }
    595     catch(Exception error_one) {
    596         try {
    597         image = new ImageIcon(ClassLoader.getSystemResource("images/" + filename));
    598         }
    599         catch (Exception error_two) {
    600         if(Gatherer.dictionary != null) {
    601             File locale_image_file = new File(RES_DIR + Gatherer.dictionary.get("Version") + File.separator + filename);
    602             if(locale_image_file.exists()) {
    603             image = new ImageIcon(locale_image_file.toString());
    604             }
    605         }
    606         if(image == null) {
    607             File image_file = new File(RES_DIR + filename);
    608             if(image_file.exists()) {
    609             image = new ImageIcon(image_file.toString());
    610             }
    611         }
    612         }
     593        image = new ImageIcon(ClassLoader.getSystemResource("images/" + Gatherer.dictionary.get("Version") + "/" + filename));
     594    }
     595    catch(NullPointerException exception) {
     596        image = new ImageIcon(ClassLoader.getSystemResource("images/" + filename));
    613597    }
    614598    if(image == null) {
Note: See TracChangeset for help on using the changeset viewer.