<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -48,15 +48,15 @@ class AccountDetailController &lt; OSX::NSWindowController
   end
   
   def awakeFromNib
-  	@soundList.removeAllItems
+    @soundList.removeAllItems
     @soundList.addItemWithTitle(GNSound::SOUND_NONE)
     @soundList.menu.addItem(NSMenuItem.separatorItem)
     GNSound.all.each { |s| @soundList.addItemWithTitle(s) }
-		@soundList.selectItemWithTitle(@account.sound)
+    @soundList.selectItemWithTitle(@account.sound)
     
- 		@interval.setTitleWithMnemonic(@account.interval.to_s)
+    @interval.setTitleWithMnemonic(@account.interval.to_s)
     @accountEnabled.setState(@account.enabled? ? NSOnState : NSOffState)
-		@growl.setState(@account.growl ? NSOnState : NSOffState)
+    @growl.setState(@account.growl ? NSOnState : NSOffState)
     @username.setTitleWithMnemonic(@account.username)
     @password.setTitleWithMnemonic(@account.password)
     
@@ -77,10 +77,10 @@ class AccountDetailController &lt; OSX::NSWindowController
   end
   
   def okay(sender)
-		@account.sound = @soundList.titleOfSelectedItem
-  	@account.interval = @interval.integerValue
+    @account.sound = @soundList.titleOfSelectedItem
+    @account.interval = @interval.integerValue
     @account.enabled = @accountEnabled.state == NSOnState ? true : false
-		@account.growl = @growl.state == NSOnState ? true : false
+    @account.growl = @growl.state == NSOnState ? true : false
     @account.username = @username.stringValue
     @account.password = @password.stringValue
     @account.save
@@ -89,10 +89,10 @@ class AccountDetailController &lt; OSX::NSWindowController
   end
   
   def soundSelect(sender)
-		if sound = NSSound.soundNamed(@soundList.titleOfSelectedItem)
-			sound.play
-		end
-	end
+    if sound = NSSound.soundNamed(@soundList.titleOfSelectedItem)
+      sound.play
+    end
+  end
   
   def sheetDidEnd_returnCode_contextInfo(sheet, code, info)
     sheet.orderOut(nil)</diff>
      <filename>AccountDetailController.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,38 +16,38 @@ OSX.ruby_thread_switcher_stop
 
 class ApplicationController &lt; OSX::NSObject
 
-	ACCOUNT_MENUITEM_POS = 2
+  ACCOUNT_MENUITEM_POS = 2
   CHECK_MENUITEM_POS = 1
   ENABLE_MENUITEM_POS = 2
   DEFAULT_ACCOUNT_SUBMENU_COUNT = 4
-	DONATE_URL = &quot;http://www.pledgie.com/campaigns/2046&quot;
+  DONATE_URL = &quot;http://www.pledgie.com/campaigns/2046&quot;
 
-	ib_outlet :menu
-	ib_action :openInbox
-	ib_action :checkAll
-	ib_action :showAbout
-	ib_action :showPreferencesWindow
-	ib_action :donate
+  ib_outlet :menu
+  ib_action :openInbox
+  ib_action :checkAll
+  ib_action :showAbout
+  ib_action :showPreferencesWindow
+  ib_action :donate
 
-		
-	def	awakeFromNib
-		@status_bar = NSStatusBar.systemStatusBar
-		@status_item = @status_bar.statusItemWithLength(NSVariableStatusItemLength)
-		@status_item.setHighlightMode(true)
-		@status_item.setMenu(@menu)
-		
-		@app_icon = NSImage.imageNamed('app.tiff')
-		@app_alter_icon = NSImage.imageNamed('app_a.tiff')
-		@mail_icon = NSImage.imageNamed('mail.tiff')
-		@mail_alter_icon = NSImage.imageNamed('mail_a.tiff')
-		@check_icon = NSImage.imageNamed('check.tiff')
-		@check_alter_icon = NSImage.imageNamed('check_a.tiff')
-		@error_icon = NSImage.imageNamed('error.tiff')
-		
-		@status_item.setImage(@app_icon)
-		@status_item.setAlternateImage(@app_alter_icon)
-		
-		GNPreferences::setupDefaults
+    
+  def awakeFromNib
+    @status_bar = NSStatusBar.systemStatusBar
+    @status_item = @status_bar.statusItemWithLength(NSVariableStatusItemLength)
+    @status_item.setHighlightMode(true)
+    @status_item.setMenu(@menu)
+    
+    @app_icon = NSImage.imageNamed('app.tiff')
+    @app_alter_icon = NSImage.imageNamed('app_a.tiff')
+    @mail_icon = NSImage.imageNamed('mail.tiff')
+    @mail_alter_icon = NSImage.imageNamed('mail_a.tiff')
+    @check_icon = NSImage.imageNamed('check.tiff')
+    @check_alter_icon = NSImage.imageNamed('check_a.tiff')
+    @error_icon = NSImage.imageNamed('error.tiff')
+    
+    @status_item.setImage(@app_icon)
+    @status_item.setAlternateImage(@app_alter_icon)
+    
+    GNPreferences::setupDefaults
     
     registerObservers
 
