From 0bc5b19b7bd1ca15dcc326cd58cb62aa18f197ab Mon Sep 17 00:00:00 2001
From: eduardogreco
Date: Fri, 22 Aug 2014 19:18:32 -0300
Subject: [PATCH 1/2] Added shortcut to the button 'Cleanup entries'
---
src/main/java/net/sf/jabref/JabRefFrame.java | 11 ++++++-----
src/main/java/net/sf/jabref/JabRefPreferences.java | 1 +
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/main/java/net/sf/jabref/JabRefFrame.java b/src/main/java/net/sf/jabref/JabRefFrame.java
index 555ddb0ec78..1c87648b933 100644
--- a/src/main/java/net/sf/jabref/JabRefFrame.java
+++ b/src/main/java/net/sf/jabref/JabRefFrame.java
@@ -290,6 +290,7 @@ void addAction(Action a) {
writeXmpAction = new GeneralAction("writeXMP", "Write XMP-metadata to PDFs",
Globals.lang("Will write XMP-metadata to the PDFs linked from selected entries."),
prefs.getKey("Write XMP")),
+
openFolder = new GeneralAction("openFolder", "Open folder",
Globals.lang("Open folder"),
prefs.getKey("Open folder")),
@@ -355,7 +356,8 @@ void addAction(Action a) {
Cleanup = new GeneralAction("Cleanup", "Cleanup entries",
Globals.lang("Cleanup entries"),
- GUIGlobals.getIconUrl("cleanupentries") ),
+ prefs.getKey("Cleanup"),
+ ("cleanupentries")),
mergeEntries = new GeneralAction("mergeEntries", "Merge entries",
Globals.lang("Merge entries"),
@@ -1121,16 +1123,15 @@ public GeneralAction(String command, String text, String description, KeyStroke
putValue(ACCELERATOR_KEY, key);
}
- /* public GeneralAction(String command, String text, String description,
- URL imageUrl, KeyStroke key) {
+ public GeneralAction(String command, String text, String description, KeyStroke key, String imageUrl) {
this.command = command;
- ImageIcon icon = GUIGlobals.getImage(command);
+ ImageIcon icon = GUIGlobals.getImage(imageUrl);
if (icon != null)
putValue(SMALL_ICON, icon);
putValue(NAME, text);
putValue(SHORT_DESCRIPTION, Globals.lang(description));
putValue(ACCELERATOR_KEY, key);
- }*/
+ }
public void actionPerformed(ActionEvent e) {
if (tabbedPane.getTabCount() > 0) {
diff --git a/src/main/java/net/sf/jabref/JabRefPreferences.java b/src/main/java/net/sf/jabref/JabRefPreferences.java
index 1361563acdc..700a9378bca 100644
--- a/src/main/java/net/sf/jabref/JabRefPreferences.java
+++ b/src/main/java/net/sf/jabref/JabRefPreferences.java
@@ -1145,6 +1145,7 @@ private void defineDefaultKeyBindings() {
defKeyBinds.put("Search ACM Portal", "ctrl shift F8");
defKeyBinds.put("Fetch ArXiv.org", "shift F8");
defKeyBinds.put("Search JSTOR", "shift F9");
+ defKeyBinds.put("Cleanup", "ctrl shift F7");
defKeyBinds.put("Write XMP", "ctrl F7");
defKeyBinds.put("New file link", "ctrl N");
defKeyBinds.put("Fetch SPIRES", "ctrl F8");
From e7087082f0b481eb356526dd89a63cf5c29dcba4 Mon Sep 17 00:00:00 2001
From: eduardogreco
Date: Fri, 22 Aug 2014 19:24:15 -0300
Subject: [PATCH 2/2] Update CHANGELOG and ABOUT
---
CHANGELOG | 1 +
src/main/resources/help/About.html | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG b/CHANGELOG
index c8082829be3..4153849773d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,5 @@
[master]
+ - Feature 850: Keyboard shortcut for 'Cleanup entries' (by eduardogreco)
- Change default behaviour to be more non-invasive: timestamps and owners are NOT set by default per entry.
- "Open Folder" works again
- newline separator can now be configured globally
diff --git a/src/main/resources/help/About.html b/src/main/resources/help/About.html
index ff62f206661..98df9c84805 100644
--- a/src/main/resources/help/About.html
+++ b/src/main/resources/help/About.html
@@ -88,7 +88,8 @@ Contributions from:
David Weitzman,
Seb Wills,
John Zedlewski,
- Waluyo Adi Siswanto
+ Waluyo Adi Siswanto,
+ Eduardo Roberto Greco
Thanks to: