From fef3e7affdae95f310020c6a9276725ca2df9994 Mon Sep 17 00:00:00 2001 From: Maxime Gibeau Date: Thu, 15 Aug 2013 21:41:36 -0400 Subject: [PATCH 1/3] Fixed icon on OSX 10.8 --- lib/compass-growl.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/compass-growl.rb b/lib/compass-growl.rb index 9513ad1..c9bb3d9 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" @@ -22,7 +22,7 @@ def growl(type, message) :name => type, :title => "Compass", :text => message, - :icon => "file://#{ICON}" + :icon => ICON }) end From 0c8a709739cdbaba598cac7237ab2b8bec0caa6a Mon Sep 17 00:00:00 2001 From: Maxime Gibeau Date: Thu, 15 Aug 2013 21:42:05 -0400 Subject: [PATCH 2/3] Higher resolution icon --- assets/compass_icon.png | Bin 1246 -> 4118 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/compass_icon.png b/assets/compass_icon.png index 201edfc565dd6a23e89e348e5032eab758be47fb..d3f6ab18ab2a8596d8e11c3506bc07b7ec5c79bc 100644 GIT binary patch literal 4118 zcmV+x5b5uUP)xJg7oRCwC#TM3j@)tUb9d#~zMb#+zs zzR`^|JIxZ6&7-Ix1EawsoM6V7MB|JDF#{MyLo{X*6+@VeMvVy)(WoO18XQLvGbfX{ zC7_InxPX97quou@dv|SJ%iHh#_rB`x>b9zv>c)5yp1!8)ZTJ4)|NZNIMJT24x4e-v z0Gt8f3;<^U_^aJ?U4U5BV|BFq$%M)f@#IGTIsh;XfS!mSBHgN-bMh0i|~Li$(E1 zB8pLxU-a1nfCd6S`r(ne^vDNGP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GbXEW;Md_Ru`tgm7G=bTdreYt>{wy#XanJkts>CQm~lnXs;kf~u`V zd~FEbUf1E^W!o0new$76)0FN>k2_P*Fhmj(1CM?llWkZTAbkp4?VyE^b|8fM2CaJw1* z)Y`abE+1{A=fD?4FPta(`&lqUC@VJLf-;JpnhA6yM<5t;wI~_8!azfYdI=uiPvB@2 z)!&O}-XkLjq~H4hUDdA=^|cQ8#&FY85@*gt;3r!GBQ!9hqQca@88D~=p&=Xw!fD`~ zTFT6=`|vmah_7Zd0BsweLs>D3KRbdWYw`#H6^k&gq;#1rx*Y)k=Y#^3w1%BXgszjh zd^Nt>_h@@z3E|GO0EAnPacXG+zHRT4QnqBstOi5qPV&m%s2>x7>=mnWl^MFGkU{T( zJzV^_3eDjp_E!&9D2R*%!HUqcdo%tY_Qwq@84cknS(pfWpl+f>>*~eI{H+-=Y|~LP zIX&UjH}sLGx@gDi#_V z!$Nm}=ERwkPx`{g7T;dJu_4)-Hx-?=)tTM9w~fCgVE^g(8}J*>BRqxeYybcN07*qo IM6N<$f(*D=tN;K2 From d01cc1474a9338c8705f52a519c7b2ba6a2272e1 Mon Sep 17 00:00:00 2001 From: Maxime Gibeau Date: Thu, 15 Aug 2013 21:48:32 -0400 Subject: [PATCH 3/3] Improvements to the notification --- lib/compass-growl.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/compass-growl.rb b/lib/compass-growl.rb index c9bb3d9..a10670e 100644 --- a/lib/compass-growl.rb +++ b/lib/compass-growl.rb @@ -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 => 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