Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Need Help creating Icon overlays for my SVN Client

Hi I am currently writing an cross platform SVN client. I have icon overlay working in windows and linux. This is a small image that sits on top of the normal icon in finder and represents the current state of the file, e.i out of sync, up to date, un-versioned. But am really struggling trying to get it to work in OSX. At this point I only want it to work in snow leopard. This is where I have got to so far.

I managed to create a QL plugin that worked. The only issue with QL plugins is that you have to specify what file types your plugin works for, (my sample worked for gifs). Unfortunately I don't know that as it needs to work for every file and folder on the system that contains a subfolder called .svn. So with a week of reading I have come to the decision that the only real way around this is to override the QLThumbnailImageCreate function that finder calls and replace it with my own if I find a .svn or call the original if not. However if this is the only route I have not been able to get any code to work that will replace the function with my own.

If any one can show me an example of switching that function, or has an alternative solution. Or knows the LSItemContentTypes type that means my plugin will fire for every single file, then I would be very happy. I've spent no more than 2 days getting this to work on windows and linux, but I've spent soooo many hours on OSX. Any help would be great.

MacBook, Mac OS X (10.6.4)

Posted on Aug 8, 2010 12:31 PM

Reply
16 replies

Aug 8, 2010 5:48 PM in response to DanUK

I don't think this is possible. I have a similar CVS-based tool that needs to be rewritten. What I did was use the ScriptingBridge to tell the Finder to set labels on those files that correspond to their status. You might be able to set the file comments too.

Will your tool work with CVS too? I don't like SVN. Since Apple is dropping CVS from Xcode, one of us needs to get a better CVS tool written.

Aug 8, 2010 11:33 PM in response to etresoft

Thanks for your reply etresoft. I know it definitely is possible because the application dropbox does it. But unfortunately its not open source so I can find out how they did it. The only other way I can do it is to monitor file system changes and then set a custom icon. But this has many draw backs. such as custom icons are persistant and will remain even when my software has been uninstalled. In answer to your CVS question I've never used it. However my solution ties into the SVN Command line, so I would imagine it would be very easy to adapt. If you'd like to work with me I'd be happy for you to add CVS support to it. I using QT Creator to write the software so if you fancy a go I can share the project with you.

Aug 9, 2010 5:23 AM in response to DanUK

DanUK wrote:
Thanks for your reply etresoft. I know it definitely is possible because the application dropbox does it.


I'm not so sure. People working on the SC Plugin SVN program have been trying to do that for years. I don't know if they have ever gotten it to work.

But unfortunately its not open source so I can find out how they did it. The only other way I can do it is to monitor file system changes and then set a custom icon. But this has many draw backs. such as custom icons are persistant and will remain even when my software has been uninstalled.


I think you should really look into using labels. An SVN/CVS user probably isn't going to be using icon view anyway. Labels will be far more useful in real life. Custom icons are just a gimmick.

I using QT Creator to write the software so if you fancy a go I can share the project with you.


Perhaps we should stick to our respective SCM programs. I'm not a fan of QT either 🙂

Aug 9, 2010 8:31 AM in response to etresoft

Thanks for the reply. Not sure about using labels as they are designed for the end user to use to help them manage there files. I wouldn't want to forcefully override their labels. Anyway, I'm requesting paid support from apple to see if they can help. I've spend about 3 weeks on this now and it's doin' my head in. Good luck with you project.

Need Help creating Icon overlays for my SVN Client

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.