source: trunk/Cocoa/Pester/Source/PSAlarmNotifierController.m@ 43

Last change on this file since 43 was 43, checked in by Nicholas Riley, 22 years ago

Pester 1.1a1.

English.lproj/InfoPlist.strings: Updated for 1.1a1.

English.lproj/MainMenu.nib: Placeholder for day names in popup menu, fixed up by code (this means you can still edit it from IB though). Added command-shift-T to both in/at cells (required, code removes one or the other as appropriate). Fixed up sizes of fields. Default to today (this will need fixing when we localized the word "today", but it's fine for now...).

English.lproj/Notifier.nib: Remove date formatter because we set a string directly now instead (could set formatter from code, but we don't).

NJRDateFormatter: many workarounds for Cocoa bugs: missing AM/PM, incorrect results with space before AM/PM, etc. Added class methods to do format manipulation and return localized formats which work for output (though not always for input; this class has an internal workaround for the AM/PM problem).

NJRFSObjectSelector: properly handle enabled attribute, store internally and report externally as appropriate. Previously, the button would become enabled if you dropped something on it even if it was supposed to be disabled.

NJRQTMediaPopUpButton: stop sound preview when button disabled.

NJRVoicePopUpButton: stop voice preview when button disabled.

PSAlarm: new method -dateString returns long date string. Maintain local copy of long date, short date and time formats, and locale, using NJRDateFormatter.

PSAlarmNotifierController: update to use -[PSAlarm dateString], -[PSAlarm timeString] for localization instead of using broken formatter.

PSAlarmSetController: update documentation for some more Cocoa bugs I need to file. Set time of day and date formatters with localized date formats from NJRDateFormatter (retain/release issue here?) Localize weekday popup for predefined dates. Localize static date display with NJRDateFormatter. Note a solution (thanks to Douglas Davidson) for figuring out which control is editing. Added command-shift-T key equivalent to toggle in/at. Properly work around bugs witih soundRepetitionCount flashing, except where it's impossible to do anything else.

Read Me.rtfd: Updated for 1.1a1.

VERSION: Updated for 1.1a1.

File size: 893 bytes
2// PSAlarmNotifierController.m
3// Pester
5// Created by Nicholas Riley on Tue Oct 08 2002.
6// Copyright (c) 2002 Nicholas Riley. All rights reserved.
9#import "PSAlarmNotifierController.h"
10#import "PSAlarmAlertController.h"
11#import "PSAlarm.h"
13@implementation PSAlarmNotifierController
15// XXX should use NSNonactivatingPanelMask on 10.2
17- (id)initWithAlarm:(PSAlarm *)alarm;
19 if ([self initWithWindowNibName: @"Notifier"]) {
20 [[self window] center];
21 [messageField setStringValue: [alarm message]];
22 [dateField setStringValue:
23 [NSString stringWithFormat: @"%@ at %@", [alarm dateString], [alarm timeString]]];
24 [[self window] makeKeyAndOrderFront: nil];
25 [[self window] orderFrontRegardless];
26 }
27 return self;
30- (IBAction)close:(id)sender;
32 [PSAlarmAlertController stopAlerts: sender];
33 [self close];
Note: See TracBrowser for help on using the repository browser.