mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@16706 72102866-910b-0410-8b05-ffd578937521
46 lines
917 B
Objective-C
46 lines
917 B
Objective-C
#include "GormPrefController.h"
|
|
#include "GormGeneralPref.h"
|
|
#include "GormHeadersPref.h"
|
|
|
|
#include <AppKit/NSBox.h>
|
|
#include <AppKit/NSPopUpButton.h>
|
|
#include <AppKit/NSNibLoading.h>
|
|
#include <AppKit/NSWindow.h>
|
|
|
|
@implementation GormPrefController
|
|
|
|
- (void) awakeFromNib
|
|
{
|
|
_generalView = [[GormGeneralPref alloc] init];
|
|
_headersView = [[GormHeadersPref alloc] init];
|
|
|
|
[prefBox setContentView:[_generalView view]];
|
|
|
|
[[self window] setFrameUsingName: @"Preferences"];
|
|
[[self window] setFrameAutosaveName: @"Preferences"];
|
|
}
|
|
|
|
|
|
- (void) popupAction: (id)sender
|
|
{
|
|
if ( sender != popup )
|
|
return;
|
|
|
|
{
|
|
int tag = [[sender selectedItem] tag];
|
|
switch(tag)
|
|
{
|
|
case 0:
|
|
[prefBox setContentView: [_generalView view]];
|
|
break;
|
|
case 1:
|
|
[prefBox setContentView: [_headersView view]];
|
|
break;
|
|
default:
|
|
NSLog(@"Ouch Default : - (void) popupAction: (id)sender");
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
@end
|