mirror of
https://github.com/MacPass/MacPass.git
synced 2026-01-30 19:18:16 +00:00
Removed command evaluation for autotype candidate selection window
This commit is contained in:
@@ -55,8 +55,8 @@
|
|||||||
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
|
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
|
||||||
NSTableCellView *view = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self];
|
NSTableCellView *view = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self];
|
||||||
MPAutotypeContext *context = self.candidates[row];
|
MPAutotypeContext *context = self.candidates[row];
|
||||||
NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n%@", context.entry.title, context.maskedEvaluatedCommand]];
|
NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n%@", context.entry.title, context.command]];
|
||||||
[string setAttributes:@{NSForegroundColorAttributeName: NSColor.disabledControlTextColor} range:NSMakeRange(context.entry.title.length + 1, context.maskedEvaluatedCommand.length)];
|
[string setAttributes:@{NSForegroundColorAttributeName: NSColor.disabledControlTextColor} range:NSMakeRange(context.entry.title.length + 1, context.command.length)];
|
||||||
view.textField.attributedStringValue = string;
|
view.textField.attributedStringValue = string;
|
||||||
view.imageView.image = context.entry.iconImage;
|
view.imageView.image = context.entry.iconImage;
|
||||||
return view;
|
return view;
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
- (void)selectAutotypeContext:(id)sender {
|
- (void)selectAutotypeContext:(id)sender {
|
||||||
NSInteger selectedRow = self.contextTableView.selectedRow;
|
NSInteger selectedRow = self.contextTableView.selectedRow;
|
||||||
if(selectedRow >= 0 && selectedRow < self.candidates.count) {
|
if(selectedRow >= 0 && selectedRow < self.candidates.count) {
|
||||||
[[MPAutotypeDaemon defaultDaemon] selectAutotypeCandiate:self.candidates[selectedRow]];
|
[MPAutotypeDaemon.defaultDaemon selectAutotypeCandiate:self.candidates[selectedRow]];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
[self cancelSelection:sender]; // cancel since the selection was invalid!
|
[self cancelSelection:sender]; // cancel since the selection was invalid!
|
||||||
|
|||||||
Reference in New Issue
Block a user