mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34: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
|
# http://www.hardcoded.net/licenses/hs_license
|
||||||
|
|
||||||
import objc
|
import objc
|
||||||
from AppKit import *
|
from Foundation import NSObject
|
||||||
|
|
||||||
from core_me.app_cocoa import DupeGuruME
|
from core_me.app_cocoa import DupeGuruME
|
||||||
from core.scanner import (SCAN_TYPE_FILENAME, SCAN_TYPE_FIELDS, SCAN_TYPE_FIELDS_NO_ORDER,
|
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
|
# http://www.hardcoded.net/licenses/hs_license
|
||||||
|
|
||||||
import objc
|
import objc
|
||||||
from AppKit import *
|
from Foundation import NSObject
|
||||||
|
|
||||||
from core_pe import app_cocoa as app_pe_cocoa
|
from core_pe import app_cocoa as app_pe_cocoa
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# http://www.hardcoded.net/licenses/hs_license
|
# http://www.hardcoded.net/licenses/hs_license
|
||||||
|
|
||||||
import objc
|
import objc
|
||||||
from AppKit import *
|
from Foundation import NSObject
|
||||||
|
|
||||||
from core_se.app_cocoa import DupeGuru
|
from core_se.app_cocoa import DupeGuru
|
||||||
from core import scanner
|
from core import scanner
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
# http://www.hardcoded.net/licenses/hs_license
|
# http://www.hardcoded.net/licenses/hs_license
|
||||||
|
|
||||||
import objc
|
import objc
|
||||||
from Foundation import *
|
from Foundation import (NSNotificationCenter, NSUserDefaults, NSSearchPathForDirectoriesInDomains,
|
||||||
from AppKit import *
|
NSApplicationSupportDirectory, NSUserDomainMask)
|
||||||
import logging
|
import logging
|
||||||
import os.path as op
|
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.cocoa import install_exception_hook
|
||||||
from hsutil.misc import stripnone
|
from hsutil.misc import stripnone
|
||||||
from hsutil.reg import RegistrationRequired
|
from hsutil.reg import RegistrationRequired
|
||||||
@ -53,6 +53,8 @@ class DupeGuru(app.DupeGuru):
|
|||||||
#--- Override
|
#--- Override
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _recycle_dupe(dupe):
|
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])
|
directory = unicode(dupe.path[:-1])
|
||||||
filename = dupe.name
|
filename = dupe.name
|
||||||
if objc.__version__ == '1.4': # For a while, we have to support this.
|
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)
|
self.make_reference(self.selected_dupes)
|
||||||
|
|
||||||
def OpenSelected(self):
|
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:
|
if self.selected_dupes:
|
||||||
path = unicode(self.selected_dupes[0].path)
|
path = unicode(self.selected_dupes[0].path)
|
||||||
NSWorkspace.sharedWorkspace().openFile_(path)
|
NSWorkspace.sharedWorkspace().openFile_(path)
|
||||||
@ -149,6 +153,8 @@ class DupeGuru(app.DupeGuru):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def RevealSelected(self):
|
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:
|
if self.selected_dupes:
|
||||||
path = unicode(self.selected_dupes[0].path)
|
path = unicode(self.selected_dupes[0].path)
|
||||||
NSWorkspace.sharedWorkspace().selectFile_inFileViewerRootedAtPath_(path,'')
|
NSWorkspace.sharedWorkspace().selectFile_inFileViewerRootedAtPath_(path,'')
|
||||||
|
@ -11,7 +11,7 @@ import logging
|
|||||||
import plistlib
|
import plistlib
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from AppKit import NSBundle, NSUserDefaults, NSURL
|
from Foundation import NSBundle, NSUserDefaults, NSURL
|
||||||
from appscript import app, k, CommandError
|
from appscript import app, k, CommandError
|
||||||
|
|
||||||
from hsutil import io
|
from hsutil import io
|
||||||
|
@ -11,11 +11,10 @@ from __future__ import unicode_literals
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
import objc
|
import objc
|
||||||
from AppKit import *
|
from AppKit import NSWorkspace
|
||||||
|
|
||||||
from hsutil import io
|
from hsutil import io
|
||||||
from hsutil.path import Path
|
from hsutil.path import Path
|
||||||
from hsutil.str import get_file_ext
|
|
||||||
|
|
||||||
from core import fs
|
from core import fs
|
||||||
from core.app_cocoa import DupeGuru as DupeGuruBase
|
from core.app_cocoa import DupeGuru as DupeGuruBase
|
||||||
|
Loading…
x
Reference in New Issue
Block a user