diff --git a/assets/compass_icon.png b/assets/compass_icon.png index 201edfc..d3f6ab1 100644 Binary files a/assets/compass_icon.png and b/assets/compass_icon.png differ diff --git a/lib/compass-growl.rb b/lib/compass-growl.rb index 9513ad1..a10670e 100644 --- a/lib/compass-growl.rb +++ b/lib/compass-growl.rb @@ -4,8 +4,8 @@ module CompassGrowl - ICON = File.join(File.expand_path('../', __FILE__), '..', 'assets', 'compass_icon.png') - GROWL = GNTP.new + ICON = File.join(File.expand_path('../../', __FILE__), 'assets', 'compass_icon.png') + GROWL = GNTP.new("Compass", "127.0.0.1") LOADED = "Compass Growl Loaded" STYLESHEET_SAVED = "Stylesheet Saved" @@ -17,30 +17,31 @@ module CompassGrowl { :name => STYLESHEET_ERROR, :enabled => true }] }) - def growl(type, message) + def growl(type, title, message, sticky = false) GROWL.notify({ :name => type, - :title => "Compass", + :title => title, :text => message, - :icon => "file://#{ICON}" + :icon => ICON, + :sticky => sticky }) end def init - CompassGrowl.growl(STYLESHEET_ERROR, "Compass Growl has been initialized") + CompassGrowl.growl(LOADED, "Init", "Compass Growl has been initialized") config = Compass.configuration config.on_stylesheet_saved do |filename| - CompassGrowl.growl(STYLESHEET_SAVED, "Stylesheet: #{File.basename(filename)} saved") + CompassGrowl.growl(STYLESHEET_SAVED, "Stylesheet", "#{File.basename(filename)} saved") end config.on_sprite_saved do |filename| - CompassGrowl.growl(SPRITE_SAVED, "Sprite: #{File.basename(filename)} saved") + CompassGrowl.growl(SPRITE_SAVED, "Sprite", "#{File.basename(filename)} saved") end config.on_stylesheet_error do |filename, error| - CompassGrowl.growl(STYLESHEET_ERROR, "Stylesheet Error: #{File.basename(filename)} \n had the following error:\n #{error}") + CompassGrowl.growl(STYLESHEET_ERROR, "Stylesheet Error", "#{File.basename(filename)} had the following error:\n #{error}", true) end end