From c9d5d6fe000b503f9d00817a55cf8a977cd6408f Mon Sep 17 00:00:00 2001 From: hsoft Date: Sun, 6 Sep 2009 08:22:33 +0000 Subject: [PATCH] [#52] Removed OS X support for dg-qt from the main branch (it is kept in the qt-osx-support branch). --HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%40122 --- base/qt/app.py | 2 - base/qt/osx/SendToTrashProject/SendToTrash.m | 23 --- .../SendToTrash.xcodeproj/project.pbxproj | 183 ------------------ base/qt/osx/__init__.py | 18 -- 4 files changed, 226 deletions(-) delete mode 100644 base/qt/osx/SendToTrashProject/SendToTrash.m delete mode 100644 base/qt/osx/SendToTrashProject/SendToTrash.xcodeproj/project.pbxproj delete mode 100644 base/qt/osx/__init__.py diff --git a/base/qt/app.py b/base/qt/app.py index 8bb7c24c..fc471a90 100644 --- a/base/qt/app.py +++ b/base/qt/app.py @@ -24,8 +24,6 @@ from dupeguru.app import (DupeGuru as DupeGuruBase, JOB_SCAN, JOB_LOAD, JOB_MOVE if sys.platform == 'win32': from .win import recycle_file -elif sys.platform == 'darwin': - from .osx import recycle_file else: logging.warning("Unsupported Platform!!!") diff --git a/base/qt/osx/SendToTrashProject/SendToTrash.m b/base/qt/osx/SendToTrashProject/SendToTrash.m deleted file mode 100644 index 26401bcf..00000000 --- a/base/qt/osx/SendToTrashProject/SendToTrash.m +++ /dev/null @@ -1,23 +0,0 @@ -#import - -int main (int argc, const char * argv[]) { - if(argc == 1){ - NSLog(@"A file path to send to trash is needed"); - return 1; - } - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - NSString *filepath = [NSString stringWithCString:argv[1] encoding:NSUTF8StringEncoding]; - NSLog(@"%@",filepath); - NSMutableArray *split = [NSMutableArray arrayWithArray:[filepath componentsSeparatedByString:@"/"]]; - NSString *filename = [split lastObject]; - [split removeLastObject]; - NSString *dirpath = [split componentsJoinedByString:@"/"]; - int result; - [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation - source:dirpath - destination:@"" - files:[NSArray arrayWithObject:filename] - tag:&result]; - [pool drain]; - return result; -} diff --git a/base/qt/osx/SendToTrashProject/SendToTrash.xcodeproj/project.pbxproj b/base/qt/osx/SendToTrashProject/SendToTrash.xcodeproj/project.pbxproj deleted file mode 100644 index 43f432d4..00000000 --- a/base/qt/osx/SendToTrashProject/SendToTrash.xcodeproj/project.pbxproj +++ /dev/null @@ -1,183 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 8DD76F9A0486AA7600D96B5E /* SendToTrash.m in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* SendToTrash.m */; settings = {ATTRIBUTES = (); }; }; - 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; }; - CEFA8C60104BD73200E2A946 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEFA8C5F104BD73200E2A946 /* Cocoa.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 8DD76F9E0486AA7600D96B5E /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 08FB7796FE84155DC02AAC07 /* SendToTrash.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SendToTrash.m; sourceTree = ""; }; - 08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 8DD76FA10486AA7600D96B5E /* SendToTrash */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = SendToTrash; sourceTree = BUILT_PRODUCTS_DIR; }; - CEFA8C5F104BD73200E2A946 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8DD76F9B0486AA7600D96B5E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */, - CEFA8C60104BD73200E2A946 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* SendToTrash */ = { - isa = PBXGroup; - children = ( - 08FB7795FE84155DC02AAC07 /* Source */, - 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */, - 1AB674ADFE9D54B511CA2CBB /* Products */, - ); - name = SendToTrash; - sourceTree = ""; - }; - 08FB7795FE84155DC02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 08FB7796FE84155DC02AAC07 /* SendToTrash.m */, - ); - name = Source; - sourceTree = ""; - }; - 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */ = { - isa = PBXGroup; - children = ( - 08FB779EFE84155DC02AAC07 /* Foundation.framework */, - CEFA8C5F104BD73200E2A946 /* Cocoa.framework */, - ); - name = "External Frameworks and Libraries"; - sourceTree = ""; - }; - 1AB674ADFE9D54B511CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8DD76FA10486AA7600D96B5E /* SendToTrash */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8DD76F960486AA7600D96B5E /* SendToTrash */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1DEB927408733DD40010E9CD /* Build configuration list for PBXNativeTarget "SendToTrash" */; - buildPhases = ( - 8DD76F990486AA7600D96B5E /* Sources */, - 8DD76F9B0486AA7600D96B5E /* Frameworks */, - 8DD76F9E0486AA7600D96B5E /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SendToTrash; - productInstallPath = "$(HOME)/bin"; - productName = SendToTrash; - productReference = 8DD76FA10486AA7600D96B5E /* SendToTrash */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "SendToTrash" */; - compatibilityVersion = "Xcode 3.1"; - hasScannedForEncodings = 1; - mainGroup = 08FB7794FE84155DC02AAC07 /* SendToTrash */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8DD76F960486AA7600D96B5E /* SendToTrash */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 8DD76F990486AA7600D96B5E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8DD76F9A0486AA7600D96B5E /* SendToTrash.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1DEB927608733DD40010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = SendToTrash; - }; - name = Release; - }; - 1DEB927A08733DD40010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_SYMBOL_SEPARATION = NO; - GCC_THREADSAFE_STATICS = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.4; - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - SDKROOT = macosx10.5; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB927408733DD40010E9CD /* Build configuration list for PBXNativeTarget "SendToTrash" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB927608733DD40010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "SendToTrash" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB927A08733DD40010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/base/qt/osx/__init__.py b/base/qt/osx/__init__.py deleted file mode 100644 index d5db85d1..00000000 --- a/base/qt/osx/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# -*- coding: utf-8 -*- -# Created By: Virgil Dupras -# Created On: 2009-08-31 -# $Id$ -# Copyright 2009 Hardcoded Software (http://www.hardcoded.net) -# -# This software is licensed under the "HS" License as described in the "LICENSE" file, -# which should be included with this package. The terms are also available at -# http://www.hardcoded.net/licenses/hs_license - -import os -import os.path as op - -CMD = unicode(op.join(op.dirname(__file__), 'SendToTrash')) - -def recycle_file(path): - print u'%s "%s"' % (CMD, unicode(path)) - os.system(u'%s "%s"' % (CMD, unicode(path)))