Changeset 838 for trunk/src/org/expeditee/items
- Timestamp:
- 02/05/14 11:15:35 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/ItemUtils.java
r778 r838 26 26 import org.expeditee.items.widgets.WidgetCorner; 27 27 import org.expeditee.items.widgets.WidgetEdge; 28 import org.expeditee.network.FrameShare; 28 29 import org.expeditee.settings.folders.FolderSettings; 29 30 … … 344 345 * not found. 345 346 */ 346 public static Picture CreatePicture(Text source, ImageObserver observer ) {347 public static Picture CreatePicture(Text source, ImageObserver observer, boolean tryRemote) { 347 348 String text = source.getText(); 348 349 String path = ""; … … 398 399 path = file.getPath(); 399 400 400 // if the image isn't found by now, give up.401 // if the image isn't found by now, try remote servers 401 402 file = new File(path); 402 403 if (!file.exists() || file.isDirectory()) { 404 if(tryRemote && FrameShare.getInstance().loadImage(fileName, null)) { 405 // call CreatePicture again, but with tryRemote set to false so we won't get into an infinite loop 406 // if something goes wrong with finding the downloaded image 407 return CreatePicture(source, observer, false); 408 } 403 409 return null; 404 410 } … … 417 423 } 418 424 425 } 426 427 public static Picture CreatePicture(Text source, ImageObserver observer) { 428 return CreatePicture(source, observer, true); 419 429 } 420 430
Note:
See TracChangeset
for help on using the changeset viewer.