Skip to content

Commit 11c3b3d

Browse files
committed
Merge remote-tracking branch 'upstream/master' into customizeEntrydlg
# By Carl Christian Snethlage (9) and others # Via Carl Christian Snethlage (5) and GitHub (1) * upstream/master: Fixed Test Refactored constructors, PreferencesService and some minor improvements. Remove ampersand escape when writing to bib file (#5869) Fix #5862. It was indeed the throttler (at least it is working now for me) (#5868) duplicate query parameter removed (#5865) Minor refactoring, and changed comment forgotten l10n resources Minor visual adjustments Removed description, fixed ok button and added some minor improvements Moved GroupDescription-stuff to proper class Added hintTextFlow, some rewording and changed the hierarchicalContext RadioButtons to a ComboBox Converted GroupDialog to mvvm pattern # Conflicts: # src/main/resources/l10n/JabRef_en.properties
2 parents 4dcbf9b + eccfb57 commit 11c3b3d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1143
-1002
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
1313

1414
### Changed
1515

16+
- We cleaned up the group add/edit dialog. [#5826](https://github.com/JabRef/jabref/pull/5826)
1617
- We reintroduced the index column. [#5844](https://github.com/JabRef/jabref/pull/5844)
1718

1819
### Fixed
@@ -26,6 +27,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
2627
- We fixed an issue where the file extension was missing after downloading a file (we now fall-back to pdf). [#5816](https://github.com/JabRef/jabref/issues/5816)
2728

2829
### Removed
30+
- Ampersands are no longer escaped by default in the `bib` file. If you want to keep the current behaviour, you can use the new "Escape Ampersands" formatter as a save action.
2931

3032

3133
## [5.0-beta] – 2019-12-15

src/main/java/org/jabref/gui/Base.css

+5-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@
311311

312312
.button {
313313
-fx-background-color: transparent;
314-
-fx-border-color: rgba(0, 0, 0, 0.23);
314+
-fx-border-color: -fx-outer-border; /* rgba(0, 0, 0, 0.23); */
315315
-fx-border-width: 1px;
316316
-fx-border-radius: 4px;
317317
-fx-padding: 0.5em 1em 0.5em 1em;
@@ -1121,3 +1121,7 @@ We want to have a look that matches our icons in the tool-bar */
11211121
-fx-font-weight: bold;
11221122
-fx-label-padding: 5 0 10 10;
11231123
}
1124+
1125+
TextFlow * {
1126+
-fx-fill: -fx-text-background-color;
1127+
}

src/main/java/org/jabref/gui/groups/GroupDescriptions.java

-32
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,6 @@ public class GroupDescriptions {
1111
private GroupDescriptions() {
1212
}
1313

14-
public static String getDescriptionForPreview(String field, String expr, boolean caseSensitive, boolean regExp) {
15-
String header = regExp ? Localization.lang(
16-
"This group contains entries whose <b>%0</b> field contains the regular expression <b>%1</b>",
17-
field, expr) : Localization.lang(
18-
"This group contains entries whose <b>%0</b> field contains the keyword <b>%1</b>",
19-
field, expr);
20-
String caseSensitiveText = caseSensitive ? Localization.lang("case sensitive") : Localization
21-
.lang("case insensitive");
22-
String footer = regExp ? Localization
23-
.lang("Entries cannot be manually assigned to or removed from this group.") : Localization.lang(
24-
"Additionally, entries whose <b>%0</b> field does not contain "
25-
+ "<b>%1</b> can be assigned manually to this group by selecting them "
26-
+ "then using either drag and drop or the context menu. "
27-
+ "This process adds the term <b>%1</b> to "
28-
+ "each entry's <b>%0</b> field. "
29-
+ "Entries can be removed manually from this group by selecting them "
30-
+ "then using the context menu. "
31-
+ "This process removes the term <b>%1</b> from "
32-
+ "each entry's <b>%0</b> field.",
33-
field, expr);
34-
return String.format("%s (%s). %s", header, caseSensitiveText, footer);
35-
}
36-
3714
public static String getShortDescriptionKeywordGroup(KeywordGroup keywordGroup, boolean showDynamic) {
3815
StringBuilder sb = new StringBuilder();
3916
sb.append("<b>");
@@ -65,14 +42,6 @@ public static String getShortDescriptionKeywordGroup(KeywordGroup keywordGroup,
6542

6643
}
6744

68-
public static String getDescriptionForPreview() {
69-
return Localization.lang("This group contains entries based on manual assignment. "
70-
+ "Entries can be assigned to this group by selecting them "
71-
+ "then using either drag and drop or the context menu. "
72-
+ "Entries can be removed from this group by selecting them "
73-
+ "then using the context menu.");
74-
}
75-
7645
public static String getShortDescriptionExplicitGroup(ExplicitGroup explicitGroup) {
7746
StringBuilder sb = new StringBuilder();
7847
sb.append("<b>").append(explicitGroup.getName()).append("</b> - ").append(Localization.lang("static group"));
@@ -118,5 +87,4 @@ public static String getShortDescription(SearchGroup searchGroup, boolean showDy
11887
}
11988
return sb.toString();
12089
}
121-
12290
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<?import javafx.geometry.Insets?>
4+
<?import javafx.scene.control.*?>
5+
<?import javafx.scene.layout.*?>
6+
<?import org.jabref.gui.icon.JabRefIconView?>
7+
8+
<DialogPane prefHeight="300.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.2-internal"
9+
xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.jabref.gui.groups.GroupDialogView">
10+
<content>
11+
<fx:define>
12+
<ToggleGroup fx:id="hierarchicalContext"/>
13+
<ToggleGroup fx:id="type"/>
14+
<ToggleGroup fx:id="autoGroupOptions"/>
15+
</fx:define>
16+
<VBox spacing="10.0" minWidth="200">
17+
<padding>
18+
<Insets bottom="4.0" left="4.0" right="4.0" top="4.0"/>
19+
</padding>
20+
<VBox>
21+
<Label text="%Name"/>
22+
<TextField fx:id="nameField"/>
23+
</VBox>
24+
<VBox>
25+
<Label text="%Description"/>
26+
<TextField fx:id="descriptionField"/>
27+
</VBox>
28+
<HBox spacing="10.0">
29+
<VBox HBox.hgrow="ALWAYS">
30+
<Label text="%Icon"/>
31+
<TextField fx:id="iconField"/>
32+
</VBox>
33+
<VBox layoutX="10.0" layoutY="10.0" minWidth="130.0" maxWidth="130.0" prefWidth="130.0">
34+
<Label text="%Color"/>
35+
<ColorPicker fx:id="colorField"/>
36+
</VBox>
37+
<VBox>
38+
<Label text="%Hierarchical context"/>
39+
<ComboBox fx:id="hierarchicalContextCombo" minWidth="130.0" maxWidth="130.0" prefWidth="130.0"/>
40+
</VBox>
41+
</HBox>
42+
<HBox alignment="BOTTOM_LEFT">
43+
<Label text="%Collect by" styleClass="sectionHeader"/>
44+
<HBox HBox.hgrow="ALWAYS"/>
45+
<Button styleClass="icon-button,narrow" onAction="#openHelp">
46+
<graphic>
47+
<JabRefIconView glyph="HELP"/>
48+
</graphic>
49+
<tooltip>
50+
<Tooltip text="%Open Help page"/>
51+
</tooltip>
52+
</Button>
53+
</HBox>
54+
<HBox>
55+
<VBox spacing="10.0">
56+
<RadioButton fx:id="explicitRadioButton" toggleGroup="$type" wrapText="true"
57+
text="%Explicit selection">
58+
<tooltip>
59+
<Tooltip text="%Statically group entries by manual assignment"/>
60+
</tooltip>
61+
</RadioButton>
62+
<RadioButton fx:id="keywordsRadioButton" toggleGroup="$type" wrapText="true"
63+
text="%Searching for keywords">
64+
<tooltip>
65+
<Tooltip text="%Dynamically group entries by searching a field for a keyword"/>
66+
</tooltip>
67+
</RadioButton>
68+
<RadioButton fx:id="searchRadioButton" toggleGroup="$type" wrapText="true"
69+
text="%Free search expression">
70+
<tooltip>
71+
<Tooltip text="%Dynamically group entries by a free-form search expression"/>
72+
</tooltip>
73+
</RadioButton>
74+
<RadioButton fx:id="autoRadioButton" toggleGroup="$type" wrapText="true"
75+
text="%Specified keywords">
76+
<tooltip>
77+
<Tooltip text="%Automatically create groups"/>
78+
</tooltip>
79+
</RadioButton>
80+
<RadioButton fx:id="texRadioButton" toggleGroup="$type" wrapText="true"
81+
text="%Cited entries">
82+
<tooltip>
83+
<Tooltip text="%Group containing entries cited in a given TeX file"/>
84+
</tooltip>
85+
</RadioButton>
86+
</VBox>
87+
<Separator orientation="VERTICAL"/>
88+
<StackPane HBox.hgrow="ALWAYS">
89+
<VBox visible="${keywordsRadioButton.selected}" spacing="10.0">
90+
<VBox>
91+
<Label text="%Field"/>
92+
<TextField fx:id="keywordGroupSearchField"/>
93+
</VBox>
94+
<VBox>
95+
<Label text="%Keyword"/>
96+
<TextField fx:id="keywordGroupSearchTerm"/>
97+
</VBox>
98+
<HBox spacing="10.0">
99+
<CheckBox fx:id="keywordGroupCaseSensitive" text="Case sensitive"/>
100+
<CheckBox fx:id="keywordGroupRegex" text="Regular expression"/>
101+
</HBox>
102+
</VBox>
103+
<VBox visible="${searchRadioButton.selected}" spacing="10.0">
104+
<VBox>
105+
<Label text="%Search expression"/>
106+
<TextField fx:id="searchGroupSearchTerm"/>
107+
</VBox>
108+
<HBox spacing="10.0">
109+
<CheckBox fx:id="searchGroupCaseSensitive" text="Case sensitive"/>
110+
<CheckBox fx:id="searchGroupRegex" text="Regular expression"/>
111+
</HBox>
112+
</VBox>
113+
<VBox visible="${autoRadioButton.selected}" spacing="10.0">
114+
<RadioButton fx:id="autoGroupKeywordsOption" toggleGroup="$autoGroupOptions"
115+
text="Generate groups from keywords in a BibTeX field"/>
116+
<VBox spacing="10.0">
117+
<padding>
118+
<Insets left="20.0"/>
119+
</padding>
120+
<HBox spacing="10.0">
121+
<VBox HBox.hgrow="ALWAYS">
122+
<Label text="%Field to group by"/>
123+
<TextField fx:id="autoGroupKeywordsField"
124+
disable="${!autoGroupKeywordsOption.selected}"/>
125+
</VBox>
126+
<VBox>
127+
<Label text="%Delimiter(s)"/>
128+
<HBox spacing="10.0">
129+
<TextField fx:id="autoGroupKeywordsDeliminator" prefWidth="30.0"
130+
disable="${!autoGroupKeywordsOption.selected}">
131+
<tooltip>
132+
<Tooltip text="%Keyword delimiter"/>
133+
</tooltip>
134+
</TextField>
135+
<TextField fx:id="autoGroupKeywordsHierarchicalDeliminator" prefWidth="30.0"
136+
disable="${!autoGroupKeywordsOption.selected}">
137+
<tooltip>
138+
<Tooltip text="%Hierarchical keyword delimiter"/>
139+
</tooltip>
140+
</TextField>
141+
</HBox>
142+
</VBox>
143+
</HBox>
144+
</VBox>
145+
<RadioButton fx:id="autoGroupPersonsOption" toggleGroup="$autoGroupOptions"
146+
text="Generate groups for author last names"/>
147+
<VBox>
148+
<padding>
149+
<Insets left="20.0"/>
150+
</padding>
151+
<Label text="%Field to group by"/>
152+
<TextField fx:id="autoGroupPersonsField" disable="${!autoGroupPersonsOption.selected}"/>
153+
</VBox>
154+
</VBox>
155+
<VBox visible="${texRadioButton.selected}">
156+
<Label text="%Aux file"/>
157+
<HBox spacing="10.0">
158+
<TextField fx:id="texGroupFilePath" HBox.hgrow="ALWAYS" prefHeight="30.0"/>
159+
<Button onAction="#texGroupBrowse" text="%Browse" prefHeight="30.0"/>
160+
</HBox>
161+
</VBox>
162+
</StackPane>
163+
</HBox>
164+
</VBox>
165+
</content>
166+
</DialogPane>

0 commit comments

Comments
 (0)