mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-09 21:24:36 +00:00
Explicited pyobjc imports.
This commit is contained in:
parent
5cda4a1eb4
commit
2d5502cc2f
@ -5,7 +5,7 @@
|
||||
# http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
import objc
|
||||
from AppKit import *
|
||||
from Foundation import NSObject
|
||||
|
||||
from core_me.app_cocoa import DupeGuruME
|
||||
from core.scanner import (SCAN_TYPE_FILENAME, SCAN_TYPE_FIELDS, SCAN_TYPE_FIELDS_NO_ORDER,
|
||||
|
@ -5,7 +5,7 @@
|
||||
# http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
import objc
|
||||
from AppKit import *
|
||||
from Foundation import NSObject
|
||||
|
||||
from core_pe import app_cocoa as app_pe_cocoa
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
# http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
import objc
|
||||
from AppKit import *
|
||||
from Foundation import NSObject
|
||||
|
||||
from core_se.app_cocoa import DupeGuru
|
||||
from core import scanner
|
||||
|
@ -7,12 +7,12 @@
|
||||
# http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
import objc
|
||||
from Foundation import *
|
||||
from AppKit import *
|
||||
from Foundation import (NSNotificationCenter, NSUserDefaults, NSSearchPathForDirectoriesInDomains,
|
||||
NSApplicationSupportDirectory, NSUserDomainMask)
|
||||
import logging
|
||||
import os.path as op
|
||||
|
||||
from hsutil import io, cocoa, job
|
||||
from hsutil import cocoa, job
|
||||
from hsutil.cocoa import install_exception_hook
|
||||
from hsutil.misc import stripnone
|
||||
from hsutil.reg import RegistrationRequired
|
||||
@ -53,6 +53,8 @@ class DupeGuru(app.DupeGuru):
|
||||
#--- Override
|
||||
@staticmethod
|
||||
def _recycle_dupe(dupe):
|
||||
# local import because first appkit import takes a lot of memory. we want to avoid it.
|
||||
from AppKit import NSWorkspace, NSWorkspaceRecycleOperation
|
||||
directory = unicode(dupe.path[:-1])
|
||||
filename = dupe.name
|
||||
if objc.__version__ == '1.4': # For a while, we have to support this.
|
||||
@ -114,6 +116,8 @@ class DupeGuru(app.DupeGuru):
|
||||
self.make_reference(self.selected_dupes)
|
||||
|
||||
def OpenSelected(self):
|
||||
# local import because first appkit import takes a lot of memory. we want to avoid it.
|
||||
from AppKit import NSWorkspace
|
||||
if self.selected_dupes:
|
||||
path = unicode(self.selected_dupes[0].path)
|
||||
NSWorkspace.sharedWorkspace().openFile_(path)
|
||||
@ -149,6 +153,8 @@ class DupeGuru(app.DupeGuru):
|
||||
return False
|
||||
|
||||
def RevealSelected(self):
|
||||
# local import because first appkit import takes a lot of memory. we want to avoid it.
|
||||
from AppKit import NSWorkspace
|
||||
if self.selected_dupes:
|
||||
path = unicode(self.selected_dupes[0].path)
|
||||
NSWorkspace.sharedWorkspace().selectFile_inFileViewerRootedAtPath_(path,'')
|
||||
|
@ -11,7 +11,7 @@ import logging
|
||||
import plistlib
|
||||
import re
|
||||
|
||||
from AppKit import NSBundle, NSUserDefaults, NSURL
|
||||
from Foundation import NSBundle, NSUserDefaults, NSURL
|
||||
from appscript import app, k, CommandError
|
||||
|
||||
from hsutil import io
|
||||
|
@ -11,11 +11,10 @@ from __future__ import unicode_literals
|
||||
import logging
|
||||
|
||||
import objc
|
||||
from AppKit import *
|
||||
from AppKit import NSWorkspace
|
||||
|
||||
from hsutil import io
|
||||
from hsutil.path import Path
|
||||
from hsutil.str import get_file_ext
|
||||
|
||||
from core import fs
|
||||
from core.app_cocoa import DupeGuru as DupeGuruBase
|
||||
|
Loading…
x
Reference in New Issue
Block a user