Index: /trunk/Cocoa/Pester/Source/NJRFSObjectSelector.m
===================================================================
--- /trunk/Cocoa/Pester/Source/NJRFSObjectSelector.m	(revision 586)
+++ /trunk/Cocoa/Pester/Source/NJRFSObjectSelector.m	(revision 587)
@@ -111,5 +111,5 @@
 }
 
-- (void)revealInFinder:(id<NSMenuItem>)sender;
+- (void)revealInFinder:(NSMenuItem *)sender;
 {
     NSString *path = [sender representedObject];
Index: /trunk/Cocoa/Pester/Source/NJRQTMediaPopUpButton.m
===================================================================
--- /trunk/Cocoa/Pester/Source/NJRQTMediaPopUpButton.m	(revision 586)
+++ /trunk/Cocoa/Pester/Source/NJRQTMediaPopUpButton.m	(revision 587)
@@ -568,5 +568,5 @@
     while ( (type = [e nextObject]) != nil) {
         if ([type hasPrefix: @"CorePasteboardFlavorType 0x"]) {
-            const char *osTypeHex = [[type substringFromIndex: [type rangeOfString: @"0x" options: NSBackwardsSearch].location] lossyCString];
+            const char *osTypeHex = [[type substringFromIndex: [type rangeOfString: @"0x" options: NSBackwardsSearch].location] UTF8String];
             OSType osType;
             sscanf(osTypeHex, "%lx", &osType);
Index: /trunk/Cocoa/Pester/Source/NSImage-OAExtensions.h
===================================================================
--- /trunk/Cocoa/Pester/Source/NSImage-OAExtensions.h	(revision 586)
+++ /trunk/Cocoa/Pester/Source/NSImage-OAExtensions.h	(revision 587)
@@ -14,15 +14,5 @@
 @interface NSImage (OAExtensions)
 
-+ (NSImage *)imageNamed:(NSString *)imageName inBundleForClass:(Class)aClass;
 + (NSImage *)imageNamed:(NSString *)imageName inBundle:(NSBundle *)aBundle;
-+ (NSImage *)imageForFileType:(NSString *)fileType;
-    // Caching wrapper for -[NSWorkspace iconForFileType:].  This method is not thread-safe at the moment.
-+ (NSImage *)draggingIconWithTitle:(NSString *)title andImage:(NSImage *)image;
-
-- (void)drawFlippedInRect:(NSRect)rect operation:(NSCompositingOperation)op fraction:(float)delta;
-- (void)drawFlippedInRect:(NSRect)rect operation:(NSCompositingOperation)op;
-
-    // Puts the image on the pasteboard as TIFF, and also supplies data from any PDF, EPS, or PICT representations available. Returns the number of types added to the pasteboard and adds their names to notThese. This routine uses -addTypes:owner:, so the pasteboard must have previously been set up using -declareTypes:owner.
-- (int)addDataToPasteboard:(NSPasteboard *)aPasteboard exceptTypes:(NSMutableSet *)notThese;
 
 @end
Index: /trunk/Cocoa/Pester/Source/NSImage-OAExtensions.m
===================================================================
--- /trunk/Cocoa/Pester/Source/NSImage-OAExtensions.m	(revision 586)
+++ /trunk/Cocoa/Pester/Source/NSImage-OAExtensions.m	(revision 587)
@@ -13,9 +13,4 @@
 
 @implementation NSImage (OAExtensions)
-
-+ (NSImage *)imageNamed:(NSString *)imageName inBundleForClass:(Class)aClass;
-{
-    return [self imageNamed:imageName inBundle:[NSBundle bundleForClass:aClass]];
-}
 
 + (NSImage *)imageNamed:(NSString *)imageName inBundle:(NSBundle *)aBundle;
@@ -38,174 +33,3 @@
 }
 
-+ (NSImage *)imageForFileType:(NSString *)fileType;
-    // It turns out that -[NSWorkspace iconForFileType:] doesn't cache previously returned values, so we cache them here.
-{
-    static NSMutableDictionary *imageDictionary = nil;
-    id image;
-
-    // ASSERT_IN_MAIN_THREAD(@"+imageForFileType: is not thread-safe; must be called from the main thread");
-    // We could fix this by adding locks around imageDictionary
-
-    if (!fileType)
-        return nil;
-        
-    if (imageDictionary == nil)
-        imageDictionary = [[NSMutableDictionary alloc] init];
-
-    image = [imageDictionary objectForKey:fileType];
-    if (image == nil) {
-#ifdef DEBUG
-        // Make sure that our caching doesn't go insane (and that we don't ask it to cache insane stuff)
-        NSLog(@"Caching workspace image for file type '%@'", fileType);
-#endif
-        image = [[NSWorkspace sharedWorkspace] iconForFileType:fileType];
-        if (image == nil)
-            image = [NSNull null];
-        [imageDictionary setObject:image forKey:fileType];
-    }
-    return image != [NSNull null] ? image : nil;
-}
-
-#define X_SPACE_BETWEEN_ICON_AND_TEXT_BOX 2
-#define X_TEXT_BOX_BORDER 2
-#define Y_TEXT_BOX_BORDER 2
-static NSDictionary *titleFontAttributes;
-
-+ (NSImage *)draggingIconWithTitle:(NSString *)title andImage:(NSImage *)image;
-{
-    NSImage *drawImage;
-    NSSize imageSize, totalSize;
-    NSSize titleSize, titleBoxSize;
-    NSRect titleBox;
-    NSPoint textPoint;
-
-    NSParameterAssert(image != nil);
-    imageSize = [image size];
-
-    if (!titleFontAttributes)
-        titleFontAttributes = [[NSDictionary alloc] initWithObjectsAndKeys:[NSFont systemFontOfSize:12.0], NSFontAttributeName, [NSColor textColor], NSForegroundColorAttributeName, nil];
-
-    if (!title || [title length] == 0)
-        return image;
-    
-    titleSize = [title sizeWithAttributes:titleFontAttributes];
-    titleBoxSize = NSMakeSize(titleSize.width + 2.0 * X_TEXT_BOX_BORDER, titleSize.height + Y_TEXT_BOX_BORDER);
-
-    totalSize = NSMakeSize(imageSize.width + X_SPACE_BETWEEN_ICON_AND_TEXT_BOX + titleBoxSize.width, MAX(imageSize.height, titleBoxSize.height));
-
-    drawImage = [[NSImage alloc] initWithSize:totalSize];
-    [drawImage setFlipped:YES];
-
-    [drawImage lockFocus];
-
-    // Draw transparent background
-    [[NSColor colorWithDeviceWhite:1.0 alpha:0.0] set];
-    NSRectFill(NSMakeRect(0, 0, totalSize.width, totalSize.height));
-
-    // Draw icon
-    [image compositeToPoint:NSMakePoint(0.0, rint(totalSize.height / 2.0 + imageSize.height / 2.0)) operation:NSCompositeSourceOver];
-    
-    // Draw box around title
-    titleBox = NSMakeRect(imageSize.width + X_SPACE_BETWEEN_ICON_AND_TEXT_BOX, floor((totalSize.height - titleBoxSize.height)/2.0), titleBoxSize.width, titleBoxSize.height);
-    [[[NSColor selectedTextBackgroundColor] colorWithAlphaComponent:0.5] set];
-    NSRectFill(titleBox);
-
-    // Draw title
-    textPoint = NSMakePoint(imageSize.width + X_SPACE_BETWEEN_ICON_AND_TEXT_BOX + X_TEXT_BOX_BORDER, Y_TEXT_BOX_BORDER - 1);
-
-    [title drawAtPoint:textPoint withAttributes:titleFontAttributes];
-
-    [drawImage unlockFocus];
-
-    return [drawImage autorelease];
-}
-
-//
-
-- (void)drawFlippedInRect:(NSRect)rect operation:(NSCompositingOperation)op fraction:(float)delta;
-{
-    CGContextRef context;
-
-    context = [[NSGraphicsContext currentContext] graphicsPort];
-    CGContextSaveGState(context); {
-        CGContextTranslateCTM(context, 0, NSMaxY(rect));
-        CGContextScaleCTM(context, 1, -1);
-        
-        rect.origin.y = 0; // We've translated ourselves so it's zero
-        [self drawInRect:rect fromRect:NSZeroRect operation:op fraction:delta];
-    } CGContextRestoreGState(context);
-
-    /*
-        NSAffineTransform *flipTransform;
-        NSPoint transformedPoint;
-        NSSize transformedSize;
-        NSRect transformedRect;
-
-        flipTransform = [[NSAffineTransform alloc] init];
-        [flipTransform scaleXBy:1.0 yBy:-1.0];
-
-        transformedPoint = [flipTransform transformPoint:rect.origin];
-        transformedSize = [flipTransform transformSize:rect.size];
-        [flipTransform concat];
-        transformedRect = NSMakeRect(transformedPoint.x, transformedPoint.y + transformedSize.height, transformedSize.width, -transformedSize.height);
-        [anImage drawInRect:transformedRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
-        [flipTransform concat];
-        [flipTransform release];
-        */
-}
-
-- (void)drawFlippedInRect:(NSRect)rect operation:(NSCompositingOperation)op;
-{
-    [self drawFlippedInRect:rect operation:op fraction:1.0];
-}
-
-- (int)addDataToPasteboard:(NSPasteboard *)aPasteboard exceptTypes:(NSMutableSet *)notThese
-{
-    NSArray *myRepresentations;
-    int repIndex, repCount;
-    int count = 0;
-
-    if (!notThese)
-        notThese = [NSMutableSet set];
-
-#define IF_ADD(typename, dataOwner) if( ![notThese containsObject:(typename)] && [aPasteboard addTypes:[NSArray arrayWithObject:(typename)] owner:(dataOwner)] > 0 )
-
-#define ADD_CHEAP_DATA(typename, expr) IF_ADD(typename, nil) { [aPasteboard setData:(expr) forType:(typename)]; [notThese addObject:(typename)]; count ++; }
-        
-    /* If we have image representations lying around that already have data in some concrete format, add that data to the pasteboard. */
-    myRepresentations = [self representations];
-    repCount = [myRepresentations count];
-    for(repIndex = 0; repIndex < repCount; repIndex ++) {
-        NSImageRep *aRep = [myRepresentations objectAtIndex:repIndex];
-            
-        if ([aRep respondsToSelector:@selector(PDFRepresentation)]) {
-            ADD_CHEAP_DATA(NSPDFPboardType, [(NSPDFImageRep *)aRep PDFRepresentation]);
-        }
-
-        if ([aRep respondsToSelector:@selector(PICTRepresentation)]) {
-            ADD_CHEAP_DATA(NSPICTPboardType, [(NSPICTImageRep *)aRep PICTRepresentation]);
-        }
-
-        if ([aRep respondsToSelector:@selector(EPSRepresentation)]) {
-            ADD_CHEAP_DATA(NSPostScriptPboardType, [(NSEPSImageRep *)aRep EPSRepresentation]);
-        }
-    }
-    
-    /* Always offer to convert to TIFF. Do this lazily, though, since we probably have to extract it from a bitmap image rep. */
-    IF_ADD(NSTIFFPboardType, self) {
-        count ++;
-    }
-
-    return count;
-}
-
-- (void)pasteboard:(NSPasteboard *)aPasteboard provideDataForType:(NSString *)wanted
-{
-    if ([wanted isEqual:NSTIFFPboardType]) {
-        [aPasteboard setData:[self TIFFRepresentation] forType:NSTIFFPboardType];
-    }
-}
-
-
-
 @end
Index: /trunk/Cocoa/Pester/Source/PSAlarm.m
===================================================================
--- /trunk/Cocoa/Pester/Source/PSAlarm.m	(revision 586)
+++ /trunk/Cocoa/Pester/Source/PSAlarm.m	(revision 587)
@@ -116,6 +116,5 @@
     if ([string isEqualToString: @"PSAlarmSnooze"]) return PSAlarmSnooze;
     if ([string isEqualToString: @"PSAlarmExpired"]) return PSAlarmExpired;
-    NSLog(@"unknown alarm type string: %@", string);
-    return nil;
+    return PSAlarmInvalid;
 }
 
Index: /trunk/Cocoa/Pester/Source/PSAlarmSetController.m
===================================================================
--- /trunk/Cocoa/Pester/Source/PSAlarmSetController.m	(revision 586)
+++ /trunk/Cocoa/Pester/Source/PSAlarmSetController.m	(revision 587)
@@ -23,5 +23,4 @@
 #import "NSAttributedString-NJRExtensions.h"
 #import "NSCalendarDate-NJRExtensions.h"
-#import <Carbon/Carbon.h>
 
 #import "PSAlerts.h"
Index: /trunk/Cocoa/Pester/Source/PSApplication.m
===================================================================
--- /trunk/Cocoa/Pester/Source/PSApplication.m	(revision 586)
+++ /trunk/Cocoa/Pester/Source/PSApplication.m	(revision 587)
@@ -19,6 +19,4 @@
 #import "NJRHotKey.h"
 #import "NSWindowCollectionBehavior.h"
-
-#import <Carbon/Carbon.h>
 
 @implementation PSApplication
Index: /trunk/Cocoa/Pester/Source/PSTimer.m
===================================================================
--- /trunk/Cocoa/Pester/Source/PSTimer.m	(revision 586)
+++ /trunk/Cocoa/Pester/Source/PSTimer.m	(revision 587)
@@ -231,4 +231,5 @@
             // NSLog(@"going to sleep, setting timer %@", PSTimerOnWake);
 	    @try {
+		// XXX replaced by dateByAddingTimeInterval: in 10.5 and later
                 [PSPowerManager setWakeTime: [[PSTimerOnWake fireDate] addTimeInterval: -15]];
             } @catch (NSException *exception) {
