Fixed #61 searching in passwords is now supported

Fixed #80 nested groups can be selected as templates or trash
Trash UUID now get's stored correctly
Enhanced and fixed some undo errors in moving groups and/or entries
Added action names for moving groups/entries via drag and drop
This commit is contained in:
michael starke
2013-09-10 00:57:47 +02:00
parent 5511dd1207
commit 5796333a2e
8 changed files with 986 additions and 862 deletions

View File

@@ -100,8 +100,7 @@
}
- (IBAction)close:(id)sender {
[NSApp endSheet:[self window]];
[[self window] orderOut:nil];
[self dismissSheet:0];
}
- (void)updateView {
@@ -237,22 +236,26 @@
- (NSMenu *)_buildTreeMenu:(KPKTree *)tree preselect:(NSUUID *)uuid {
NSMenu *menu = [[NSMenu alloc] init];
[menu setAutoenablesItems:NO];
/*
Trash and Templates can be nested, so wee need to adhere to this :(
*/
for(KPKGroup *group in tree.root.groups) {
NSMenuItem *groupItem = [[NSMenuItem alloc] init];
[groupItem setImage:group.iconImage];
[groupItem setTitle:group.name];
[groupItem setRepresentedObject:group];
[groupItem setEnabled:YES];
if(uuid && [group.uuid isEqual:uuid]) {
[groupItem setState:NSOnState];
}
[menu addItem:groupItem];
[self _insertMenuItemsForGroup:group atLevel:0 inMenu:menu preselect:uuid];
}
return menu;
}
- (void)_insertMenuItemsForGroup:(KPKGroup *)group atLevel:(NSUInteger)level inMenu:(NSMenu *)menu preselect:(NSUUID *)uuid{
NSMenuItem *groupItem = [[NSMenuItem alloc] init];
[groupItem setImage:group.iconImage];
[groupItem setTitle:group.name];
[groupItem setRepresentedObject:group];
[groupItem setEnabled:YES];
if(uuid && [group.uuid isEqual:uuid]) {
[groupItem setState:NSOnState];
}
[groupItem setIndentationLevel:level];
[menu addItem:groupItem];
for(KPKGroup *childGroup in group.groups) {
[self _insertMenuItemsForGroup:childGroup atLevel:level + 1 inMenu:menu preselect:uuid];
}
}
@end