diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index edb26429e3b..d93a51e9633 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -634,7 +634,12 @@ public void init() { stateManager.setSelectedEntries(libraryTab.getSelectedEntries()); // Update active search query when switching between databases - stateManager.activeSearchQueryProperty().set(libraryTab.getCurrentSearchQuery()); + if (prefs.getSearchPreferences().shouldKeepSearchString() && libraryTab.getCurrentSearchQuery().isEmpty() && stateManager.activeSearchQueryProperty().get().isPresent()) { + // apply search query also when opening a new library and keep search string is activated + libraryTab.setCurrentSearchQuery(stateManager.activeSearchQueryProperty().get()); + } else { + stateManager.activeSearchQueryProperty().set(libraryTab.getCurrentSearchQuery()); + } // Update search autocompleter with information for the correct database: libraryTab.updateSearchManager(); diff --git a/src/main/java/org/jabref/gui/search/GlobalSearchResultDialog.java b/src/main/java/org/jabref/gui/search/GlobalSearchResultDialog.java index 5787897b98c..94707f68729 100644 --- a/src/main/java/org/jabref/gui/search/GlobalSearchResultDialog.java +++ b/src/main/java/org/jabref/gui/search/GlobalSearchResultDialog.java @@ -16,6 +16,7 @@ import org.jabref.gui.maintable.columns.SpecialFieldColumn; import org.jabref.gui.preview.PreviewViewer; import org.jabref.gui.util.BaseDialog; +import org.jabref.logic.l10n.Localization; import org.jabref.preferences.PreferencesService; import com.airhacks.afterburner.views.ViewLoader; @@ -39,6 +40,7 @@ public GlobalSearchResultDialog(ExternalFileTypes externalFileTypes, UndoManager this.undoManager = undoManager; this.externalFileTypes = externalFileTypes; + setTitle(Localization.lang("Search results from open libraries")); ViewLoader.view(this) .load() .setAsDialogPane(this); diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index 13bfc059c62..4dc5a2b677c 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -2395,3 +2395,4 @@ Could\ not\ extract\ Metadata\ from\:\ %0=Could not extract Metadata from: %0 Search\ across\ libraries\ in\ a\ new\ window=Search across libraries in a new window Keep\ search\ string\ across\ libraries=Keep search string across libraries Keep\ dialog\ always\ on\ top=Keep dialog always on top +Search\ results\ from\ open\ libraries=Search results from open libraries