X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=lib%2Fredact%2Fredact.rb;h=581c4c4297739fd0667a039ce675bfe16ed37098;hb=eabefe8c75ede2bdf39853e56c5d59984893decc;hp=70f6770e8af618abdc24b9f62ddd1595ce611aba;hpb=2815a23df18ddbaf3e0be81e013f869658829e61;p=redact.git diff --git a/lib/redact/redact.rb b/lib/redact/redact.rb index 70f6770..581c4c4 100644 --- a/lib/redact/redact.rb +++ b/lib/redact/redact.rb @@ -1,5 +1,5 @@ #-- -# $Id: redact.rb 35 2005-04-25 17:14:49Z tilman $ +# $Id: redact.rb 53 2005-06-11 13:21:38Z tilman $ # # Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de) # @@ -57,7 +57,7 @@ class String end module Redact - VERSION = "0.1.1" + VERSION = "0.1.2" class RedactError < StandardError; end @@ -142,10 +142,12 @@ module Redact end class FontDirectoryEntry # :nodoc: - attr_reader :filename + attr_reader :save_as, :filename, :alias - def initialize(filename) + def initialize(fn_alias, filename) + @save_as = fn_alias.to_str.dup.freeze @filename = filename.to_str.dup.freeze + @alias = "Edje." + fn_alias.sub(/.[^.]+$/, "").freeze end protected @@ -154,7 +156,7 @@ module Redact end def to_eet_properties - {"entry" => [@filename]} + {"entry" => [@alias]} end end @@ -178,7 +180,8 @@ module Redact class ImageDirectoryEntry # :nodoc: attr_reader :filename, :image, :id - def initialize(filename) + def initialize(im_alias, filename) + @alias = im_alias.to_str.dup.freeze @filename = filename.to_str.dup.freeze @image = Imlib2::Image.load(@filename) @id = -1 @@ -202,7 +205,7 @@ module Redact end def to_eet_properties - {"entry" => [@filename], + {"entry" => [@alias], "source_type" => [@source_type], "source_param" => [@source_param], "id" => [@id]}