@@ -56,18 +56,18 @@ class ApplicationController &lt; OSX::NSObject
     setupMenu
     
     setupCheckers
-	end
-	
-	def	openInbox(sender)
-		if sender.title == NSLocalizedString(&quot;Open Inbox&quot;)
-			# &quot;Open Inbox&quot; menu item
-			account = accountForGuid(sender.menu.title)
-		else
-			# top menu item for account
-			account = accountForGuid(sender.submenu.title)
-		end
-		openInboxForAccount(account)
-	end
+  end
+  
+  def openInbox(sender)
+    if sender.title == NSLocalizedString(&quot;Open Inbox&quot;)
+      # &quot;Open Inbox&quot; menu item
+      account = accountForGuid(sender.menu.title)
+    else
+      # top menu item for account
+      account = accountForGuid(sender.submenu.title)
+    end
+    openInboxForAccount(account)
+  end
   
   def toggleAccount(sender)
     account = accountForGuid(sender.menu.title)
@@ -78,32 +78,32 @@ class ApplicationController &lt; OSX::NSObject
     checkerForAccount(account).reset
   end
 
-	def openMessage(sender)
-		NSWorkspace.sharedWorkspace.openURL(NSURL.URLWithString(sender.representedObject))
-	end
+  def openMessage(sender)
+    NSWorkspace.sharedWorkspace.openURL(NSURL.URLWithString(sender.representedObject))
+  end
 
-	def checkAll(sender)
-		checkAllAccounts
-	end
+  def checkAll(sender)
+    checkAllAccounts
+  end
     
   def checkAccount(sender)
     account = accountForGuid(sender.menu.title)
     checkerForAccount(account).reset
   end
-	
-	def	showAbout(sender)
-		NSApplication.sharedApplication.activateIgnoringOtherApps(true)
-		NSApplication.sharedApplication.orderFrontStandardAboutPanel(sender)
-	end
-	
-	def	showPreferencesWindow(sender)	
-		NSApplication.sharedApplication.activateIgnoringOtherApps(true)
-		PreferencesController.sharedController.showWindow(sender)
-	end
+  
+  def showAbout(sender)
+    NSApplication.sharedApplication.activateIgnoringOtherApps(true)
+    NSApplication.sharedApplication.orderFrontStandardAboutPanel(sender)
+  end
+  
+  def showPreferencesWindow(sender) 
+    NSApplication.sharedApplication.activateIgnoringOtherApps(true)
+    PreferencesController.sharedController.showWindow(sender)
+  end
 
-	def	donate(sender)
-		NSWorkspace.sharedWorkspace.openURL(NSURL.URLWithString(DONATE_URL))
-	end
+  def donate(sender)
+    NSWorkspace.sharedWorkspace.openURL(NSURL.URLWithString(DONATE_URL))
+  end
   
   def updateMenuBarCount(notification = nil)
     msgCount = messageCount
@@ -157,7 +157,7 @@ class ApplicationController &lt; OSX::NSObject
     @status_item.setAlternateImage(@check_alter_icon)
   end
   
-  def	updateAccountMenuItem(notification)
+  def updateAccountMenuItem(notification)
     account = accountForGuid(notification.userInfo[:guid])
     menuItem = menuItemForAccount(account)
     menuItem.title = account.username
@@ -198,15 +198,15 @@ class ApplicationController &lt; OSX::NSObject
     end
   
     updateMenuBarCount
-	end
+  end
   
   # delegate not working if :click_context not provided?
-	def growlNotifierClicked_context(sender, context)
-		openInboxForAccountName(context) if context
-	end
+  def growlNotifierClicked_context(sender, context)
+    openInboxForAccountName(context) if context
+  end
 
-	def growlNotifierTimedOut_context(sender, context)
-	end
+  def growlNotifierTimedOut_context(sender, context)
+  end
 
   private
   
@@ -303,16 +303,16 @@ class ApplicationController &lt; OSX::NSObject
   def addAccountMenuItem(account, index)
     accountMenu = NSMenu.alloc.initWithTitle(account.guid)
     accountMenu.setAutoenablesItems(false)
-		
-		#open inbox menu item
-		openInboxItem = accountMenu.addItemWithTitle_action_keyEquivalent(NSLocalizedString(&quot;Open Inbox&quot;), &quot;openInbox&quot;, &quot;&quot;)
-		openInboxItem.target = self
-		openInboxItem.enabled = true
+    
+    #open inbox menu item
+    openInboxItem = accountMenu.addItemWithTitle_action_keyEquivalent(NSLocalizedString(&quot;Open Inbox&quot;), &quot;openInbox&quot;, &quot;&quot;)
+    openInboxItem.target = self
+    openInboxItem.enabled = true
     
     #check menu item
     checkItem = accountMenu.addItemWithTitle_action_keyEquivalent(NSLocalizedString(&quot;Check&quot;), &quot;checkAccount&quot;, &quot;&quot;)
-		checkItem.target = self
-		checkItem.enabled = account.enabled?
+    checkItem.target = self
+    checkItem.enabled = account.enabled?
     
     #enable/disable menu item
     enableAccountItem = accountMenu.addItemWithTitle_action_keyEquivalent(
@@ -321,17 +321,17 @@ class ApplicationController &lt; OSX::NSObject
     )
     enableAccountItem.target = self
     enableAccountItem.enabled = true
