Merge branch 'master' into tableview

This commit is contained in:
Francisco Ryan Tolmasky I
2009-07-17 11:47:12 -07:00
4 changed files with 135 additions and 2 deletions
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby -wKU
#
# Open Document in Running Browser(s)
# v3 - November 22, 2007
#
# Now supports multiple running versions of a single browser along
# with a range of new/old browsers. Bring back support for Firefox.
#
# Options: Set TM_PROJECT_SITEURL in your TM Project Window Info Button
# in the following form: "http://example.com/"
require "#{ENV['TM_SUPPORT_PATH']}/lib/escape.rb"
if ENV['TM_PROJECT_SITEURL']
url = "#{ENV['TM_PROJECT_SITEURL']}" + ENV['TM_FILEPATH'].sub(/^#{Regexp.escape(ENV['TM_PROJECT_DIRECTORY'])}\//, '')
else
url = "file://#{ENV['TM_PROJECT_DIRECTORY']}/index.html"
end
proclist = `ps -x -o command`
active = []
os = `defaults read /System/Library/CoreServices/SystemVersion ProductVersion`
browsers = %w[ Safari OmniWeb Camino Shiira firefox-bin Xyle\ scope Opera Internet\ Explorer flock-bin iCab Sunrise seamonkey-bin navigator-bin ].join('|')
# Build paths to each active browser
#
# Notes:
# - 'WebKit' look ahead is to rule it out so we can use the working
# rule below.
# - 'LaunchCFMApp' portion is so iCab works.
active = proclist.scan(%r{^(?:/.*LaunchCFMApp )?(/.*\.app)(?=/Contents/MacOS/(?:#{browsers})\b(?!\s-WebKit))})
# Special check for WebKit as it appears as Safari
# Note: Only supports one running instance of WebKit, picked at random.
if proclist =~ %r{/Contents/MacOS/Safari.*-WebKit(DeveloperExtras|ScriptDebuggerEnabled)}
active &lt;&lt; "WebKit"
end
# TODO: Change when Leopard Only
# On Leopard use the -g option to open in background.
if os =~ /^10\.(5|6)/
active.each {|p| `open -g -a #{e_sh(p)} #{e_sh(url)}` }
else
active.each {|p| `open -a #{e_sh(p)} #{e_sh(url)}` }
end</string>
<key>input</key>
<string>none</string>
<key>name</key>
<string>Open Document in Running Browser(s)</string>
<key>output</key>
<string>discard</string>
<key>scope</key>
<string>source.js.objj</string>
<key>uuid</key>
<string>36FD3695-1051-401E-8536-89FB9CEEEAB4</string>
</dict>
</plist>
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>### Refresh All Active Browsers - OmniWeb, Safari, Firefox &amp; IE
### v1.0. 2005-03-29
###
# Check if Internet Explorer is running, if so refresh
ps -xc|grep -sq "Internet Explorer" &amp;&amp; osascript -e 'tell app "Internet Explorer"' -e 'activate' -e 'OpenURL "JavaScript:window.location.reload();" toWindow -1' -e 'end tell'
# Check if OmniWeb is running, if so refresh
ps -xc|grep -sq OmniWeb &amp;&amp; osascript -e 'tell app "OmniWeb"' -e 'activate' -e 'reload first browser' -e 'end tell'
# Check if Firefox is running, if so refresh
ps -xc|grep -sqi firefox &amp;&amp; osascript &lt;&lt;'APPLESCRIPT'
tell app "Firefox" to activate
tell app "System Events"
if UI elements enabled then
keystroke "r" using command down
-- Fails if System Preferences &gt; Universal access &gt; "Enable access for assistive devices" is not on
else
tell app "Firefox" to Get URL "JavaScript:window.location.reload();" inside window 1
-- Fails if Firefox is set to open URLs from external apps in new tabs.
end if
end tell
APPLESCRIPT
# Check if Safari is running, if so refresh
ps -xc|grep -sq Safari &amp;&amp; osascript -e 'tell app "Safari"' -e 'activate' -e 'do JavaScript "window.location.reload();" in first document' -e 'end tell'
# Check if Camino is running, if so refresh
ps -xc|grep -sq Camino &amp;&amp; osascript -e 'tell app "Camino"' -e 'activate' -e 'tell app "System Events" to keystroke "r" using {command down}' -e 'end tell'
</string>
<key>input</key>
<string>none</string>
<key>keyEquivalent</key>
<string>@r</string>
<key>name</key>
<string>Refresh Running Browser(s)</string>
<key>output</key>
<string>discard</string>
<key>scope</key>
<string>source.js.objj</string>
<key>uuid</key>
<string>033BC36A-97DA-4F48-9ACB-B58C80D1A689</string>
</dict>
</plist>
@@ -21,7 +21,7 @@
<array>
<dict>
<key>begin</key>
<string>((@)(interface|protocol))(?!.+;)\s+([A-Za-z][A-Za-z0-9]*)\s*((:)(?:\s*)([A-Za-z][A-Za-z0-9]*))?(\s|\n)?</string>
<string>((@)(interface|protocol))(?!.+;)\s+([_A-Za-z][_A-Za-z0-9]*)\s*((:)(?:\s*)([_A-Za-z][_A-Za-z0-9]*))?(\s|\n)?</string>
<key>captures</key>
<dict>
<key>1</key>
@@ -84,7 +84,7 @@
</dict>
<dict>
<key>begin</key>
<string>((@)(implementation))\s+([A-Za-z][A-Za-z0-9]*)\s*(?::\s*([A-Za-z][A-Za-z0-9]*))?</string>
<string>((@)(implementation))\s+([_A-Za-z][_A-Za-z0-9]*)\s*(?::\s*([_A-Za-z][_A-Za-z0-9]*))?</string>
<key>captures</key>
<dict>
<key>1</key>
@@ -8,14 +8,31 @@
<string>Tom Robinson</string>
<key>description</key>
<string>&lt;a href="http://cappuccino.org/"&gt;Cappuccino&lt;/a&gt; is an open source framework that makes it easy to build desktop-caliber applications that run in a web browser.</string>
<key>mainMenu</key>
<dict>
<key>items</key>
<array>
<string>96C39647-4346-4750-9F96-58070F24EDE6</string>
<string>AA41BEF8-5F81-4A5A-85DE-2E81A112778B</string>
<string>85B0746B-AE1C-47B3-8B9A-2B9A95F4C71E</string>
<string>------------------------------------</string>
<string>36FD3695-1051-401E-8536-89FB9CEEEAB4</string>
<string>033BC36A-97DA-4F48-9ACB-B58C80D1A689</string>
</array>
<key>submenus</key>
<dict/>
</dict>
<key>name</key>
<string>JavaScript Objective-J</string>
<key>ordering</key>
<array>
<string>58D4B98A-2110-423E-9C80-CC9E202816E7</string>
<string>85A46AFC-5552-4CE5-BDA0-ED34F0398399</string>
<string>96C39647-4346-4750-9F96-58070F24EDE6</string>
<string>AA41BEF8-5F81-4A5A-85DE-2E81A112778B</string>
<string>85B0746B-AE1C-47B3-8B9A-2B9A95F4C71E</string>
<string>36FD3695-1051-401E-8536-89FB9CEEEAB4</string>
<string>033BC36A-97DA-4F48-9ACB-B58C80D1A689</string>
</array>
<key>uuid</key>
<string>1FB3D538-84E1-4002-AA46-5705529A27E1</string>