--- a/ImageEditor.st Mon Dec 05 03:22:12 2011 +0100
+++ b/ImageEditor.st Mon Dec 05 15:40:09 2011 +0100
@@ -6300,19 +6300,25 @@
doLoadFromURL
"opens a dialog for loading an image from a URL"
- |tempFile url|
+ |tempFile url response|
self checkModified ifFalse:[ ^ self ].
url := Dialog
- request:'Load Image from URL'
+ request:(resources string:'Load Image from URL')
initialAnswer:LastURL.
url notEmptyOrNil ifTrue:[
LastURL := url.
tempFile := Filename newTemporary.
- HTTPInterface get:url destinationFile:tempFile.
- self loadFromFile:tempFile.
+ self withWaitCursorDo:[
+ response := HTTPInterface get:url destinationFile:tempFile.
+ ].
+ response isErrorResponse ifTrue:[
+ Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText).
+ ] ifFalse:[
+ self loadFromFile:tempFile.
+ ].
tempFile delete
]