Skip to content

Instantly share code, notes, and snippets.

@abloom
Created February 25, 2009 17:29
Show Gist options
  • Save abloom/70305 to your computer and use it in GitHub Desktop.
Save abloom/70305 to your computer and use it in GitHub Desktop.
require 'hotcocoa'
require File.dirname(__FILE__)+'/mappings/status_item'
include HotCocoa
class Application
def start
application :name => "VPN Bar" do |app|
app.delegate = self
m = menu do |main|
main.item :connect
main.separator
main.item :help
main.item :preferences
main.item :quit
end
img = image :file => "resources/status_bar_icon.png"
status_item :image => img, :menu => m, :length => 24, :highlight_mode => true
end
end
def on_connect(menu)
alert :message => "..."
end
def on_help(menu)
end
def on_preferences(menu)
end
def load_application_menu
end
end
Application.new.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment