Skip to content

Commit

Permalink
Disables the preview cycling
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusDietz committed Aug 24, 2019
1 parent 205ae68 commit 66fcbb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
3 changes: 0 additions & 3 deletions src/main/java/org/jabref/gui/BasePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,6 @@ private void setupActions() {
new SpecialFieldViewModel(SpecialField.READ_STATUS, undoManager).getSpecialFieldAction(status, this.frame));
}

actions.put(Actions.NEXT_PREVIEW_STYLE, this::nextPreviewStyle);
actions.put(Actions.PREVIOUS_PREVIEW_STYLE, this::previousPreviewStyle);

actions.put(Actions.SEND_AS_EMAIL, new SendAsEMailAction(frame));

actions.put(Actions.WRITE_XMP, new WriteXMPAction(this)::execute);
Expand Down
15 changes: 8 additions & 7 deletions src/main/java/org/jabref/gui/preview/PreviewPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ public PreviewPanel(BibDatabaseContext database, BasePanel basePanel, DialogServ
previewView.startFullDrag();

Dragboard dragboard = previewView.startDragAndDrop(TransferMode.COPY);
ClipboardContent content = new ClipboardContent();
ClipboardContent content = new ClipboardContent();
content.putHtml(previewView.getSelectionHtmlContent());
dragboard.setContent(content);
dragboard.setContent(content);

event.consume();
});
event.consume();
});

previewView.setOnDragOver(event -> {
if (event.getDragboard().hasFiles()) {
Expand Down Expand Up @@ -93,7 +93,6 @@ public PreviewPanel(BibDatabaseContext database, BasePanel basePanel, DialogServ

event.setDropCompleted(success);
event.consume();

});
this.getChildren().add(previewView);

Expand Down Expand Up @@ -142,19 +141,21 @@ private ContextMenu createPopupMenu() {
copyPreview.setOnAction(event -> previewView.copyPreviewToClipBoard());
MenuItem printEntryPreview = new MenuItem(Localization.lang("Print entry preview"), IconTheme.JabRefIcons.PRINTED.getGraphicNode());
printEntryPreview.setOnAction(event -> previewView.print());
/* Deleted since it does not work anymore. Needs refactoring.
MenuItem previousPreviewLayout = new MenuItem(Localization.lang("Previous preview layout"));
previousPreviewLayout.setAccelerator(keyBindingRepository.getKeyCombination(KeyBinding.PREVIOUS_PREVIEW_LAYOUT));
previousPreviewLayout.setOnAction(event -> basePanel.previousPreviewStyle());
MenuItem nextPreviewLayout = new MenuItem(Localization.lang("Next preview layout"));
nextPreviewLayout.setAccelerator(keyBindingRepository.getKeyCombination(KeyBinding.NEXT_PREVIEW_LAYOUT));
nextPreviewLayout.setOnAction(event -> basePanel.nextPreviewStyle());
*/

ContextMenu menu = new ContextMenu();
menu.getItems().add(copyPreview);
menu.getItems().add(printEntryPreview);
menu.getItems().add(new SeparatorMenuItem());
menu.getItems().add(nextPreviewLayout);
menu.getItems().add(previousPreviewLayout);
// menu.getItems().add(nextPreviewLayout);
// menu.getItems().add(previousPreviewLayout);
return menu;
}

Expand Down

0 comments on commit 66fcbb1

Please sign in to comment.