On 26 Jan 2009, at 9:55 PM, Maxwell, Adam R wrote:

>
>
>
> On 01/26/09 12:17, "Christiaan Hofman" <[email protected]> wrote:
>
>>
>> On 26 Jan 2009, at 9:10 PM, Maxwell, Adam R wrote:
>>
>>> On 01/26/09 11:51, "Christiaan Hofman" <[email protected]> wrote:
>>>
>>>> Correction, the file icon does not seem to be the one for the
>>>> linked file, but
>>>> for the .bib document file. This is not as intended, probably some
>>>> OS update
>>>> has changed AppKit's behavior (I seem to recall that it worked even
>>>> after
>>>> Leopard was released).
>>>
>>> It looks like NSDocument now uses -[NSWindow setRepresentedURL:].
>>> Duplicating the current hack for setRepresentedFilename: seems to
>>> work.
>>
>> Yea, I just committed that change.
>
> How about this:
>
> - (void)synchronizeWindowTitleWithDocumentName
> {
>    // use local files since representedURL doesn't work with non- 
> file URLs
>    [[self window] setRepresentedURL:[[[publication localFiles]  
> firstObject]
> URL]];
>    [[self window] setTitle:[self windowTitleForDocumentDisplayName: 
> [[self
> document] displayName]]];
> }
>
> (modified as necessary for 10.4), then change all [[self window]  
> setTitle:]
> calls to [self synchronizeWindowTitleWithDocumentName]?  Currently  
> it gets
> out of sync if files are reordered.  This fixes that, and also gets  
> rid of
> the nasty swizzling hacks.
>
> -- 
> Adam

One reason for the swizzling was also because we use this in various  
windows (it really should be possible out-of-the-box to override the  
default behavior). Moreover, it needed to be overridden at this place,  
because we have zero control over when the proxy icon gets set by  
AppKit, this can come at any time. So even if we would make this  
change, AppKit could again change the proxy icon again whenever it  
likes.

Christiaan


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

Reply via email to