Ignore:
Timestamp:
2009-09-05T20:26:23+02:00 (15 years ago)
Author:
Gubaer
Message:

fixed #3410: Size of new upload dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java

    r2008 r2065  
    9696            Pattern p = Pattern.compile(field + "=(\\d+)",Pattern.CASE_INSENSITIVE);
    9797            Matcher m = p.matcher(preferenceValue);
    98             if (!m.matches())
    99                 throw new WindowGeometryException(tr("preference with key ''{0}'' doesn't include ''{1}=ddd''. Can't resstore window geometry from preferences.", preferenceKey, field));
     98            if (!m.find())
     99                throw new WindowGeometryException(tr("preference with key ''{0}'' doesn''t include ''{1}''. Can''t restore window geometry from preferences.", preferenceKey, field));
    100100            v = m.group(1);
    101101            return Integer.parseInt(v);
     
    103103            throw e;
    104104        } catch(NumberFormatException e) {
    105             throw new WindowGeometryException(tr("preference with key ''{0}'' doesn't provide an int value for ''{1}''. Got {2}. Can't resstore window geometry from preferences.", preferenceKey, field, v));
     105            throw new WindowGeometryException(tr("preference with key ''{0}'' doesn''t provide an int value for ''{1}''. Got {2}. Can''t restore window geometry from preferences.", preferenceKey, field, v));
    106106        } catch(Exception e) {
    107             throw new WindowGeometryException(tr("failed to parse field ''{1}'' in preference with key ''{0}''. Exception was: {2}. Can't resstore window geometry from preferences.", preferenceKey, field, e.toString()), e);
     107            throw new WindowGeometryException(tr("failed to parse field ''{1}'' in preference with key ''{0}''. Exception was: {2}. Can''t restore window geometry from preferences.", preferenceKey, field, e.toString()), e);
    108108        }
    109109    }
     
    112112        String value = Main.pref.get(preferenceKey);
    113113        if (value == null)
    114             throw new WindowGeometryException(tr("preference with key ''{0}'' doesn't exist. Can't resstore window geometry from preferences.", preferenceKey));
     114            throw new WindowGeometryException(tr("preference with key ''{0}'' doesn''t exist. Can''t restore window geometry from preferences.", preferenceKey));
    115115        topLeft = new Point();
    116116        extent = new Dimension();
     
    151151            initFromPreferences(preferenceKey);
    152152        } catch(WindowGeometryException e) {
     153            e.printStackTrace();
     154            System.out.println(tr("Warning: failed to restore window geometry from key ''{0}''. Falling back to default geometry.", preferenceKey));
    153155            initFromWindowGeometry(defaultGeometry);
    154156        }
Note: See TracChangeset for help on using the changeset viewer.