Fixed icons, messed around in the engine a little.

This commit is contained in:
Uli Kusterer 2003-08-10 15:59:58 +02:00
parent 52a51f7d79
commit 524c6532df
5 changed files with 22 additions and 7 deletions

View File

@ -3,7 +3,7 @@
@interface PasteboardDocument : ResourceDocument
{
unsigned long generalChangeCount; // change count for the general pasteboard
int generalChangeCount; // change count for the general pasteboard
}
- (void)readPasteboard:(NSString *)pbName;

View File

@ -13,12 +13,12 @@
return self;
}
- (void)readPasteboard:(NSString *)pbName
-(void) readPasteboard:(NSString *)pbName
{
NSPasteboard *pb = [NSPasteboard pasteboardWithName:pbName];
NSArray *types = [pb types];
NSEnumerator *enumerator = [types objectEnumerator];
NSString *currentType;
NSPasteboard *pb = [NSPasteboard pasteboardWithName:pbName];
NSArray *types = [pb types];
NSEnumerator *enumerator = [types objectEnumerator];
NSString *currentType;
[[self undoManager] disableUndoRegistration];
while( currentType = [enumerator nextObject] )
@ -42,6 +42,18 @@
[resources addObject:resource]; // array retains resource
}
[[self undoManager] enableUndoRegistration];
[outlineView reloadData];
}
-(void) windowDidBecomeKey: (NSNotification*)notification
{
// This mess sponsored by Uli Kusterer ;-)
generalChangeCount = [[NSPasteboard generalPasteboard] changeCount];
[resources removeAllObjects];
[self readPasteboard:NSGeneralPboard]; // Update window contents.
}
@end

View File

@ -13,7 +13,9 @@
{
static PasteboardWindowController *sharedPasteboardWindowController = nil;
if( !sharedPasteboardWindowController )
{
sharedPasteboardWindowController = [[PasteboardWindowController allocWithZone:[self zone]] init];
}
return sharedPasteboardWindowController;
}

Binary file not shown.

View File

@ -1,2 +1,3 @@
-> "Open as Hex" displays "(null)" as the document name. Why?
-> Template editor always forces at least one item in a list. Make it support empty lists.
-> Changing the type/creator of a file isn't written to disk by ResourceDocument.
-> Create small versions of the doc icons in Photoshop instead of letting IconComposer use its cheap scaling on them.