Growl Mail broken again with Mac OS X update 10.6.5

November 16, 2010 Leave a comment

Another Mac OS X update and Growl Mail is broken again.

There are several sites on the internet that detail how to re-enable Growl Mail. I found one that scripts it with AppleScript which I find quite useful so I’m going to put it here as well.

It is one of the comments on http://hints.macworld.com and thank you to the user tedw for coming up with it.

Here is the script:

tell application "System Events"
	-- recover uuids from Mail and framework info.plists
	set mailPlist to property list file "/Applications/Mail.app/Contents/Info.plist"
	set frameworkPlist to property list file "/System/Library/Frameworks/Message.framework/Resources/Info.plist"
	tell mailPlist
		set mailCompatUUID to the value of property list item "PluginCompatibilityUUID"
	end tell
	tell frameworkPlist
		set frameworkCompatUUID to the value of property list item "PluginCompatibilityUUID"
	end tell
	
	-- add to growlMail info,plist
	set growlmailPluginPaths to {"~/Library/Mail/Bundles/", "/Library/Mail/Bundles/", ¬
		"~/Library/Mail/Bundles (Disabled)/", "/Library/Mail/Bundles (Disabled)/"}
	repeat with thisPath in growlmailPluginPaths
		-- run through possible locations looking for the growlMail bundle
		if exists disk item (thisPath & "GrowlMail.mailbundle") then
			set growlmailPlist to ¬
				property list file (thisPath & "GrowlMail.mailbundle/Contents/Info.plist")
			tell growlmailPlist
				tell property list item "SupportedPluginCompatibilityUUIDs"
					-- check to see if uids exist, and add them if they don't
					set uuidList to its value
					if uuidList does not contain mailCompatUUID then
						make new property list item at end of property list items ¬
							with properties {value:mailCompatUUID}
					end if
					if uuidList does not contain frameworkCompatUUID then
						make new property list item at end of property list items ¬
							with properties {value:frameworkCompatUUID}
					end if
				end tell
			end tell
			
			-- try to move bundle into bundles folder if it's in disabled folder
			if thisPath contains "(Disabled)" then
				set enabledPath to path of disk item (text 1 thru -13 of thisPath)
				try
					move disk item (thisPath & "GrowlMail.mailbundle") to alias enabledPath
				on error
					--something (possibly permissions) went wrong
					say "Move failed"
					set theFolderPath to path of disk item thisPath
					tell application "Finder"
						activate
						open folder theFolderPath
					end tell
				end try
			end if
			exit repeat
		end if
	end repeat
end tell
Categories: Growl, Mac OS X, Tools Tags: ,

jCollapser v1.2.2

June 16, 2010 3 comments

This is a quick update that a minor fix has been applied to jCollapser.

This fix corrects the cookie naming to be RFC compliant, fixing an issue reported on plugins.jquery.com.

New example page is here.
Archive: jCollapser-1.2.2.tar.gz

Categories: JavaScript, jQuery Tags: ,

jStockTicker v1.1.1

June 16, 2010 15 comments

Days between two dates

Just a quick python function to calculate the days between two dates. It is really simple and easy :)

import datetime

def date_diff_days(from_date=datetime.date.today(),to_date=datetime.date.today() ):
    return (to_date - from_date).days

And an example to use it:

date1 = datetime.date(2009, 03, 26) 
date2 = datetime.date(2009, 07, 25) 

print date_diff_days( date1, date2 )

That’s it :)

Categories: Example, Python, Source code Tags: ,

Absolute positioning and z-index in Internet Explorer 6

July 19, 2009 6 comments

During my work I bumped into a silly little problem. Basically IE6 wouldn’t position one of the HTML elements correctly where as IE7 and the rest of the browsers I test with (Firefox, Safari) do.

I googled around a lot to find the solution and an explanation to the problem. Below are my findings.

The problem

<div class="container">
<h1><span>title</span></h1>
<img src="/someimage.jpg" alt="" /></div>

We want to position the <h1> element above the image. We do this by absolutely positioning it. We set position: relative for the container class and position: absolute for the <h1> tag. In firefox, safari and even in IE7 this works and positions the element as we want, but not in IE6.
Read more…

Examples

April 12, 2009 Leave a comment
Categories: Example, Source code Tags: , ,

jMover v1.2

March 16, 2009 3 comments

I have updated my jMover jQuery plugin to version 1.2. The new version includes moving all the elements between the 2 select boxes, auto creation of the select boxes and the buttons and automatically binding the click event handlers.

Read more…

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: