Settings now work with KDB1 Files and do not trap the Application in the modal dialog

Added user base settings to hide/show passwords at KDB1 field. The settings are stored but not considered ;)
This commit is contained in:
michael starke
2013-07-19 22:25:40 +02:00
parent 5e6d2bed3d
commit efa727eaba
14 changed files with 765 additions and 109 deletions

View File

@@ -33,7 +33,7 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
}
@property (weak) IBOutlet NSOutlineView *outlineView;
@property (weak) IBOutlet NSButton *addGroupButton;
@property (weak) KdbGroup *selectedGroup;
@property (nonatomic, weak) KdbGroup *selectedGroup;
@property (strong) NSTreeController *treeController;
@property (strong) MPOutlineDataSource *datasource;
@@ -89,6 +89,29 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
[_outlineView expandItem:node expandChildren:YES];
}
#pragma mark Custom Setter/Getter
- (void)setDatabaseNameWrapper:(NSString *)databaseNameWrapper {
if(![_databaseNameWrapper isEqualToString:databaseNameWrapper]) {
if([databaseNameWrapper length] == 0) {
_databaseNameWrapper = NSLocalizedString(@"DATABASE", "Default name database");
}
else {
_databaseNameWrapper= [databaseNameWrapper copy];
}
}
}
//- (void)setSelectedGroup:(KdbGroup *)selectedGroup {
// if(_selectedGroup != selectedGroup) {
// _selectedGroup = selectedGroup;
// if([selectedGroup isKindOfClass:[Kdb4Group class]]) {
// MPDocument *document = [[self windowController] document];
// document.treeV4.lastSelectedGroup = ((Kdb4Group *)selectedGroup).uuid;
// }
// }
//}
#pragma mark Notifications
- (void)setupNotifications:(MPDocumentWindowController *)windowController {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didCreateGroup:) name:MPDocumentDidAddGroupNotification object:[windowController document]];
@@ -114,17 +137,6 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
}
}
- (void)setDatabaseNameWrapper:(NSString *)databaseNameWrapper {
if(![_databaseNameWrapper isEqualToString:databaseNameWrapper]) {
if([databaseNameWrapper length] == 0) {
_databaseNameWrapper = NSLocalizedString(@"DATABASE", "Default name database");
}
else {
_databaseNameWrapper= [databaseNameWrapper copy];
}
}
}
#pragma mark -
#pragma mark Actions