Skip to content
Permalink
Browse files

Using masked Autotype sequence in Candiate Selection window again but…

… non-interactive
  • Loading branch information...
mstarke committed Mar 1, 2019
1 parent 1399a8d commit 342acfda593ffb50c0b5bc147cf74a2d49b49b9d
Showing with 5 additions and 4 deletions.
  1. +1 −1 Cartfile
  2. +1 −1 Cartfile.resolved
  3. +3 −2 MacPass/MPAutotypeCandidateSelectionViewController.m
@@ -1,3 +1,3 @@
github "sparkle-project/Sparkle" ~> 1.18.1
github "MacPass/KeePassKit" ~> 2.3
github "MacPass/KeePassKit" ~> 2.4
github "mstarke/HNHUi" ~> 3.0
@@ -1,4 +1,4 @@
github "MacPass/KeePassKit" "2.3.9"
github "MacPass/KeePassKit" "2.4.0"
github "mstarke/HNHUi" "3.0"
github "robbiehanson/KissXML" "5.2.3"
github "sparkle-project/Sparkle" "1.20.0"
@@ -55,8 +55,9 @@ - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView {
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
NSTableCellView *view = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self];
MPAutotypeContext *context = self.candidates[row];
NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@ (%@)\n%@", context.entry.title, context.entry.username, context.command]];
[string setAttributes:@{NSForegroundColorAttributeName: NSColor.disabledControlTextColor} range:NSMakeRange((string.length - context.command.length), context.command.length)];
NSString *maskedEvaluatedCommand = context.maskedEvaluatedCommand;
NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n%@", context.entry.title, maskedEvaluatedCommand]];
[string setAttributes:@{NSForegroundColorAttributeName: NSColor.disabledControlTextColor} range:NSMakeRange((string.length - maskedEvaluatedCommand.length), maskedEvaluatedCommand.length)];
view.textField.attributedStringValue = string;
view.imageView.image = context.entry.iconImage;
return view;

0 comments on commit 342acfd

Please sign in to comment.
You can’t perform that action at this time.