-		
-		accountMenu.addItem(NSMenuItem.separatorItem)
+    
+    accountMenu.addItem(NSMenuItem.separatorItem)
     
     #top level menu item for acount
-		accountItem = NSMenuItem.alloc.init
-		accountItem.title = account.username
-		accountItem.submenu = accountMenu
-		accountItem.target = self
-		accountItem.action = 'openInbox'
+    accountItem = NSMenuItem.alloc.init
+    accountItem.title = account.username
+    accountItem.submenu = accountMenu
+    accountItem.target = self
+    accountItem.action = 'openInbox'
 
-		@status_item.menu.insertItem_atIndex(accountItem, ACCOUNT_MENUITEM_POS + index)
+    @status_item.menu.insertItem_atIndex(accountItem, ACCOUNT_MENUITEM_POS + index)
   end
   
   def menuItemForAccount(account)
@@ -347,16 +347,16 @@ class ApplicationController &lt; OSX::NSObject
     menu.itemAtIndex(ENABLE_MENUITEM_POS).title = account.enabled? ? NSLocalizedString(&quot;Disable&quot;) : NSLocalizedString(&quot;Enable&quot;)
     menu.itemAtIndex(CHECK_MENUITEM_POS).enabled = account.enabled?
   end
-  	
-	def	openInboxForAccount(account)
+    
+  def openInboxForAccount(account)
     openInboxForAccountName(account.username)
-	end
+  end
   
-  def	openInboxForAccountName(name)
-		account_domain = name.split(&quot;@&quot;)
-		
-		inbox_url = (account_domain.length == 2 &amp;&amp; ![&quot;gmail.com&quot;, &quot;googlemail.com&quot;].include?(account_domain[1])) ? 
-			&quot;https://mail.google.com/a/#{account_domain[1]}&quot; : &quot;https://mail.google.com/mail&quot;
-		NSWorkspace.sharedWorkspace.openURL(NSURL.URLWithString(inbox_url))
-	end
+  def openInboxForAccountName(name)
+    account_domain = name.split(&quot;@&quot;)
+    
+    inbox_url = (account_domain.length == 2 &amp;&amp; ![&quot;gmail.com&quot;, &quot;googlemail.com&quot;].include?(account_domain[1])) ? 
+      &quot;https://mail.google.com/a/#{account_domain[1]}&quot; : &quot;https://mail.google.com/mail&quot;
+    NSWorkspace.sharedWorkspace.openURL(NSURL.URLWithString(inbox_url))
+  end
 end</diff>
      <filename>ApplicationController.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,25 +13,25 @@ class GNAccount &lt; OSX::NSObject
 
   attr_accessor :guid, :username, :password, :interval, :enabled, :sound, :growl
   Properties = [:guid, :username, :interval, :enabled, :sound, :growl]
-  	
-	MIN_INTERVAL		= 1
-	MAX_INTERVAL		= 300
-	DEFAULT_INTERVAL	= 30
+    
+  MIN_INTERVAL    = 1
+  MAX_INTERVAL    = 300
+  DEFAULT_INTERVAL  = 30
 
-	def init
-		self.password = GNKeychain.sharedInstance.get_password(@username)
-		super_init
-	end
+  def init
+    self.password = GNKeychain.sharedInstance.get_password(@username)
+    super_init
+  end
 
-	def	initWithNameIntervalEnabledGrowlSound(username, interval, enabled, growl, sound)
-		self.username = username    
+  def initWithNameIntervalEnabledGrowlSound(username, interval, enabled, growl, sound)
+    self.username = username    
     self.interval = interval || DEFAULT_INTERVAL
     self.enabled = enabled
     self.growl = growl
     self.sound = sound || GNSound::SOUND_NONE
     
-		init
-	end
+    init
+  end
   
   def initWithCoder(coder)
     Properties.each do |prop|
@@ -70,28 +70,28 @@ class GNAccount &lt; OSX::NSObject
     @growl = val
     @growl = false if val == 0
   end
-	
-	def	username=(new_username)
-		@old_username ||= @username
-		@username = new_username
-	end
-	
-	def	password=(new_password)
-		@old_password ||= @password
-		@password = new_password
-	end
-	
-	def	username_changed?
-		@old_username &amp;&amp; @old_username != @username
-	end
-	
-	def	password_changed?
-		@old_password &amp;&amp; @old_password != @password
-	end
-	
-	def changed?
-		username_changed? || password_changed? #todo
-	end
+  
+  def username=(new_username)
+    @old_username ||= @username
+    @username = new_username
+  end
+  
+  def password=(new_password)
+    @old_password ||= @password
+    @password = new_password
+  end
+  
+  def username_changed?
+    @old_username &amp;&amp; @old_username != @username
+  end
+  
+  def password_changed?
+    @old_password &amp;&amp; @old_password != @password
+  end
+  
+  def changed?
+    username_changed? || password_changed? #todo
+  end
   
   def new?
     @guid.nil?</diff>
      <filename>GNAccount.rb</filename>
    </modified>
    <modified>
      <diff>@@ -83,21 +83,21 @@ class GNChecker &lt; OSX::NSObject
     end
   end
   
