diff --git a/MacPass/MPAttachmentTableDataSource.m b/MacPass/MPAttachmentTableDataSource.m index 8f1edc52..279705c0 100644 --- a/MacPass/MPAttachmentTableDataSource.m +++ b/MacPass/MPAttachmentTableDataSource.m @@ -21,7 +21,6 @@ // #import "MPAttachmentTableDataSource.h" -#import "KPKBinary+MPAdditions.h" #import "MPDocument.h" @implementation MPAttachmentTableDataSource diff --git a/MacPass/MPEntryTableDataSource.m b/MacPass/MPEntryTableDataSource.m index c9a93690..ded31811 100644 --- a/MacPass/MPEntryTableDataSource.m +++ b/MacPass/MPEntryTableDataSource.m @@ -63,13 +63,16 @@ } - (BOOL)tableView:(NSTableView *)tableView acceptDrop:(id)info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)dropOperation { - /* local drag */ + if(dropOperation == NSTableViewDropAbove) { + row = MAX(0, row - 1); // decrement the row + } BOOL copyItems = info.draggingSourceOperationMask == NSDragOperationCopy; MPDocument *document = tableView.window.windowController.document; if(document.currentTargetGroups.count != 1) { return NO; } KPKGroup *targetGroup = document.currentTargetGroups.firstObject; + /* local drag */ if(info.draggingSource == tableView) { if(copyItems) { for(NSUUID *entryUUID in [self _readEntryUUIDsFromPasterboard:info.draggingPasteboard].reverseObjectEnumerator) { diff --git a/MacPass/MPOutlineDataSource.m b/MacPass/MPOutlineDataSource.m index 497a85cd..8f733437 100644 --- a/MacPass/MPOutlineDataSource.m +++ b/MacPass/MPOutlineDataSource.m @@ -156,7 +156,7 @@ for(KPKGroup *group in self.draggedGroups.reverseObjectEnumerator) { [group moveToGroup:targetGroup atIndex:insertIndex]; insertIndex = group.index; - [group.undoManager setActionName:NSLocalizedString(@"MOVE_GROUP", "Action title for moving a group via drag and drop")]; + [group.undoManager setActionName:NSLocalizedString(@"DRAG_GROUP", "Action title for moving a group via drag and drop")]; } return YES; } @@ -174,7 +174,7 @@ for(NSUUID *entryUUID in entryUUIDs) { KPKEntry *draggedEntry = [document findEntry:entryUUID]; [draggedEntry moveToGroup:targetGroup]; - [draggedEntry.undoManager setActionName:NSLocalizedString(@"MOVE_ENTRY", "Action title for moving an entry via drag and drop")]; + [draggedEntry.undoManager setActionName:NSLocalizedString(@"DRAG_ENTRY", "Action title for moving an entry via drag and drop")]; } } return YES; diff --git a/MacPass/en.lproj/Localizable.strings b/MacPass/en.lproj/Localizable.strings index 724846e7..61ae624c 100644 --- a/MacPass/en.lproj/Localizable.strings +++ b/MacPass/en.lproj/Localizable.strings @@ -135,7 +135,8 @@ /* Context menu sub-menu to copy custom fields to clipboard */ "COPY_CUSTOM_FIELDS_MENU" = "Copy Custom Field…"; -/* Action title for copying an entry via drag and drop */ +/* Action name when an entry was moved + Action title for copying an entry via drag and drop */ "COPY_ENTRY" = "Copy Entry"; /* Mask for title to copy field value */ @@ -201,6 +202,14 @@ /* Empty Trash */ "DELETE_TRASHED_GROUP" = "Delete Trashed Group"; +/* Action title for copying an entry via drag and drop to another database + Action title for moving an entry via drag and drop */ +"DRAG_ENTRY" = "Drag Entry"; + +/* Action title for moving a group via drag and drop + Actiontitle for copying groups via drag and drop to antother database */ +"DRAG_GROUP" = "Drag Group"; + /* Action name for duplicating entries */ "DUPLICATE_ENTRIES_%ld" = "Duplicate Entries %ld"; @@ -331,12 +340,9 @@ Modification date column title */ "MODIFIED" = "Modified"; -/* Action title for moving an entry via drag and drop */ +/* Action name when an entry was moved */ "MOVE_ENTRY" = "Move Entry"; -/* Action title for moving a group via drag and drop */ -"MOVE_GROUP" = "Move Group"; - /* Menu displayed as popup selection for search options when multiple items are selected */ "MULTIPLE_FILTERS_ACTIVE_WITH_DOTS" = "Multiple…"; diff --git a/MacPass/en.lproj/Localizable.strings.updated b/MacPass/en.lproj/Localizable.strings.updated new file mode 100644 index 00000000..a60e6df5 Binary files /dev/null and b/MacPass/en.lproj/Localizable.strings.updated differ