From 55e0f13f38fb2c7bfa742025e547a8e3f9d380d2 Mon Sep 17 00:00:00 2001 From: bartsch-dev Date: Mon, 10 Oct 2016 23:28:44 +0200 Subject: [PATCH 01/10] select whole word when selecting search bar (#2149) --- src/main/java/net/sf/jabref/gui/search/GlobalSearchBar.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/sf/jabref/gui/search/GlobalSearchBar.java b/src/main/java/net/sf/jabref/gui/search/GlobalSearchBar.java index 68324c3a0ba..3d4d84ec7ef 100644 --- a/src/main/java/net/sf/jabref/gui/search/GlobalSearchBar.java +++ b/src/main/java/net/sf/jabref/gui/search/GlobalSearchBar.java @@ -264,6 +264,7 @@ private void endSearch() { public void focus() { if (!searchField.hasFocus()) { searchField.requestFocus(); + searchField.selectAll(); } } From 01f01ab84cb5f2e0126e509caab98c3558d44e35 Mon Sep 17 00:00:00 2001 From: Braunch Date: Tue, 11 Oct 2016 03:18:50 +0200 Subject: [PATCH 02/10] Fix changing the font size not working when importing preferences (#2069) --- CHANGELOG.md | 1 + .../gui/preftabs/AppearancePrefsTab.java | 2 +- .../gui/preftabs/PreferencesDialog.java | 85 +++++++++++-------- 3 files changed, 52 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0661a825372..3127f1f608e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - Fixed InvalidBackgroundColor flickering with Ctrl-s and File > Save database - Fixed loop when pulling changes (shared database) when current selected field has changed - Fixed [#1958](https://github.com/JabRef/jabref/issues/1958): Verbatim fields are no longer checked for HTML encoded characters by integrity checks +- Fixed [#1808](https://github.com/JabRef/jabref/issues/1808): Font preference dialog now keeps changes - Fixed [#1937](https://github.com/JabRef/jabref/issues/1937): If no help page for the current chosen language exists, the english help page will be shown - Fixed [#2060](https://github.com/JabRef/jabref/issues/2060): Medline fetcher now imports data in UTF-8 encoding - Fixed file menu displays wrong hotkey in the German translation diff --git a/src/main/java/net/sf/jabref/gui/preftabs/AppearancePrefsTab.java b/src/main/java/net/sf/jabref/gui/preftabs/AppearancePrefsTab.java index 135c07783cd..7547effefbd 100644 --- a/src/main/java/net/sf/jabref/gui/preftabs/AppearancePrefsTab.java +++ b/src/main/java/net/sf/jabref/gui/preftabs/AppearancePrefsTab.java @@ -182,7 +182,7 @@ public AppearancePrefsTab(JabRefPreferences prefs) { overrideFonts.addActionListener(e -> fontSize.setEnabled(overrideFonts.isSelected())); fontButton.addActionListener( - e -> new FontSelectorDialog(null, GUIGlobals.currentFont).getSelectedFont().ifPresent(x -> usedFont = x)); + e -> new FontSelectorDialog(null, usedFont).getSelectedFont().ifPresent(x -> usedFont = x)); JPanel pan = builder.getPanel(); pan.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); diff --git a/src/main/java/net/sf/jabref/gui/preftabs/PreferencesDialog.java b/src/main/java/net/sf/jabref/gui/preftabs/PreferencesDialog.java index ca8d5476c47..95b99510324 100644 --- a/src/main/java/net/sf/jabref/gui/preftabs/PreferencesDialog.java +++ b/src/main/java/net/sf/jabref/gui/preftabs/PreferencesDialog.java @@ -42,6 +42,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + /** * Preferences dialog. Contains a TabbedPane, and tabs will be defined in * separate classes. Tabs MUST implement the PrefsTab interface, since this @@ -153,21 +154,7 @@ public PreferencesDialog(JabRefFrame parent) { // Import and export actions: exportPreferences.setToolTipText(Localization.lang("Export preferences to file")); - exportPreferences.addActionListener(e -> { - FileDialog dialog = new FileDialog(frame).withExtension(FileExtensions.XML); - dialog.setDefaultExtension(FileExtensions.XML); - Optional path = dialog.saveNewFile(); - - path.ifPresent(exportFile -> { - try { - prefs.exportPreferences(exportFile.toString()); - } catch (JabRefException ex) { - LOGGER.warn(ex.getMessage(), ex); - JOptionPane.showMessageDialog(PreferencesDialog.this, ex.getLocalizedMessage(), - Localization.lang("Export preferences"), JOptionPane.ERROR_MESSAGE); - } - }); - }); + exportPreferences.addActionListener(new ExportAction()); importPreferences.setToolTipText(Localization.lang("Import preferences from file")); importPreferences.addActionListener(e -> { @@ -182,6 +169,7 @@ public PreferencesDialog(JabRefFrame parent) { JOptionPane.showMessageDialog(PreferencesDialog.this, Localization.lang("You must restart JabRef for this to come into effect."), Localization.lang("Import preferences"), JOptionPane.WARNING_MESSAGE); + this.dispose(); } catch (JabRefException ex) { LOGGER.warn(ex.getMessage(), ex); JOptionPane.showMessageDialog(PreferencesDialog.this, ex.getLocalizedMessage(), @@ -191,7 +179,7 @@ public PreferencesDialog(JabRefFrame parent) { }); showPreferences.addActionListener( - e -> new PreferencesFilterDialog(new JabRefPreferencesFilter(Globals.prefs), frame).setVisible(true)); + e -> new PreferencesFilterDialog(new JabRefPreferencesFilter(prefs), frame).setVisible(true)); resetPreferences.addActionListener(e -> { if (JOptionPane.showConfirmDialog(PreferencesDialog.this, Localization.lang("Are you sure you want to reset all settings to default values?"), @@ -229,6 +217,28 @@ private void updateAfterPreferenceChanges() { Globals.prefs.updateEntryEditorTabList(); } + private void storeAllSettings(){ + // First check that all tabs are ready to close: + Component[] preferenceTabs = main.getComponents(); + for (Component tab: preferenceTabs) { + if (!((PrefsTab) tab).validateSettings()) { + return; // If not, break off. + } + } + // Then store settings and close: + for (Component tab: preferenceTabs) { + ((PrefsTab) tab).storeSettings(); + } + Globals.prefs.flush(); + + setVisible(false); + MainTable.updateRenderers(); + GUIGlobals.updateEntryEditorColors(); + frame.setupAllTables(); + frame.getGroupSelector().revalidateGroups(); // icons may have changed + frame.output(Localization.lang("Preferences recorded.")); + } + class OkAction extends AbstractAction { @@ -238,27 +248,32 @@ public OkAction() { @Override public void actionPerformed(ActionEvent e) { + storeAllSettings(); + } + } - // First check that all tabs are ready to close: - int count = main.getComponentCount(); - Component[] comps = main.getComponents(); - for (int i = 0; i < count; i++) { - if (!((PrefsTab) comps[i]).validateSettings()) { - return; // If not, break off. - } - } - // Then store settings and close: - for (int i = 0; i < count; i++) { - ((PrefsTab) comps[i]).storeSettings(); - } - Globals.prefs.flush(); + class ExportAction extends AbstractAction { - setVisible(false); - MainTable.updateRenderers(); - GUIGlobals.updateEntryEditorColors(); - frame.setupAllTables(); - frame.getGroupSelector().revalidateGroups(); // icons may have changed - frame.output(Localization.lang("Preferences recorded.")); + public ExportAction() { + super("Export"); + } + + @Override + public void actionPerformed(ActionEvent e) { + FileDialog dialog = new FileDialog(frame).withExtension(FileExtensions.XML); + dialog.setDefaultExtension(FileExtensions.XML); + Optional path = dialog.saveNewFile(); + + path.ifPresent(exportFile -> { + try { + storeAllSettings(); + Globals.prefs.exportPreferences(exportFile.toString()); + } catch (JabRefException ex) { + LOGGER.warn(ex.getMessage(), ex); + JOptionPane.showMessageDialog(PreferencesDialog.this, ex.getLocalizedMessage(), + Localization.lang("Export preferences"), JOptionPane.WARNING_MESSAGE); + } + }); } } From 45b864bf108dc4be0a275b360f35986f40415a52 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 11 Oct 2016 00:29:08 +0200 Subject: [PATCH 03/10] Update gradle from 3.0 to 3.1 --- gradle/wrapper/gradle-wrapper.jar | Bin 53324 -> 52818 bytes gradle/wrapper/gradle-wrapper.properties | 4 ++-- gradlew | 5 +++++ gradlew.bat | 6 ------ 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 3baa851b28c65f87dd36a6748e1a85cf360c1301..deedc7fa5e6310eac3148a7dd0b1f069b07364cb 100644 GIT binary patch delta 8629 zcmZ8m1yodB+Z~2RT5>>2x>Fh?q)P<^NlEF3p&UTE;nE$_B^?sd-6GwnASs}P#6JS> z`~H4+t(kMyKKt4G#Jy+TbDyCs#ECRSY&AthBn%J;4Gl!M-O^5ZTL5(R-k z>M@U>5xlKAbVLCCM@0WaETKZWDMuM@%X5yK5@17Exv5m+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:37 +0200 Subject: [PATCH 04/10] Remove gradle plugin com.github.youribonnaffe.gradle.format as it is deprecated and the config uses a non-existing file --- build.gradle | 9 --------- 1 file changed, 9 deletions(-) diff --git a/build.gradle b/build.gradle index 877210a7435..677770cbc70 100644 --- a/build.gradle +++ b/build.gradle @@ -16,8 +16,6 @@ buildscript { plugins { id "com.install4j.gradle" version "6.1.2" id 'com.github.johnrengelman.shadow' version '1.2.3' - // TODO replaced by spotless plugin, needs to be updated - id "com.github.youribonnaffe.gradle.format" version "1.5" // If this is updated to 0.0.9, check configurations.errorprone id "net.ltgt.errorprone" version "0.0.8" id 'me.champeau.gradle.jmh' version '0.3.0' @@ -277,13 +275,6 @@ jacocoTestReport { } } -// enables `gradlew format`. Currently `LabelPatternUtil.java` is destroyed. Use with care! -format { - configurationFile = file('ide-settings/formatter_settings.xml') - // default: reformat main and test - //files = sourceSets.main.java -} - shadowJar { classifier 'fat' From 7fa5e90f87fb3dc2fd4011be3255534e943712b3 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 11 Oct 2016 00:36:57 +0200 Subject: [PATCH 05/10] Update install4j plugin from 6.1.2 to 6.1.3 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 677770cbc70..15922e9c499 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ buildscript { } plugins { - id "com.install4j.gradle" version "6.1.2" + id "com.install4j.gradle" version "6.1.3" id 'com.github.johnrengelman.shadow' version '1.2.3' // If this is updated to 0.0.9, check configurations.errorprone id "net.ltgt.errorprone" version "0.0.8" From adc5af42e8e524bacb626fb66288259f53c6cbef Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 11 Oct 2016 00:40:19 +0200 Subject: [PATCH 06/10] Update me.champeau.gradle.jmh' version from 0.3.0 to 0.3.1 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 15922e9c499..ad1d98ec1c3 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ plugins { id 'com.github.johnrengelman.shadow' version '1.2.3' // If this is updated to 0.0.9, check configurations.errorprone id "net.ltgt.errorprone" version "0.0.8" - id 'me.champeau.gradle.jmh' version '0.3.0' + id 'me.champeau.gradle.jmh' version '0.3.1' } apply plugin: "java" From d3b955e8394e25a17aafc2e5a537a2f313f47077 Mon Sep 17 00:00:00 2001 From: bartsch-dev Date: Tue, 11 Oct 2016 03:35:34 +0200 Subject: [PATCH 07/10] fix switching edited textfield in the entry editor with TAB (#2138) --- .../sf/jabref/gui/maintable/MainTableSelectionListener.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java b/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java index 92821260f1e..e490a95f886 100644 --- a/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java +++ b/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java @@ -102,6 +102,12 @@ public void listChanged(ListEvent e) { } final BibEntry newSelected = selected.get(0); + if ((panel.getMode() == BasePanelMode.SHOWING_EDITOR || panel.getMode() == BasePanelMode.WILL_SHOW_EDITOR) + && newSelected == panel.getCurrentEditor().getEntry()) { + // entry already selected and currently editing it, do not steal the focus from the selected textfield + return; + } + if (newSelected != null) { final BasePanelMode mode = panel.getMode(); // What is the panel already showing? if ((mode == BasePanelMode.WILL_SHOW_EDITOR) || (mode == BasePanelMode.SHOWING_EDITOR)) { From bbee8cea603716c661cb336f1cc77b95b9ea2041 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 11 Oct 2016 04:27:06 +0200 Subject: [PATCH 08/10] Change download URL to downloads.jabref.org (#2145) --- src/main/java/net/sf/jabref/logic/util/Version.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/sf/jabref/logic/util/Version.java b/src/main/java/net/sf/jabref/logic/util/Version.java index 4e13af77db1..6d78e8a29b1 100644 --- a/src/main/java/net/sf/jabref/logic/util/Version.java +++ b/src/main/java/net/sf/jabref/logic/util/Version.java @@ -17,7 +17,7 @@ */ public class Version { - public static final String JABREF_DOWNLOAD_URL = "http://www.fosshub.com/JabRef.html"; + public static final String JABREF_DOWNLOAD_URL = "https://downloads.jabref.org"; private static final Log LOGGER = LogFactory.getLog(Version.class); private static final String JABREF_GITHUB_URL = "https://api.github.com/repos/JabRef/jabref/releases/latest"; From fc9fd678aab9e5dff29fc5f173b2aa43c67c2428 Mon Sep 17 00:00:00 2001 From: bartsch-dev Date: Tue, 11 Oct 2016 04:33:31 +0200 Subject: [PATCH 09/10] don't change entry after search if editing an entry (#2129) --- .../java/net/sf/jabref/gui/BasePanel.java | 1 + .../sf/jabref/gui/search/SearchWorker.java | 20 +++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/sf/jabref/gui/BasePanel.java b/src/main/java/net/sf/jabref/gui/BasePanel.java index 2fd4836610c..d604bb14c7a 100644 --- a/src/main/java/net/sf/jabref/gui/BasePanel.java +++ b/src/main/java/net/sf/jabref/gui/BasePanel.java @@ -1301,6 +1301,7 @@ public void listen(EntryChangedEvent entryChangedEvent) { @Subscribe public void listen(EntryRemovedEvent removedEntryEvent) { + // IMO only used to update the status (found X entries) frame.getGlobalSearchBar().performSearch(); } } diff --git a/src/main/java/net/sf/jabref/gui/search/SearchWorker.java b/src/main/java/net/sf/jabref/gui/search/SearchWorker.java index 893a4f8bb9e..3c1291db866 100644 --- a/src/main/java/net/sf/jabref/gui/search/SearchWorker.java +++ b/src/main/java/net/sf/jabref/gui/search/SearchWorker.java @@ -9,6 +9,7 @@ import net.sf.jabref.JabRefGUI; import net.sf.jabref.gui.BasePanel; +import net.sf.jabref.gui.BasePanelMode; import net.sf.jabref.gui.maintable.MainTableDataModel; import net.sf.jabref.logic.search.SearchQuery; import net.sf.jabref.model.database.BibDatabase; @@ -92,14 +93,17 @@ private void updateUIWithSearchResult(List matchedEntries) { } // only selects the first match if the selected entries are no hits or no entry is selected - List selectedEntries = basePanel.getSelectedEntries(); - boolean isHitSelected = selectedEntries.stream().anyMatch(BibEntry::isSearchHit); - if (!isHitSelected && !matchedEntries.isEmpty()) { - for (int i = 0; i < basePanel.getMainTable().getRowCount(); i++) { - BibEntry entry = basePanel.getMainTable().getEntryAt(i); - if (entry.isSearchHit()) { - basePanel.getMainTable().setSelected(i); - break; + // and no editor is open (to avoid jumping around when editing an entry) + if (basePanel.getMode() != BasePanelMode.SHOWING_EDITOR && basePanel.getMode() != BasePanelMode.WILL_SHOW_EDITOR) { + List selectedEntries = basePanel.getSelectedEntries(); + boolean isHitSelected = selectedEntries.stream().anyMatch(BibEntry::isSearchHit); + if (!isHitSelected && !matchedEntries.isEmpty()) { + for (int i = 0; i < basePanel.getMainTable().getRowCount(); i++) { + BibEntry entry = basePanel.getMainTable().getEntryAt(i); + if (entry.isSearchHit()) { + basePanel.getMainTable().setSelected(i); + break; + } } } } From 3459ec3a3b48176fa4802bd41335f14571834282 Mon Sep 17 00:00:00 2001 From: Admir Obralija Date: Tue, 11 Oct 2016 05:11:44 +0200 Subject: [PATCH 10/10] Fix isSharedDatabaseAlreadyPresent check. --- .../gui/shared/OpenSharedDatabaseDialog.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/sf/jabref/gui/shared/OpenSharedDatabaseDialog.java b/src/main/java/net/sf/jabref/gui/shared/OpenSharedDatabaseDialog.java index 87db077670d..dfdce9c80e9 100644 --- a/src/main/java/net/sf/jabref/gui/shared/OpenSharedDatabaseDialog.java +++ b/src/main/java/net/sf/jabref/gui/shared/OpenSharedDatabaseDialog.java @@ -36,6 +36,8 @@ import net.sf.jabref.gui.help.HelpAction; import net.sf.jabref.logic.help.HelpFile; import net.sf.jabref.logic.l10n.Localization; +import net.sf.jabref.model.database.BibDatabaseContext; +import net.sf.jabref.model.database.DatabaseLocation; import net.sf.jabref.shared.DBMSConnection; import net.sf.jabref.shared.DBMSConnectionProperties; import net.sf.jabref.shared.DBMSType; @@ -382,13 +384,11 @@ private void setLoadingConnectButtonText(boolean isLoading) { */ private boolean isSharedDatabaseAlreadyPresent() { List panels = JabRefGUI.getMainFrame().getBasePanelList(); - for (BasePanel panel : panels) { - DBMSConnectionProperties dbmsConnectionProperties = panel.getBibDatabaseContext().getDBMSSynchronizer() - .getDBProcessor().getDBMSConnectionProperties(); - if (this.connectionProperties.equals(dbmsConnectionProperties)) { - return true; - } - } - return false; + return panels.parallelStream().anyMatch(panel -> { + BibDatabaseContext context = panel.getBibDatabaseContext(); + return ((context.getLocation() == DatabaseLocation.SHARED) && + this.connectionProperties.equals(context.getDBMSSynchronizer() + .getDBProcessor().getDBMSConnectionProperties())); + }); } }