-  def	checkMail				
-		reset
-	end
-	
-	def	checkResult(notification)  
+  def checkMail       
+    reset
+  end
+  
+  def checkResult(notification)  
     @checkedAt = DateTime.now
     
-		preferences = GNPreferences.sharedInstance
+    preferences = GNPreferences.sharedInstance
 
-		results = YAML.load(
-			NSString.alloc.initWithData_encoding(
-				notification.userInfo.valueForKey(NSFileHandleNotificationDataItem),
-				NSUTF8StringEncoding
-			)
-		)
+    results = YAML.load(
+      NSString.alloc.initWithData_encoding(
+        notification.userInfo.valueForKey(NSFileHandleNotificationDataItem),
+        NSUTF8StringEncoding
+      )
+    )
     
     result = results[@account.username.to_s]
     return unless result
@@ -142,10 +142,10 @@ class GNChecker &lt; OSX::NSObject
       
       notify(@account.username, [unreadCount, info].join(&quot;\n\n&quot;))
     end
-		if shouldNotify &amp;&amp; @account.sound != GNSound::SOUND_NONE &amp;&amp; sound = NSSound.soundNamed(@account.sound)
-			sound.play
-		end
-	end
+    if shouldNotify &amp;&amp; @account.sound != GNSound::SOUND_NONE &amp;&amp; sound = NSSound.soundNamed(@account.sound)
+      sound.play
+    end
+  end
   
   def checkedAt
     @checkedAt ? @checkedAt.strftime(&quot;%H:%M&quot;) : &quot;NA&quot;
@@ -156,14 +156,14 @@ class GNChecker &lt; OSX::NSObject
   end
   
   def notify(title, desc)
-		Growl::Notifier.sharedInstance.notify('new_messages', title, desc, :click_context =&gt; title)
-	end
+    Growl::Notifier.sharedInstance.notify('new_messages', title, desc, :click_context =&gt; title)
+  end
   
   def cleanup
     @checker.interrupt and @checker = nil if @checker
     @timer.invalidate if @timer
     
-		if @pipe
+    if @pipe
       NSNotificationCenter.defaultCenter.removeObserver_name_object(self, NSFileHandleReadToEndOfFileCompletionNotification, @pipe.fileHandleForReading)
     end
   end</diff>
      <filename>GNChecker.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,72 +10,72 @@ require 'osx/cocoa'
 OSX.require_framework 'Security'
 
 class GNKeychain &lt; OSX::NSObject
-	include OSX	
-	SERVICE = &quot;GmailNotifr&quot;
+  include OSX 
+  SERVICE = &quot;GmailNotifr&quot;
   
     
   def self.sharedInstance
     @instance ||= self.alloc.init
   end
-	
-	def	set_account(username, password)
-		return if username.nil? || password.nil?
-		pass = &quot;#{password}&quot;
-		error = SecKeychainAddGenericPassword(
-			nil,
-			SERVICE.length,
-			SERVICE,
-			username.length,
-			username,
-			pass.length,
-			pass,
-			nil)
-			
-		#already set
-		if error == OSX::ErrSecDuplicateItem
-			status, *data = SecKeychainFindGenericPassword(
-				nil,
-				SERVICE.length,
-				SERVICE,
-				username.length,
-				username)
-			data.shift
-			data.shift
-			item = data.shift #SecKeychainItemRef
-			SecKeychainItemModifyContent(item, nil, pass.length, pass)
-		end
-	end
+  
+  def set_account(username, password)
+    return if username.nil? || password.nil?
+    pass = &quot;#{password}&quot;
+    error = SecKeychainAddGenericPassword(
+      nil,
+      SERVICE.length,
+      SERVICE,
+      username.length,
+      username,
+      pass.length,
+      pass,
+      nil)
+      
+    #already set
+    if error == OSX::ErrSecDuplicateItem
+      status, *data = SecKeychainFindGenericPassword(
+        nil,
+        SERVICE.length,
+        SERVICE,
+        username.length,
+        username)
+      data.shift
+      data.shift
+      item = data.shift #SecKeychainItemRef
+      SecKeychainItemModifyContent(item, nil, pass.length, pass)
+    end
+  end
   
   def delete_account(username)
-  	return if username.nil?
-		status, *data = SecKeychainFindGenericPassword(
-			nil,
-			SERVICE.length,
-			SERVICE,
-			username.length,
-			username)
-		if status == 0
-			data.shift
-			data.shift
-			item = data.shift
+    return if username.nil?
+    status, *data = SecKeychainFindGenericPassword(
+      nil,
+      SERVICE.length,
+      SERVICE,
+      username.length,
+      username)
+    if status == 0
+      data.shift
+      data.shift
+      item = data.shift
       SecKeychainItemDelete(item)
-		end
+    end
+  end
+  
+  def get_password(username)
+    return &quot;&quot; if username.nil?
+    status, *data = SecKeychainFindGenericPassword(
+      nil,
+      SERVICE.length,
+      SERVICE,
+      username.length,
+      username)
+    if status == 0
+      password_length = data.shift
+      password_data = data.shift
+      password = password_data.bytestr(password_length)
+    else
+      &quot;&quot;
+    end
   end
