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 14 comments

This is just a quick update to the jStockTicker code. I have applied the fix suggested by Shay in the jStockticker v1.1 comments.

New demo page here.
Archive: jStockTicker-1.1.1.tar.gz

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

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

This is just a quick update. I finally got around to find a place for live demos.

You can find the links on the Examples page.

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…

jStockTicker (a jQuery Stock Ticker made easy) v1.1

March 13, 2009 44 comments

[Update] Fixed source can be found here. Thanks to Shay and Julien.

I’ve been digging through my old work and found a nice javascript plugin that created a Stock Ticker. It made a good candidate to port it to jQuery.

So the jStockTicker plugin was born.

Basically it works with animating a div containing a sequence of spans. As soon as the second visible span reaches the edge of the visible area, the first span is appended to the end of the list.

Read more…

jCollapser example

March 10, 2009 14 comments

I’ve got a few requests to post example code to show how to use the new version of the jCollapser plugin.

So here we go :)
Read more…

[Update new version v1.2.2] jCollapser v1.2

March 9, 2009 11 comments

[UPDATE #2] New version more info here.

New version of the jQuery plugin jCollapser. See change log for changes.

Source can be found here.
Latest development source can be found in the SVN repository at http://code.google.com/p/progadv/source/checkout

Change Log:

v1.2.1:
-Fixed error with init time state settings.

v1.2:
-Add cookie state support
-Add initialization time state setting if cookie is not set.

v1.1:
-Restructure of code to allow multiple collapse elements on the same page

v1.0:
-Initial release

Twit This Post!

Follow

Get every new post delivered to your Inbox.