mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
Forgot to add this in last commit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@16706 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b5f14f087d
commit
0141a9145e
2 changed files with 68 additions and 0 deletions
22
GormPrefController.h
Normal file
22
GormPrefController.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#ifndef INCLUDED_GormPrefController_h
|
||||||
|
#define INCLUDED_GormPrefController_h
|
||||||
|
|
||||||
|
#include <Foundation/NSObject.h>
|
||||||
|
|
||||||
|
#include <AppKit/NSWindowController.h>
|
||||||
|
|
||||||
|
@interface GormPrefController : NSWindowController
|
||||||
|
{
|
||||||
|
id window;
|
||||||
|
id popup;
|
||||||
|
id prefBox;
|
||||||
|
|
||||||
|
id _generalView;
|
||||||
|
id _headersView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) popupAction: (id)sender;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif
|
46
GormPrefController.m
Normal file
46
GormPrefController.m
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
#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
|
Loading…
Reference in a new issue