-	
-	def	get_password(username)
-		return &quot;&quot; if username.nil?
-		status, *data = SecKeychainFindGenericPassword(
-			nil,
-			SERVICE.length,
-			SERVICE,
-			username.length,
-			username)
-		if status == 0
-			password_length = data.shift
-			password_data = data.shift
-			password = password_data.bytestr(password_length)
-		else
-			&quot;&quot;
-		end
-	end
 end</diff>
      <filename>GNKeychain.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,20 +9,20 @@
 require 'osx/cocoa'
 
 # a simple wrapper for preferences values
-class GNPreferences &lt; OSX::NSObject			
+class GNPreferences &lt; OSX::NSObject     
 
-	attr_accessor :accounts, :autoLaunch, :showUnreadCount
+  attr_accessor :accounts, :autoLaunch, :showUnreadCount
   
   def self.sharedInstance
     @instance ||= self.alloc.init
   end
-	
-	def	init
-		super_init
-		
-		defaults = NSUserDefaults.standardUserDefaults
+  
+  def init
+    super_init
+    
+    defaults = NSUserDefaults.standardUserDefaults
 
-		@accounts	= NSMutableArray.alloc.init
+    @accounts = NSMutableArray.alloc.init
     
     
     if archivedAccounts = defaults.objectForKey(Accounts)
@@ -32,8 +32,8 @@ class GNPreferences &lt; OSX::NSObject
     # from version &lt;= 0.4.3
     if @accounts.count == 0 &amp;&amp; usernames = defaults.stringArrayForKey(&quot;usernames&quot;)
       interval = defaults.integerForKey(&quot;interval&quot;)
-      growl	= defaults.boolForKey(&quot;growl&quot;)
-      sound	= defaults.stringForKey(&quot;sound&quot;) || GNSound::SOUND_NONE
+      growl = defaults.boolForKey(&quot;growl&quot;)
+      sound = defaults.stringForKey(&quot;sound&quot;) || GNSound::SOUND_NONE
       
       usernames.each do |u|
         account = GNAccount.alloc.initWithNameIntervalEnabledGrowlSound(u, interval, true, growl, sound)
@@ -48,18 +48,18 @@ class GNPreferences &lt; OSX::NSObject
       writeBack
     end
 
-		@autoLaunch = GNStartItems.alloc.init.isSet
-		@showUnreadCount = defaults.boolForKey(ShowUnreadCount)
+    @autoLaunch = GNStartItems.alloc.init.isSet
+    @showUnreadCount = defaults.boolForKey(ShowUnreadCount)
 
-		self
-	end
+    self
+  end
   
   def autoLaunch?
     GNStartItems.alloc.init.isSet
   end
     
   def autoLaunch=(val)
-		GNStartItems.alloc.init.set(val)
+    GNStartItems.alloc.init.set(val)
   end
   
   def showUnreadCount?
@@ -67,7 +67,7 @@ class GNPreferences &lt; OSX::NSObject
   end
   
   def showUnreadCount=(val)
-		NSUserDefaults.standardUserDefaults.setObject_forKey(val, ShowUnreadCount)
+    NSUserDefaults.standardUserDefaults.setObject_forKey(val, ShowUnreadCount)
     NSUserDefaults.standardUserDefaults.synchronize
     NSNotificationCenter.defaultCenter.postNotificationName_object(GNShowUnreadCountChangedNotification, self)
   end
@@ -92,35 +92,35 @@ class GNPreferences &lt; OSX::NSObject
     writeBack
     NSNotificationCenter.defaultCenter.postNotificationName_object_userInfo(GNAccountChangedNotification, self, :guid =&gt; account.guid)
   end
