Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8837099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:38:30+00:00 2026-06-14T09:38:30+00:00

I manages to integrate Icon Overlay like dropbox in Mac Os Finder with a

  • 0

I manages to integrate Icon Overlay like dropbox in Mac Os Finder with a SIMBL plugin !
I Use the swizzle method to override some finder function.

Here is my swizzle method :

void PluginSwizzleInstanceMethod(Class cls, SEL oldSel, SEL newSel) 
{
    Method mnew = class_getInstanceMethod(cls, newSel);
    Method mold = class_getInstanceMethod(cls, oldSel);
    method_exchangeImplementations(mnew, mold);
}

So for the moment i override the drawWithFrame method like this :

Class cls = NSClassFromString(@"TIconAndTextCell");
SEL oldSel = @selector(drawWithFrame:inView:);
SEL newSel = @selector(PluginDrawWithFrame:inView:);
PluginSwizzleInstanceMethod(cls, oldSel, newSel);

all my icons are displayed but not on my desktop or on the view that show items as icon …
Why ?

thank you ,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:38:32+00:00Added an answer on June 14, 2026 at 9:38 am

    I just managed to do some stuff for the Desktop, so I’ll post in case that’s still relevant for someone:

    So as you experienced, Finder draws icons differently on the Desktop.
    One class that is responsible for that is TDesktopIcon.
    One can, for example, change icons by overriding the drawIconInContext: method, and setting the thumbnailImage property to whatever NSImage* he likes.

    - (void) FO_drawIconInContext:(struct CGContext *)arg1 {
        NSImage *image;
        // set image... 
        [(TDesktopIcon*)self setThumbnailImage:image];
        [self FO_drawIconInContext:arg1];
    }
    

    Getting the url for each item was not as straight forward as with TIconAndTextCell or IKImageBrowserCell.

    In order to get the URLs, you need to override the prepareToDrawNode: method of TDesktopViewController.
    You get the URL from arg1 as follows:

    - (void) FO_prepareToDrawNode:(const struct TFENode *)arg1 {
        struct OpaqueNodeRef *opr = arg1->fNodeRef;  
        struct FINode *fiNode = [FINode nodeFromNodeRef:opr];  
        NSURL *url = [fiNode previewItemURL];  
        // save url somewhere (I use NSUserDefaults) 
        [self FO_prepareToDrawNode:arg1];  
    }  
    

    Maybe there’s a better way, but that’s what I figured out…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to integrate a Cache Manager in an ASP.NET application. Basically I
I am trying to integrate dropbox with iphone and done with login option.I want
I try to integrate django-ifs like a django app without using buildout. Now I
Recently I made an application in using Swing, AWT and JDBC that manages some
I would like to integrate my app with contact manager: More precisely: When I
So I followed some tutorials on how to integrate iAds, and finally managed to
I've recently started to use SQLite and began to integrate it into a C#
I'm investigating Adobe CQ5 and would like any advice on how to integrate its
I'm trying to integrate a Qt library with an SDL application. I'd like to
I want to Integrate Spring and Hibernate and use JTA for managing the transactions.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.