[TxMt] Re: adding a file icon

Yvon Thoraval yvon.thoraval at gmail.com
Fri Nov 29 14:17:01 UTC 2013


Fine, thanks a lot.

what I've added to the Info.plist is :
        {    LSItemContentTypes   = ( "com.apple.disk-image-dart" );
            CFBundleTypeRole     = Editor;
            LSHandlerRank        = Alternate;
            CFBundleTypeIconFile = "Dart_file.icns";
        },

AppleScript :
set i to info for (POSIX file
"/Users/yt/dart/tests/web_server_hello_world.dart") as alias

giving :
name extension:"dart",
...,
default application:alias
"SSD:System:Library:CoreServices:DiskImageMounter.app:", kind:"Image disque
DART",
...,
type identifier:"com.apple.disk-image-dart"
, ...

then it seems UTI would be "com.apple.disk-image-dart", i suspect something
wrong on the Mac OS X side.. Those text files having nothing to do with
DiskImageMounter ;-)

then, that's OK to me having a blank icon at least.

for the remaining i gave up :)

attached the Dart_file.icns


2013/11/29 Allan Odgaard <mailinglist at textmate.org>

> On 29 Nov 2013, at 1:26, Yvon Thoraval wrote:
>
>  I've added some lines in the Info.plist of TextMate 2, the Icon file into
>> the Resources directory but nothing change […]
>>
>
> Adding icon plus proper Info.plist entries should do it. Though you may
> need to “touch” TextMate.app, relaunch Finder, or similiar, to get the
> system to pick up the change. Also, you may want to run “codesign” on
> TextMate.app to give it a valid signature after your changes.
>
>
>  Then, what is the correct way to add a file icon into TextMate 2 ?
>>
>
> As of such, this isn’t supported. Adding stuff to TextMate.app will be
> lost after an update and it breaks the signature.
>
> Apple doesn’t provide a system for dealing with this in a way that
> supports TextMate’s distributed approach to file type support.
>
>
>  Also, using applescript, i've found the identifier for *.dart files, it is
>> part of archive file one terminating by -dart, strange...
>> Before any trick the file icon was of a dmg one...
>>
>
> Indeed: com.apple.disk-image-dart
>
> So that might also be your issue. I.e. after changing TextMate.app you
> will also need to change one .dart document to “open in TextMate” (to make
> it use the TextMate icon you added).
>
> We can btw add a definition for .dart to the Info.plist we ship with
> TextMate, that at least should give it the “blank” TextMate icon (if you
> assign TextMate as app to open these files).
>
> If you already have a proper declaration (UTI) for the .dart file, then
> please provide it, so that I can add it.
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate




-- 
Yvon at 48.871651804,2.384858688
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20131129/19bf174b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Dart_file.icns
Type: application/octet-stream
Size: 182060 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20131129/19bf174b/attachment-0001.icns>


More information about the textmate mailing list