mirror of
https://github.com/MacPass/MacPass.git
synced 2026-05-07 20:12:52 +00:00
47 lines
1.5 KiB
Objective-C
47 lines
1.5 KiB
Objective-C
//
|
|
// MPEntyTableDataSource.m
|
|
// MacPass
|
|
//
|
|
// Created by Michael Starke on 09.06.13.
|
|
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
//
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
//
|
|
|
|
#import "MPEntryTableDataSource.h"
|
|
#import "MPEntryViewController.h"
|
|
|
|
#import "KeePassKit/KeePassKit.h"
|
|
|
|
@interface MPEntryTableDataSource ()
|
|
|
|
@end
|
|
|
|
@implementation MPEntryTableDataSource
|
|
|
|
- (id<NSPasteboardWriting>)tableView:(NSTableView *)tableView pasteboardWriterForRow:(NSInteger)row {
|
|
id item = self.viewController.entryArrayController.arrangedObjects[row];
|
|
if([item isKindOfClass:KPKEntry.class]) {
|
|
return item;
|
|
}
|
|
return nil;
|
|
}
|
|
|
|
- (void)tableView:(NSTableView *)tableView draggingSession:(NSDraggingSession *)session willBeginAtPoint:(NSPoint)screenPoint forRowIndexes:(nonnull NSIndexSet *)rowIndexes {
|
|
session.draggingFormation = NSDraggingFormationList;
|
|
}
|
|
|
|
@end
|