Skip to content

Commit

Permalink
Simplify code extremely. What is still required is a much more beauti…
Browse files Browse the repository at this point in the history
…ful about page.
  • Loading branch information
simonharrer committed Jan 26, 2016
1 parent 48cba6a commit 033f4e2
Show file tree
Hide file tree
Showing 33 changed files with 110 additions and 812 deletions.
8 changes: 2 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,14 @@ processResources {
}
}

filesMatching("help/**/About.html") {
expand ("version": project.version,
filesMatching("build.properties") {
expand (version: project.version,
"year": String.valueOf(Calendar.getInstance().get(Calendar.YEAR)),
"authors": new File('AUTHORS').readLines().findAll {!it.startsWith("#")}.join(", "),
"developers": new File('DEVELOPERS').readLines().findAll {!it.startsWith("#")}.join(", "),
"licenseInformation": licenseInformation)
}

filesMatching("build.properties") {
expand version: project.version
}

filesMatching("resource/**/meta.xml") {
expand version: project.version
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import net.sf.jabref.*;
import net.sf.jabref.gui.GUIGlobals;
import net.sf.jabref.gui.JabRefFrame;
import net.sf.jabref.gui.help.HelpAction;
import net.sf.jabref.gui.help.OnlineHelpAction;
import net.sf.jabref.gui.keyboard.KeyBinding;
import net.sf.jabref.gui.util.FocusRequester;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/net/sf/jabref/groups/GroupSelector.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
import net.sf.jabref.logic.l10n.Localization;
import net.sf.jabref.logic.search.rules.InvertSearchRule;
import net.sf.jabref.logic.search.SearchRule;
import net.sf.jabref.gui.help.HelpAction;
import net.sf.jabref.logic.search.rules.sets.SearchRuleSets;
import net.sf.jabref.logic.search.rules.sets.SearchRuleSet;
import net.sf.jabref.gui.undo.NamedCompound;
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/net/sf/jabref/gui/GUIGlobals.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ public class GUIGlobals {
public static Font CURRENTFONT;
public static Font typeNameFont;

// Size of help window.
public static final Dimension
helpSize = new Dimension(750, 600);
public static final Dimension aboutSize = new Dimension(600, 265);
public static Double zoomLevel = 1.0;

Expand All @@ -78,7 +75,6 @@ public class GUIGlobals {
private static final String extension = ".gif";
public static String ex = GUIGlobals.imageSize + GUIGlobals.extension;
public static String pre = "/images/";
public static final String helpPre = "/help/";

private static final Map<String, JLabel> tableIcons = new HashMap<>(); // Contains table icon mappings. Set up
// further below.
Expand Down Expand Up @@ -265,4 +261,4 @@ public static void init() {
}
}

}
}
37 changes: 0 additions & 37 deletions src/main/java/net/sf/jabref/gui/help/HTMLParagraphView.java

This file was deleted.

43 changes: 1 addition & 42 deletions src/main/java/net/sf/jabref/gui/help/HelpAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,41 +35,8 @@
*/
public class HelpAction extends MnemonicAwareAction {
private final HelpDialog diag;

private Class<?> resourceOwner;

private String helpFile;


public HelpAction(HelpDialog diag, String helpFile) {
this(diag, helpFile, Localization.lang("Help"), IconTheme.JabRefIcon.HELP.getSmallIcon());
}

public HelpAction(HelpDialog diag, String helpFile, String tooltip) {
this(diag, helpFile, tooltip, IconTheme.JabRefIcon.HELP.getSmallIcon());
}

public HelpAction(HelpDialog diag, String helpFile, Icon iconFile) {
this(diag, helpFile, Localization.lang("Help"), iconFile);
}

public HelpAction(HelpDialog diag, String helpFile, String tooltip, Icon iconFile) {
super(iconFile);
putValue(Action.NAME, Localization.menuTitle("Help"));
putValue(Action.SHORT_DESCRIPTION, tooltip);
this.diag = diag;
this.helpFile = helpFile;
}

public HelpAction(String title, HelpDialog diag, String helpFile, String tooltip, KeyStroke key) {
super(IconTheme.JabRefIcon.HELP.getIcon());
putValue(Action.NAME, title);
putValue(Action.SHORT_DESCRIPTION, tooltip);
putValue(Action.ACCELERATOR_KEY, key);
this.diag = diag;
this.helpFile = helpFile;
}

public HelpAction(String title, HelpDialog diag, String helpFile, String tooltip, Icon iconFile) {
super(iconFile);
putValue(Action.NAME, title);
Expand All @@ -78,10 +45,6 @@ public HelpAction(String title, HelpDialog diag, String helpFile, String tooltip
this.helpFile = helpFile;
}

public void setResourceOwner(Class<?> resourceOwner) {
this.resourceOwner = resourceOwner;
}

public JButton getIconButton() {
JButton hlp = new JButton(this);
hlp.setText(null);
Expand All @@ -96,10 +59,6 @@ public void setHelpFile(String helpFile) {

@Override
public void actionPerformed(ActionEvent e) {
if (resourceOwner == null) {
diag.showPage(helpFile);
} else {
diag.showPage(helpFile, resourceOwner);
}
diag.setVisible(true);
}
}
190 changes: 0 additions & 190 deletions src/main/java/net/sf/jabref/gui/help/HelpContent.java

This file was deleted.

Loading

0 comments on commit 033f4e2

Please sign in to comment.