AbstractLauncherApplication.st
changeset 13119 988afe47fee1
parent 13087 82522521c37e
child 13143 ea1a7e8104c2
child 13180 64a4186ddfce
--- a/AbstractLauncherApplication.st	Fri Jul 05 14:26:18 2013 +0200
+++ b/AbstractLauncherApplication.st	Fri Jul 05 15:34:09 2013 +0200
@@ -875,7 +875,7 @@
                     fromDirectory:nil
                     forSave:true
                     whenBoxCreatedEvaluate:[:box |
-                        |editButton msPaintButton|
+                        |editButton paintButton copyButton|
                         "/ UserPreferences current useNewFileDialog ifFalse:[
                             editButton := Button label:(resources string:'Edit').
                             editButton
@@ -884,22 +884,28 @@
                                     ImageEditor openOnImage:anImage.
                                 ].
                             box addButton:editButton.
-                        "/ ]
-                            (OperatingSystem isMSWINDOWSlike
-                            and:[ true "OperatingSystem canExecuteCommand:'C:\Windows\system32\mspaint.exe'" ]) ifTrue:[
-                                msPaintButton := Button label:(resources string:'MS-Paint').
-                                msPaintButton
-                                    action:[
-                                        |tempFile|
-
-                                        tempFile := Filename newTemporary withSuffix:'bmp'.
-                                        box hide; destroy.
-                                        anImage saveOn:tempFile.
-                                        OperatingSystem
-                                            openApplicationForDocument:tempFile operation:#edit.
-                                    ].
-                                box addButton:msPaintButton.
-                            ].
+
+                            paintButton := Button label:(resources string:'OS Editor').
+                            paintButton
+                                action:[
+                                    |tempStream|
+
+                                    tempStream := FileStream newTemporaryWithSuffix:'png'.
+                                    box hide; destroy.
+                                    PNGReader save:anImage onStream:tempStream.
+                                    tempStream close.
+                                    OperatingSystem
+                                        openApplicationForDocument:tempStream fileName operation:#edit mimeType:'image/png'.
+                                ].
+                            box addButton:paintButton.
+
+                            copyButton := Button label:(resources string:'Copy to Clipboard').
+                            copyButton
+                                action:[
+                                    self window setClipboardObject:anImage.
+                                    box hide; destroy.
+                                ].
+                            box addButton:copyButton.
                         "/ ]
                    ].
     fileName notNil ifTrue:[
@@ -7023,14 +7029,14 @@
 !AbstractLauncherApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.433 2013-07-04 06:54:47 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.434 2013-07-05 13:34:09 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.433 2013-07-04 06:54:47 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.434 2013-07-05 13:34:09 stefan Exp $'
 !
 
 version_SVN
-    ^ '$Id: AbstractLauncherApplication.st,v 1.433 2013-07-04 06:54:47 cg Exp $'
+    ^ '$Id: AbstractLauncherApplication.st,v 1.434 2013-07-05 13:34:09 stefan Exp $'
 ! !