- Timestamp:
- 2009-09-05T20:26:23+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/UploadAction.java
r2061 r2065 480 480 new WindowGeometry( 481 481 panel.getClass().getName(), 482 WindowGeometry.centerInWindow(JOptionPane.getFrameForComponent(Main.parent), new Dimension(400,400)) 482 WindowGeometry.centerInWindow( 483 JOptionPane.getFrameForComponent(Main.parent), 484 new Dimension(400,600) 485 ) 483 486 ).apply(this); 484 487 panel.startUserInput(); -
trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
r2008 r2065 96 96 Pattern p = Pattern.compile(field + "=(\\d+)",Pattern.CASE_INSENSITIVE); 97 97 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)); 100 100 v = m.group(1); 101 101 return Integer.parseInt(v); … … 103 103 throw e; 104 104 } 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)); 106 106 } 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); 108 108 } 109 109 } … … 112 112 String value = Main.pref.get(preferenceKey); 113 113 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)); 115 115 topLeft = new Point(); 116 116 extent = new Dimension(); … … 151 151 initFromPreferences(preferenceKey); 152 152 } 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)); 153 155 initFromWindowGeometry(defaultGeometry); 154 156 }
Note:
See TracChangeset
for help on using the changeset viewer.