source: trunk/Cocoa/Pester/Source/PSPreferencesController.m@ 129

Last change on this file since 129 was 129, checked in by Nicholas Riley, 21 years ago

PSPreferencesController.[hm]: Manage preferences window, just like in
HostLauncher (and DockCam, I guess, though I didn't check.)

NJRHotKeyField.[hm], NJRHotKeyFieldCell.[hm]: Implements a NSTextField
subclass which intercepts every keyboard event it can, and turns it
into a human-readable representation. Don't ask me how many hours of
work this was.

English.lproj/MainMenu.nib: Hook up Preferences menu item.

English.lproj/Preferences.nib: Simple Preferences panel. One
NJRHotKeyField, one button, a couple of static text fields.

NSString-NJRExtensions.[hm]: Added method from HostLauncher (modified
to output attributed string, as it's needed in order to get the right
mix of fonts), -keyEquivalentAttributedStringWithModifierMask:.
Greatly broadened the number of keys which this method can process to
pretty much the entire extended keyboard.

NSFont-NJRExtensions.[hm]: Provide a class method for obtaining a
theme font as a NSFont.

File size: 873 bytes
Line 
1//
2// PSPreferencesController.m
3// Pester
4//
5// Created by Nicholas Riley on Sat Mar 29 2003.
6// Copyright (c) 2003 Nicholas Riley. All rights reserved.
7//
8
9#import "PSPreferencesController.h"
10#import "NJRHotKeyField.h"
11
12@implementation PSPreferencesController
13
14#pragma mark interface updating
15
16- (void)update;
17{
18 // XXX do what we do in HL, stop more than one prefs window from appearing
19}
20
21#pragma mark preferences I/O
22
23- (void)readFromPrefs;
24{
25 // XXX
26}
27
28- (void)writeToPrefs;
29{
30 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
31 // XXX
32 [defaults synchronize];
33}
34
35#pragma mark initialize-release
36
37- (id)init {
38 if ( (self = [super initWithWindowNibName: @"Preferences"]) != nil) {
39 [self window]; // connect outlets
40 [self readFromPrefs];
41 [self update];
42 }
43 return self;
44}
45
46- (void)dealloc;
47{
48
49}
50
51@end
Note: See TracBrowser for help on using the repository browser.