mirror of
https://github.com/exituser/Pearcleaner.git
synced 2026-09-17 04:58:56 +00:00
v3.8.7
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "icon_32x32.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@@ -27,8 +27,11 @@ class FinderOpen: FIFinderSync {
|
||||
selectedItemURLs.count == 1, selectedItemURLs.first?.pathExtension == "app" {
|
||||
// Add menu item if the selected item is a .app file
|
||||
let menuItem = NSMenuItem(title: "Pearcleaner Uninstall", action: #selector(openInMyApp), keyEquivalent: "")
|
||||
// menuItem.image = NSImage(named: NSImage.trashEmptyName)
|
||||
// menu.addItem(withTitle: "Pearcleaner Uninstall", action: #selector(openInMyApp), keyEquivalent: "")
|
||||
if let appIcon = NSImage(named: "Icon") {
|
||||
menuItem.image = appIcon
|
||||
} else {
|
||||
menuItem.image = NSImage(named: NSImage.trashFullName)
|
||||
}
|
||||
menu.addItem(menuItem)
|
||||
}
|
||||
}
|
||||
@@ -53,79 +56,3 @@ class FinderOpen: FIFinderSync {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//class FinderSync: FIFinderSync {
|
||||
//
|
||||
// var myFolderURL = URL(fileURLWithPath: "/Users/Shared/MySyncExtension Documents")
|
||||
//
|
||||
// override init() {
|
||||
// super.init()
|
||||
//
|
||||
// NSLog("FinderSync() launched from %@", Bundle.main.bundlePath as NSString)
|
||||
//
|
||||
// // Set up the directory we are syncing.
|
||||
// FIFinderSyncController.default().directoryURLs = [self.myFolderURL]
|
||||
//
|
||||
// // Set up images for our badge identifiers. For demonstration purposes, this uses off-the-shelf images.
|
||||
// FIFinderSyncController.default().setBadgeImage(NSImage(named: NSImage.colorPanelName)!, label: "Status One" , forBadgeIdentifier: "One")
|
||||
// FIFinderSyncController.default().setBadgeImage(NSImage(named: NSImage.cautionName)!, label: "Status Two", forBadgeIdentifier: "Two")
|
||||
// }
|
||||
//
|
||||
// // MARK: - Primary Finder Sync protocol methods
|
||||
//
|
||||
// override func beginObservingDirectory(at url: URL) {
|
||||
// // The user is now seeing the container's contents.
|
||||
// // If they see it in more than one view at a time, we're only told once.
|
||||
// NSLog("beginObservingDirectoryAtURL: %@", url.path as NSString)
|
||||
// }
|
||||
//
|
||||
//
|
||||
// override func endObservingDirectory(at url: URL) {
|
||||
// // The user is no longer seeing the container's contents.
|
||||
// NSLog("endObservingDirectoryAtURL: %@", url.path as NSString)
|
||||
// }
|
||||
//
|
||||
// override func requestBadgeIdentifier(for url: URL) {
|
||||
// NSLog("requestBadgeIdentifierForURL: %@", url.path as NSString)
|
||||
//
|
||||
// // For demonstration purposes, this picks one of our two badges, or no badge at all, based on the filename.
|
||||
// let whichBadge = abs(url.path.hash) % 3
|
||||
// let badgeIdentifier = ["", "One", "Two"][whichBadge]
|
||||
// FIFinderSyncController.default().setBadgeIdentifier(badgeIdentifier, for: url)
|
||||
// }
|
||||
//
|
||||
// // MARK: - Menu and toolbar item support
|
||||
//
|
||||
// override var toolbarItemName: String {
|
||||
// return "FinderSy"
|
||||
// }
|
||||
//
|
||||
// override var toolbarItemToolTip: String {
|
||||
// return "FinderSy: Click the toolbar item for a menu."
|
||||
// }
|
||||
//
|
||||
// override var toolbarItemImage: NSImage {
|
||||
// return NSImage(named: NSImage.cautionName)!
|
||||
// }
|
||||
//
|
||||
// override func menu(for menuKind: FIMenuKind) -> NSMenu {
|
||||
// // Produce a menu for the extension.
|
||||
// let menu = NSMenu(title: "")
|
||||
// menu.addItem(withTitle: "Example Menu Item", action: #selector(sampleAction(_:)), keyEquivalent: "")
|
||||
// return menu
|
||||
// }
|
||||
//
|
||||
// @IBAction func sampleAction(_ sender: AnyObject?) {
|
||||
// let target = FIFinderSyncController.default().targetedURL()
|
||||
// let items = FIFinderSyncController.default().selectedItemURLs()
|
||||
//
|
||||
// let item = sender as! NSMenuItem
|
||||
// NSLog("sampleAction: menu item: %@, target = %@, items = ", item.title as NSString, target!.path as NSString)
|
||||
// for obj in items! {
|
||||
// NSLog(" %@", obj.path as NSString)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user