Skip to content

Commit

Permalink
Merge pull request #32 from Ogefest/feature/textarea-search-bar
Browse files Browse the repository at this point in the history
Feature/textarea search bar
  • Loading branch information
Ogefest authored Apr 26, 2021
2 parents 94b3479 + 375a71a commit 6bea0ca
Show file tree
Hide file tree
Showing 12 changed files with 261 additions and 514 deletions.
9 changes: 0 additions & 9 deletions src/main/java/notepack/NoteTabContentCallback.java

This file was deleted.

211 changes: 0 additions & 211 deletions src/main/java/notepack/NoteTabContentController.java

This file was deleted.

6 changes: 0 additions & 6 deletions src/main/java/notepack/SearchFormCallback.java

This file was deleted.

97 changes: 0 additions & 97 deletions src/main/java/notepack/SearchFormController.java

This file was deleted.

9 changes: 8 additions & 1 deletion src/main/java/notepack/app/task/InitializeShortcuts.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,19 @@ public void guiWork(TaskUtil taskUtil, App app) {
notes.getScene().getAccelerators().put(kcSearchReplaceString, () -> {
Tab t = taskUtil.getNotesContainer().getSelectionModel().getSelectedItem();
if (t.getUserData() instanceof TextAreaController) {
((TextAreaController) t.getUserData()).showSearchReplaceForm();
((TextAreaController) t.getUserData()).showSearchForm();
}
if (t.getUserData() instanceof TodoPaneBackgroundController) {
((TodoPaneBackgroundController) t.getUserData()).toggleSearchInput();
}
});
KeyCombination kcSearchString = new KeyCodeCombination(KeyCode.R, KeyCombination.CONTROL_DOWN);
notes.getScene().getAccelerators().put(kcSearchString, () -> {
Tab t = taskUtil.getNotesContainer().getSelectionModel().getSelectedItem();
if (t.getUserData() instanceof TextAreaController) {
((TextAreaController) t.getUserData()).showReplaceForm();
}
});

KeyCombination kcOpenNotes = new KeyCodeCombination(KeyCode.N, KeyCombination.CONTROL_DOWN, KeyCombination.SHIFT_DOWN);
parentStage.getScene().getAccelerators().put(kcOpenNotes, () -> taskUtil.showNotesPane());
Expand Down
Loading

0 comments on commit 6bea0ca

Please sign in to comment.