Fixed font/image handling.
[redact.git] / lib / redact / part.rb
index 313a29578feba103c968124d827db0d3238ec7e8..c9dc87f16e81e3645ebfa2aea37073fe46538ab4 100644 (file)
@@ -1,5 +1,5 @@
 #--
-# $Id: part.rb 47 2005-06-08 20:05:19Z tilman $
+# $Id: part.rb 49 2005-06-09 17:21:05Z tilman $
 #
 # Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
 #
@@ -405,7 +405,7 @@ module Redact
 
                        image = EDJE.image_dir.find { |e| e.filename == im2 }
                        if image.nil?
-                               image = ImageDirectoryEntry.new(im2)
+                               image = ImageDirectoryEntry.new(im, im2)
                                EDJE.image_dir << image
                        end
 
@@ -450,7 +450,7 @@ module Redact
 
                        @image = EDJE.image_dir.find { |e| e.filename == im2 }
                        if @image.nil?
-                               @image = ImageDirectoryEntry.new(im2)
+                               @image = ImageDirectoryEntry.new(im, im2)
                                EDJE.image_dir << @image
                        end
 
@@ -557,10 +557,10 @@ module Redact
 
                                found = EDJE.font_dir.find { |font| font.filename == f2 }
                                if found.nil?
-                                       EDJE.font_dir << FontDirectoryEntry.new(f2)
-                                       @font = EDJE.font_dir.last.filename
+                                       EDJE.font_dir << FontDirectoryEntry.new(f, f2)
+                                       @font = EDJE.font_dir.last.alias
                                else
-                                       @font = found.filename
+                                       @font = found.alias
                                end
                        else
                                @font = f