-	
-	def writeBack
-		defaults = NSUserDefaults.standardUserDefaults
-				
-		defaults.setObject_forKey(
+  
+  def writeBack
+    defaults = NSUserDefaults.standardUserDefaults
+        
+    defaults.setObject_forKey(
       @accounts.map { |a| NSKeyedArchiver.archivedDataWithRootObject(a) },
       Accounts
     )
 
-		# save to Info.plist
-		defaults.synchronize	
-		
-		# save accounts to default keychain
-		@accounts.each do |account|
-			GNKeychain.sharedInstance.set_account(account.username, account.password)
-		end
-		
-	end
-	
-	class &lt;&lt; self
-		def setupDefaults
-			NSUserDefaults.standardUserDefaults.registerDefaults(
-				NSDictionary.dictionaryWithObjectsAndKeys(
-					true, ShowUnreadCount,
+    # save to Info.plist
+    defaults.synchronize  
+    
+    # save accounts to default keychain
+    @accounts.each do |account|
+      GNKeychain.sharedInstance.set_account(account.username, account.password)
+    end
+    
+  end
+  
+  class &lt;&lt; self
+    def setupDefaults
+      NSUserDefaults.standardUserDefaults.registerDefaults(
+        NSDictionary.dictionaryWithObjectsAndKeys(
+          true, ShowUnreadCount,
           PrefsToolbarItemAccounts, PreferencesSelection,
-					nil
-				)
-			)
-		end
-	end
-	
+          nil
+        )
+      )
+    end
+  end
+  
 end</diff>
      <filename>GNPreferences.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,39 +10,39 @@ require 'osx/cocoa'
 
 class GNSound &lt; OSX::NSObject
 
-	SOUND_NONE = &quot;None&quot; #NSLocalizedString(&quot;Sound None&quot;)
+  SOUND_NONE = &quot;None&quot; #NSLocalizedString(&quot;Sound None&quot;)
   
   @@soundList = []
   
-	class &lt;&lt; self
-		
-		def	all
-			return @@soundList if @@soundList.size &gt; 0			
-					
-			@@soundList.clear
+  class &lt;&lt; self
+    
+    def all
+      return @@soundList if @@soundList.size &gt; 0      
+          
+      @@soundList.clear
 
-			knownSoundTypes = NSSound.soundUnfilteredFileTypes
-			libs = NSSearchPathForDirectoriesInDomains(
-				NSLibraryDirectory,
-				NSUserDomainMask | NSLocalDomainMask | NSSystemDomainMask,
-				true
-			)
-			
-			fileManager = NSFileManager.defaultManager
-			
-			libs.each do |folder|
-				folder_name = File.join(folder, &quot;Sounds&quot;)
-				if fileManager.fileExistsAtPath_isDirectory(folder_name, nil)
-					fileManager.directoryContentsAtPath(folder_name).each do |file|
-						if knownSoundTypes.include?(file.pathExtension)						
-							@@soundList &lt;&lt; file.stringByDeletingPathExtension
-						end
-					end
-				end
-			end
+      knownSoundTypes = NSSound.soundUnfilteredFileTypes
+      libs = NSSearchPathForDirectoriesInDomains(
+        NSLibraryDirectory,
+        NSUserDomainMask | NSLocalDomainMask | NSSystemDomainMask,
+        true
+      )
+      
+      fileManager = NSFileManager.defaultManager
+      
+      libs.each do |folder|
+        folder_name = File.join(folder, &quot;Sounds&quot;)
+        if fileManager.fileExistsAtPath_isDirectory(folder_name, nil)
+          fileManager.directoryContentsAtPath(folder_name).each do |file|
+            if knownSoundTypes.include?(file.pathExtension)           
+              @@soundList &lt;&lt; file.stringByDeletingPathExtension
+            end
+          end
+        end
+      end
 
-			@@soundList.sort!
-		end
-	end
+      @@soundList.sort!
+    end
+  end
 
 end</diff>
      <filename>GNSound.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,64 +10,64 @@ require 'osx/cocoa'
 
 class GNStartItems &lt; OSX::NSObject
 
-	def	isSet
-		cf = OSX::CFPreferencesCopyValue(
-			&quot;AutoLaunchedApplicationDictionary&quot;,
-			&quot;loginwindow&quot;,
-			OSX::KCFPreferencesCurrentUser,
-			OSX::KCFPreferencesAnyHost
-		)
-		
-		return false unless cf
+  def isSet
+    cf = OSX::CFPreferencesCopyValue(
+      &quot;AutoLaunchedApplicationDictionary&quot;,
+      &quot;loginwindow&quot;,
+      OSX::KCFPreferencesCurrentUser,
+      OSX::KCFPreferencesAnyHost
+    )
+    
+    return false unless cf
 
-		cf.any? { |app| path == app[&quot;Path&quot;] }
-	end
-	
-	def	set(autoLaunch)
-		if autoLaunch != isSet
-			cf = OSX::CFPreferencesCopyValue(
-				&quot;AutoLaunchedApplicationDictionary&quot;,
-				&quot;loginwindow&quot;,
-				OSX::KCFPreferencesCurrentUser,
-				OSX::KCFPreferencesAnyHost
-			)
-			
-			if cf
-				cf = cf.mutableCopy
-			else
-				cf = NSMutableArray.alloc.init
-			end
-			
-			if autoLaunch
-				#add
-				#cf &lt;&lt; { &quot;Path&quot; =&gt; path }
-				cf.addObject(NSDictionary.dictionaryWithObject_forKey(path, &quot;Path&quot;))
-			else
-				#remove
-				to_remove = nil
-				cf.each do |app|
-					to_remove = app and break if app.valueForKey(&quot;Path&quot;) == path
-				end
-				cf.removeObject(to_remove) if to_remove
-			end
-			
-			OSX::CFPreferencesSetValue(
-				&quot;AutoLaunchedApplicationDictionary&quot;,
-				cf,
-				&quot;loginwindow&quot;,
-				OSX::KCFPreferencesCurrentUser,
-				OSX::KCFPreferencesAnyHost
-			)
-			
-			OSX::CFPreferencesSynchronize(
-				&quot;loginwindow&quot;,
-				OSX::KCFPreferencesCurrentUser,
-				OSX::KCFPreferencesAnyHost
-			)
-		end
-	end
-	
-	def	path
-		@path ||= NSBundle.mainBundle.bundlePath
-	end
+    cf.any? { |app| path == app[&quot;Path&quot;] }
+  end
+  
+  def set(autoLaunch)
+    if autoLaunch != isSet
+      cf = OSX::CFPreferencesCopyValue(
+        &quot;AutoLaunchedApplicationDictionary&quot;,
+        &quot;loginwindow&quot;,
+        OSX::KCFPreferencesCurrentUser,
+        OSX::KCFPreferencesAnyHost
+      )
+      
+      if cf
+        cf = cf.mutableCopy
+      else
+        cf = NSMutableArray.alloc.init
+      end
+      
+      if autoLaunch
+        #add
+        #cf &lt;&lt; { &quot;Path&quot; =&gt; path }
+        cf.addObject(NSDictionary.dictionaryWithObject_forKey(path, &quot;Path&quot;))
+      else
+        #remove
+        to_remove = nil
+        cf.each do |app|
+          to_remove = app and break if app.valueForKey(&quot;Path&quot;) == path
+        end
+        cf.removeObject(to_remove) if to_remove
+      end
+      
+      OSX::CFPreferencesSetValue(
+        &quot;AutoLaunchedApplicationDictionary&quot;,
+        cf,
+        &quot;loginwindow&quot;,
+        OSX::KCFPreferencesCurrentUser,
+        OSX::KCFPreferencesAnyHost
+      )
+      
+      OSX::CFPreferencesSynchronize(
+        &quot;loginwindow&quot;,
+        OSX::KCFPreferencesCurrentUser,
+        OSX::KCFPreferencesAnyHost
+      )
+    end
+  end
+  
+  def path
+    @path ||= NSBundle.mainBundle.bundlePath
+  end
 end</diff>
      <filename>GNStartItems.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@ class PreferencesController &lt; OSX::NSWindowController
     @sharedInstance
   end
 
-  def	init
+  def init
     if super_init
       prefsWindow = NSWindow.alloc.initWithContentRect_styleMask_backing_defer(
         NSMakeRect(0, 0, 550, 260),
@@ -43,8 +43,8 @@ class PreferencesController &lt; OSX::NSWindowController
 
     self
   end
-	
-  def	toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(toolbar, itemIdentifier, flag)
+  
+  def toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(toolbar, itemIdentifier, flag)
     mod = moduleForIdentifier(itemIdentifier)
     item = NSToolbarItem.alloc.initWithItemIdentifier(itemIdentifier)
     
@@ -58,15 +58,15 @@ class PreferencesController &lt; OSX::NSWindowController
     item
   end
 
-  def	toolbarAllowedItemIdentifiers(toolbar)
+  def toolbarAllowedItemIdentifiers(toolbar)
     @modules.map { |mod| mod.identifier }
   end
 
-  def	toolbarDefaultItemIdentifiers(toolbar)
+  def toolbarDefaultItemIdentifiers(toolbar)
     nil
   end
 
-  def	toolbarSelectableItemIdentifiers(toolbar)
+  def toolbarSelectableItemIdentifiers(toolbar)
     toolbarAllowedItemIdentifiers(toolbar)
   end
   
@@ -75,7 +75,7 @@ class PreferencesController &lt; OSX::NSWindowController
     super_showWindow(sender)
   end
 
-  def	selectModule(sender)
+  def selectModule(sender)
     mod = moduleForIdentifier(sender.itemIdentifier)
     switchToModule(mod) if mod
   end
@@ -95,12 +95,12 @@ class PreferencesController &lt; OSX::NSWindowController
   end
 
   private
-	def	setupToolbar
+  def setupToolbar
     toolbar = NSToolbar.alloc.initWithIdentifier(&quot;preferencesToolbar&quot;)
     toolbar.delegate = self
     toolbar.setAllowsUserCustomization(false)
     self.window.setToolbar(toolbar)
-	end
+  end
 
   def switchToModule(mod)
     @currentModule.view.removeFromSuperview if @currentModule</diff>
      <filename>PreferencesController.rb</filename>
    </modified>
    <modified>
      <diff>@@ -43,11 +43,11 @@ class PrefsAccountsViewController &lt;  OSX::NSViewController
   
   ## account list table view
   def numberOfRowsInTableView(sender)
-		accounts.size
-	end
-	
-	def tableView_objectValueForTableColumn_row(tableView, tableColumn, row)
-		account = accounts[row]
+    accounts.size
+  end
+  
+  def tableView_objectValueForTableColumn_row(tableView, tableColumn, row)
+    account = accounts[row]
     if account
       case tableColumn.identifier
       when &quot;AccountName&quot;
@@ -56,18 +56,18 @@ class PrefsAccountsViewController &lt;  OSX::NSViewController
         account.enabled?
       end
     end
-	end
-	
-	def	tableView_setObjectValue_forTableColumn_row(tableView, object, tableColumn, row)	
+  end
+  
+  def tableView_setObjectValue_forTableColumn_row(tableView, object, tableColumn, row)  
     if (account = accounts[row]) &amp;&amp; tableColumn.identifier == &quot;EnableStatus&quot;
       account.enabled = object
       account.save
     end
-	end
-	
-	def	tableViewSelectionDidChange(notification)
-		forceRefresh
-	end
+  end
+  
+  def tableViewSelectionDidChange(notification)
+    forceRefresh
+  end
   
   ## button actions
   def startAddingAccount(sender)
@@ -105,16 +105,16 @@ class PrefsAccountsViewController &lt;  OSX::NSViewController
 
   private
   def accounts
-		GNPreferences.sharedInstance.accounts
+    GNPreferences.sharedInstance.accounts
   end
   
-	def	currentAccount
+  def currentAccount
     if @accountList.selectedRow &gt; -1
       accounts[@accountList.selectedRow]
     else
       nil
     end
-	end
+  end
   
   def forceRefresh
     @accountList.reloadData</diff>
      <filename>PrefsAccountsViewController.rb</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,7 @@ class PrefsSettingsViewController &lt;  OSX::NSViewController
   def loadView
     super_loadView
     @autoLaunch.setTitle(NSLocalizedString(&quot;Launch at login&quot;))
-		@autoLaunch.setState(GNPreferences.sharedInstance.autoLaunch? ? NSOnState : NSOffState)
+    @autoLaunch.setState(GNPreferences.sharedInstance.autoLaunch? ? NSOnState : NSOffState)
     @showUnreadCount.setTitle(NSLocalizedString(&quot;Show unread count in menu bar&quot;))
     @showUnreadCount.setState(GNPreferences.sharedInstance.showUnreadCount? ? NSOnState : NSOffState)
   end</diff>
      <filename>PrefsSettingsViewController.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,31 +4,31 @@ require 'rexml/document'
 require 'yaml'
 
 class GmailChecker
-	# password should be base64 encoded
-	def initialize(username, password)
-		@username = username
-		@password = password.unpack(&quot;m&quot;).first
-	end
-	
-	def	check
-		http = Net::HTTP.new(&quot;mail.google.com&quot;, 443)
-		http.use_ssl = true
-		http.verify_mode = OpenSSL::SSL::VERIFY_NONE
-		response = nil
-		result = { :error =&gt; &quot;ConnectionError&quot;, :count =&gt; 0, :messages =&gt; [] }
+  # password should be base64 encoded
+  def initialize(username, password)
+    @username = username
+    @password = password.unpack(&quot;m&quot;).first
+  end
+  
+  def check
+    http = Net::HTTP.new(&quot;mail.google.com&quot;, 443)
+    http.use_ssl = true
+    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
+    response = nil
+    result = { :error =&gt; &quot;ConnectionError&quot;, :count =&gt; 0, :messages =&gt; [] }
 
-		begin
-		  http.start do |http|
-			req = Net::HTTP::Get.new(&quot;/mail/feed/atom&quot;)
-			req.basic_auth(@username, @password)
-			response = http.request(req)
-		  end
+    begin
+      http.start do |http|
+      req = Net::HTTP::Get.new(&quot;/mail/feed/atom&quot;)
+      req.basic_auth(@username, @password)
+      response = http.request(req)
+      end
 
-		  if response
+      if response
         case response.code
         when &quot;401&quot; #HTTPUnauthorized
           result[:error] = &quot;UserError&quot;
-        when &quot;200&quot; #HTTPOK				
+        when &quot;200&quot; #HTTPOK        
           feed = REXML::Document.new response.body
           # messages count
           result[:count] = feed.get_elements('/feed/fullcount')[0].text.to_i
@@ -60,22 +60,22 @@ class GmailChecker
             }
           end
         end
-		  end
-		rescue REXML::ParseException =&gt; e
-		  #puts &quot;error parsing feed: #{e.message}&quot;
-		rescue =&gt; e
-		  #puts &quot;error: #{e}&quot;
-		rescue Timeout::Error =&gt; e
-			#puts &quot;time out on connection&quot;
-		end
-		
-		result
-	end
+      end
+    rescue REXML::ParseException =&gt; e
+      #puts &quot;error parsing feed: #{e.message}&quot;
+    rescue =&gt; e
+      #puts &quot;error: #{e}&quot;
+    rescue Timeout::Error =&gt; e
+      #puts &quot;time out on connection&quot;
+    end
+    
+    result
+  end
 end
 
 results = {}
 (ARGV.length / 2).times do |t|
-	results[ARGV[t * 2]] = GmailChecker.new(ARGV[t * 2], ARGV[t * 2 + 1]).check
+  results[ARGV[t * 2]] = GmailChecker.new(ARGV[t * 2], ARGV[t * 2 + 1]).check
 end
 
 print results.to_yaml
\ No newline at end of file</diff>
      <filename>gmailchecker</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>060ee1ebc8b9eef4cf4efa96ff172f32a9538ff4</id>
    </parent>
  </parents>
  <author>
    <name>James Chen</name>
    <email>ashchan@gmail.com</email>
  </author>
  <url>http://github.com/ashchan/gmail-notifr/commit/b409c17b04227bd089016f93ab4592e5b9d59f68</url>
  <id>b409c17b04227bd089016f93ab4592e5b9d59f68</id>
  <committed-date>2009-09-03T01:41:54-07:00</committed-date>
  <authored-date>2009-09-03T01:41:54-07:00</authored-date>
  <message>converted all tabs to spaces</message>
  <tree>4bb0dfd029b3a2c020fdc517492651659c6ed00d</tree>
  <committer>
    <name>James Chen</name>
    <email>ashchan@gmail.com</email>
  </committer>
</commit>
