Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into convertSearchWorker
Browse files Browse the repository at this point in the history
* upstream/master:
  Fix background color of dialogs in dark mode (#4994)
  NPE-fix for Preferences/Ext-Prog/Settings for X/Browse  (#4983)
  Bump richtextfx from 0.10.0 to 0.10.1 (#4989)
  Bump tika-core from 1.20 to 1.21 (#4984)
  • Loading branch information
Siedlerchr committed May 25, 2019
2 parents 32925d8 + d3b193c commit 858ffd8
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ dependencies {
compile 'org.apache.pdfbox:fontbox:2.0.15'
compile 'org.apache.pdfbox:xmpbox:2.0.15'

compile group: 'org.apache.tika', name: 'tika-core', version: '1.20'
compile group: 'org.apache.tika', name: 'tika-core', version: '1.21'

// required for reading write-protected PDFs - see https://github.com/JabRef/jabref/pull/942#issuecomment-209252635
compile 'org.bouncycastle:bcprov-jdk15on:1.61'
Expand Down Expand Up @@ -130,7 +130,7 @@ dependencies {
compile 'de.saxsys:mvvmfx:1.8.0'
compile 'org.fxmisc.easybind:easybind:1.0.3'
compile 'org.fxmisc.flowless:flowless:0.6.1'
compile 'org.fxmisc.richtext:richtextfx:0.10.0'
compile 'org.fxmisc.richtext:richtextfx:0.10.1'
compile 'com.sibvisions.external.jvxfx:dndtabpane:0.1'
compile 'javax.inject:javax.inject:1'
compile 'com.jfoenix:jfoenix:8.0.8'
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/jabref/gui/Base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1032,3 +1032,7 @@ We want to have a look that matches our icons in the tool-bar */
-fx-font-size: 1.5em;
-fx-padding: 1em 0em 1em 0em;
}

.dialog-pane {
-fx-background-color: -fx-control-inner-background;
}
5 changes: 3 additions & 2 deletions src/main/java/org/jabref/gui/help/AboutDialog.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.about-heading {
-fx-font-size: 30;
-fx-text-fill: -jr-theme;
}

.about-heading:pressed {
-fx-text-fill: -fx-focus-color;
-fx-text-fill: -jr-selected;
}

.top-padding {
Expand Down Expand Up @@ -33,7 +34,7 @@
}

.info-sections {
-fx-padding: 5px;
-fx-padding: 5px;
}

.logo-pane {
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/jabref/gui/preferences/ExternalTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.jabref.gui.push.PushToApplication;
import org.jabref.gui.push.PushToApplicationSettings;
import org.jabref.gui.push.PushToApplicationSettingsDialog;
import org.jabref.gui.push.PushToApplicationsManager;
import org.jabref.gui.util.FileDialogConfiguration;
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.util.OS;
Expand All @@ -28,6 +27,7 @@

class ExternalTab implements PrefsTab {

private final JabRefFrame frame;
private final JabRefPreferences prefs;
private final TextField emailSubject;
private final TextField citeCommand;
Expand All @@ -54,6 +54,7 @@ class ExternalTab implements PrefsTab {

public ExternalTab(JabRefFrame frame, PreferencesDialog prefsDiag, JabRefPreferences prefs) {
this.prefs = prefs;
this.frame = frame;
dialogService = frame.getDialogService();
builder.setVgap(7);

Expand Down Expand Up @@ -197,7 +198,7 @@ public Node getBuilder() {
}

private void addSettingsButton(final PushToApplication application, GridPane panel, int index) {
PushToApplicationSettings settings = PushToApplicationsManager.getSettings(application);
PushToApplicationSettings settings = frame.getPushApplications().getSettings(application);
Button button = new Button(Localization.lang("Settings for %0", application.getApplicationName()));
button.setPrefSize(150, 20);
button.setOnAction(e -> PushToApplicationSettingsDialog.showSettingsDialog(dialogService, settings, index));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#sideMenu {
-fx-background-color: -jr-white;
-fx-background-color: -fx-control-inner-background;
-fx-border-color: -fx-outer-border;
-fx-border-width: 1;
}

#sideMenu > .virtual-flow > .clipped-container > .sheet > .list-cell {
-fx-padding: 8 8 8 8;
-fx-background: -jr-white;
-fx-background: -fx-control-inner-background;
}

.preferencePaneContainer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public class PushToApplicationSettings {
protected AbstractPushToApplication application;
private DialogService dialogService;

public PushToApplicationSettings(DialogService dialogService) {
this.dialogService = dialogService;
}

public GridPane getJFXSettingPane(int n) {
switch (n) {
case 0:
Expand Down
13 changes: 8 additions & 5 deletions src/main/java/org/jabref/gui/push/PushToApplicationsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ public class PushToApplicationsManager {

private final List<PushToApplication> applications;

private final DialogService dialogService;

public PushToApplicationsManager(DialogService dialogService) {
this.dialogService = dialogService;
// Set up the current available choices:
applications = new ArrayList<>();
applications.add(new PushToEmacs(dialogService));
Expand All @@ -25,15 +28,15 @@ public List<PushToApplication> getApplications() {
return applications;
}

public static PushToApplicationSettings getSettings(PushToApplication application) {
public PushToApplicationSettings getSettings(PushToApplication application) {
if (application instanceof PushToEmacs) {
return new PushToEmacsSettings();
return new PushToEmacsSettings(dialogService);
} else if (application instanceof PushToLyx) {
return new PushToLyxSettings();
return new PushToLyxSettings(dialogService);
} else if (application instanceof PushToVim) {
return new PushToVimSettings();
return new PushToVimSettings(dialogService);
} else {
return new PushToApplicationSettings();
return new PushToApplicationSettings(dialogService);
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/jabref/gui/push/PushToEmacsSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
import javafx.scene.control.TextField;

import org.jabref.Globals;
import org.jabref.gui.DialogService;
import org.jabref.logic.l10n.Localization;
import org.jabref.preferences.JabRefPreferences;

public class PushToEmacsSettings extends PushToApplicationSettings {

private final TextField additionalParams = new TextField();

public PushToEmacsSettings (DialogService dialogService) { super(dialogService); }

@Override
public void storeSettings() {
super.storeSettings();
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/jabref/gui/push/PushToLyxSettings.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package org.jabref.gui.push;

import org.jabref.Globals;
import org.jabref.gui.DialogService;
import org.jabref.logic.l10n.Localization;
import org.jabref.preferences.JabRefPreferences;

public class PushToLyxSettings extends PushToApplicationSettings {

public PushToLyxSettings (DialogService dialogService) { super(dialogService); }

@Override
protected void initJFXSettingsPanel() {
super.initJFXSettingsPanel();
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/jabref/gui/push/PushToVimSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
import javafx.scene.control.TextField;

import org.jabref.Globals;
import org.jabref.gui.DialogService;
import org.jabref.logic.l10n.Localization;
import org.jabref.preferences.JabRefPreferences;

public class PushToVimSettings extends PushToApplicationSettings {

private final TextField vimServer = new TextField();

public PushToVimSettings (DialogService dialogService) { super(dialogService); }

@Override
public void storeSettings() {
super.storeSettings();
Expand Down

0 comments on commit 858ffd8

Please sign in to comment.