Re: Icon Overlay on Mac OSX

2012-08-02 Thread KappA
Thanks. Yeah this too seems a bit messy, as you also have to take the quick look preview into consideration. (when switching the various Finder views). On Thu, Aug 2, 2012 at 10:37 PM, Charles Srstka wrote: > On Aug 2, 2012, at 9:26 PM, Jens Alfke wrote: > > On Aug 2, 2012, at 6:54 PM, KappA wr

Re: Icon Overlay on Mac OSX

2012-08-02 Thread Charles Srstka
On Aug 2, 2012, at 9:26 PM, Jens Alfke wrote: > On Aug 2, 2012, at 6:54 PM, KappA wrote: > >> get the attributes >> get the icon >> composite the overlay >> set the icon >> set the attributes > > This has an obvious race condition, but it should work most of the time. If > you don't change th

Re: Icon Overlay on Mac OSX

2012-08-02 Thread Jens Alfke
On Aug 2, 2012, at 6:54 PM, KappA wrote: > get the attributes > get the icon > composite the overlay > set the icon > set the attributes This has an obvious race condition, but it should work most of the time. If you don't change the icon often, you should be OK. > I am not sure how this affe

Re: Icon Overlay on Mac OSX

2012-08-02 Thread KappA
I have been playing around with that - get the attributes get the icon composite the overlay set the icon set the attributes When I print out the attributes before/after they match - now this only works for files that you have access to (it failed for a few files owned by root). I am not sure ho

Re: Icon Overlay on Mac OSX

2012-08-02 Thread Alfian Busyro
Which you guys mean I have to create the overlay to an Image it self then stick it to a file icon ? I'd try this before but nothing was changed. maybe I'll have try this once again. And for file attributes, can we use setAttributes:ofItemAtPath:error: from NSFileManager ? because there is NSF

Re: Icon Overlay on Mac OSX

2012-08-02 Thread Alfian Busyro
Which you guys mean I have to create the overlay to an Image it self then stick it to a file icon ? I'd try this before but nothing was changed. maybe I'll have try this once again. And for file attributes, can we use setAttributes:ofItemAtPath:error: from NSFileManager ? because there is NSF

Re: Icon Overlay on Mac OSX

2012-08-02 Thread Alfian Busyro
I'll take a look of this. Thanks, Alfian On 12/08/02 14:55, Charles Srstka wrote: On Aug 2, 2012, at 12:47 AM, Jens Alfke wrote: On Jul 18, 2012, at 2:42 AM, Alfian Busyro wrote: I tried this CTBadge, and it gave me a custom application icon after I run it. So a little bit different with

Re: Icon Overlay on Mac OSX

