[bknr-cvs] hans changed trunk/projects/quickhoney/upgrade-stuff/import.lisp

BKNR Commits bknr at bknr.net
Fri Aug 1 15:02:03 UTC 2008


Revision: 3721
Author: hans
URL: http://bknr.net/trac/changeset/3721

Import more pictures

U   trunk/projects/quickhoney/upgrade-stuff/import.lisp

Modified: trunk/projects/quickhoney/upgrade-stuff/import.lisp
===================================================================
--- trunk/projects/quickhoney/upgrade-stuff/import.lisp	2008-08-01 12:50:18 UTC (rev 3720)
+++ trunk/projects/quickhoney/upgrade-stuff/import.lisp	2008-08-01 15:02:03 UTC (rev 3721)
@@ -1,19 +1,32 @@
 (in-package :quickhoney)
 
+(defun replace-image (pathname)
+  (handler-case
+      (let ((old (store-image-with-name (pathname-name pathname))))
+        (when old
+          (format t "deleting ~A~%" old)
+          (delete-object old))
+        (import-image pathname))
+    (error (e)
+      (format t "~&; error importing ~S: ~A~%" pathname e))))
+
 (dolist (name '(#p"type-news.png" #p"type-pixel.png" #p"type-shop.png" #p"type-vector.png"))
   (import-image name :keywords '(:type)))
 
-(dolist (name '(#P"overlay-close.gif"
-                #P"hey.gif"
-                #P"buy.gif" #P"buy-top.gif" #P"buy-print.gif" #P"buy-file.gif" #P"buy-t-shirt.gif"
-                #P"buy-right-line.gif"
-                #P"t-shirt-sample-background.gif"
-                #P"print-sample.jpg"
-                #P"button-bottom.gif"
-                #P"add-to-cart.gif" #P"checkout.gif"))
-  (handler-case
-      (import-image name)
-    (error (e)
-      (format t "~&; error importing ~S: ~A~%" name e))))
+(dolist (pathname '(#P"overlay-close.gif"
+                    #P"hey.gif"
+                    #P"buy.gif" #P"buy-top.gif" #P"buy-print.gif" #P"buy-file.gif" #P"buy-t-shirt.gif"
+                    #P"buy-right-line.gif"
+                    #P"t-shirt-sample-background.gif"
+                    #P"print-sample.jpg"
+                    #P"button-bottom.gif"
+                    #P"add-to-cart.gif" #P"checkout.gif"
+                    #P"pixel.png" #P"pixel-selected.png" #P"pixel-unselected.png" #P"pixel-hover.png"
+                    #P"vector.png" #P"vector-selected.png" #P"vector-unselected.png" #P"vector-hover.png"
+                    #P"news.png" #P"news-selected.png" #P"news-unselected.png" #P"news-hover.png"
+                    #P"shop.png" #P"shop-selected.png" #P"shop-unselected.png" #P"shop-hover.png"
+                    #P"contact.png" #P"contact-selected.png" #P"contact-unselected.png" #P"contact-hover.png"
+                    #P"quickhoney.png"))
+  (replace-image pathname))
 
 (import-image #p"news-sep.gif")
\ No newline at end of file




More information about the Bknr-cvs mailing list