equal
deleted
inserted
replaced
8688 HTTPInterface isNil ifTrue:[ Smalltalk loadPackage:'stx:goodies/communication']. |
8688 HTTPInterface isNil ifTrue:[ Smalltalk loadPackage:'stx:goodies/communication']. |
8689 |
8689 |
8690 LastURL := url. |
8690 LastURL := url. |
8691 tempFile := FileStream newTemporary close fileName. |
8691 tempFile := FileStream newTemporary close fileName. |
8692 self withWaitCursorDo:[ |
8692 self withWaitCursorDo:[ |
|
8693 |newURL| |
|
8694 |
8693 response := HTTPInterface get:url destinationFile:tempFile. |
8695 response := HTTPInterface get:url destinationFile:tempFile. |
|
8696 response isMovedResponse ifTrue:[ |
|
8697 newURL := response location. |
|
8698 newURL ~= url ifTrue:[ |
|
8699 response := HTTPInterface get:newURL destinationFile:tempFile. |
|
8700 ]. |
|
8701 ]. |
8694 ]. |
8702 ]. |
8695 response isErrorResponse ifTrue:[ |
8703 response isErrorResponse ifTrue:[ |
8696 Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText). |
8704 Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText). |
8697 ] ifFalse:[ |
8705 ] ifFalse:[ |
8698 self loadFromFile:tempFile. |
8706 self loadFromFile:tempFile. |
8699 ]. |
8707 ]. |
8700 tempFile delete |
8708 tempFile delete |
8701 ] |
8709 ] |
8702 |
8710 |
8703 "Created: / 20-09-2010 / 11:30:59 / cg" |
8711 "Created: / 20-09-2010 / 11:30:59 / cg" |
8704 "Modified: / 16-02-2017 / 10:51:18 / cg" |
8712 "Modified: / 13-09-2017 / 17:00:28 / cg" |
8705 ! |
8713 ! |
8706 |
8714 |
8707 doNewImage |
8715 doNewImage |
8708 "opens a dialog with choices of size and color map for creating a new image" |
8716 "opens a dialog with choices of size and color map for creating a new image" |
8709 |
8717 |