mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 06:25:56 +03:00
shell/macos: Remove legacy (< 10.10) overlay icons
Having to update the plugins to add a submenu in the context menu, it's more cost-effective to remove support for legacy macOS versions than implementing and testing this setup.
This commit is contained in:
parent
b6db9789ee
commit
3b20684dc7
48 changed files with 6 additions and 4706 deletions
|
@ -506,536 +506,6 @@
|
|||
<key>UUID</key>
|
||||
<string>7D7219B7-1897-48C3-8533-842BDEC46F71</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>PACKAGE_FILES</key>
|
||||
<dict>
|
||||
<key>DEFAULT_INSTALL_LOCATION</key>
|
||||
<string>/</string>
|
||||
<key>HIERARCHY</key>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>Utilities</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>Applications</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>509</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>Application Support</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Documentation</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Filesystems</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Frameworks</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Input Methods</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Internet Plug-Ins</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>LaunchAgents</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>LaunchDaemons</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>PreferencePanes</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Preferences</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>Printers</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>PrivilegedHelperTools</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>QuickLook</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>QuickTime</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Screen Savers</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Library/ScriptingAdditions/SyncStateFinder.osax/Contents</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>SyncStateFinder.osax</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>2</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>ScriptingAdditions</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>2</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Scripts</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Services</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Widgets</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Library</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Extensions</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Library</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>System</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>Shared</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>1023</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>Users</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>1</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>PAYLOAD_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>VERSION</key>
|
||||
<integer>2</integer>
|
||||
</dict>
|
||||
<key>PACKAGE_SCRIPTS</key>
|
||||
<dict>
|
||||
<key>POSTINSTALL_PATH</key>
|
||||
<dict/>
|
||||
<key>PREINSTALL_PATH</key>
|
||||
<dict/>
|
||||
<key>RESOURCES</key>
|
||||
<array/>
|
||||
</dict>
|
||||
<key>PACKAGE_SETTINGS</key>
|
||||
<dict>
|
||||
<key>AUTHENTICATION</key>
|
||||
<integer>1</integer>
|
||||
<key>CONCLUSION_ACTION</key>
|
||||
<integer>0</integer>
|
||||
<key>IDENTIFIER</key>
|
||||
<string>com.ownCloud.finderPlugin</string>
|
||||
<key>LOCATION</key>
|
||||
<integer>0</integer>
|
||||
<key>NAME</key>
|
||||
<string>Legacy Finder Plugin (OS X 10.9 or older)</string>
|
||||
<key>OVERWRITE_PERMISSIONS</key>
|
||||
<false/>
|
||||
<key>VERSION</key>
|
||||
<string>@MIRALL_VERSION_FULL@</string>
|
||||
</dict>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>UUID</key>
|
||||
<string>39F61FCD-6EAA-4F3A-81C6-25E3F667DFB5</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PROJECT</key>
|
||||
<dict>
|
||||
|
@ -1103,49 +573,6 @@
|
|||
<key>UUID</key>
|
||||
<string>9647ADC0-BD53-4D7D-A561-73D383AACDE1</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DESCRIPTION</key>
|
||||
<array/>
|
||||
<key>OPTIONS</key>
|
||||
<dict>
|
||||
<key>HIDDEN</key>
|
||||
<false/>
|
||||
<key>STATE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>PACKAGE_UUID</key>
|
||||
<string>39F61FCD-6EAA-4F3A-81C6-25E3F667DFB5</string>
|
||||
<key>REQUIREMENTS</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BEHAVIOR</key>
|
||||
<integer>1</integer>
|
||||
<key>DICTIONARY</key>
|
||||
<dict>
|
||||
<key>IC_REQUIREMENT_JAVASCRIPT_FUNCTION</key>
|
||||
<string>olderOsx</string>
|
||||
<key>IC_REQUIREMENT_JAVASCRIPT_PARAMETERS</key>
|
||||
<array/>
|
||||
</dict>
|
||||
<key>IDENTIFIER</key>
|
||||
<string>fr.whitebox.Packages.requirement.javascript</string>
|
||||
<key>MESSAGE</key>
|
||||
<array/>
|
||||
<key>NAME</key>
|
||||
<string>JavaScript</string>
|
||||
<key>STATE</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>TITLE</key>
|
||||
<array/>
|
||||
<key>TOOLTIP</key>
|
||||
<array/>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>UUID</key>
|
||||
<string>1D2C47E0-5FD3-4623-B934-1347C66782D0</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>REMOVED</key>
|
||||
<dict/>
|
||||
|
@ -1450,18 +877,6 @@
|
|||
<string>@CMAKE_INSTALL_DIR@</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SHARED_GLOBAL_DATA</key>
|
||||
<dict>
|
||||
<key>IC_REQUIREMENT_JAVASCRIPT_SHARED_SOURCE_CODE</key>
|
||||
<string>
|
||||
function olderOsx() {
|
||||
if(system.compareVersions(system.version.ProductVersion, '10.10') == -1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</string>
|
||||
</dict>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>VERSION</key>
|
||||
|
|
|
@ -3,7 +3,4 @@
|
|||
# kill the old version. see issue #2044
|
||||
killall @APPLICATION_EXECUTABLE@
|
||||
|
||||
# Unload the Finder plugin. see issue #2105
|
||||
killall Finder
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
|
||||
if(APPLE)
|
||||
add_custom_target( legacy_mac_overlayplugin ALL
|
||||
xcodebuild -workspace ${CMAKE_SOURCE_DIR}/shell_integration/MacOSX/OwnCloud.xcworkspace
|
||||
-scheme SyncStateFinder.osax -configuration Release SYMROOT=${CMAKE_CURRENT_BINARY_DIR}
|
||||
OC_APPLICATION_REV_DOMAIN=${APPLICATION_REV_DOMAIN}
|
||||
OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX=${SOCKETAPI_TEAM_IDENTIFIER_PREFIX}
|
||||
COMMENT building Legacy Mac Overlay icons)
|
||||
|
||||
# Contrary to popular belief, this is called like this no matter what theme/OEM.
|
||||
set(OC_OEM_SHARE_ICNS "${CMAKE_BINARY_DIR}/src/gui/ownCloud.icns")
|
||||
|
||||
|
@ -25,12 +17,6 @@ add_custom_target( mac_overlayplugin ALL
|
|||
VERBATIM)
|
||||
add_dependencies(mac_overlayplugin ${APPLICATION_EXECUTABLE}) # for the ownCloud.icns to be generated
|
||||
|
||||
|
||||
# legacy
|
||||
INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Release/SyncStateFinder.osax/Contents
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/Library/ScriptingAdditions/SyncStateFinder.osax/ )
|
||||
|
||||
# >= 10.10.x
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Release/FinderSyncExt.appex
|
||||
DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/PlugIns
|
||||
USE_SOURCE_PERMISSIONS)
|
||||
|
|
|
@ -4,10 +4,4 @@
|
|||
<FileRef
|
||||
location = "group:OwnCloudFinderSync/OwnCloudFinderSync.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:OwnCloudFinder/OwnCloudFinder.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:OwnCloudInjector/OwnCloudInjector.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface OwnCloudFinderContentManager : NSObject
|
||||
{
|
||||
NSMutableDictionary* _fileNamesCache;
|
||||
NSMutableDictionary* _oldFileNamesCache;
|
||||
BOOL _fileIconsEnabled;
|
||||
BOOL _hasChangedContent;
|
||||
|
||||
NSNumber *_icnOk;
|
||||
NSNumber *_icnSync;
|
||||
NSNumber *_icnWarn;
|
||||
NSNumber *_icnErr;
|
||||
NSNumber *_icnOkSwm;
|
||||
NSNumber *_icnSyncSwm;
|
||||
NSNumber *_icnWarnSwm;
|
||||
NSNumber *_icnErrSwm;
|
||||
}
|
||||
|
||||
+ (OwnCloudFinderContentManager*)sharedInstance;
|
||||
|
||||
- (void)enableFileIcons:(BOOL)enable;
|
||||
- (NSNumber*)iconByPath:(NSString*)path isDirectory:(BOOL)isDir;
|
||||
- (void)removeAllIcons;
|
||||
- (void)setIcons:(NSDictionary*)iconDictionary filterByFolder:(NSString*)filterFolder;
|
||||
- (void)setResultForPath:(NSString*)path result:(NSString*)result;
|
||||
- (void)clearFileNameCache;
|
||||
- (void)reFetchFileNameCacheForPath:(NSString*)path;
|
||||
- (void)repaintAllWindows;
|
||||
|
||||
- (void)loadIconResources;
|
||||
|
||||
@end
|
|
@ -1,358 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import <AppKit/NSApplication.h>
|
||||
#import <AppKit/NSWindow.h>
|
||||
#import <objc/runtime.h>
|
||||
#import "ContentManager.h"
|
||||
#import "MenuManager.h"
|
||||
#import "RequestManager.h"
|
||||
#import "IconCache.h"
|
||||
|
||||
static OwnCloudFinderContentManager* sharedInstance = nil;
|
||||
|
||||
@implementation OwnCloudFinderContentManager
|
||||
- init
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self)
|
||||
{
|
||||
_fileNamesCache = [[NSMutableDictionary alloc] init];
|
||||
_oldFileNamesCache = [[NSMutableDictionary alloc] init];
|
||||
_fileIconsEnabled = TRUE;
|
||||
_hasChangedContent = TRUE;
|
||||
[self loadIconResources];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[self removeAllIcons];
|
||||
[_fileNamesCache release];
|
||||
[_oldFileNamesCache release];
|
||||
sharedInstance = nil;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
+ (OwnCloudFinderContentManager*)sharedInstance
|
||||
{
|
||||
@synchronized(self)
|
||||
{
|
||||
if (sharedInstance == nil)
|
||||
{
|
||||
sharedInstance = [[self alloc] init];
|
||||
}
|
||||
}
|
||||
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
- (void)loadIconResources
|
||||
{
|
||||
NSBundle *extBundle = [NSBundle bundleForClass:[self class]];
|
||||
|
||||
_icnOk = [[IconCache sharedInstance] registerIcon:[extBundle imageForResource:@"ok.icns"]];
|
||||
_icnSync = [[IconCache sharedInstance] registerIcon:[extBundle imageForResource:@"sync.icns"]];
|
||||
_icnWarn = [[IconCache sharedInstance] registerIcon:[extBundle imageForResource:@"warning.icns"]];
|
||||
_icnErr = [[IconCache sharedInstance] registerIcon:[extBundle imageForResource:@"error.icns"]];
|
||||
_icnOkSwm = [[IconCache sharedInstance] registerIcon:[extBundle imageForResource:@"ok_swm.icns"]];
|
||||
_icnSyncSwm = [[IconCache sharedInstance] registerIcon:[extBundle imageForResource:@"sync_swm.icns"]];
|
||||
_icnWarnSwm = [[IconCache sharedInstance] registerIcon:[extBundle imageForResource:@"warning_swm.icns"]];
|
||||
_icnErrSwm = [[IconCache sharedInstance] registerIcon:[extBundle imageForResource:@"error_swm.icns"]];
|
||||
|
||||
// NSLog(@"Icon ok: %@ identifier: %d from bundle %@", [extBundle imageForResource:@"ok.icns"], [_icnOk intValue], extBundle);
|
||||
}
|
||||
|
||||
- (void)enableFileIcons:(BOOL)enable
|
||||
{
|
||||
_fileIconsEnabled = enable;
|
||||
|
||||
[self repaintAllWindows];
|
||||
}
|
||||
|
||||
- (void)setResultForPath:(NSString*)path result:(NSString*)result
|
||||
{
|
||||
if (_icnOk == nil) {
|
||||
// no icon resource path registered yet
|
||||
return;
|
||||
}
|
||||
|
||||
NSNumber *res;
|
||||
res = [NSNumber numberWithInt:0];
|
||||
|
||||
if( [result isEqualToString:@"OK"] ) {
|
||||
res = _icnOk;
|
||||
} else if( [result isEqualToString:@"SYNC"] || [result isEqualToString:@"NEW"] ) {
|
||||
res = _icnSync;
|
||||
} else if( [result isEqualToString:@"IGNORE"]) {
|
||||
res = _icnWarn;
|
||||
} else if( [result isEqualToString:@"ERROR"]) {
|
||||
res = _icnErr;
|
||||
} else if( [result isEqualToString:@"OK+SWM"] ) {
|
||||
res = _icnOkSwm;
|
||||
} else if( [result isEqualToString:@"SYNC+SWM"] || [result isEqualToString:@"NEW+SWM"] ) {
|
||||
res = _icnSyncSwm;
|
||||
} else if( [result isEqualToString:@"IGNORE+SWM"]) {
|
||||
res = _icnWarnSwm;
|
||||
} else if( [result isEqualToString:@"ERROR+SWM"]) {
|
||||
res = _icnErrSwm;
|
||||
}else if( [result isEqualToString:@"NOP"]) {
|
||||
// Nothing.
|
||||
} else {
|
||||
NSLog(@"SyncState: Unknown status code %@", result);
|
||||
}
|
||||
|
||||
NSString* normalizedPath = [path decomposedStringWithCanonicalMapping];
|
||||
|
||||
if (![_fileNamesCache objectForKey:normalizedPath] || ![[_fileNamesCache objectForKey:normalizedPath] isEqualTo:res]) {
|
||||
[_fileNamesCache setObject:res forKey:normalizedPath];
|
||||
//NSLog(@"SET value %d %@", [res intValue], normalizedPath);
|
||||
_hasChangedContent = YES;
|
||||
[self performSelector:@selector(repaintAllWindowsIfNeeded) withObject:0 afterDelay:1.0]; // 1 sec
|
||||
}
|
||||
}
|
||||
|
||||
- (NSNumber*)iconByPath:(NSString*)path isDirectory:(BOOL)isDir
|
||||
{
|
||||
//NSLog(@"%@ %@", NSStringFromSelector(_cmd), path);
|
||||
if (!_fileIconsEnabled)
|
||||
{
|
||||
NSLog(@"SyncState: Icons are NOT ENABLED!");
|
||||
// return nil;
|
||||
}
|
||||
|
||||
if( path == nil ) {
|
||||
NSNumber *res = [NSNumber numberWithInt:0];
|
||||
return res;
|
||||
}
|
||||
NSString* normalizedPath = [path decomposedStringWithCanonicalMapping];
|
||||
|
||||
if (![[OwnCloudFinderRequestManager sharedInstance] isRegisteredPath:normalizedPath isDirectory:isDir]) {
|
||||
return [NSNumber numberWithInt:0];
|
||||
}
|
||||
|
||||
NSNumber* result = [_fileNamesCache objectForKey:normalizedPath];
|
||||
// NSLog(@"XXXXXXX Asking for icon for path %@ = %d",normalizedPath, [result intValue]);
|
||||
|
||||
if( result == nil ) {
|
||||
result = [NSNumber numberWithInt:0];
|
||||
// Set 0 into the cache, meaning "don't have an icon, but already requested it"
|
||||
[_fileNamesCache setObject:result forKey:normalizedPath];
|
||||
// start the async call
|
||||
[[OwnCloudFinderRequestManager sharedInstance] askForIcon:normalizedPath isDirectory:isDir];
|
||||
}
|
||||
if ([result intValue] == 0) {
|
||||
// Show the old state while we wait for the new one
|
||||
NSNumber* oldResult = [_oldFileNamesCache objectForKey:normalizedPath];
|
||||
if (oldResult)
|
||||
result = oldResult;
|
||||
}
|
||||
// NSLog(@"iconByPath return value %d", [result intValue]);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Clears the entries from the hash to make it call again home to the desktop client.
|
||||
- (void)clearFileNameCache
|
||||
{
|
||||
[_fileNamesCache release];
|
||||
_fileNamesCache = [[NSMutableDictionary alloc] init];
|
||||
[_oldFileNamesCache removeAllObjects];
|
||||
}
|
||||
|
||||
- (void)reFetchFileNameCacheForPath:(NSString*)path
|
||||
{
|
||||
//NSLog(@"%@", NSStringFromSelector(_cmd));
|
||||
|
||||
// We won't request the new state if it finds the path in _fileNamesCache
|
||||
// Move all entries to _oldFileNamesCache so that they get re-requested, but
|
||||
// still available while we refill the cache
|
||||
[_oldFileNamesCache addEntriesFromDictionary:_fileNamesCache];
|
||||
[_fileNamesCache removeAllObjects];
|
||||
|
||||
[self repaintAllWindows];
|
||||
}
|
||||
|
||||
|
||||
- (void)removeAllIcons
|
||||
{
|
||||
[_fileNamesCache removeAllObjects];
|
||||
[_oldFileNamesCache removeAllObjects];
|
||||
|
||||
[self repaintAllWindows];
|
||||
}
|
||||
|
||||
- (void)repaintAllWindowsIfNeeded
|
||||
{
|
||||
if (!_hasChangedContent) {
|
||||
//NSLog(@"%@ Repaint scheduled but not needed", NSStringFromSelector(_cmd));
|
||||
return;
|
||||
}
|
||||
|
||||
_hasChangedContent = NO;
|
||||
[self repaintAllWindows];
|
||||
}
|
||||
|
||||
- (void)repaintAllWindows
|
||||
{
|
||||
//NSLog(@"%@", NSStringFromSelector(_cmd));
|
||||
NSArray* windows = [[NSApplication sharedApplication] windows];
|
||||
|
||||
for (int i = 0; i < [windows count]; i++)
|
||||
{
|
||||
NSWindow* window = [windows objectAtIndex:i];
|
||||
|
||||
if (![window isVisible])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
MenuManager* menuManager = [MenuManager sharedInstance];
|
||||
OwnCloudFinderRequestManager* requestManager = [OwnCloudFinderRequestManager sharedInstance];
|
||||
|
||||
if ([[window className] isEqualToString:@"TBrowserWindow"])
|
||||
{
|
||||
NSObject* browserWindowController = [window browserWindowController];
|
||||
|
||||
BOOL repaintWindow = YES;
|
||||
|
||||
NSString* filterFolder = [requestManager filterFolder];
|
||||
|
||||
if (filterFolder)
|
||||
{
|
||||
repaintWindow = NO;
|
||||
|
||||
struct TFENodeVector* targetPath;
|
||||
|
||||
if ([browserWindowController respondsToSelector:@selector(targetPath)])
|
||||
{
|
||||
// 10.7 & 10.8
|
||||
targetPath = [browserWindowController targetPath];
|
||||
}
|
||||
else if ([browserWindowController respondsToSelector:@selector(activeContainer)])
|
||||
{
|
||||
// 10.9
|
||||
targetPath = [[browserWindowController activeContainer] targetPath];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"SyncState: refreshing icon badges failed");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
NSArray* folderPaths = [menuManager pathsForNodes:targetPath];
|
||||
|
||||
for (NSString* folderPath in folderPaths)
|
||||
{
|
||||
if ([folderPath hasPrefix:filterFolder] || [filterFolder hasPrefix:folderPath])
|
||||
{
|
||||
repaintWindow = YES;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (repaintWindow)
|
||||
{
|
||||
if ([browserWindowController respondsToSelector:@selector(browserViewController)])
|
||||
{
|
||||
// 10.7 & 10.8
|
||||
NSObject* browserViewController = [browserWindowController browserViewController];
|
||||
|
||||
NSObject* browserView = [browserViewController browserView];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{[browserView setNeedsDisplay:YES];});
|
||||
}
|
||||
else if ([browserWindowController respondsToSelector:@selector(activeBrowserViewController)])
|
||||
{
|
||||
// 10.9
|
||||
NSObject* browserViewController = [browserWindowController activeBrowserViewController];
|
||||
|
||||
NSObject* browserView = [browserViewController browserView];
|
||||
|
||||
if ([browserView isKindOfClass:(id)objc_getClass("TListView")])
|
||||
{
|
||||
// List or Coverflow View
|
||||
[self setNeedsDisplayForListView:browserView];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Icon or Column View
|
||||
dispatch_async(dispatch_get_main_queue(), ^{[browserView setNeedsDisplay:YES];});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"SyncState: refreshing icon badges failed");
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setIcons:(NSDictionary*)iconDictionary filterByFolder:(NSString*)filterFolder
|
||||
{
|
||||
NSLog(@"%@", NSStringFromSelector(_cmd));
|
||||
for (NSString* path in iconDictionary)
|
||||
{
|
||||
if (filterFolder && ![path hasPrefix:filterFolder])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
NSString* normalizedPath = [path decomposedStringWithCanonicalMapping];
|
||||
NSNumber* iconId = [iconDictionary objectForKey:path];
|
||||
|
||||
if ([iconId intValue] == -1)
|
||||
{
|
||||
[_fileNamesCache removeObjectForKey:normalizedPath];
|
||||
}
|
||||
else
|
||||
{
|
||||
[_oldFileNamesCache removeObjectForKey:normalizedPath];
|
||||
[_fileNamesCache setObject:iconId forKey:normalizedPath];
|
||||
}
|
||||
}
|
||||
|
||||
[self repaintAllWindows];
|
||||
}
|
||||
|
||||
- (void)setNeedsDisplayForListView:(NSView*)view
|
||||
{
|
||||
NSArray* subviews = [view subviews];
|
||||
|
||||
for (int i = 0; i < [subviews count]; i++)
|
||||
{
|
||||
NSView* subview = [subviews objectAtIndex:i];
|
||||
|
||||
if ([subview isKindOfClass:(id)objc_getClass("TListRowView")])
|
||||
{
|
||||
[self setNeedsDisplayForListView:subview];
|
||||
}
|
||||
else if ([subview isKindOfClass:(id)objc_getClass("TListNameCellView")])
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{[subview setNeedsDisplay:YES];});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,28 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface NSObject (ContextMenuHandlers)
|
||||
|
||||
struct TFENodeVector;
|
||||
|
||||
+ (void)OCContextMenuHandlers_handleContextMenuCommon:(unsigned int)arg1 nodes:(const struct TFENodeVector*)arg2 event:(id)arg3 view:(id)arg4 browserController:(id)arg5 addPlugIns:(BOOL)arg6;
|
||||
+ (void)OCContextMenuHandlers_handleContextMenuCommon:(unsigned int)arg1 nodes:(const struct TFENodeVector*)arg2 event:(id)arg3 view:(id)arg4 windowController:(id)arg5 addPlugIns:(BOOL)arg6;
|
||||
+ (void)OCContextMenuHandlers_addViewSpecificStuffToMenu:(id)arg1 browserViewController:(id)arg2 context:(unsigned int)arg3;
|
||||
|
||||
- (void)OCContextMenuHandlers_configureWithNodes:(const struct TFENodeVector*)arg1 browserController:(id)arg2 container:(BOOL)arg3;
|
||||
- (void)OCContextMenuHandlers_configureWithNodes:(const struct TFENodeVector*)arg1 windowController:(id)arg2 container:(BOOL)arg3;
|
||||
|
||||
@end
|
|
@ -1,101 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import "ContextMenuHandlers.h"
|
||||
#import "MenuManager.h"
|
||||
|
||||
@class TIconViewController;
|
||||
|
||||
@implementation NSObject (ContextMenuHandlers)
|
||||
|
||||
+ (void)OCContextMenuHandlers_addViewSpecificStuffToMenu:(id)arg1 browserViewController:(id)arg2 context:(unsigned int)arg3 // 10.7 & 10.8
|
||||
{
|
||||
[self OCContextMenuHandlers_addViewSpecificStuffToMenu:arg1 browserViewController:arg2 context:arg3];
|
||||
NSLog(@"OCContextMenuHandlers_addViewSpecificStuffToMenu 10.7/10.8 %@ %@ %d", arg1, arg2, arg3);
|
||||
MenuManager* menuManager = [MenuManager sharedInstance];
|
||||
if (menuManager.menuItems.count > 0)
|
||||
{
|
||||
[menuManager addItemsToMenu:arg1 forFiles:menuManager.menuItems];
|
||||
[menuManager.menuItems removeAllObjects];
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)OCContextMenuHandlers_addViewSpecificStuffToMenu:(id)arg1 clickedView:(id)arg2 browserViewController:(id)arg3 context:(unsigned int)arg4 // 10.9
|
||||
{
|
||||
[self OCContextMenuHandlers_addViewSpecificStuffToMenu:arg1 clickedView:arg2 browserViewController:arg3 context:arg4];
|
||||
NSLog(@"OCContextMenuHandlers_addViewSpecificStuffToMenu 10.9 %@ %@ %@ %d", arg1, arg2, arg3, arg4);
|
||||
MenuManager* menuManager = [MenuManager sharedInstance];
|
||||
if (menuManager.menuItems.count > 0)
|
||||
{
|
||||
[menuManager addItemsToMenu:arg1 forFiles:menuManager.menuItems];
|
||||
[menuManager.menuItems removeAllObjects];
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)OCContextMenuHandlers_handleContextMenuCommon:(unsigned int)arg1 nodes:(const struct TFENodeVector*)arg2 event:(id)arg3 view:(id)arg4 windowController:(id)arg5 addPlugIns:(BOOL)arg6 // 10.7
|
||||
{
|
||||
MenuManager* menuManager = [MenuManager sharedInstance];
|
||||
NSLog(@"ContextMenuHandlers_handleContextMenuCommon");
|
||||
menuManager.menuItems = (NSMutableArray*)[menuManager pathsForNodes:arg2];
|
||||
[self OCContextMenuHandlers_handleContextMenuCommon:arg1 nodes:arg2 event:arg3 view:arg4 windowController:arg5 addPlugIns:arg6];
|
||||
}
|
||||
|
||||
+ (void)OCContextMenuHandlers_handleContextMenuCommon:(unsigned int)arg1 nodes:(const struct TFENodeVector*)arg2 event:(id)arg3 view:(id)arg4 browserController:(id)arg5 addPlugIns:(BOOL)arg6 // 10.8
|
||||
{
|
||||
MenuManager* menuManager = [MenuManager sharedInstance];
|
||||
NSLog(@"ContextMenuHandlers_handleContextMenuCommon");
|
||||
menuManager.menuItems = (NSMutableArray*)[menuManager pathsForNodes:arg2];
|
||||
[self OCContextMenuHandlers_handleContextMenuCommon:arg1 nodes:arg2 event:arg3 view:arg4 browserController:arg5 addPlugIns:arg6];
|
||||
}
|
||||
|
||||
+ (void)OCContextMenuHandlers_handleContextMenuCommon:(unsigned int)arg1 nodes:(const struct TFENodeVector*)arg2 event:(id)arg3 clickedView:(id)arg4 browserViewController:(id)arg5 addPlugIns:(BOOL)arg6 // 10.9
|
||||
{
|
||||
MenuManager* menuManager = [MenuManager sharedInstance];
|
||||
NSLog(@"ContextMenuHandlers_handleContextMenuCommon");
|
||||
menuManager.menuItems = (NSMutableArray*)[menuManager pathsForNodes:arg2];
|
||||
[self OCContextMenuHandlers_handleContextMenuCommon:arg1 nodes:arg2 event:arg3 clickedView:arg4 browserViewController:arg5 addPlugIns:arg6];
|
||||
}
|
||||
|
||||
- (void)OCContextMenuHandlers_configureWithNodes:(const struct TFENodeVector*)arg1 windowController:(id)arg2 container:(BOOL)arg3 // 10.7
|
||||
{
|
||||
[self OCContextMenuHandlers_configureWithNodes:arg1 windowController:arg2 container:arg3];
|
||||
NSLog(@"ContextMenuHandlers_configureWithNodes");
|
||||
TContextMenu* realSelf = (TContextMenu*)self;
|
||||
MenuManager* menuManager = [MenuManager sharedInstance];
|
||||
NSArray* selectedItems = [menuManager pathsForNodes:arg1];
|
||||
[menuManager addItemsToMenu:realSelf forFiles:selectedItems];
|
||||
}
|
||||
|
||||
- (void)OCContextMenuHandlers_configureWithNodes:(const struct TFENodeVector*)arg1 browserController:(id)arg2 container:(BOOL)arg3 // 10.8
|
||||
{
|
||||
[self OCContextMenuHandlers_configureWithNodes:arg1 browserController:arg2 container:arg3];
|
||||
NSLog(@"ContextMenuHandlers_configureWithNodes");
|
||||
TContextMenu* realSelf = (TContextMenu*)self;
|
||||
MenuManager* menuManager = [MenuManager sharedInstance];
|
||||
|
||||
NSArray* selectedItems = [menuManager pathsForNodes:arg1];
|
||||
[menuManager addItemsToMenu:realSelf forFiles:selectedItems];
|
||||
}
|
||||
|
||||
- (void)OCContextMenuHandlers_configureFromMenuNeedsUpdate:(id)arg1 clickedView:(id)arg2 container:(BOOL)arg3 event:(id)arg4 selectedNodes:(const struct TFENodeVector *)arg5 // 10.9
|
||||
{
|
||||
[self OCContextMenuHandlers_configureFromMenuNeedsUpdate:arg1 clickedView:arg2 container:arg3 event:arg4 selectedNodes:arg5]; // 10.8
|
||||
NSLog(@"ContextMenuHandlers_configureFromMenuNeedsUpdate");
|
||||
TContextMenu* realSelf = (TContextMenu*)self;
|
||||
MenuManager* menuManager = [MenuManager sharedInstance];
|
||||
NSArray* selectedItems = [menuManager pathsForNodes:arg5];
|
||||
[menuManager addItemsToMenu:realSelf forFiles:selectedItems];
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,74 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import "ContextMenuHandlers.h"
|
||||
#import "Finder/Finder.h"
|
||||
#import "MenuManager.h"
|
||||
|
||||
@implementation NSObject (ContextMenuHandlers)
|
||||
|
||||
+ (void) ContextMenuHandlers_handleContextMenuCommon:(unsigned int)arg1 nodes:(const struct TFENodeVector*)arg2 event:(id)arg3 view:(id)arg4 windowController:(id)arg5 addPlugIns:(BOOL)arg6 // Lion
|
||||
{
|
||||
MenuManager* contextMenuUtils = [MenuManager sharedInstance];
|
||||
|
||||
contextMenuUtils.menuItems = (NSMutableArray*)[contextMenuUtils pathsForNodes:arg2];
|
||||
|
||||
[self ContextMenuHandlers_handleContextMenuCommon:arg1 nodes:arg2 event:arg3 view:arg4 windowController:arg5 addPlugIns:arg6];
|
||||
}
|
||||
|
||||
+ (void) ContextMenuHandlers_handleContextMenuCommon:(unsigned int)arg1 nodes:(const struct TFENodeVector*)arg2 event:(id)arg3 view:(id)arg4 browserController:(id)arg5 addPlugIns:(BOOL)arg6 // Mountain Lion
|
||||
{
|
||||
MenuManager* contextMenuUtils = [MenuManager sharedInstance];
|
||||
|
||||
contextMenuUtils.menuItems = (NSMutableArray*)[contextMenuUtils pathsForNodes:arg2];
|
||||
|
||||
[self ContextMenuHandlers_handleContextMenuCommon:arg1 nodes:arg2 event:arg3 view:arg4 browserController:arg5 addPlugIns:arg6];
|
||||
}
|
||||
|
||||
+ (void) ContextMenuHandlers_addViewSpecificStuffToMenu:(id)arg1 browserViewController:(id)arg2 context:(unsigned int)arg3
|
||||
{
|
||||
[self ContextMenuHandlers_addViewSpecificStuffToMenu:arg1 browserViewController:arg2 context:arg3];
|
||||
|
||||
if ([MenuManager sharedInstance].menuItems.count > 0)
|
||||
{
|
||||
MenuManager* contextMenuUtils = [MenuManager sharedInstance];
|
||||
[contextMenuUtils addItemsToMenu:arg1 forPaths:contextMenuUtils.menuItems];
|
||||
[contextMenuUtils.menuItems removeAllObjects];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) ContextMenuHandlers_configureWithNodes:(const struct TFENodeVector*)arg1 windowController:(id)arg2 container:(BOOL)arg3 // Lion
|
||||
{
|
||||
[self ContextMenuHandlers_configureWithNodes:arg1 windowController:arg2 container:arg3];
|
||||
|
||||
TContextMenu* realSelf = (TContextMenu*)self;
|
||||
MenuManager* contextMenuUtils = [MenuManager sharedInstance];
|
||||
|
||||
NSArray* selectedItems = [contextMenuUtils pathsForNodes:arg1];
|
||||
[contextMenuUtils addItemsToMenu:realSelf forPaths:selectedItems];
|
||||
}
|
||||
|
||||
- (void) ContextMenuHandlers_configureWithNodes:(const struct TFENodeVector*)arg1 browserController:(id)arg2 container:(BOOL)arg3 // Mountain Lion
|
||||
{
|
||||
[self ContextMenuHandlers_configureWithNodes:arg1 browserController:arg2 container:arg3];
|
||||
|
||||
TContextMenu* realSelf = (TContextMenu*)self;
|
||||
MenuManager* contextMenuUtils = [MenuManager sharedInstance];
|
||||
|
||||
NSArray* selectedItems = [contextMenuUtils pathsForNodes:arg1];
|
||||
[contextMenuUtils addItemsToMenu:realSelf forPaths:selectedItems];
|
||||
}
|
||||
|
||||
|
||||
@end
|
|
@ -1,2 +0,0 @@
|
|||
/* Localized versions of Info.plist keys */
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,22 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface FinderHook : NSObject
|
||||
|
||||
+ (void)hookClassMethod:(SEL)oldSelector inClass:(NSString*)className toCallToTheNewMethod:(SEL)newSelector;
|
||||
+ (void)hookMethod:(SEL)oldSelector inClass:(NSString*)className toCallToTheNewMethod:(SEL)newSelector;
|
||||
|
||||
@end
|
|
@ -1,125 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import "ContentManager.h"
|
||||
#import "FinderHook.h"
|
||||
#import "IconCache.h"
|
||||
#import "objc/objc-class.h"
|
||||
#import "RequestManager.h"
|
||||
|
||||
static BOOL installed = NO;
|
||||
|
||||
@implementation FinderHook
|
||||
|
||||
+ (void)hookClassMethod:(SEL)oldSelector inClass:(NSString*)className toCallToTheNewMethod:(SEL)newSelector
|
||||
{
|
||||
Class hookedClass = NSClassFromString(className);
|
||||
Method oldMethod = class_getClassMethod(hookedClass, oldSelector);
|
||||
Method newMethod = class_getClassMethod(hookedClass, newSelector);
|
||||
|
||||
method_exchangeImplementations(newMethod, oldMethod);
|
||||
}
|
||||
|
||||
+ (void)hookMethod:(SEL)oldSelector inClass:(NSString*)className toCallToTheNewMethod:(SEL)newSelector
|
||||
{
|
||||
Class hookedClass = NSClassFromString(className);
|
||||
Method oldMethod = class_getInstanceMethod(hookedClass, oldSelector);
|
||||
Method newMethod = class_getInstanceMethod(hookedClass, newSelector);
|
||||
|
||||
method_exchangeImplementations(newMethod, oldMethod);
|
||||
}
|
||||
|
||||
+ (void)install
|
||||
{
|
||||
if (installed)
|
||||
{
|
||||
// NSLog(@"SyncStateFinder: already installed");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// NSLog(@"SyncStateFinder: installing SyncState Shell extension");
|
||||
|
||||
[OwnCloudFinderRequestManager sharedInstance];
|
||||
|
||||
// Icons
|
||||
[self hookMethod:@selector(drawImage:) inClass:@"IKImageBrowserCell" toCallToTheNewMethod:@selector(OCIconOverlayHandlers_IKImageBrowserCell_drawImage:)]; // 10.7 & 10.8 & 10.9 (Icon View arrange by name)
|
||||
|
||||
[self hookMethod:@selector(drawImage:) inClass:@"IKFinderReflectiveIconCell" toCallToTheNewMethod:@selector(OCIconOverlayHandlers_IKFinderReflectiveIconCell_drawImage:)]; // 10.7 & 10.8 & 10.9 (Icon View arrange by everything else)
|
||||
|
||||
[self hookMethod:@selector(drawIconWithFrame:) inClass:@"TColumnCell" toCallToTheNewMethod:@selector(OCIconOverlayHandlers_drawIconWithFrame:)]; // 10.7 & 10.8 & 10.9 Column View
|
||||
|
||||
[self hookMethod:@selector(drawRect:) inClass:@"TDimmableIconImageView" toCallToTheNewMethod:@selector(OCIconOverlayHandlers_drawRect:)]; // 10.9 (List and Coverflow Views)
|
||||
|
||||
// Context Menus
|
||||
[self hookClassMethod:@selector(addViewSpecificStuffToMenu:browserViewController:context:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(OCContextMenuHandlers_addViewSpecificStuffToMenu:browserViewController:context:)]; // 10.7 & 10.8
|
||||
|
||||
[self hookClassMethod:@selector(addViewSpecificStuffToMenu:clickedView:browserViewController:context:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(OCContextMenuHandlers_addViewSpecificStuffToMenu:clickedView:browserViewController:context:)]; // 10.9
|
||||
|
||||
[self hookClassMethod:@selector(handleContextMenuCommon:nodes:event:view:windowController:addPlugIns:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(OCContextMenuHandlers_handleContextMenuCommon:nodes:event:view:windowController:addPlugIns:)]; // 10.7
|
||||
|
||||
[self hookClassMethod:@selector(handleContextMenuCommon:nodes:event:view:browserController:addPlugIns:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(OCContextMenuHandlers_handleContextMenuCommon:nodes:event:view:browserController:addPlugIns:)]; // 10.8
|
||||
|
||||
[self hookClassMethod:@selector(handleContextMenuCommon:nodes:event:clickedView:browserViewController:addPlugIns:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(OCContextMenuHandlers_handleContextMenuCommon:nodes:event:clickedView:browserViewController:addPlugIns:)]; // 10.9
|
||||
|
||||
[self hookMethod:@selector(configureWithNodes:windowController:container:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(OCContextMenuHandlers_configureWithNodes:windowController:container:)]; // 10.7
|
||||
|
||||
[self hookMethod:@selector(configureWithNodes:browserController:container:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(OCContextMenuHandlers_configureWithNodes:browserController:container:)]; // 10.8
|
||||
|
||||
[self hookMethod:@selector(configureFromMenuNeedsUpdate:clickedView:container:event:selectedNodes:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(OCContextMenuHandlers_configureFromMenuNeedsUpdate:clickedView:container:event:selectedNodes:)]; // 10.9
|
||||
|
||||
installed = YES;
|
||||
|
||||
// NSLog(@"SyncStateFinder: installed");
|
||||
}
|
||||
|
||||
+ (void)uninstall
|
||||
{
|
||||
if (!installed)
|
||||
{
|
||||
// NSLog(@"SyncStateFinder: not installed");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// NSLog(@"SyncStateFinder: uninstalling");
|
||||
|
||||
[[OwnCloudFinderContentManager sharedInstance] dealloc];
|
||||
|
||||
[[IconCache sharedInstance] dealloc];
|
||||
|
||||
[[OwnCloudFinderRequestManager sharedInstance] dealloc];
|
||||
|
||||
// Icons
|
||||
[self hookMethod:@selector(OCIconOverlayHandlers_drawImage:) inClass:@"TIconViewCell" toCallToTheNewMethod:@selector(drawImage:)]; // 10.7 & 10.8 & 10.9
|
||||
|
||||
[self hookMethod:@selector(OCIconOverlayHandlers_drawIconWithFrame:) inClass:@"TListViewIconAndTextCell" toCallToTheNewMethod:@selector(drawIconWithFrame:)]; // 10.7 & 10.8 & 10.9
|
||||
|
||||
// Context Menus
|
||||
[self hookClassMethod:@selector(OCContextMenuHandlers_addViewSpecificStuffToMenu:browserViewController:context:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(addViewSpecificStuffToMenu:browserViewController:context:)]; // 10.7 & 10.8
|
||||
|
||||
[self hookClassMethod:@selector(OCContextMenuHandlers_handleContextMenuCommon:nodes:event:view:windowController:addPlugIns:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(handleContextMenuCommon:nodes:event:view:windowController:addPlugIns:)]; // 10.7
|
||||
|
||||
[self hookMethod:@selector(OCContextMenuHandlers_configureWithNodes:windowController:container:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(configureWithNodes:windowController:container:)]; // 10.7
|
||||
|
||||
[self hookClassMethod:@selector(OCContextMenuHandlers_handleContextMenuCommon:nodes:event:view:browserController:addPlugIns:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(handleContextMenuCommon:nodes:event:view:browserController:addPlugIns:)]; // 10.8
|
||||
|
||||
[self hookMethod:@selector(OCContextMenuHandlers_configureWithNodes:browserController:container:) inClass:@"TContextMenu" toCallToTheNewMethod:@selector(configureWithNodes:browserController:container:)]; // 10.8
|
||||
|
||||
installed = NO;
|
||||
|
||||
// NSLog(@"SyncStateFinder: uninstalled");
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,24 +0,0 @@
|
|||
//
|
||||
// FinishedIconCache.h
|
||||
// OwnCloudFinder
|
||||
//
|
||||
// Created by Markus Goetz on 01/10/14.
|
||||
//
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface FinishedIconCache : NSObject {
|
||||
NSCache *_cache;
|
||||
long long _hits;
|
||||
long long _misses;
|
||||
}
|
||||
|
||||
+ (FinishedIconCache*)sharedInstance;
|
||||
|
||||
- (NSImage*)getIcon:(NSString*)fileName overlayIconIndex:(int)idx width:(float)w height:(float)h;
|
||||
- (void)registerIcon:(NSImage*)icon withFileName:(NSString*)fileName overlayIconIndex:(int)idx width:(float)w height:(float)h;
|
||||
|
||||
|
||||
@end
|
|
@ -1,91 +0,0 @@
|
|||
//
|
||||
// FinishedIconCache.m
|
||||
// OwnCloudFinder
|
||||
//
|
||||
// Created by Markus Goetz on 01/10/14.
|
||||
//
|
||||
//
|
||||
|
||||
#import "FinishedIconCache.h"
|
||||
|
||||
|
||||
@interface FinishedIconCacheItem : NSObject
|
||||
@property (nonatomic, strong) NSImage *icon;
|
||||
@property (nonatomic) NSTimeInterval maxAge;
|
||||
@end
|
||||
|
||||
@implementation FinishedIconCacheItem
|
||||
@synthesize icon;
|
||||
@synthesize maxAge;
|
||||
- (void)dealloc {
|
||||
//NSLog(@"RELEASE %@ %@", self, self.icon);
|
||||
if (self.icon) {
|
||||
[self->icon release];
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation FinishedIconCache
|
||||
|
||||
static FinishedIconCache* sharedInstance = nil;
|
||||
|
||||
- init
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
_cache = [[NSCache alloc] init];
|
||||
_cache.totalCostLimit = (2880 * 1800); // mbp15 screen size
|
||||
_hits = 0;
|
||||
_misses = 0;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_cache dealloc];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
+ (FinishedIconCache*)sharedInstance
|
||||
{
|
||||
@synchronized(self)
|
||||
{
|
||||
if (sharedInstance == nil)
|
||||
{
|
||||
sharedInstance = [[self alloc] init];
|
||||
}
|
||||
}
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
|
||||
- (NSImage*)getIcon:(NSString*)fileName overlayIconIndex:(int)idx width:(float)w height:(float)h
|
||||
{
|
||||
NSString *cacheKey = [NSString stringWithFormat:@"%@--%d--%f%f", fileName, idx, w,h];
|
||||
FinishedIconCacheItem *item = [_cache objectForKey:cacheKey];
|
||||
if (item) {
|
||||
if (item.maxAge > [[NSDate date] timeIntervalSinceReferenceDate]) {
|
||||
_hits++;
|
||||
return item.icon;
|
||||
}
|
||||
}
|
||||
_misses++;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- (void)registerIcon:(NSImage*)icon withFileName:(NSString*)fileName overlayIconIndex:(int)idx width:(float)w height:(float)h
|
||||
{
|
||||
NSString *cacheKey = [NSString stringWithFormat:@"%@--%d--%f%f", fileName, idx, w, h];
|
||||
FinishedIconCacheItem *item = [[FinishedIconCacheItem alloc] init];
|
||||
item.icon = icon;
|
||||
// max age between 1 sec and 5 sec
|
||||
item.maxAge = [[NSDate date] timeIntervalSinceReferenceDate] + 1.0 + 4.0*((double)arc4random() / 0x100000000);
|
||||
[_cache setObject:item forKey:cacheKey cost:w*h];
|
||||
[item release];
|
||||
//NSLog(@"CACHE hit/miss ratio: %f", (float)_hits/(float)_misses);
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,27 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface IconCache : NSObject {
|
||||
int _currentIconId;
|
||||
NSMutableDictionary* _iconIdDictionary;
|
||||
}
|
||||
|
||||
+ (IconCache*)sharedInstance;
|
||||
|
||||
- (NSImage*)getIcon:(NSNumber*)iconId;
|
||||
- (NSNumber*)registerIcon:(NSImage*)image;
|
||||
|
||||
@end
|
|
@ -1,72 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import "IconCache.h"
|
||||
|
||||
@implementation IconCache
|
||||
|
||||
static IconCache* sharedInstance = nil;
|
||||
|
||||
- init
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self)
|
||||
{
|
||||
_iconIdDictionary = [[NSMutableDictionary alloc] init];
|
||||
_currentIconId = 0;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_iconIdDictionary release];
|
||||
sharedInstance = nil;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
+ (IconCache*)sharedInstance
|
||||
{
|
||||
@synchronized(self)
|
||||
{
|
||||
if (sharedInstance == nil)
|
||||
{
|
||||
sharedInstance = [[self alloc] init];
|
||||
}
|
||||
}
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
- (NSImage*)getIcon:(NSNumber*)iconId
|
||||
{
|
||||
NSImage* image = [_iconIdDictionary objectForKey:iconId];
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
- (NSNumber*)registerIcon:(NSImage*)image
|
||||
{
|
||||
_currentIconId++;
|
||||
|
||||
NSNumber* iconId = [NSNumber numberWithInt:_currentIconId];
|
||||
|
||||
[_iconIdDictionary setObject:image forKey:iconId];
|
||||
|
||||
return iconId;
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,23 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface NSObject (IconOverlayHandlers)
|
||||
|
||||
- (void)OCIconOverlayHandlers_drawIconWithFrame:(struct CGRect)arg1;
|
||||
- (void)OCIconOverlayHandlers_drawImage:(id)arg1;
|
||||
- (void)OCIconOverlayHandlers_drawRect:(struct CGRect)arg1;
|
||||
|
||||
@end
|
|
@ -1,176 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import <objc/runtime.h>
|
||||
#import "ContentManager.h"
|
||||
#import "IconCache.h"
|
||||
#import "FinishedIconCache.h"
|
||||
#import "IconOverlayHandlers.h"
|
||||
#import "Finder/Finder.h"
|
||||
|
||||
@implementation NSObject (IconOverlayHandlers)
|
||||
|
||||
- (void)OCIconOverlayHandlers_drawIconWithFrame:(struct CGRect)arg1
|
||||
{
|
||||
[self OCIconOverlayHandlers_drawIconWithFrame:arg1];
|
||||
|
||||
NSURL* url = [[NSClassFromString(@"FINode") nodeFromNodeRef:[(TIconAndTextCell*)self node]->fNodeRef] previewItemURL];
|
||||
|
||||
BOOL isDir;
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath: [url path] isDirectory:&isDir] == NO) {
|
||||
NSLog(@"ERROR: Could not determine file type of %@", [url path]);
|
||||
isDir = NO;
|
||||
}
|
||||
|
||||
NSNumber* imageIndex = [[OwnCloudFinderContentManager sharedInstance] iconByPath:[url path] isDirectory:isDir];
|
||||
|
||||
//NSLog(@"1 The icon index is %d", [imageIndex intValue]);
|
||||
if ([imageIndex intValue] > 0)
|
||||
{
|
||||
NSImage* image = [[IconCache sharedInstance] getIcon:imageIndex];
|
||||
|
||||
if (image != nil)
|
||||
{
|
||||
struct CGRect arg2 = [(TIconViewCell*)self imageRectForBounds:arg1];
|
||||
|
||||
[image drawInRect:NSMakeRect(arg2.origin.x, arg2.origin.y, arg2.size.width, arg2.size.height) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:TRUE hints:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)OCIconOverlayHandlers_IKImageBrowserCell_drawImage:(id)arg1
|
||||
{
|
||||
IKImageWrapper*imageWrapper = [self OCIconOverlayHandlers_imageWrapper:arg1];
|
||||
|
||||
[self OCIconOverlayHandlers_IKImageBrowserCell_drawImage:imageWrapper];
|
||||
}
|
||||
|
||||
- (void)OCIconOverlayHandlers_IKFinderReflectiveIconCell_drawImage:(id)arg1
|
||||
{
|
||||
IKImageWrapper*imageWrapper = [self OCIconOverlayHandlers_imageWrapper:arg1];
|
||||
|
||||
[self OCIconOverlayHandlers_IKFinderReflectiveIconCell_drawImage:imageWrapper];
|
||||
}
|
||||
|
||||
- (IKImageWrapper*)OCIconOverlayHandlers_imageWrapper:(id)arg1
|
||||
{
|
||||
TIconViewCell* realSelf = (TIconViewCell*)self;
|
||||
FINode* node = (FINode*)[realSelf representedItem];
|
||||
|
||||
NSURL* url = [node previewItemURL];
|
||||
|
||||
BOOL isDir;
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:[url path] isDirectory:&isDir] == NO) {
|
||||
NSLog(@"ERROR: Could not determine file type of %@", [url path]);
|
||||
isDir = NO;
|
||||
}
|
||||
|
||||
NSNumber* imageIndex = [[OwnCloudFinderContentManager sharedInstance] iconByPath:[url path] isDirectory:isDir];
|
||||
//NSLog(@"2 The icon index is %d %@ %@", [imageIndex intValue], [url path], isDir ? @"isDir" : @"");
|
||||
|
||||
if ([imageIndex intValue] > 0)
|
||||
{
|
||||
NSImage* icon = [arg1 _nsImage];
|
||||
|
||||
// Use the short term icon cache that possibly has the finished icon
|
||||
FinishedIconCache *finishedIconCache = [FinishedIconCache sharedInstance];
|
||||
NSImage *finishedImage = [finishedIconCache getIcon:[url path] overlayIconIndex:imageIndex width:[icon size].width height:[icon size].height];
|
||||
if (finishedImage) {
|
||||
//NSLog(@"X Got finished image from cache %@ %@", finishedImage, [url path]);
|
||||
return [[[IKImageWrapper alloc] initWithNSImage:finishedImage] autorelease];;
|
||||
} else {
|
||||
//NSLog(@"X Need to redraw %@", [url path]);
|
||||
}
|
||||
|
||||
NSImage* iconimage = [[IconCache sharedInstance] getIcon:[NSNumber numberWithInt:[imageIndex intValue]]];
|
||||
|
||||
if (iconimage != nil)
|
||||
{
|
||||
[icon lockFocus];
|
||||
|
||||
CGContextRef myContext = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
|
||||
CGRect destRect = CGRectMake(0, 0, [icon size].width, [icon size].height);
|
||||
|
||||
CGImageRef cgImage = [iconimage CGImageForProposedRect:&destRect
|
||||
context:[NSGraphicsContext currentContext]
|
||||
hints:nil];
|
||||
if (cgImage) {
|
||||
CGContextDrawImage(myContext, destRect, cgImage);
|
||||
//CGImageRelease(cgImage); // leak here? if we leave this code in, Finder crashes
|
||||
// But actually i'm not seeing a leak in Activity Monitor.. maybe it is not really leaking?
|
||||
} else {
|
||||
NSLog(@"No image given!!!!!11 %@", [url path]);
|
||||
}
|
||||
|
||||
[icon unlockFocus];
|
||||
}
|
||||
|
||||
// Insert into cache
|
||||
[finishedIconCache registerIcon:icon withFileName:[url path] overlayIconIndex:imageIndex width:[icon size].width height:[icon size].height];
|
||||
|
||||
return [[[IKImageWrapper alloc] initWithNSImage:icon] autorelease];
|
||||
}
|
||||
else
|
||||
{
|
||||
return arg1;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)OCIconOverlayHandlers_drawRect:(struct CGRect)arg1
|
||||
{
|
||||
[self OCIconOverlayHandlers_drawRect:arg1];
|
||||
|
||||
NSView* supersuperview = [[(NSView*)self superview] superview];
|
||||
|
||||
if ([supersuperview isKindOfClass:(id)objc_getClass("TListRowView")])
|
||||
{
|
||||
TListRowView *listRowView = (TListRowView*) supersuperview;
|
||||
FINode *fiNode;
|
||||
|
||||
object_getInstanceVariable(listRowView, "_node", (void**)&fiNode);
|
||||
|
||||
NSURL *url;
|
||||
|
||||
if ([fiNode respondsToSelector:@selector(previewItemURL)])
|
||||
{
|
||||
url = [fiNode previewItemURL];
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL isDir;
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:[url path] isDirectory: &isDir] == NO) {
|
||||
NSLog(@"ERROR: Could not determine file type of %@", [url path]);
|
||||
isDir = NO;
|
||||
}
|
||||
|
||||
NSNumber* imageIndex = [[OwnCloudFinderContentManager sharedInstance] iconByPath:[url path] isDirectory:isDir];
|
||||
//NSLog(@"3 The icon index is %d", [imageIndex intValue]);
|
||||
|
||||
if ([imageIndex intValue] > 0)
|
||||
{
|
||||
NSImage* image = [[IconCache sharedInstance] getIcon:imageIndex];
|
||||
|
||||
if (image != nil)
|
||||
{
|
||||
[image drawInRect:NSMakeRect(arg1.origin.x, arg1.origin.y, arg1.size.width, arg1.size.height) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:TRUE hints:nil];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,48 +0,0 @@
|
|||
<?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>SocketApiPrefix</key>
|
||||
<string>$(OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX)$(OC_APPLICATION_REV_DOMAIN)</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.owncloud.finder</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>OWNC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>CFPlugInDynamicRegisterFunction</key>
|
||||
<string></string>
|
||||
<key>CFPlugInDynamicRegistration</key>
|
||||
<string>NO</string>
|
||||
<key>CFPlugInFactories</key>
|
||||
<dict>
|
||||
<key>00000000-0000-0000-0000-000000000000</key>
|
||||
<string>MyFactoryFunction</string>
|
||||
</dict>
|
||||
<key>CFPlugInTypes</key>
|
||||
<dict>
|
||||
<key>00000000-0000-0000-0000-000000000000</key>
|
||||
<array>
|
||||
<string>00000000-0000-0000-0000-000000000000</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>CFPlugInUnloadFunction</key>
|
||||
<string></string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>FinderHook</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,29 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class TContextMenu;
|
||||
struct TFENodeVector;
|
||||
|
||||
@interface MenuManager : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray* menuItems;
|
||||
|
||||
+ (MenuManager*)sharedInstance;
|
||||
|
||||
- (void)addItemsToMenu:(TContextMenu*)menu forFiles:(NSArray*)files;
|
||||
- (NSArray*)pathsForNodes:(const struct TFENodeVector*)nodes;
|
||||
|
||||
@end
|
|
@ -1,188 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import "MenuManager.h"
|
||||
#import "Finder/Finder.h"
|
||||
#import "RequestManager.h"
|
||||
|
||||
@implementation MenuManager
|
||||
|
||||
static MenuManager* sharedInstance = nil;
|
||||
|
||||
+ (MenuManager*)sharedInstance
|
||||
{
|
||||
@synchronized(self)
|
||||
{
|
||||
if (sharedInstance == nil)
|
||||
{
|
||||
sharedInstance = [[self alloc] init];
|
||||
}
|
||||
}
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
- init
|
||||
{
|
||||
return [super init];
|
||||
}
|
||||
|
||||
- (void)addChildrenSubMenuItems:(NSMenuItem*)parentMenuItem withChildren:(NSArray*)menuItemsDictionaries forFiles:(NSArray*)files
|
||||
{
|
||||
NSMenu* menu = [[NSMenu alloc] init];
|
||||
|
||||
for (int i = 0; i < [menuItemsDictionaries count]; ++i)
|
||||
{
|
||||
NSDictionary* menuItemDictionary = [menuItemsDictionaries objectAtIndex:i];
|
||||
|
||||
NSString* submenuTitle = [menuItemDictionary objectForKey:@"title"];
|
||||
BOOL enabled = [[menuItemDictionary objectForKey:@"enabled"] boolValue];
|
||||
NSString* uuid = [menuItemDictionary objectForKey:@"uuid"];
|
||||
NSArray* childrenSubMenuItems = (NSArray*)[menuItemDictionary objectForKey:@"contextMenuItems"];
|
||||
|
||||
if ([submenuTitle isEqualToString:@"_SEPARATOR_"])
|
||||
{
|
||||
[menu addItem:[NSMenuItem separatorItem]];
|
||||
}
|
||||
else if (childrenSubMenuItems != nil && [childrenSubMenuItems count] != 0)
|
||||
{
|
||||
NSMenuItem* submenuItem = [menu addItemWithTitle:submenuTitle action:nil keyEquivalent:@""];
|
||||
|
||||
[self addChildrenSubMenuItems:submenuItem withChildren:childrenSubMenuItems forFiles:files];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self createActionMenuItemIn:menu withTitle:submenuTitle withIndex:i enabled:enabled withUuid:uuid forFiles:files];
|
||||
}
|
||||
}
|
||||
|
||||
[parentMenuItem setSubmenu:menu];
|
||||
|
||||
[menu release];
|
||||
}
|
||||
|
||||
- (void)addItemsToMenu:(TContextMenu*)menu forFiles:(NSArray*)files
|
||||
{
|
||||
OwnCloudFinderRequestManager *requestManager = [OwnCloudFinderRequestManager sharedInstance];
|
||||
NSString *shareItemTitle = [requestManager shareItemTitle];
|
||||
if (!shareItemTitle || shareItemTitle.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < files.count; i++) {
|
||||
NSString *fn = [files objectAtIndex:i];
|
||||
BOOL isDir = false;
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:fn isDirectory:&isDir]) {
|
||||
if (![requestManager isRegisteredPath:fn isDirectory:isDir]) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NSMutableArray* menuItemsArray = [[[NSMutableArray alloc] init] autorelease];
|
||||
NSMutableDictionary *firstEntry = [[[NSMutableDictionary alloc] init] autorelease];
|
||||
[firstEntry setValue:[NSNumber numberWithBool:YES] forKey:@"enabled"];
|
||||
[firstEntry setValue:shareItemTitle forKey:@"title"];
|
||||
[menuItemsArray addObject:firstEntry];
|
||||
|
||||
// Find the menu with a submenu which should be the share menu position
|
||||
NSInteger menuIndex = MIN(4, menu.itemArray.count);
|
||||
for (int i = menuIndex; i < menu.itemArray.count; i++) {
|
||||
if ([[menu itemAtIndex:i] hasSubmenu]) {
|
||||
menuIndex = i;
|
||||
//NSLog(@"addItemsToMenu: menuIndex --> %lu (count=%lu)", menuIndex, (unsigned long)menu.itemArray.count);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < [menuItemsArray count]; ++i)
|
||||
{
|
||||
NSDictionary* menuItemDictionary = [menuItemsArray objectAtIndex:i];
|
||||
|
||||
NSString* mainMenuTitle = [menuItemDictionary objectForKey:@"title"];
|
||||
|
||||
if ([mainMenuTitle isEqualToString:@""])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
menuIndex++;
|
||||
|
||||
BOOL enabled = [[menuItemDictionary objectForKey:@"enabled"] boolValue];
|
||||
NSString* uuid = [menuItemDictionary objectForKey:@"uuid"];
|
||||
NSArray* childrenSubMenuItems = (NSArray*)[menuItemDictionary objectForKey:@"contextMenuItems"];
|
||||
|
||||
if (childrenSubMenuItems != nil && [childrenSubMenuItems count] != 0)
|
||||
{
|
||||
NSMenuItem* mainMenuItem = [menu insertItemWithTitle:mainMenuTitle action:nil keyEquivalent:@"" atIndex:menuIndex];
|
||||
|
||||
[self addChildrenSubMenuItems:mainMenuItem withChildren:childrenSubMenuItems forFiles:files];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self createActionMenuItemIn:menu withTitle:mainMenuTitle withIndex:menuIndex enabled:enabled withUuid:uuid forFiles:files];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)createActionMenuItemIn:(NSMenu*)menu withTitle:(NSString*)title withIndex:(NSInteger*)index enabled:(BOOL)enabled withUuid:(NSString*)uuid forFiles:(NSArray*)files
|
||||
{
|
||||
NSMenuItem* mainMenuItem = [menu insertItemWithTitle:title action:@selector(menuItemClicked:) keyEquivalent:@"" atIndex:index];
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
[mainMenuItem setTarget:self];
|
||||
}
|
||||
|
||||
NSDictionary* menuActionDictionary = [[NSMutableDictionary alloc] init];
|
||||
[menuActionDictionary setValue:uuid forKey:@"uuid"];
|
||||
NSMutableArray* filesArray = [files copy];
|
||||
[menuActionDictionary setValue:filesArray forKey:@"files"];
|
||||
|
||||
[mainMenuItem setRepresentedObject:menuActionDictionary];
|
||||
|
||||
[filesArray release];
|
||||
[menuActionDictionary release];
|
||||
}
|
||||
|
||||
- (void)menuItemClicked:(id)param
|
||||
{
|
||||
[[OwnCloudFinderRequestManager sharedInstance] menuItemClicked:[param representedObject]];
|
||||
}
|
||||
|
||||
- (NSArray*)pathsForNodes:(const struct TFENodeVector*)nodes
|
||||
{
|
||||
struct TFENode* start = nodes->_M_impl._M_start;
|
||||
struct TFENode* end = nodes->_M_impl._M_finish;
|
||||
|
||||
int count = end - start;
|
||||
|
||||
NSMutableArray* selectedItems = [[NSMutableArray alloc] initWithCapacity:count];
|
||||
struct TFENode* current;
|
||||
|
||||
for (current = start; current < end; ++current)
|
||||
{
|
||||
FINode* node = (FINode*)[NSClassFromString(@"FINode") nodeFromNodeRef:current->fNodeRef];
|
||||
|
||||
NSString* path = [[node previewItemURL] path];
|
||||
|
||||
if (path)
|
||||
{
|
||||
[selectedItems addObject:path];
|
||||
}
|
||||
}
|
||||
|
||||
return [selectedItems autorelease];
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,369 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
0B13ECAF173C687900548DA1 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BFC9ACB173C57E400CDD329 /* Security.framework */; };
|
||||
5BB74A8719DBF9BB001BAAAC /* FinishedIconCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BB74A8619DBF9BB001BAAAC /* FinishedIconCache.m */; };
|
||||
692C18A516660C4700BF6A53 /* ContextMenuHandlers.m in Sources */ = {isa = PBXBuildFile; fileRef = 692C18A416660C4600BF6A53 /* ContextMenuHandlers.m */; };
|
||||
692C18A9166617F500BF6A53 /* IconOverlayHandlers.m in Sources */ = {isa = PBXBuildFile; fileRef = 692C18A8166617F500BF6A53 /* IconOverlayHandlers.m */; };
|
||||
692C18AC1666392700BF6A53 /* MenuManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 692C18AB1666392700BF6A53 /* MenuManager.m */; };
|
||||
6993878616494C000044E4DF /* RequestManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6993878516494C000044E4DF /* RequestManager.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
|
||||
69948B361636D50E0093B6CE /* ContentManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 69948B351636D50E0093B6CE /* ContentManager.m */; };
|
||||
8C37DD9F161593BD00016A95 /* FinderHook.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C37DD9A161593BD00016A95 /* FinderHook.m */; };
|
||||
8C37DDB2161593FF00016A95 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C37DDB1161593FF00016A95 /* Cocoa.framework */; };
|
||||
8C37DDBA161594B400016A95 /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C37DDB9161594B400016A95 /* Quartz.framework */; };
|
||||
8C99F6941622D145002D2135 /* IconCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C99F6931622D145002D2135 /* IconCache.m */; };
|
||||
8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; };
|
||||
8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; };
|
||||
C220057B1B31B04C00A4FB37 /* error_swm.icns in Resources */ = {isa = PBXBuildFile; fileRef = C22005731B31B04C00A4FB37 /* error_swm.icns */; };
|
||||
C220057C1B31B04C00A4FB37 /* error.icns in Resources */ = {isa = PBXBuildFile; fileRef = C22005741B31B04C00A4FB37 /* error.icns */; };
|
||||
C220057D1B31B04C00A4FB37 /* ok_swm.icns in Resources */ = {isa = PBXBuildFile; fileRef = C22005751B31B04C00A4FB37 /* ok_swm.icns */; };
|
||||
C220057E1B31B04C00A4FB37 /* ok.icns in Resources */ = {isa = PBXBuildFile; fileRef = C22005761B31B04C00A4FB37 /* ok.icns */; };
|
||||
C220057F1B31B04C00A4FB37 /* sync_swm.icns in Resources */ = {isa = PBXBuildFile; fileRef = C22005771B31B04C00A4FB37 /* sync_swm.icns */; };
|
||||
C22005801B31B04C00A4FB37 /* sync.icns in Resources */ = {isa = PBXBuildFile; fileRef = C22005781B31B04C00A4FB37 /* sync.icns */; };
|
||||
C22005811B31B04C00A4FB37 /* warning_swm.icns in Resources */ = {isa = PBXBuildFile; fileRef = C22005791B31B04C00A4FB37 /* warning_swm.icns */; };
|
||||
C22005821B31B04C00A4FB37 /* warning.icns in Resources */ = {isa = PBXBuildFile; fileRef = C220057A1B31B04C00A4FB37 /* warning.icns */; };
|
||||
C2B573831B1CD5AE00303B36 /* SyncClientProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = C2B573821B1CD5AE00303B36 /* SyncClientProxy.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
|
||||
0B2BF60B176A43DB001246CD /* Finder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Finder.h; sourceTree = "<group>"; };
|
||||
0BFC9ACB173C57E400CDD329 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
5BB74A8519DBF9BB001BAAAC /* FinishedIconCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FinishedIconCache.h; sourceTree = "<group>"; };
|
||||
5BB74A8619DBF9BB001BAAAC /* FinishedIconCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FinishedIconCache.m; sourceTree = "<group>"; };
|
||||
692C18A316660C4600BF6A53 /* ContextMenuHandlers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextMenuHandlers.h; sourceTree = "<group>"; };
|
||||
692C18A416660C4600BF6A53 /* ContextMenuHandlers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContextMenuHandlers.m; sourceTree = "<group>"; };
|
||||
692C18A7166617F500BF6A53 /* IconOverlayHandlers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IconOverlayHandlers.h; sourceTree = "<group>"; };
|
||||
692C18A8166617F500BF6A53 /* IconOverlayHandlers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IconOverlayHandlers.m; sourceTree = "<group>"; };
|
||||
692C18AA1666392700BF6A53 /* MenuManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MenuManager.h; sourceTree = "<group>"; };
|
||||
692C18AB1666392700BF6A53 /* MenuManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MenuManager.m; sourceTree = "<group>"; };
|
||||
6993878416494C000044E4DF /* RequestManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RequestManager.h; sourceTree = "<group>"; };
|
||||
6993878516494C000044E4DF /* RequestManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RequestManager.m; sourceTree = "<group>"; usesTabs = 1; };
|
||||
69948B341636D50E0093B6CE /* ContentManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentManager.h; sourceTree = "<group>"; };
|
||||
69948B351636D50E0093B6CE /* ContentManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContentManager.m; sourceTree = "<group>"; };
|
||||
8C37DD99161593BD00016A95 /* FinderHook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FinderHook.h; sourceTree = "<group>"; };
|
||||
8C37DD9A161593BD00016A95 /* FinderHook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FinderHook.m; sourceTree = "<group>"; };
|
||||
8C37DDB1161593FF00016A95 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
8C37DDB9161594B400016A95 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; };
|
||||
8C99F6921622D145002D2135 /* IconCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IconCache.h; sourceTree = "<group>"; };
|
||||
8C99F6931622D145002D2135 /* IconCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IconCache.m; sourceTree = "<group>"; };
|
||||
8D576316048677EA00EA77CD /* SyncStateFinder.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SyncStateFinder.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
C22005731B31B04C00A4FB37 /* error_swm.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = error_swm.icns; path = ../../icons/icns/error_swm.icns; sourceTree = "<group>"; };
|
||||
C22005741B31B04C00A4FB37 /* error.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = error.icns; path = ../../icons/icns/error.icns; sourceTree = "<group>"; };
|
||||
C22005751B31B04C00A4FB37 /* ok_swm.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = ok_swm.icns; path = ../../icons/icns/ok_swm.icns; sourceTree = "<group>"; };
|
||||
C22005761B31B04C00A4FB37 /* ok.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = ok.icns; path = ../../icons/icns/ok.icns; sourceTree = "<group>"; };
|
||||
C22005771B31B04C00A4FB37 /* sync_swm.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = sync_swm.icns; path = ../../icons/icns/sync_swm.icns; sourceTree = "<group>"; };
|
||||
C22005781B31B04C00A4FB37 /* sync.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = sync.icns; path = ../../icons/icns/sync.icns; sourceTree = "<group>"; };
|
||||
C22005791B31B04C00A4FB37 /* warning_swm.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = warning_swm.icns; path = ../../icons/icns/warning_swm.icns; sourceTree = "<group>"; };
|
||||
C220057A1B31B04C00A4FB37 /* warning.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = warning.icns; path = ../../icons/icns/warning.icns; sourceTree = "<group>"; };
|
||||
C2B573811B1CD5AE00303B36 /* SyncClientProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SyncClientProxy.h; sourceTree = "<group>"; };
|
||||
C2B573821B1CD5AE00303B36 /* SyncClientProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncClientProxy.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D576313048677EA00EA77CD /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0B13ECAF173C687900548DA1 /* Security.framework in Frameworks */,
|
||||
8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */,
|
||||
8C37DDB2161593FF00016A95 /* Cocoa.framework in Frameworks */,
|
||||
8C37DDBA161594B400016A95 /* Quartz.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
089C166AFE841209C02AAC07 /* SyncStateFinder */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C2B573801B1CD5AE00303B36 /* common */,
|
||||
08FB77AFFE84173DC02AAC07 /* Source */,
|
||||
089C167CFE841241C02AAC07 /* Resources */,
|
||||
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
|
||||
19C28FB6FE9D52B211CA2CBB /* Products */,
|
||||
);
|
||||
name = SyncStateFinder;
|
||||
sourceTree = "<group>";
|
||||
usesTabs = 1;
|
||||
};
|
||||
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0BFC9ACB173C57E400CDD329 /* Security.framework */,
|
||||
8C37DDB9161594B400016A95 /* Quartz.framework */,
|
||||
0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */,
|
||||
8C37DDB1161593FF00016A95 /* Cocoa.framework */,
|
||||
);
|
||||
name = "External Frameworks and Libraries";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C167CFE841241C02AAC07 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C22005731B31B04C00A4FB37 /* error_swm.icns */,
|
||||
C22005741B31B04C00A4FB37 /* error.icns */,
|
||||
C22005751B31B04C00A4FB37 /* ok_swm.icns */,
|
||||
C22005761B31B04C00A4FB37 /* ok.icns */,
|
||||
C22005771B31B04C00A4FB37 /* sync_swm.icns */,
|
||||
C22005781B31B04C00A4FB37 /* sync.icns */,
|
||||
C22005791B31B04C00A4FB37 /* warning_swm.icns */,
|
||||
C220057A1B31B04C00A4FB37 /* warning.icns */,
|
||||
8D576317048677EA00EA77CD /* Info.plist */,
|
||||
8D5B49A704867FD3000E48DA /* InfoPlist.strings */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB77AFFE84173DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0B2BF60A176A43DB001246CD /* Finder */,
|
||||
8C37DD99161593BD00016A95 /* FinderHook.h */,
|
||||
8C37DD9A161593BD00016A95 /* FinderHook.m */,
|
||||
692C18A316660C4600BF6A53 /* ContextMenuHandlers.h */,
|
||||
692C18A416660C4600BF6A53 /* ContextMenuHandlers.m */,
|
||||
692C18A7166617F500BF6A53 /* IconOverlayHandlers.h */,
|
||||
692C18A8166617F500BF6A53 /* IconOverlayHandlers.m */,
|
||||
6993878416494C000044E4DF /* RequestManager.h */,
|
||||
6993878516494C000044E4DF /* RequestManager.m */,
|
||||
69948B341636D50E0093B6CE /* ContentManager.h */,
|
||||
69948B351636D50E0093B6CE /* ContentManager.m */,
|
||||
8C99F6921622D145002D2135 /* IconCache.h */,
|
||||
8C99F6931622D145002D2135 /* IconCache.m */,
|
||||
5BB74A8519DBF9BB001BAAAC /* FinishedIconCache.h */,
|
||||
5BB74A8619DBF9BB001BAAAC /* FinishedIconCache.m */,
|
||||
692C18AA1666392700BF6A53 /* MenuManager.h */,
|
||||
692C18AB1666392700BF6A53 /* MenuManager.m */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0B2BF60A176A43DB001246CD /* Finder */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0B2BF60B176A43DB001246CD /* Finder.h */,
|
||||
);
|
||||
path = Finder;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FB6FE9D52B211CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D576316048677EA00EA77CD /* SyncStateFinder.bundle */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C2B573801B1CD5AE00303B36 /* common */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C2B573811B1CD5AE00303B36 /* SyncClientProxy.h */,
|
||||
C2B573821B1CD5AE00303B36 /* SyncClientProxy.m */,
|
||||
);
|
||||
name = common;
|
||||
path = ../common;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D57630D048677EA00EA77CD /* SyncStateFinder */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB911A08733D790010E9CD /* Build configuration list for PBXNativeTarget "SyncStateFinder" */;
|
||||
buildPhases = (
|
||||
8D57630F048677EA00EA77CD /* Resources */,
|
||||
8D576311048677EA00EA77CD /* Sources */,
|
||||
8D576313048677EA00EA77CD /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = SyncStateFinder;
|
||||
productInstallPath = "$(HOME)/Library/Bundles";
|
||||
productName = SyncStateFinder;
|
||||
productReference = 8D576316048677EA00EA77CD /* SyncStateFinder.bundle */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0460;
|
||||
};
|
||||
buildConfigurationList = 1DEB911E08733D790010E9CD /* Build configuration list for PBXProject "OwnCloudFinder" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 089C166AFE841209C02AAC07 /* SyncStateFinder */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D57630D048677EA00EA77CD /* SyncStateFinder */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D57630F048677EA00EA77CD /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C220057E1B31B04C00A4FB37 /* ok.icns in Resources */,
|
||||
C22005821B31B04C00A4FB37 /* warning.icns in Resources */,
|
||||
C220057F1B31B04C00A4FB37 /* sync_swm.icns in Resources */,
|
||||
C220057C1B31B04C00A4FB37 /* error.icns in Resources */,
|
||||
8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */,
|
||||
C22005801B31B04C00A4FB37 /* sync.icns in Resources */,
|
||||
C220057D1B31B04C00A4FB37 /* ok_swm.icns in Resources */,
|
||||
C220057B1B31B04C00A4FB37 /* error_swm.icns in Resources */,
|
||||
C22005811B31B04C00A4FB37 /* warning_swm.icns in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D576311048677EA00EA77CD /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8C37DD9F161593BD00016A95 /* FinderHook.m in Sources */,
|
||||
8C99F6941622D145002D2135 /* IconCache.m in Sources */,
|
||||
69948B361636D50E0093B6CE /* ContentManager.m in Sources */,
|
||||
C2B573831B1CD5AE00303B36 /* SyncClientProxy.m in Sources */,
|
||||
6993878616494C000044E4DF /* RequestManager.m in Sources */,
|
||||
5BB74A8719DBF9BB001BAAAC /* FinishedIconCache.m in Sources */,
|
||||
692C18A516660C4700BF6A53 /* ContextMenuHandlers.m in Sources */,
|
||||
692C18A9166617F500BF6A53 /* IconOverlayHandlers.m in Sources */,
|
||||
692C18AC1666392700BF6A53 /* MenuManager.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C167EFE841241C02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB911B08733D790010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/Bundles";
|
||||
OC_APPLICATION_REV_DOMAIN = com.owncloud.desktopclient;
|
||||
OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX = "";
|
||||
PRODUCT_NAME = SyncStateFinder;
|
||||
WRAPPER_EXTENSION = bundle;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB911C08733D790010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/Bundles";
|
||||
OC_APPLICATION_REV_DOMAIN = com.owncloud.desktopclient;
|
||||
OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX = "";
|
||||
PRODUCT_NAME = SyncStateFinder;
|
||||
WRAPPER_EXTENSION = bundle;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB911F08733D790010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = _DEBUG_LOG;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB912008733D790010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB911A08733D790010E9CD /* Build configuration list for PBXNativeTarget "SyncStateFinder" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB911B08733D790010E9CD /* Debug */,
|
||||
1DEB911C08733D790010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB911E08733D790010E9CD /* Build configuration list for PBXProject "OwnCloudFinder" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB911F08733D790010E9CD /* Debug */,
|
||||
1DEB912008733D790010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:OwnCloudFinder.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
|
@ -1,14 +0,0 @@
|
|||
<?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>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>8D57630D048677EA00EA77CD</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,40 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RequestManager.h"
|
||||
#import "SyncClientProxy.h"
|
||||
|
||||
@interface OwnCloudFinderRequestManager : NSObject <SyncClientProxyDelegate>
|
||||
{
|
||||
SyncClientProxy *_syncClientProxy;
|
||||
|
||||
NSMutableArray* _requestQueue;
|
||||
NSMutableDictionary* _registeredPathes;
|
||||
NSMutableSet* _requestedPaths;
|
||||
|
||||
NSString *_shareMenuTitle;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) NSString* filterFolder;
|
||||
|
||||
+ (OwnCloudFinderRequestManager*)sharedInstance;
|
||||
|
||||
- (BOOL)isRegisteredPath:(NSString*)path isDirectory:(BOOL)isDir;
|
||||
- (void)askForIcon:(NSString*)path isDirectory:(BOOL)isDir;
|
||||
- (void)menuItemClicked:(NSDictionary*)actionDictionary;
|
||||
|
||||
- (NSString*) shareItemTitle;
|
||||
|
||||
@end
|
|
@ -1,159 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#import "ContentManager.h"
|
||||
#import "IconCache.h"
|
||||
#import "RequestManager.h"
|
||||
|
||||
static OwnCloudFinderRequestManager* sharedInstance = nil;
|
||||
|
||||
@implementation OwnCloudFinderRequestManager
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
// For the sake of allowing both the legacy and the FinderSync extensions to work with the same
|
||||
// client build, use the same server name including the Team ID even though we won't be sandboxed.
|
||||
NSBundle *extBundle = [NSBundle bundleForClass:[self class]];
|
||||
// This was added to the bundle's Info.plist to get it from the build system
|
||||
NSString *socketApiPrefix = [extBundle objectForInfoDictionaryKey:@"SocketApiPrefix"];
|
||||
NSString *serverName = [socketApiPrefix stringByAppendingString:@".socketApi"];
|
||||
// NSLog(@"OwnCloudFinderRequestManager serverName %@", serverName);
|
||||
|
||||
_syncClientProxy = [[SyncClientProxy alloc] initWithDelegate:self serverName:serverName];
|
||||
|
||||
_registeredPathes = [[NSMutableDictionary alloc] init];
|
||||
_requestedPaths = [[NSMutableSet alloc] init];
|
||||
|
||||
_shareMenuTitle = nil;
|
||||
|
||||
// The NSConnection will block until the distant object came back and this creates a loop hanging Finder.
|
||||
// Start from a timer to have time to unwind the stack first.
|
||||
[NSTimer scheduledTimerWithTimeInterval:0 target:_syncClientProxy selector:@selector(start) userInfo:nil repeats:NO];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
sharedInstance = nil;
|
||||
}
|
||||
|
||||
+ (OwnCloudFinderRequestManager*)sharedInstance
|
||||
{
|
||||
@synchronized(self)
|
||||
{
|
||||
if (sharedInstance == nil)
|
||||
{
|
||||
sharedInstance = [[self alloc] init];
|
||||
}
|
||||
}
|
||||
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
- (BOOL)isRegisteredPath:(NSString*)path isDirectory:(BOOL)isDir
|
||||
{
|
||||
// check if the file in question is underneath a registered directory
|
||||
NSArray *regPathes = [_registeredPathes allKeys];
|
||||
BOOL registered = NO;
|
||||
|
||||
NSString* checkPath = [NSString stringWithString:path];
|
||||
if (isDir && ![checkPath hasSuffix:@"/"]) {
|
||||
// append a slash
|
||||
checkPath = [path stringByAppendingString:@"/"];
|
||||
}
|
||||
|
||||
for( NSString *regPath in regPathes ) {
|
||||
if( [checkPath hasPrefix:regPath]) {
|
||||
// the path was registered
|
||||
registered = YES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return registered;
|
||||
}
|
||||
|
||||
- (void)askForIcon:(NSString*)path isDirectory:(BOOL)isDir
|
||||
{
|
||||
if( [self isRegisteredPath:path isDirectory:isDir] ) {
|
||||
[_requestedPaths addObject:path];
|
||||
[_syncClientProxy askForIcon:path isDirectory:isDir];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setResultForPath:(NSString*)path result:(NSString*)result
|
||||
{
|
||||
// The client will broadcast all changes, do not fill the cache for paths that Finder didn't ask for.
|
||||
if ([_requestedPaths containsObject:path]) {
|
||||
[[OwnCloudFinderContentManager sharedInstance] setResultForPath:path result:result];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)reFetchFileNameCacheForPath:(NSString*)path
|
||||
{
|
||||
[_requestedPaths removeAllObjects];
|
||||
[[OwnCloudFinderContentManager sharedInstance] reFetchFileNameCacheForPath:path];
|
||||
}
|
||||
|
||||
- (void)registerPath:(NSString*)path
|
||||
{
|
||||
NSNumber *one = [NSNumber numberWithInt:1];
|
||||
[_registeredPathes setObject:one forKey:path];
|
||||
[[OwnCloudFinderContentManager sharedInstance] repaintAllWindows];
|
||||
}
|
||||
|
||||
- (void)unregisterPath:(NSString*)path
|
||||
{
|
||||
[_registeredPathes removeObjectForKey:path];
|
||||
[[OwnCloudFinderContentManager sharedInstance] repaintAllWindows];
|
||||
}
|
||||
|
||||
- (void)setShareMenuTitle:(NSString*)title
|
||||
{
|
||||
_shareMenuTitle = title;
|
||||
}
|
||||
|
||||
- (void)connectionDidDie
|
||||
{
|
||||
// NSLog(@"Socket DISconnected! %@", [err localizedDescription]);
|
||||
|
||||
// clear the registered paths.
|
||||
_registeredPathes = [[NSMutableDictionary alloc] init];
|
||||
[_requestedPaths removeAllObjects];
|
||||
|
||||
// clear the caches in content manager
|
||||
OwnCloudFinderContentManager *contentman = [OwnCloudFinderContentManager sharedInstance];
|
||||
[contentman clearFileNameCache];
|
||||
[contentman repaintAllWindows];
|
||||
}
|
||||
|
||||
- (void)menuItemClicked:(NSDictionary*)actionDictionary
|
||||
{
|
||||
// NSLog(@"RequestManager menuItemClicked %@", actionDictionary);
|
||||
NSArray *filePaths = [actionDictionary valueForKey:@"files"];
|
||||
for (int i = 0; i < filePaths.count; i++) {
|
||||
[_syncClientProxy askOnSocket:[filePaths objectAtIndex:i] query:@"SHARE"];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString*) shareItemTitle
|
||||
{
|
||||
return _shareMenuTitle;
|
||||
}
|
||||
|
||||
@end
|
|
@ -11,12 +11,12 @@
|
|||
C2B573D21B1CD94B00303B36 /* main.m in Resources */ = {isa = PBXBuildFile; fileRef = C2B573B91B1CD91E00303B36 /* main.m */; };
|
||||
C2B573DE1B1CD9CE00303B36 /* FinderSync.m in Sources */ = {isa = PBXBuildFile; fileRef = C2B573DD1B1CD9CE00303B36 /* FinderSync.m */; };
|
||||
C2B573E21B1CD9CE00303B36 /* FinderSyncExt.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = C2B573D71B1CD9CE00303B36 /* FinderSyncExt.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
C2B573E91B1DA1FB00303B36 /* SyncClientProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = C2B573E81B1DA1FB00303B36 /* SyncClientProxy.m */; };
|
||||
C2B573F31B1DAD6400303B36 /* error.iconset in Resources */ = {isa = PBXBuildFile; fileRef = C2B573EB1B1DAD6400303B36 /* error.iconset */; };
|
||||
C2B573F41B1DAD6400303B36 /* ok_swm.iconset in Resources */ = {isa = PBXBuildFile; fileRef = C2B573EC1B1DAD6400303B36 /* ok_swm.iconset */; };
|
||||
C2B573F51B1DAD6400303B36 /* ok.iconset in Resources */ = {isa = PBXBuildFile; fileRef = C2B573ED1B1DAD6400303B36 /* ok.iconset */; };
|
||||
C2B573F71B1DAD6400303B36 /* sync.iconset in Resources */ = {isa = PBXBuildFile; fileRef = C2B573EF1B1DAD6400303B36 /* sync.iconset */; };
|
||||
C2B573F91B1DAD6400303B36 /* warning.iconset in Resources */ = {isa = PBXBuildFile; fileRef = C2B573F11B1DAD6400303B36 /* warning.iconset */; };
|
||||
C2C932F01F0BFC6700C8BCB3 /* SyncClientProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = C2C932EF1F0BFC6700C8BCB3 /* SyncClientProxy.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
@ -52,13 +52,13 @@
|
|||
C2B573DB1B1CD9CE00303B36 /* FinderSyncExt.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = FinderSyncExt.entitlements; sourceTree = "<group>"; };
|
||||
C2B573DC1B1CD9CE00303B36 /* FinderSync.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FinderSync.h; sourceTree = "<group>"; };
|
||||
C2B573DD1B1CD9CE00303B36 /* FinderSync.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FinderSync.m; sourceTree = "<group>"; };
|
||||
C2B573E71B1DA1FB00303B36 /* SyncClientProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SyncClientProxy.h; sourceTree = "<group>"; };
|
||||
C2B573E81B1DA1FB00303B36 /* SyncClientProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncClientProxy.m; sourceTree = "<group>"; };
|
||||
C2B573EB1B1DAD6400303B36 /* error.iconset */ = {isa = PBXFileReference; lastKnownFileType = folder.iconset; name = error.iconset; path = ../../icons/nopadding/error.iconset; sourceTree = SOURCE_ROOT; };
|
||||
C2B573EC1B1DAD6400303B36 /* ok_swm.iconset */ = {isa = PBXFileReference; lastKnownFileType = folder.iconset; name = ok_swm.iconset; path = ../../icons/nopadding/ok_swm.iconset; sourceTree = SOURCE_ROOT; };
|
||||
C2B573ED1B1DAD6400303B36 /* ok.iconset */ = {isa = PBXFileReference; lastKnownFileType = folder.iconset; name = ok.iconset; path = ../../icons/nopadding/ok.iconset; sourceTree = SOURCE_ROOT; };
|
||||
C2B573EF1B1DAD6400303B36 /* sync.iconset */ = {isa = PBXFileReference; lastKnownFileType = folder.iconset; name = sync.iconset; path = ../../icons/nopadding/sync.iconset; sourceTree = SOURCE_ROOT; };
|
||||
C2B573F11B1DAD6400303B36 /* warning.iconset */ = {isa = PBXFileReference; lastKnownFileType = folder.iconset; name = warning.iconset; path = ../../icons/nopadding/warning.iconset; sourceTree = SOURCE_ROOT; };
|
||||
C2C932EE1F0BFC6700C8BCB3 /* SyncClientProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SyncClientProxy.h; sourceTree = "<group>"; };
|
||||
C2C932EF1F0BFC6700C8BCB3 /* SyncClientProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncClientProxy.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -82,7 +82,6 @@
|
|||
C2B573941B1CD88000303B36 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C2B573E61B1DA1FB00303B36 /* common */,
|
||||
C2B573B31B1CD91E00303B36 /* desktopclient */,
|
||||
C2B573D81B1CD9CE00303B36 /* FinderSyncExt */,
|
||||
C2B573B21B1CD91E00303B36 /* Products */,
|
||||
|
@ -118,6 +117,8 @@
|
|||
C2B573D81B1CD9CE00303B36 /* FinderSyncExt */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C2C932EE1F0BFC6700C8BCB3 /* SyncClientProxy.h */,
|
||||
C2C932EF1F0BFC6700C8BCB3 /* SyncClientProxy.m */,
|
||||
C2B573DC1B1CD9CE00303B36 /* FinderSync.h */,
|
||||
C2B573DD1B1CD9CE00303B36 /* FinderSync.m */,
|
||||
C2B573D91B1CD9CE00303B36 /* Supporting Files */,
|
||||
|
@ -139,16 +140,6 @@
|
|||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C2B573E61B1DA1FB00303B36 /* common */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C2B573E71B1DA1FB00303B36 /* SyncClientProxy.h */,
|
||||
C2B573E81B1DA1FB00303B36 /* SyncClientProxy.m */,
|
||||
);
|
||||
name = common;
|
||||
path = ../common;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
|
@ -284,7 +275,7 @@
|
|||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C2B573E91B1DA1FB00303B36 /* SyncClientProxy.m in Sources */,
|
||||
C2C932F01F0BFC6700C8BCB3 /* SyncClientProxy.m in Sources */,
|
||||
C2B573DE1B1CD9CE00303B36 /* FinderSync.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
/* Localized versions of Info.plist keys */
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
<?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>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.owncloud.injector</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>OwnCloudInjector</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>osax</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>OWNC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.2</string>
|
||||
<key>OSAScriptingDefinition</key>
|
||||
<string>OwnCloudInjector.sdef</string>
|
||||
<key>OSAXHandlers</key>
|
||||
<dict>
|
||||
<key>Events</key>
|
||||
<dict>
|
||||
<key>OWNClded</key>
|
||||
<dict>
|
||||
<key>Context</key>
|
||||
<string>Process</string>
|
||||
<key>Handler</key>
|
||||
<string>HandleLoadedEvent</string>
|
||||
<key>ThreadSafe</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>OWNCload</key>
|
||||
<dict>
|
||||
<key>Context</key>
|
||||
<string>Process</string>
|
||||
<key>Handler</key>
|
||||
<string>HandleLoadEvent</string>
|
||||
<key>ThreadSafe</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>OWNCunld</key>
|
||||
<dict>
|
||||
<key>Context</key>
|
||||
<string>Process</string>
|
||||
<key>Handler</key>
|
||||
<string>HandleUnloadEvent</string>
|
||||
<key>ThreadSafe</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,35 +0,0 @@
|
|||
//
|
||||
// LNStandardVersionComparator.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 12/21/07.
|
||||
// Copyright 2007 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef LNSTANDARDVERSIONCOMPARATOR_H
|
||||
#define LNSTANDARDVERSIONCOMPARATOR_H
|
||||
|
||||
#import "LNVersionComparisonProtocol.h"
|
||||
|
||||
/*!
|
||||
@class
|
||||
@abstract Sparkle's default version comparator.
|
||||
@discussion This comparator is adapted from MacPAD, by Kevin Ballard. It's "dumb" in that it does essentially string comparison, in components split by character type.
|
||||
*/
|
||||
@interface LNStandardVersionComparator : NSObject<LNVersionComparison> { }
|
||||
|
||||
/*!
|
||||
@method
|
||||
@abstract Returns a singleton instance of the comparator.
|
||||
*/
|
||||
+(LNStandardVersionComparator*)defaultComparator;
|
||||
|
||||
/*!
|
||||
@method
|
||||
@abstract Compares version strings through textual analysis.
|
||||
@discussion See the implementation for more details.
|
||||
*/
|
||||
-(NSComparisonResult)compareVersion:(NSString*)versionA toVersion:(NSString*)versionB;
|
||||
@end
|
||||
|
||||
#endif
|
|
@ -1,158 +0,0 @@
|
|||
//
|
||||
// LNStandardVersionComparator.m
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 12/21/07.
|
||||
// Copyright 2007 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "LNStandardVersionComparator.h"
|
||||
|
||||
@implementation LNStandardVersionComparator
|
||||
|
||||
+(LNStandardVersionComparator*) defaultComparator {
|
||||
static LNStandardVersionComparator* defaultComparator = nil;
|
||||
|
||||
if (defaultComparator == nil) defaultComparator = [[LNStandardVersionComparator alloc] init];
|
||||
return defaultComparator;
|
||||
}
|
||||
|
||||
typedef enum {
|
||||
kNumberType,
|
||||
kStringType,
|
||||
kPeriodType
|
||||
} SUCharacterType;
|
||||
|
||||
-(SUCharacterType) typeOfCharacter:(NSString*)character {
|
||||
if ([character isEqualToString:@"."]) {
|
||||
return kPeriodType;
|
||||
} else if ([[NSCharacterSet decimalDigitCharacterSet] characterIsMember:[character characterAtIndex:0]]) {
|
||||
return kNumberType;
|
||||
} else {
|
||||
return kStringType;
|
||||
}
|
||||
}
|
||||
|
||||
-(NSArray*) splitVersionString:(NSString*)version {
|
||||
NSString* character;
|
||||
NSMutableString* s;
|
||||
NSUInteger i, n;
|
||||
SUCharacterType oldType, newType;
|
||||
NSMutableArray* parts = [NSMutableArray array];
|
||||
|
||||
if ([version length] == 0) {
|
||||
// Nothing to do here
|
||||
return parts;
|
||||
}
|
||||
s = [[[version substringToIndex:1] mutableCopy] autorelease];
|
||||
oldType = [self typeOfCharacter:s];
|
||||
n = [version length] - 1;
|
||||
for (i = 1; i <= n; ++i) {
|
||||
character = [version substringWithRange:NSMakeRange(i, 1)];
|
||||
newType = [self typeOfCharacter:character];
|
||||
if ((oldType != newType) || (oldType == kPeriodType)) {
|
||||
// We've reached a new segment
|
||||
NSString* aPart = [[[NSString alloc] initWithString:s] autorelease];
|
||||
[parts addObject:aPart];
|
||||
[s setString:character];
|
||||
} else {
|
||||
// Add character to string and continue
|
||||
[s appendString:character];
|
||||
}
|
||||
oldType = newType;
|
||||
}
|
||||
|
||||
// Add the last part onto the array
|
||||
[parts addObject:[NSString stringWithString:s]];
|
||||
return parts;
|
||||
}
|
||||
|
||||
-(NSComparisonResult) compareVersion:(NSString*)versionA toVersion:(NSString*)versionB;
|
||||
{
|
||||
NSArray* partsA = [self splitVersionString:versionA];
|
||||
NSArray* partsB = [self splitVersionString:versionB];
|
||||
|
||||
NSString* partA, * partB;
|
||||
NSUInteger i, n;
|
||||
int intA, intB;
|
||||
SUCharacterType typeA, typeB;
|
||||
|
||||
n = MIN([partsA count], [partsB count]);
|
||||
for (i = 0; i < n; ++i) {
|
||||
partA = [partsA objectAtIndex:i];
|
||||
partB = [partsB objectAtIndex:i];
|
||||
|
||||
typeA = [self typeOfCharacter:partA];
|
||||
typeB = [self typeOfCharacter:partB];
|
||||
|
||||
// Compare types
|
||||
if (typeA == typeB) {
|
||||
// Same type; we can compare
|
||||
if (typeA == kNumberType) {
|
||||
intA = [partA intValue];
|
||||
intB = [partB intValue];
|
||||
if (intA > intB) {
|
||||
return NSOrderedDescending;
|
||||
} else if (intA < intB) {
|
||||
return NSOrderedAscending;
|
||||
}
|
||||
} else if (typeA == kStringType) {
|
||||
NSComparisonResult result = [partA compare:partB];
|
||||
if (result != NSOrderedSame) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Not the same type? Now we have to do some validity checking
|
||||
if ((typeA != kStringType) && (typeB == kStringType)) {
|
||||
// typeA wins
|
||||
return NSOrderedDescending;
|
||||
} else if ((typeA == kStringType) && (typeB != kStringType)) {
|
||||
// typeB wins
|
||||
return NSOrderedAscending;
|
||||
} else {
|
||||
// One is a number and the other is a period. The period is invalid
|
||||
if (typeA == kNumberType) {
|
||||
return NSOrderedDescending;
|
||||
} else {
|
||||
return NSOrderedAscending;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// The versions are equal up to the point where they both still have parts
|
||||
// Lets check to see if one is larger than the other
|
||||
if ([partsA count] != [partsB count]) {
|
||||
// Yep. Lets get the next part of the larger
|
||||
// n holds the index of the part we want.
|
||||
NSString* missingPart;
|
||||
SUCharacterType missingType;
|
||||
NSComparisonResult shorterResult, largerResult;
|
||||
|
||||
if ([partsA count] > [partsB count]) {
|
||||
missingPart = [partsA objectAtIndex:n];
|
||||
shorterResult = NSOrderedAscending;
|
||||
largerResult = NSOrderedDescending;
|
||||
} else {
|
||||
missingPart = [partsB objectAtIndex:n];
|
||||
shorterResult = NSOrderedDescending;
|
||||
largerResult = NSOrderedAscending;
|
||||
}
|
||||
|
||||
missingType = [self typeOfCharacter:missingPart];
|
||||
// Check the type
|
||||
if (missingType == kStringType) {
|
||||
// It's a string. Shorter version wins
|
||||
return shorterResult;
|
||||
} else {
|
||||
// It's a number/period. Larger version wins
|
||||
return largerResult;
|
||||
}
|
||||
}
|
||||
|
||||
// The 2 strings are identical
|
||||
return NSOrderedSame;
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,27 +0,0 @@
|
|||
//
|
||||
// LNVersionComparisonProtocol.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 12/21/07.
|
||||
// Copyright 2007 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef LNVERSIONCOMPARISONPROTOCOL_H
|
||||
#define LNVERSIONCOMPARISONPROTOCOL_H
|
||||
|
||||
/*!
|
||||
@protocol
|
||||
@abstract Implement this protocol to provide version comparison facilities for Sparkle.
|
||||
*/
|
||||
@protocol LNVersionComparison
|
||||
|
||||
/*!
|
||||
@method
|
||||
@abstract An abstract method to compare two version strings.
|
||||
@discussion Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a, and NSOrderedSame if they are equivalent.
|
||||
*/
|
||||
-(NSComparisonResult)compareVersion:(NSString*)versionA toVersion:(NSString*)versionB;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
|
@ -1,270 +0,0 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import "LNStandardVersionComparator.h"
|
||||
|
||||
#define EXPORT __attribute__((visibility("default")))
|
||||
|
||||
#define WAIT_FOR_APPLE_EVENT_TO_ENTER_HANDLER_IN_SECONDS 1.0
|
||||
#define FINDER_MIN_TESTED_VERSION @"10.7"
|
||||
#define FINDER_MAX_TESTED_VERSION @"10.8.5"
|
||||
#define LIFERAYNATIVITY_INJECTED_NOTIFICATION @"SyncStateInjectedNotification"
|
||||
|
||||
EXPORT OSErr HandleLoadEvent(const AppleEvent* ev, AppleEvent* reply, long refcon);
|
||||
|
||||
static NSString* globalLock = @"I'm the global lock to prevent concurrent handler executions";
|
||||
|
||||
// SIMBL-compatible interface
|
||||
@interface OwnCloudShell : NSObject { }
|
||||
-(void) install;
|
||||
-(void) uninstall;
|
||||
@end
|
||||
|
||||
// just a dummy class for locating our bundle
|
||||
@interface OwnCloudInjector : NSObject { }
|
||||
@end
|
||||
|
||||
@implementation OwnCloudInjector { }
|
||||
@end
|
||||
|
||||
static bool liferayNativityLoaded = false;
|
||||
static NSString* liferayNativityBundleName = @"SyncStateFinder";
|
||||
|
||||
typedef struct {
|
||||
NSString* location;
|
||||
} configuration;
|
||||
|
||||
static OSErr AEPutParamString(AppleEvent* event, AEKeyword keyword, NSString* string) {
|
||||
UInt8* textBuf;
|
||||
CFIndex length, maxBytes, actualBytes;
|
||||
|
||||
length = CFStringGetLength((CFStringRef)string);
|
||||
maxBytes = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8);
|
||||
textBuf = malloc(maxBytes);
|
||||
if (textBuf) {
|
||||
CFStringGetBytes((CFStringRef)string, CFRangeMake(0, length), kCFStringEncodingUTF8, 0, true, (UInt8*)textBuf, maxBytes, &actualBytes);
|
||||
OSErr err = AEPutParamPtr(event, keyword, typeUTF8Text, textBuf, actualBytes);
|
||||
free(textBuf);
|
||||
return err;
|
||||
} else {
|
||||
return memFullErr;
|
||||
}
|
||||
}
|
||||
|
||||
static void reportError(AppleEvent* reply, NSString* msg) {
|
||||
NSLog(@"LiferayNativityInjector: %@", msg);
|
||||
AEPutParamString(reply, keyErrorString, msg);
|
||||
}
|
||||
|
||||
typedef enum {
|
||||
InvalidBundleType,
|
||||
LiferayNativityBundleType,
|
||||
} LNBundleType;
|
||||
|
||||
static OSErr loadBundle(LNBundleType type, AppleEvent* reply, long refcon) {
|
||||
bool isLoaded = false;
|
||||
NSString* bundleName = nil;
|
||||
NSString* targetAppName = nil;
|
||||
NSString* versionCheckKey = nil;
|
||||
NSString* maxVersion = nil;
|
||||
NSString* minVersion = nil;
|
||||
|
||||
switch (type) {
|
||||
case LiferayNativityBundleType:
|
||||
isLoaded = liferayNativityLoaded;
|
||||
bundleName = liferayNativityBundleName;
|
||||
targetAppName = @"Finder";
|
||||
versionCheckKey = @"LiferayNativityFinderVersionCheck";
|
||||
maxVersion = FINDER_MAX_TESTED_VERSION;
|
||||
minVersion = FINDER_MIN_TESTED_VERSION;
|
||||
break;
|
||||
default:
|
||||
NSLog(@"SyncStateInjector: Failed to load bundle for type %d", type);
|
||||
return 8;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (isLoaded) {
|
||||
// NSLog(@"SyncStateInjector: %@ already loaded.", bundleName);
|
||||
return noErr;
|
||||
}
|
||||
|
||||
@try {
|
||||
NSBundle* mainBundle = [NSBundle mainBundle];
|
||||
if (!mainBundle) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Unable to locate main %@ bundle!", targetAppName]);
|
||||
return 4;
|
||||
}
|
||||
|
||||
NSString* mainVersion = [mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"];
|
||||
if (!mainVersion || ![mainVersion isKindOfClass:[NSString class]]) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Unable to determine %@ version!", targetAppName]);
|
||||
return 5;
|
||||
}
|
||||
|
||||
// future compatibility check
|
||||
if (type == LiferayNativityBundleType) {
|
||||
// in Dock we cannot use NSAlert and similar UI stuff - this would hang the Dock process and cause 100% CPU load
|
||||
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
|
||||
if ([defaults boolForKey:versionCheckKey]) {
|
||||
LNStandardVersionComparator* comparator = [LNStandardVersionComparator defaultComparator];
|
||||
if (([comparator compareVersion:mainVersion toVersion:maxVersion] == NSOrderedDescending) ||
|
||||
([comparator compareVersion:mainVersion toVersion:minVersion] == NSOrderedAscending)) {
|
||||
NSAlert* alert = [NSAlert new];
|
||||
[alert setMessageText:[NSString stringWithFormat:@"You have %@ version %@", targetAppName, mainVersion]];
|
||||
[alert setInformativeText:[NSString stringWithFormat:@"But %@ was properly tested only with %@ versions in range %@ - %@\n\nYou have probably updated your system and %@ version got bumped by Apple developers.\n\nYou may expect a new LiferayNativity release soon.", bundleName, targetAppName, targetAppName, minVersion, maxVersion]];
|
||||
[alert setShowsSuppressionButton:YES];
|
||||
[alert addButtonWithTitle:@"Launch LiferayNativity anyway"];
|
||||
[alert addButtonWithTitle:@"Cancel"];
|
||||
NSInteger res = [alert runModal];
|
||||
if ([[alert suppressionButton] state] == NSOnState) {
|
||||
[defaults setBool:NO forKey:versionCheckKey];
|
||||
}
|
||||
if (res != NSAlertFirstButtonReturn) {
|
||||
// cancel
|
||||
return noErr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NSBundle* liferayNativityInjectorBundle = [NSBundle bundleForClass:[OwnCloudInjector class]];
|
||||
NSString* liferayNativityLocation = [liferayNativityInjectorBundle pathForResource:bundleName ofType:@"bundle"];
|
||||
NSBundle* pluginBundle = [NSBundle bundleWithPath:liferayNativityLocation];
|
||||
if (!pluginBundle) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Unable to create bundle from path: %@ [%@]", liferayNativityLocation, liferayNativityInjectorBundle]);
|
||||
return 2;
|
||||
}
|
||||
|
||||
NSError* error;
|
||||
if (![pluginBundle loadAndReturnError:&error]) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Unable to load bundle from path: %@ error: %@", liferayNativityLocation, [error localizedDescription]]);
|
||||
return 6;
|
||||
}
|
||||
|
||||
Class principalClass = [pluginBundle principalClass];
|
||||
if (!principalClass) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Unable to retrieve principalClass for bundle: %@", pluginBundle]);
|
||||
return 3;
|
||||
}
|
||||
id principalClassObject = NSClassFromString(NSStringFromClass(principalClass));
|
||||
if ([principalClassObject respondsToSelector:@selector(install)]) {
|
||||
// NSLog(@"SyncStateInjector: Installing %@ ...", bundleName);
|
||||
[principalClassObject install];
|
||||
}
|
||||
|
||||
return noErr;
|
||||
} @catch (NSException* exception) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Failed to load %@ with exception: %@", bundleName, exception]);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static LNBundleType mainBundleType(AppleEvent* reply) {
|
||||
@try {
|
||||
NSBundle* mainBundle = [NSBundle mainBundle];
|
||||
if (!mainBundle) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Unable to locate main bundle!"]);
|
||||
return InvalidBundleType;
|
||||
}
|
||||
|
||||
if ([[mainBundle bundleIdentifier] isEqualToString:@"com.apple.finder"]) {
|
||||
return LiferayNativityBundleType;
|
||||
}
|
||||
} @catch (NSException* exception) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Failed to load main bundle with exception: %@", exception]);
|
||||
}
|
||||
|
||||
return InvalidBundleType;
|
||||
}
|
||||
|
||||
EXPORT OSErr HandleLoadEvent(const AppleEvent* ev, AppleEvent* reply, long refcon) {
|
||||
@synchronized(globalLock) {
|
||||
@autoreleasepool {
|
||||
NSBundle* injectorBundle = [NSBundle bundleForClass:[OwnCloudInjector class]];
|
||||
NSString* injectorVersion = [injectorBundle objectForInfoDictionaryKey:@"CFBundleVersion"];
|
||||
|
||||
if (!injectorVersion || ![injectorVersion isKindOfClass:[NSString class]]) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Unable to determine SyncStateInjector version!"]);
|
||||
return 7;
|
||||
}
|
||||
|
||||
@try {
|
||||
OSErr err = loadBundle(mainBundleType(reply), reply, refcon);
|
||||
|
||||
if (err != noErr)
|
||||
{
|
||||
return err;
|
||||
}
|
||||
|
||||
pid_t pid = [[NSProcessInfo processInfo] processIdentifier];
|
||||
|
||||
[[NSDistributedNotificationCenter defaultCenter]postNotificationName:LIFERAYNATIVITY_INJECTED_NOTIFICATION object:[[NSBundle mainBundle]bundleIdentifier] userInfo:@{@"pid": @(pid)}];
|
||||
|
||||
liferayNativityLoaded = true;
|
||||
|
||||
return noErr;
|
||||
} @catch (NSException* exception) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Failed to load OwnCloudFinder with exception: %@", exception]);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT OSErr HandleLoadedEvent(const AppleEvent* ev, AppleEvent* reply, long refcon) {
|
||||
@synchronized(globalLock) {
|
||||
@autoreleasepool {
|
||||
LNBundleType type = mainBundleType(reply);
|
||||
if ((type == LiferayNativityBundleType) && liferayNativityLoaded) {
|
||||
return noErr;
|
||||
}
|
||||
reportError(reply, @"LiferayNativity not loaded");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT OSErr HandleUnloadEvent(const AppleEvent* ev, AppleEvent* reply, long refcon) {
|
||||
@synchronized(globalLock) {
|
||||
@autoreleasepool {
|
||||
@try {
|
||||
if (!liferayNativityLoaded) {
|
||||
// NSLog(@"SyncStateInjector: not loaded.");
|
||||
return noErr;
|
||||
}
|
||||
|
||||
NSString* bundleName = liferayNativityBundleName;
|
||||
|
||||
NSBundle* liferayNativityInjectorBundle = [NSBundle bundleForClass:[OwnCloudInjector class]];
|
||||
NSString* liferayNativityLocation = [liferayNativityInjectorBundle pathForResource:bundleName ofType:@"bundle"];
|
||||
NSBundle* pluginBundle = [NSBundle bundleWithPath:liferayNativityLocation];
|
||||
if (!pluginBundle) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Unable to create bundle from path: %@ [%@]", liferayNativityLocation, liferayNativityInjectorBundle]);
|
||||
return 2;
|
||||
}
|
||||
|
||||
Class principalClass = [pluginBundle principalClass];
|
||||
if (!principalClass) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Unable to retrieve principalClass for bundle: %@", pluginBundle]);
|
||||
return 3;
|
||||
}
|
||||
id principalClassObject = NSClassFromString(NSStringFromClass(principalClass));
|
||||
if ([principalClassObject respondsToSelector:@selector(uninstall)]) {
|
||||
// NSLog(@"SyncStateInjector: Uninstalling %@ ...", bundleName);
|
||||
[principalClassObject uninstall];
|
||||
}
|
||||
|
||||
liferayNativityLoaded = false;
|
||||
|
||||
return noErr;
|
||||
} @catch (NSException* exception) {
|
||||
reportError(reply, [NSString stringWithFormat:@"Failed to unload OwnCloudFinder with exception: %@", exception]);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
|
||||
<dictionary title="OwnCloudInjector Terminology">
|
||||
<suite name="OwnCloudInjector Suite" code="OWNC" description="OwnCloud Injector commands">
|
||||
<command name="install OwnCloud" code="OWNCload" description="Loads OwnCloud into the Finder process"/>
|
||||
<command name="uninstall OwnCloud" code="OWNCunld" description="Unloads OwnCloud from the Finder process"/>
|
||||
<command name="check OwnCloud" code="OWNClded" description="Checks if OwnCloud is loaded in Finder process"/>
|
||||
</suite>
|
||||
</dictionary>
|
|
@ -1,269 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
0B36CB92182461A10039B237 /* SyncStateFinder.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 0B36CB91182461A10039B237 /* SyncStateFinder.bundle */; };
|
||||
0BD9C38E1778EF450094CF5D /* license.txt in Resources */ = {isa = PBXBuildFile; fileRef = 0BD9C38D1778EF450094CF5D /* license.txt */; };
|
||||
8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; };
|
||||
8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; };
|
||||
D6ACBEA2117B7D5600F6691C /* OwnCloudInjector.m in Sources */ = {isa = PBXBuildFile; fileRef = D6ACBE9E117B7D5600F6691C /* OwnCloudInjector.m */; };
|
||||
D6ACBEA3117B7D5600F6691C /* LNStandardVersionComparator.m in Sources */ = {isa = PBXBuildFile; fileRef = D6ACBEA0117B7D5600F6691C /* LNStandardVersionComparator.m */; };
|
||||
D6ACBEA5117B7D6100F6691C /* OwnCloudInjector.sdef in Resources */ = {isa = PBXBuildFile; fileRef = D6ACBEA4117B7D6100F6691C /* OwnCloudInjector.sdef */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
|
||||
0B36CB91182461A10039B237 /* SyncStateFinder.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = SyncStateFinder.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0BD9C38D1778EF450094CF5D /* license.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = license.txt; sourceTree = "<group>"; };
|
||||
8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D60A992314CE37030061AD6D /* SyncStateFinder.osax */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SyncStateFinder.osax; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D6ACBE9E117B7D5600F6691C /* OwnCloudInjector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OwnCloudInjector.m; sourceTree = "<group>"; };
|
||||
D6ACBE9F117B7D5600F6691C /* LNVersionComparisonProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LNVersionComparisonProtocol.h; sourceTree = "<group>"; };
|
||||
D6ACBEA0117B7D5600F6691C /* LNStandardVersionComparator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LNStandardVersionComparator.m; sourceTree = "<group>"; };
|
||||
D6ACBEA1117B7D5600F6691C /* LNStandardVersionComparator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LNStandardVersionComparator.h; sourceTree = "<group>"; };
|
||||
D6ACBEA4117B7D6100F6691C /* OwnCloudInjector.sdef */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = OwnCloudInjector.sdef; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D576313048677EA00EA77CD /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
089C166AFE841209C02AAC07 /* TotalFinder-osax */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB77AFFE84173DC02AAC07 /* Source */,
|
||||
089C167CFE841241C02AAC07 /* Resources */,
|
||||
089C1671FE841209C02AAC07 /* Dependencies */,
|
||||
D60A992414CE37030061AD6D /* Products */,
|
||||
);
|
||||
indentWidth = 2;
|
||||
name = "SyncStateFinder-osax";
|
||||
sourceTree = "<group>";
|
||||
tabWidth = 2;
|
||||
usesTabs = 0;
|
||||
};
|
||||
089C1671FE841209C02AAC07 /* Dependencies */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */,
|
||||
);
|
||||
name = Dependencies;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C167CFE841241C02AAC07 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0B36CB91182461A10039B237 /* SyncStateFinder.bundle */,
|
||||
D6ACBEA4117B7D6100F6691C /* OwnCloudInjector.sdef */,
|
||||
8D576317048677EA00EA77CD /* Info.plist */,
|
||||
8D5B49A704867FD3000E48DA /* InfoPlist.strings */,
|
||||
0BD9C38D1778EF450094CF5D /* license.txt */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB77AFFE84173DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D6ACBE9E117B7D5600F6691C /* OwnCloudInjector.m */,
|
||||
D6ACBE9F117B7D5600F6691C /* LNVersionComparisonProtocol.h */,
|
||||
D6ACBEA0117B7D5600F6691C /* LNStandardVersionComparator.m */,
|
||||
D6ACBEA1117B7D5600F6691C /* LNStandardVersionComparator.h */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D60A992414CE37030061AD6D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D60A992314CE37030061AD6D /* SyncStateFinder.osax */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D57630D048677EA00EA77CD /* SyncStateFinder.osax */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB911A08733D790010E9CD /* Build configuration list for PBXNativeTarget "SyncStateFinder.osax" */;
|
||||
buildPhases = (
|
||||
8D57630F048677EA00EA77CD /* Resources */,
|
||||
8D576311048677EA00EA77CD /* Sources */,
|
||||
8D576313048677EA00EA77CD /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = SyncStateFinder.osax;
|
||||
productInstallPath = "$(HOME)/Library/Bundles";
|
||||
productName = "SyncStateFinder-osax";
|
||||
productReference = D60A992314CE37030061AD6D /* SyncStateFinder.osax */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 0460;
|
||||
ORGANIZATIONNAME = BinaryAge;
|
||||
};
|
||||
buildConfigurationList = 1DEB911E08733D790010E9CD /* Build configuration list for PBXProject "OwnCloudInjector" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
en,
|
||||
English,
|
||||
);
|
||||
mainGroup = 089C166AFE841209C02AAC07 /* TotalFinder-osax */;
|
||||
productRefGroup = D60A992414CE37030061AD6D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D57630D048677EA00EA77CD /* SyncStateFinder.osax */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D57630F048677EA00EA77CD /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0B36CB92182461A10039B237 /* SyncStateFinder.bundle in Resources */,
|
||||
8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */,
|
||||
D6ACBEA5117B7D6100F6691C /* OwnCloudInjector.sdef in Resources */,
|
||||
0BD9C38E1778EF450094CF5D /* license.txt in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D576311048677EA00EA77CD /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D6ACBEA2117B7D5600F6691C /* OwnCloudInjector.m in Sources */,
|
||||
D6ACBEA3117B7D5600F6691C /* LNStandardVersionComparator.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C167EFE841241C02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB911B08733D790010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
AppKit,
|
||||
);
|
||||
PRODUCT_NAME = SyncStateFinder;
|
||||
SKIP_INSTALL = YES;
|
||||
WRAPPER_EXTENSION = osax;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB911C08733D790010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
AppKit,
|
||||
);
|
||||
PRODUCT_NAME = SyncStateFinder;
|
||||
WRAPPER_EXTENSION = osax;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB911F08733D790010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB912008733D790010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB911A08733D790010E9CD /* Build configuration list for PBXNativeTarget "SyncStateFinder.osax" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB911B08733D790010E9CD /* Debug */,
|
||||
1DEB911C08733D790010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB911E08733D790010E9CD /* Build configuration list for PBXProject "OwnCloudInjector" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB911F08733D790010E9CD /* Debug */,
|
||||
1DEB912008733D790010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:OwnCloudFinder.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
|
@ -1,73 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0500"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "NO"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8D57630D048677EA00EA77CD"
|
||||
BuildableName = "SyncStateFinder.bundle"
|
||||
BlueprintName = "SyncStateFinder"
|
||||
ReferencedContainer = "container:../OwnCloudFinder/OwnCloudFinder.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8D57630D048677EA00EA77CD"
|
||||
BuildableName = "SyncStateFinder.osax"
|
||||
BlueprintName = "SyncStateFinder.osax"
|
||||
ReferencedContainer = "container:OwnCloudInjector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -1,14 +0,0 @@
|
|||
<?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>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>8D57630D048677EA00EA77CD</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,25 +0,0 @@
|
|||
Copyright (c) 2010-2013, BinaryAge Limited
|
||||
Contributors: https://github.com/binaryage/totalfinder-osax/contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Antonin Hildebrand nor the
|
||||
names of other contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY BINARYAGE LIMITED ``AS IS'' AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL Antonin Hildebrand BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,9 +0,0 @@
|
|||
tell application "Finder"
|
||||
try
|
||||
«event OWNClded»
|
||||
set the result to 0
|
||||
on error msg number code
|
||||
set the result to code
|
||||
end try
|
||||
end tell
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Not used anymore, please do (from build dir) (this is <= 10.9 only)"
|
||||
echo sudo cp -r ./shell_integration/MacOSX/Release/SyncStateFinder.osax /Library/ScriptingAdditions/
|
||||
echo killall Finder
|
||||
exit 1
|
||||
|
||||
SELFPATH=`dirname $0`
|
||||
# osascript $SELFPATH/unload.scpt
|
||||
|
||||
sudo rm -rf /Library/ScriptingAdditions/SyncStateFinder.osax
|
||||
# Klaas' machine
|
||||
OSAXDIR=$HOME/Library/Developer/Xcode/DerivedData/OwnCloud-*/Build/Products/Debug/SyncStateFinder.osax
|
||||
[ -d $OSAXDIR ] ||OSAXDIR=$HOME/Library/Developer/Xcode/DerivedData/OwnCloud-*/Build/Intermediates/ArchiveIntermediates/SyncStateFinder.osax/IntermediateBuildFilesPath/UninstalledProducts/SyncStateFinder.osax
|
||||
|
||||
# Markus' machine
|
||||
[ -d $OSAXDIR ] || echo "OSAX does not exist"
|
||||
[ -d $OSAXDIR ] && sudo cp -rv $OSAXDIR /Library/ScriptingAdditions/
|
||||
|
||||
sudo killall Finder
|
||||
sleep 1
|
||||
osascript $SELFPATH/load.scpt
|
||||
osascript $SELFPATH/check.scpt
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
tell application "Finder"
|
||||
try
|
||||
«event OWNCload»
|
||||
end try
|
||||
end tell
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
osascript -e 'tell application "Finder" \
|
||||
try \
|
||||
«event OWNCload» \
|
||||
end try \
|
||||
end tell'
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
tell application "Finder"
|
||||
try
|
||||
«event OWNCunld»
|
||||
end try
|
||||
end tell
|
||||
|
|
@ -108,48 +108,6 @@ ownCloudGui::ownCloudGui(Application *parent)
|
|||
SLOT(slotShowOptionalTrayMessage(QString, QString)));
|
||||
connect(Logger::instance(), SIGNAL(guiMessage(QString, QString)),
|
||||
SLOT(slotShowGuiMessage(QString, QString)));
|
||||
|
||||
setupOverlayIcons();
|
||||
}
|
||||
|
||||
// Use this to do platform specific code to make overlay icons appear
|
||||
// in the gui
|
||||
// MacOSX: perform a AppleScript code piece to load the Finder Plugin.
|
||||
|
||||
|
||||
void ownCloudGui::setupOverlayIcons()
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
// Make sure that we only send the load event to the legacy plugin when
|
||||
// using OS X <= 10.9 since 10.10 starts using the new FinderSync one.
|
||||
if (QSysInfo::MacintoshVersion < QSysInfo::MV_10_10) {
|
||||
const QLatin1String finderExtension("/Library/ScriptingAdditions/SyncStateFinder.osax");
|
||||
if (QFile::exists(finderExtension)) {
|
||||
QString aScript = QString::fromUtf8("tell application \"Finder\"\n"
|
||||
" try\n"
|
||||
" «event OWNCload»\n"
|
||||
" end try\n"
|
||||
"end tell\n");
|
||||
|
||||
QString osascript = "/usr/bin/osascript";
|
||||
QStringList processArguments;
|
||||
// processArguments << "-l" << "AppleScript";
|
||||
|
||||
QProcess p;
|
||||
p.start(osascript, processArguments);
|
||||
p.write(aScript.toUtf8());
|
||||
p.closeWriteChannel();
|
||||
//p.waitForReadyRead(-1);
|
||||
p.waitForFinished(5000);
|
||||
QByteArray result = p.readAll();
|
||||
QString resultAsString(result); // if appropriate
|
||||
qCInfo(lcApplication) << "Load Finder Overlay-Plugin: " << resultAsString << ": " << p.exitCode()
|
||||
<< (p.exitCode() != 0 ? p.errorString() : QString::null);
|
||||
} else {
|
||||
qCWarning(lcApplication) << finderExtension << "does not exist! Finder Overlay Plugin loading failed";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// This should rather be in application.... or rather in ConfigFile?
|
||||
|
|
Loading…
Reference in a new issue