Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Extend the folder drop on icon to any file type on mac. #367

Merged
merged 1 commit into from
Nov 6, 2013

Conversation

RaymondLim
Copy link
Contributor

Also allow user to use "Open With" for image file extensions. This fixes issue adobe/brackets#5759

@eugeneo Can you review this and comment if you see something not right?
@bchintx I think you should review this too.

…er to use "Open With" for image file extensions.
@ghost ghost assigned bchintx Nov 1, 2013
@bchintx
Copy link
Contributor

bchintx commented Nov 1, 2013

@RaymondLim Done with initial review. This info.plist change appears to work just fine, but I'll wait for you to respond to @eugeneo 's comment before deciding to merge this change.

@RaymondLim
Copy link
Contributor Author

@eugeneo

in the case extensions add support to file types that are not currently supported.

Yes, my current change is exactly for file types that are not yet supported. So if an extension provides a pdf viewer or a video viewer, then the users should be able to view these file types with drag-and-drop on icon.

Thanks for pointing out "public.image" UTI. It's definitely better than listing individual image extensions, but I do have two concerns (or questions) for you.

  • What is the key if we switch to "public.image"? I think it has to be LSItemContentTypes instead of CFBundleTypeExtensions that I'm currently using.
  • "public.image" covers more extensions than we actually support in our preview image feature. Dropping an image file other than the extensions that I have will not show up in the image viewer in Brackets. So if we switch to "public.image", then users can use "Open With" in Finder for those image extensions that we don't yet supported. ( which I think is misleading)

@eugeneo
Copy link
Contributor

eugeneo commented Nov 2, 2013

Sorry, I overlooked the wildcard. I tested the change and found no issues.

I am not sure if there is a need to separately declare image extensions if there is a wildcard - I did not see any difference in my testing.

@RaymondLim
Copy link
Contributor Author

How about the key? Do you replace the key CFBundleTypeExtensions with LSItemContentTypes when you tested with "public.image"?

@eugeneo
Copy link
Contributor

eugeneo commented Nov 2, 2013

I did not try public.image - I tried your change as is and then tried your change after removing CFBundleTypeExtensions with the list of image extensions - saw no difference. In both cases I was able to drop to Dock icon and to use Open With... and then browse to the application.

@bchintx
Copy link
Contributor

bchintx commented Nov 6, 2013

I just re-tested with @RaymondLim 's original changes and with removing individual and/or all of the CFBundleTypeExtensions. From what I can tell, you do need to enumerate specific extensions in order support Open With of those file types. Otherwise, Brackets does not appear in the Open With list.

One observation: the Finder appears to cache the file type associations, so you'll need to be sure to do the following before any changes are recognized by the system:

  • rebuild Brackets.app with your updated info.plist;
  • run that just built Brackets.app; and
  • force quit (and restart) the Finder.

@bchintx
Copy link
Contributor

bchintx commented Nov 6, 2013

Approving and Merging...

bchintx added a commit that referenced this pull request Nov 6, 2013
Extend the folder drop on icon to any file type on mac.
@bchintx bchintx merged commit 7ed6c3e into master Nov 6, 2013
@bchintx bchintx deleted the rlim/image-drop-on-mac branch November 6, 2013 21:46
bchintx added a commit that referenced this pull request Dec 8, 2015
Extend the folder drop on icon to any file type on mac.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants