-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into libraryproperties…
…tofx * upstream/master: fix copy base bug in Strings Dialog validation Bump mockito-core from 2.24.0 to 2.24.5 (#4663) Fix for #4628 - cant save new content selectors (#4658) Fix issues with double spaces. (#4662)
- Loading branch information
Showing
11 changed files
with
471 additions
and
535 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/java/org/jabref/gui/actions/ManageContentSelectorAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.jabref.gui.actions; | ||
|
||
import org.jabref.gui.BasePanel; | ||
import org.jabref.gui.JabRefFrame; | ||
import org.jabref.gui.contentselector.ContentSelectorDialogView; | ||
import org.jabref.logic.l10n.Localization; | ||
|
||
public class ManageContentSelectorAction extends SimpleCommand { | ||
|
||
private final JabRefFrame jabRefFrame; | ||
|
||
public ManageContentSelectorAction(JabRefFrame jabRefFrame) { | ||
this.jabRefFrame = jabRefFrame; | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
BasePanel basePanel = jabRefFrame.getCurrentBasePanel(); | ||
if (noActiveConnectionExists(basePanel)) { | ||
jabRefFrame.getDialogService().showErrorDialogAndWait(Localization.lang("Active database connection do not exists!")); | ||
return; | ||
} | ||
new ContentSelectorDialogView(basePanel).showAndWait(); | ||
} | ||
|
||
private boolean noActiveConnectionExists(BasePanel basePanel) { | ||
return basePanel == null || basePanel.getBibDatabaseContext() == null; | ||
} | ||
} |
67 changes: 67 additions & 0 deletions
67
src/main/java/org/jabref/gui/contentselector/ContentSelectorDialog.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.geometry.Insets?> | ||
<?import javafx.scene.control.Button?> | ||
<?import javafx.scene.control.ButtonType?> | ||
<?import javafx.scene.control.DialogPane?> | ||
<?import javafx.scene.control.Label?> | ||
<?import javafx.scene.control.ListView?> | ||
<?import javafx.scene.control.Separator?> | ||
<?import javafx.scene.layout.HBox?> | ||
<?import javafx.scene.layout.VBox?> | ||
|
||
<DialogPane minHeight="450.0" minWidth="375.0" prefHeight="450.0" prefWidth="407.0" xmlns="http://javafx.com/javafx/8.0.172-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.jabref.gui.contentselector.ContentSelectorDialogView"> | ||
<content> | ||
<VBox> | ||
<children> | ||
<Label prefHeight="27.0" prefWidth="108.0" text="Field names" /> | ||
<HBox prefHeight="140.0" prefWidth="385.0"> | ||
<children> | ||
<ListView fx:id="fieldNamesListView" prefHeight="140.0" prefWidth="297.0"/> | ||
<VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="100.0"> | ||
<children> | ||
<Button fx:id="addFieldNameButton" alignment="CENTER" mnemonicParsing="false" prefHeight="26.0" prefWidth="72.0" text="%Add" onAction="#addNewFieldName"> | ||
<VBox.margin> | ||
<Insets top="5.0" /> | ||
</VBox.margin> | ||
</Button> | ||
<Button fx:id="removeFieldNameButton" mnemonicParsing="false" text="%Remove" onAction="#removeFieldName"> | ||
<VBox.margin> | ||
<Insets top="5.0" /> | ||
</VBox.margin> | ||
</Button> | ||
</children> | ||
</VBox> | ||
</children> | ||
</HBox> | ||
<Separator prefWidth="200.0"> | ||
<VBox.margin> | ||
<Insets top="20.0" /> | ||
</VBox.margin> | ||
</Separator> | ||
<Label prefHeight="27.0" prefWidth="108.0" text="Keywords" /> | ||
<HBox prefHeight="140.0" prefWidth="385.0"> | ||
<children> | ||
<ListView fx:id="keywordsListView" prefHeight="140.0" prefWidth="297.0" /> | ||
<VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="100.0"> | ||
<children> | ||
<Button fx:id="addKeywordButton" alignment="CENTER" mnemonicParsing="false" prefHeight="26.0" prefWidth="72.0" text="%Add" onAction="#addNewKeyword"> | ||
<VBox.margin> | ||
<Insets top="5.0" /> | ||
</VBox.margin> | ||
</Button> | ||
<Button fx:id="removeKeywordButton" mnemonicParsing="false" text="%Remove" onAction="#removeKeyword"> | ||
<VBox.margin> | ||
<Insets top="5.0" /> | ||
</VBox.margin> | ||
</Button> | ||
</children> | ||
</VBox> | ||
</children> | ||
</HBox> | ||
</children> | ||
</VBox> | ||
</content> | ||
<ButtonType fx:id="saveButton" buttonData="OK_DONE" text="%Save" /> | ||
<ButtonType fx:constant="CANCEL" /> | ||
</DialogPane> |
Oops, something went wrong.