34 |
plugin[ICON_PATH].subscribe do |event, slot| |
plugin[ICON_PATH].subscribe do |event, slot| |
35 |
if event == :notify_slot_add |
if event == :notify_slot_add |
36 |
app = plugin['/system/ui/fox/FXApp'].data |
app = plugin['/system/ui/fox/FXApp'].data |
37 |
path = "#{plugin.plugin_configuration.base_path}/icons/#{slot.name}.png" |
path = "#{plugin.plugin_configuration.full_base_path}/icons/#{slot.name}.png" |
38 |
if FileTest.exist?(path) |
if FileTest.exist?(path) |
39 |
slot.data = Fox::FXPNGIcon.new(app, File.open(path, "rb").read) |
slot.data = Fox::FXPNGIcon.new(app, File.open(path, "rb").read) |
40 |
slot.data.create |
slot.data.create |