mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-19 07:19:30 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user