mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 07:59:27 +00:00
Added simple settings
This commit is contained in:
59
MacPass/MPGeneralSettingsController.m
Normal file
59
MacPass/MPGeneralSettingsController.m
Normal file
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// MPGeneralSettingsController.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 23.07.12.
|
||||
// Copyright (c) 2012 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPGeneralSettingsController.h"
|
||||
|
||||
NSString *const MPGeneralSetingsIdentifier = @"GeneralSettingsTab";
|
||||
|
||||
@interface MPGeneralSettingsController ()
|
||||
@property (assign) IBOutlet NSPopUpButton *encodingPopup;
|
||||
- (void)didLoadView;
|
||||
@end
|
||||
|
||||
@implementation MPGeneralSettingsController
|
||||
@synthesize encodingPopup = _encodingPopup;
|
||||
|
||||
+ (NSString *)identifier {
|
||||
return MPGeneralSetingsIdentifier;
|
||||
}
|
||||
|
||||
- (id)init {
|
||||
return [self initWithNibName:@"GeneralSettings" bundle:[NSBundle mainBundle]];
|
||||
}
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
||||
{
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)loadView {
|
||||
[super loadView];
|
||||
[self didLoadView];
|
||||
}
|
||||
|
||||
- (void)didLoadView {
|
||||
// setup connections
|
||||
NSMenu *encodingMenu = [[NSMenu allocWithZone:[NSMenu menuZone]] init];
|
||||
NSMenuItem *item;
|
||||
|
||||
item = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:@"UTF8 Encoding" action:NULL keyEquivalent:@""];
|
||||
[item setRepresentedObject:[NSNumber numberWithInt:NSUTF8StringEncoding]];
|
||||
[encodingMenu addItem:item];
|
||||
[item release];
|
||||
|
||||
item = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:@"ASCII Encoding" action:NULL keyEquivalent:@""];
|
||||
[item setRepresentedObject:[NSNumber numberWithInt:NSASCIIStringEncoding]];
|
||||
[encodingMenu addItem:item];
|
||||
[item release];
|
||||
|
||||
[_encodingPopup setMenu:encodingMenu];
|
||||
[encodingMenu release];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user