neilsardesai / Manila

A Finder extension for changing folder colors
MIT License
563 stars 11 forks source link

No Color Menu on partition #1

Open agencetwogether opened 2 years ago

agencetwogether commented 2 years ago

Hello,

I have 2 partitions on my MacBook Pro : first for macOs and second for data. In fist one I can choose a color for folder or for second no option appears.

neilsardesai commented 2 years ago

Hello, Would you mind posting a screen recording of the issue?

agencetwogether commented 2 years ago

Sure, This is a video showing

https://user-images.githubusercontent.com/53862310/159132516-f9046260-2e20-493f-88e4-88b47eed18ba.mov

starbudweiser commented 2 years ago

I have the same issue. The contextual menu shows up only on main Macintosh HD folders. On other partitions or hardrives, it is not visible.

neilsardesai commented 2 years ago

Thanks for the info. This should now be resolved in the latest version (1.0.2). Please try it out and let me know if it works for you.

agencetwogether commented 2 years ago

Hi @neilsardesai

Thanks for the fix, Yes it's working..... But... Manila replace hard drive icon of my second partition with file icon. If i uncheck Manila in Finder extensions, hard drive icon shows, if I check again, file icon...

neilsardesai commented 2 years ago

@agencetwogether I’m not sure I really understand. Would you mind posting another screen recording?

agencetwogether commented 2 years ago

Here, Pay your attention on the left sidebar of finder window

https://user-images.githubusercontent.com/53862310/159384192-2f169dd9-1c30-4ba8-aee5-0672c1e0132e.mov

neilsardesai commented 2 years ago

Oh whoops, that’s…certainly unexpected 🙃. Thanks for catching this. I’ve reverted version 1.0.2 back to 1.0.1, and will look into why the sidebar icon is changing here.

neilsardesai commented 2 years ago

Hmm, from the documentation:

The sidebar icons you provide will replace the default folder icons in the Finder’s sidebar for any of the root folders that your extension is monitoring. This icon does not replace the icon for any folders contained by your monitored folder. It also does not replace the icon for any system folders that you may be monitoring (for example, Documents, Desktop, Applications, and Downloads).

(https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Finder.html)

That’s a bit annoying. I’m not sure there’s any way around this. Seems like any root folder that’s not a system folder gets its sidebar icon automatically changed when a Finder extension is monitoring that folder 🙁

sbarex commented 2 years ago

This is a common bug for all extensions that do not define an icon for the monitored folders (and unfortunately the icon must be unique for all folders, defined at the compilation time and not dynamically customizable).

Unfortunately I have the same problem with an extension I developed.

A temporary solution is to monitor the parent folder of the one placed in the finder bar. In the case of disks, perhaps you could monitor the /Volumes folder?

neilsardesai commented 2 years ago

A temporary solution is to monitor the parent folder of the one placed in the finder bar. In the case of disks, perhaps you could monitor the /Volumes folder?

@sbarex have you had success with this? I tried FIFinderSyncController.default().directoryURLs = [URL(fileURLWithPath: "/Volumes")] but that caused the context menu to just not show up at all anywhere

sbarex commented 2 years ago

It hasn't happened to me to manage multiple internal disks. Normally I only monitor the "/" path or specific subfolders.

However handling the "/" path does not extend the control of external disks (USB or network). For external disks I manage the NSWorkspace.didMountNotification notification from which I get the url of the disk path:

@objc func handleMount(_ notification: NSNotification) {
    guard let volumeURL = notification.userInfo?[NSWorkspace.volumeURLUserInfoKey] as? URL else {
        return
    }
    let finderSync = FIFinderSyncController.default()
    finderSync.directoryURLs.insert(volumeURL)
}

So I think that in addition to the root path / the exact disk mount path should be monitored (like /Volumes/Disk2).

noChillGrandma commented 2 years ago

same problem, manila won't show on context menu of an external drive. Hopefully 1.0.2 is released soon as mentioned above.

frag-p commented 8 months ago

hello - are there any solutions now? I have the same issues since updating to MacOS Sonoma - I miss this app so much!!!