Ignore:
Timestamp:
02/23/03 04:55:07 (21 years ago)
Author:
Nicholas Riley
Message:

Pester 1.1b3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/Pester/Source/PSApplication.m

    r61 r102  
    1111#import "PSAlarmAlertController.h"
    1212#import "PSAlarmsController.h"
     13#import "NJRReadMeController.h"
    1314#import "PSAlarm.h"
    1415#import "PSAlarms.h"
     
    3031- (IBAction)showHelp:(id)sender;
    3132{
    32     [[NSWorkspace sharedWorkspace] openFile: [[NSBundle mainBundle] pathForResource: @"Read Me" ofType: @"rtfd"]];
     33    [NJRReadMeController readMeControllerWithRTFDocument: [[NSBundle mainBundle] pathForResource: @"Read Me" ofType: @"rtfd"]];
    3334}
    3435
     
    154155- (BOOL)applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)flag;
    155156{
    156     if (!flag && ![[PSAlarms allAlarms] alarmsExpiring]) [alarmSetController showWindow: self];
     157    // XXX sometimes alarmsExpiring is NO (?), and we display the alarm set controller on top of an expiring alarm, try to reproduce
     158    if (!flag && ![[PSAlarms allAlarms] alarmsExpiring] && [NSApp modalWindow] == nil)
     159        [alarmSetController showWindow: self];
    157160    return YES;
    158161}
     
    215218}
    216219
     220// calendar window (running in modal session) will appear even when app is in background; shouldn't
     221- (void)applicationWillBecomeActive:(NSNotification *)notification;
     222{
     223    NSWindow *modalWindow = [NSApp modalWindow];
     224    if (modalWindow != nil) [modalWindow makeKeyAndOrderFront: nil];
     225}
     226
     227- (void)applicationWillResignActive:(NSNotification *)notification;
     228{
     229    NSWindow *modalWindow = [NSApp modalWindow];
     230    if (modalWindow != nil) [modalWindow orderOut: nil];
     231}
     232
    217233@end
Note: See TracChangeset for help on using the changeset viewer.