Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

executable file 34 lines (28 sloc) 0.961 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
#
# rb_main.rb
# Gmail Notifr
#
# Created by James Chen on 10/24/10.
# Copyright ashchan.com 2010. All rights reserved.
#

# Loading the Cocoa framework. If you need to load more frameworks, you can
# do that here too.
framework 'Cocoa'
framework 'Growl'
require 'time'
require 'net/https'

# Loading all the Ruby project files.
main = File.basename(__FILE__, File.extname(__FILE__))
dir_path = NSBundle.mainBundle.resourcePath.fileSystemRepresentation

# try to load Security bs file on SnowLeopard, Lion 10.7 has version number 1138
load_bridge_support_file "#{dir_path}/BridgeSupport/Security.bridgesupport" if NSAppKitVersionNumber < 1138

Dir.glob(File.join(dir_path, '*.{rb,rbo}')).map { |x| File.basename(x, File.extname(x)) }.uniq.each do |path|
  if path != main
    require(path)
  end
end

def NSLocalizedString(key)
  NSBundle.mainBundle.localizedStringForKey(key, value:'', table:nil)
end

# Starting the Cocoa main loop.
NSApplicationMain(0, nil)
Something went wrong with that request. Please try again.