File: main_prefs.m

package info (click to toggle)
lusernet.app 0.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 828 kB
  • sloc: objc: 8,495; makefile: 22
file content (46 lines) | stat: -rw-r--r-- 921 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
copyright 2002 Alexander Malmberg <alexander@malmberg.org>
*/

#include <Foundation/NSObject.h>

#include "main.h"

#include "PrefBox.h"

#include "Pref_Sources.h"
#include "Pref_MessageViewing.h"
#include "Pref_ReadAhead.h"
#include "Pref_Posting.h"

#include "PreferencesWindowController.h"


@implementation AppDelegate (prefs)
-(void) openPreferences: (id)sender
{
	if (!preferences_window)
	{
		NSObject<PrefBox> *pb;
		preferences_window=[[PreferencesWindowController alloc] init];

		pb=[[Pref_Sources alloc] initWithMsgDB: mdb];
		[preferences_window addPrefBox: pb];
		DESTROY(pb);

		pb=[[Pref_MessageViewing alloc] init];
		[preferences_window addPrefBox: pb];
		DESTROY(pb);

		pb=[[Pref_ReadAhead alloc] init];
		[preferences_window addPrefBox: pb];
		DESTROY(pb);

		pb=[[Pref_Posting alloc] init];
		[preferences_window addPrefBox: pb];
		DESTROY(pb);
	}
	[preferences_window showWindow: self];
}
@end