mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-18 01:29:26 +00:00
Enabled drag and drop of search result for reordering
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
// FIXME: change drag image to use only the first column regardless of drag start
|
// FIXME: change drag image to use only the first column regardless of drag start
|
||||||
|
|
||||||
- (id<NSPasteboardWriting>)tableView:(NSTableView *)tableView pasteboardWriterForRow:(NSInteger)row {
|
- (id<NSPasteboardWriting>)tableView:(NSTableView *)tableView pasteboardWriterForRow:(NSInteger)row {
|
||||||
if(MPDisplayModeEntries != self.viewController.displayMode) {
|
if(MPDisplayModeHistory == self.viewController.displayMode) {
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
- (NSDragOperation)tableView:(NSTableView *)tableView validateDrop:(id<NSDraggingInfo>)info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)dropOperation {
|
- (NSDragOperation)tableView:(NSTableView *)tableView validateDrop:(id<NSDraggingInfo>)info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)dropOperation {
|
||||||
/* we do not accept drops if we are in history or search display mode */
|
/* we do not accept drops if we are in history or search display mode */
|
||||||
if(MPDisplayModeEntries != self.viewController.displayMode) {
|
if(self.viewController.displayMode != MPDisplayModeEntries) {
|
||||||
return NSDragOperationNone;
|
return NSDragOperationNone;
|
||||||
}
|
}
|
||||||
BOOL isLocalDrag = info.draggingSource == tableView;
|
BOOL isLocalDrag = info.draggingSource == tableView;
|
||||||
|
|||||||
Reference in New Issue
Block a user