Adium

Changeset 15456

Show
Ignore:
Timestamp:
03/13/2006 02:52:22 PM (3 years ago)
Author:
catfish_man
Message:

We now use some snazzy DOM stuff to update user icons in the message view. Fixes #3440

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Plugins/WebKit Message View/AIWebKitMessageViewController.m

    r15365 r15456  
    8181    //init 
    8282    if ((self = [super init])) 
    83         { 
     83        {               
    8484                [self _initWebView]; 
    8585 
     
    922922                                                                         object:[chat account]]; 
    923923         
    924         //We've now masked every user currently in the pariticpating list objects 
     924        //We've now masked every user currently in the participating list objects 
    925925        [objectsWithUserIconsArray release];  
    926         objectsWithUserIconsArray = [participatingListObjects mutableCopy]; 
     926        objectsWithUserIconsArray = [participatingListObjects mutableCopy];     
    927927} 
    928928 
     
    10141014                /* 
    10151015                 * Writing the icon out is necessary for webkit to be able to use it; it also guarantees that there won't be 
    1016                  * any animation, which is good since animation in the messagae view is slow and annoying. 
     1016                 * any animation, which is good since animation in the message view is slow and annoying. 
    10171017                 */ 
    10181018                webKitUserIconPath = [self _webKitUserIconPathForObject:inObject]; 
     
    10271027                                [objectsWithUserIconsArray addObject:inObject]; 
    10281028                        } 
     1029                         
     1030                        DOMNodeList *images = [[[webView mainFrame] DOMDocument] getElementsByTagName:@"img"]; 
     1031                        for(int i = 0; i < [images length]; i++) 
     1032                        { 
     1033                                DOMHTMLImageElement *img = (DOMHTMLImageElement *)[images item:i]; 
     1034                                if([[img getAttribute:@"src"] rangeOfString:[inObject internalObjectID]].location != NSNotFound) 
     1035                                        [img setSrc:webKitUserIconPath]; 
     1036                        } 
    10291037                } 
    10301038        }