dg cocoa: Since there are problems with the latest pyobjc + py2app + Snow Leopard, I've got to stick with pyobjc1.4 for a while after all...

--HG--
extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%40264
This commit is contained in:
hsoft 2009-12-16 14:48:37 +00:00
parent 9a7bb30df4
commit cf34164191
1 changed files with 7 additions and 2 deletions

View File

@ -7,6 +7,7 @@
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/hs_license
import objc
from Foundation import *
from AppKit import *
import logging
@ -55,8 +56,12 @@ class DupeGuru(app.DupeGuru):
def _recycle_dupe(dupe):
directory = unicode(dupe.path[:-1])
filename = dupe.name
result, tag = NSWorkspace.sharedWorkspace().performFileOperation_source_destination_files_tag_(
NSWorkspaceRecycleOperation, directory, '', [filename], None)
if objc.__version__ == '1.4': # For a while, we have to support this.
result, tag = NSWorkspace.sharedWorkspace().performFileOperation_source_destination_files_tag_(
NSWorkspaceRecycleOperation, directory, '', [filename])
else:
result, tag = NSWorkspace.sharedWorkspace().performFileOperation_source_destination_files_tag_(
NSWorkspaceRecycleOperation, directory, '', [filename], None)
def _start_job(self, jobid, func):
try: