Skip to content

Commit

Permalink
Revert "Add disable/enable calculation of items in group (#6233)"
Browse files Browse the repository at this point in the history
This reverts commit efc69be.
  • Loading branch information
tobiasdiez authored Apr 5, 2020
1 parent efc69be commit c176cc5
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 1,669 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We made the filters more easily accessible in the integrity check dialog. [#5955](https://github.com/JabRef/jabref/pull/5955)
- We reimplemented and improved the dialog "Customize entry types". [#4719](https://github.com/JabRef/jabref/issues/4719)
- We added an [American Physical Society](https://journals.aps.org/) fetcher. [#818](https://github.com/JabRef/jabref/issues/818)
- We added possibility to enable/disable items quantity in groups. [#6042](https://github.com/JabRef/jabref/issues/6042)

### Fixed

Expand Down
6 changes: 2 additions & 4 deletions src/main/java/org/jabref/gui/groups/GroupTreeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void initialize() {
.withTooltip(GroupNodeViewModel::getDescription)
.install(mainColumn);

// Number of hits (only if user wants to see them)
// Number of hits
PseudoClass anySelected = PseudoClass.getPseudoClass("any-selected");
PseudoClass allSelected = PseudoClass.getPseudoClass("all-selected");
new ViewModelTreeTableCellFactory<GroupNodeViewModel>()
Expand All @@ -134,9 +134,7 @@ public void initialize() {
group.allSelectedEntriesMatchedProperty());
}
Text text = new Text();
if (preferencesService.getDisplayGroupCount()) {
text.textProperty().bind(group.getHits().asString());
}
text.textProperty().bind(group.getHits().asString());
text.getStyleClass().setAll("text");
node.getChildren().add(text);
node.setMaxWidth(Control.USE_PREF_SIZE);
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/jabref/gui/preferences/GroupsTab.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<RadioButton fx:id="groupViewModeUnion" text="%Display all entries belonging to one or more of the selected groups"
toggleGroup="$groupViewMode"/>
<CheckBox fx:id="autoAssignGroup" text="%Automatically assign new entry to selected groups"/>
<CheckBox fx:id="displayGroupCount" text="%Display count of items in group"/>

<Label styleClass="sectionHeader" text="%Dynamic groups"/>
<GridPane hgap="10.0" vgap="4.0">
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/jabref/gui/preferences/GroupsTabView.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public class GroupsTabView extends AbstractPreferenceTabView<GroupsTabViewModel>
@FXML private RadioButton groupViewModeIntersection;
@FXML private RadioButton groupViewModeUnion;
@FXML private CheckBox autoAssignGroup;
@FXML private CheckBox displayGroupCount;
@FXML private TextField defaultGroupingField;
@FXML private TextField keywordSeparator;

Expand All @@ -38,7 +37,6 @@ public void initialize() {
groupViewModeIntersection.selectedProperty().bindBidirectional(viewModel.groupViewModeIntersectionProperty());
groupViewModeUnion.selectedProperty().bindBidirectional(viewModel.groupViewModeUnionProperty());
autoAssignGroup.selectedProperty().bindBidirectional(viewModel.autoAssignGroupProperty());
displayGroupCount.selectedProperty().bindBidirectional(viewModel.displayGroupCount());
defaultGroupingField.textProperty().bindBidirectional(viewModel.defaultGroupingFieldProperty());
keywordSeparator.textProperty().bindBidirectional(viewModel.keywordSeparatorProperty());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class GroupsTabViewModel implements PreferenceTabViewModel {
private final BooleanProperty groupViewModeIntersectionProperty = new SimpleBooleanProperty();
private final BooleanProperty groupViewModeUnionProperty = new SimpleBooleanProperty();
private final BooleanProperty autoAssignGroupProperty = new SimpleBooleanProperty();
private final BooleanProperty displayGroupCountProperty = new SimpleBooleanProperty();
private final StringProperty defaultGroupingFieldProperty = new SimpleStringProperty("");
private final StringProperty keywordSeparatorProperty = new SimpleStringProperty("");

Expand All @@ -44,7 +43,6 @@ public void setValues() {
break;
}
autoAssignGroupProperty.setValue(preferences.getBoolean(JabRefPreferences.AUTO_ASSIGN_GROUP));
displayGroupCountProperty.setValue(preferences.getBoolean(JabRefPreferences.DISPLAY_GROUP_COUNT));

defaultGroupingFieldProperty.setValue(preferences.get(JabRefPreferences.GROUPS_DEFAULT_FIELD));
keywordSeparatorProperty.setValue(preferences.get(JabRefPreferences.KEYWORD_SEPARATOR));
Expand All @@ -59,7 +57,6 @@ public void storeSettings() {
preferences.setGroupViewMode(GroupViewMode.UNION);
}
preferences.putBoolean(JabRefPreferences.AUTO_ASSIGN_GROUP, autoAssignGroupProperty.getValue());
preferences.putBoolean(JabRefPreferences.DISPLAY_GROUP_COUNT, displayGroupCountProperty.getValue());

preferences.put(JabRefPreferences.GROUPS_DEFAULT_FIELD, defaultGroupingFieldProperty.getValue().trim());
preferences.put(JabRefPreferences.KEYWORD_SEPARATOR, keywordSeparatorProperty.getValue());
Expand All @@ -79,8 +76,6 @@ public void storeSettings() {

public BooleanProperty autoAssignGroupProperty() { return autoAssignGroupProperty; }

public BooleanProperty displayGroupCount() { return displayGroupCountProperty;}

public StringProperty defaultGroupingFieldProperty() { return defaultGroupingFieldProperty; }

public StringProperty keywordSeparatorProperty() { return keywordSeparatorProperty; }
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/org/jabref/preferences/JabRefPreferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ public class JabRefPreferences implements PreferencesService {

public static final String KEYWORD_SEPARATOR = "groupKeywordSeparator";
public static final String AUTO_ASSIGN_GROUP = "autoAssignGroup";
public static final String DISPLAY_GROUP_COUNT = "displayGroupCount";
public static final String EXTRA_FILE_COLUMNS = "extraFileColumns";
public static final String OVERRIDE_DEFAULT_FONT_SIZE = "overrideDefaultFontSize";
public static final String MAIN_FONT_SIZE = "mainFontSize";
Expand Down Expand Up @@ -521,7 +520,6 @@ private JabRefPreferences() {
defaults.put(AUTOCOMPLETER_COMPLETE_FIELDS, "author;editor;title;journal;publisher;keywords;crossref;related;entryset");
defaults.put(GROUPS_DEFAULT_FIELD, StandardField.KEYWORDS.getName());
defaults.put(AUTO_ASSIGN_GROUP, Boolean.TRUE);
defaults.put(DISPLAY_GROUP_COUNT, Boolean.TRUE);
defaults.put(GROUP_INTERSECT_UNION_VIEW_MODE, GroupViewMode.INTERSECTION.name());
defaults.put(KEYWORD_SEPARATOR, ", ");
defaults.put(DEFAULT_ENCODING, StandardCharsets.UTF_8.name());
Expand Down Expand Up @@ -2054,9 +2052,4 @@ public void storeTimestampPreferences(TimestampPreferences preferences) {
put(TIME_STAMP_FORMAT, preferences.getTimestampFormat());
putBoolean(OVERWRITE_TIME_STAMP, preferences.isOverwriteTimestamp());
}

@Override
public boolean getDisplayGroupCount() {
return getBoolean(JabRefPreferences.DISPLAY_GROUP_COUNT);
}
}
2 changes: 0 additions & 2 deletions src/main/java/org/jabref/preferences/PreferencesService.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,4 @@ public interface PreferencesService {

void storeTimestampPreferences(TimestampPreferences preferences);

boolean getDisplayGroupCount();

}
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_da.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1120,5 +1120,3 @@ Default\ pattern=Standardmønster
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2093,7 +2093,6 @@ Unable\ to\ open\ ShortScience.=Unable to open ShortScience.
Shared\ database=Shared database
Lookup=Lookup
Please\ enter\ a\ field\ name\ to\ search\ for\ keywords.=Please enter a field name to search for keywords.
Access\ date\ of\ the\ address\ specified\ in\ the\ url\ field.=Access date of the address specified in the url field.
Additional\ information\ related\ to\ the\ resource\ indicated\ by\ the\ eprint\ field.=Additional information related to the resource indicated by the eprint field.
Expand Down Expand Up @@ -2158,4 +2157,3 @@ Year\ of\ publication.=Year of publication.
Remove\ formatter\ for\ %0=Remove formatter for %0
Remove\ formatter\ '%0'=Remove formatter '%0'
Display\ count\ of\ items\ in\ group=Display count of items in group
Loading

0 comments on commit c176cc5

Please sign in to comment.