mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 01:59:24 +00:00
WindowAssocitations get listed in Autotype tab
This commit is contained in:
31
MacPass/MPWindowAssociationsTableViewDelegate.m
Normal file
31
MacPass/MPWindowAssociationsTableViewDelegate.m
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// MPWindowAssociationsTableViewDelegate.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 13.02.14.
|
||||
// Copyright (c) 2014 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPWindowAssociationsTableViewDelegate.h"
|
||||
|
||||
#import "MPDocument.h"
|
||||
#import "KPKEntry.h"
|
||||
#import "KPKAutotype.h"
|
||||
#import "KPKWindowAssociation.h"
|
||||
|
||||
@implementation MPWindowAssociationsTableViewDelegate
|
||||
|
||||
- (void)tableViewSelectionDidChange:(NSNotification *)notification {
|
||||
// update add/remove buttons?
|
||||
}
|
||||
|
||||
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
|
||||
MPDocument *document = [[[tableView window] windowController] document];
|
||||
NSTableCellView *view = [tableView makeViewWithIdentifier:@"WindowAssociationCell" owner:tableView];
|
||||
KPKEntry *entry = document.selectedEntry;
|
||||
KPKWindowAssociation *association = entry.autotype.associations[row];
|
||||
[[view textField] bind:NSValueBinding toObject:association withKeyPath:@"windowTitle" options:nil];
|
||||
return view;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user