2012-08-02 Thread Charles Srstka
On Aug 2, 2012, at 3:41 PM, KappA wrote: > I believe setIcon updates the file modification date... (please check as I > can't remember for sure)... which might go against what a file tracking > system might be trying to do. > > i.e. will give false file modification updates because of setting th

Re: Icon Overlay on Mac OSX

2012-08-02 Thread KappA
I believe setIcon updates the file modification date... (please check as I can't remember for sure)... which might go against what a file tracking system might be trying to do. i.e. will give false file modification updates because of setting the updated icons. If there is a way to do that withou

Re: Icon Overlay on Mac OSX

2012-08-02 Thread Uli Kusterer
On 02.08.2012, at 07:47, Jens Alfke wrote: > Set custom icons for the files? (I have no idea how custom file icons are > done nowadays, though. They used to be stored in the resource fork, but > that's been deprecated for a decade now. Maybe they're in extended file > attributes?) NSWorkspace

Re: Icon Overlay on Mac OSX

2012-08-01 Thread Charles Srstka
On Aug 2, 2012, at 12:47 AM, Jens Alfke wrote: > On Jul 18, 2012, at 2:42 AM, Alfian Busyro wrote: > >> I tried this CTBadge, and it gave me a custom application icon after I run >> it. >> So a little bit different with what I want to do though. >> Do you have any idea how to implement this to

Re: Icon Overlay on Mac OSX

2012-08-01 Thread Jens Alfke
On Jul 18, 2012, at 2:42 AM, Alfian Busyro wrote: > I tried this CTBadge, and it gave me a custom application icon after I run it. > So a little bit different with what I want to do though. > Do you have any idea how to implement this to the finder , without injecting > it like dropbox did. Se

Re: Icon Overlay on Mac OSX

2012-08-01 Thread Charles Srstka
On Jul 18, 2012, at 4:42 AM, Alfian Busyro wrote: > Hi Gideon, > Thanks for your reply. > > I tried this CTBadge, and it gave me a custom application icon after I run it. > So a little bit different with what I want to do though. > Do you have any idea how to implement this to the finder , witho

Re: Icon Overlay on Mac OSX

2012-08-01 Thread Alfian Busyro
Hi Gideon, Thanks for your reply. I tried this CTBadge, and it gave me a custom application icon after I run it. So a little bit different with what I want to do though. Do you have any idea how to implement this to the finder , without injecting it like dropbox did. With Regards, Alfian O

Re: Icon Overlay on Mac OSX

2012-07-23 Thread koko
On Jul 22, 2012, at 11:02 PM, Alfian Busyro wrote: >> So essentially you'd be building a (very limited and much simpler) >> mini-Finder that only does what is needed for your application. We do this with our apps and it is a good approach. -koko ___

Re: Icon Overlay on Mac OSX

2012-07-22 Thread Alfian Busyro
Actually I'd like to do this. But I'm not the man who made the specification, and my superior want it in the app. Btw, thanks for all replies. Regards, Alfian On 12/07/21 2:28, Uli Kusterer wrote: On 18.07.2012, at 12:37, Alfian Busyro wrote: Just like I thought, injecting code is not a good

Re: Icon Overlay on Mac OSX

2012-07-20 Thread Uli Kusterer
On 18.07.2012, at 12:37, Alfian Busyro wrote: > Just like I thought, injecting code is not a good way to do this. > So, is it impossible to do this without injecting code to Finder ? BTW -- just because nobody has mentioned it yet: You can also take the approach many other applications use: Creat

Re: Icon Overlay on Mac OSX

2012-07-19 Thread David Catmull
Uli Kusterer wrote: > In the old days, one could use Icon Services calls to change the icon used > for a particular file type, that might even save you the renaming, but Icon > Services is probably considered "old" API these days, and I'm not sure if > changes to icons in your app using Icon Se

Re: Icon Overlay on Mac OSX

2012-07-18 Thread Lee Ann Rucker
On Jul 8, 2012, at 10:34 PM, Alfian Busyro wrote: > > > I want to ask you guy's opinion about this issue. My opinion: No way on earth am I letting Dropbox near my system. > And if some of you guys have an experience with it, please share it with me. There are official ways to change the Dock

Re: Icon Overlay on Mac OSX

2012-07-18 Thread Jens Alfke
On Jul 18, 2012, at 3:37 AM, Alfian Busyro wrote: > Just like I thought, injecting code is not a good way to do this. > So, is it impossible to do this without injecting code to Finder ? Yes, it is impossible. The Finder is not meant to be extended/hacked and has no API for this. This is absol

Re: Icon Overlay on Mac OSX

2012-07-18 Thread Uli Kusterer
On 18.07.2012, at 12:37, Alfian Busyro wrote: > Just like I thought, injecting code is not a good way to do this. > So, is it impossible to do this without injecting code to Finder ? For what purpose do you need this? If you only need a small number of animation steps, you could just set up a di

Re: Icon Overlay on Mac OSX

2012-07-18 Thread Alfian Busyro
Just like I thought, injecting code is not a good way to do this. So, is it impossible to do this without injecting code to Finder ? With Regards, Alfian On 12/07/18 15:18, Kyle Sluder wrote: On Mon, Jul 9, 2012, at 02:34 PM, Alfian Busyro wrote: I want to ask you guy's opinion about this iss

Re: Icon Overlay on Mac OSX

2012-07-18 Thread Charles Srstka
On Jul 9, 2012, at 12:34 AM, Alfian Busyro wrote: > I'm a newbie in Cocoa framework, XCode and also Obj-C. > I'm still struggling to create an icon overlay in finder like the one in that > dropbox did. > During my investigation about this I found that dropbox was using injection > method to the

Re: Icon Overlay on Mac OSX

2012-07-18 Thread Kyle Sluder
On Mon, Jul 9, 2012, at 02:34 PM, Alfian Busyro wrote: > I want to ask you guy's opinion about this issue. > And if some of you guys have an experience with it, please share it with > me. As said before, there is no supported way to do this. You should not attempt it. Discussion about methods of i

Re: Icon Overlay on Mac OSX

2012-07-17 Thread Gideon King
You might like to check out CTBadge - there are a couple of minor memory issues in the current release which will be picked up in Xcode's analyze function, but apart from that, it will probably point you in the right direction. http://blog.oofn.net/2006/01/08/badging-for-everyone/ Regards Gid

Icon Overlay on Mac OSX

2012-07-17 Thread Alfian Busyro
Hi, I'm a newbie in Cocoa framework, XCode and also Obj-C. I'm still struggling to create an icon overlay in finder like the one in that dropbox did. During my investigation about this I found that dropbox was using injection method to the finder code using mach_star (https://github.com/rentzs