Skip to content

Commit

Permalink
store status of group sidepane - fixes #2201 and #1825
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasgeiger committed Nov 2, 2016
1 parent ed27ada commit 1f6c2e3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- Fixed RTFChars would only use "?" for characters with unicode over the value of 127, now it uses the base character (é -> e instead of ?)
- Fixed close action of entry editor not working after parsing error corrected
- Fixed [koppor/#128](https://github.com/koppor/jabref/issues/128): Sensible default settings for "Enable save actions" and "Cleanup"
- Fixed [#2201](https://github.com/JabRef/jabref/issues/#2201) and [#1825](https://github.com/JabRef/jabref/issues/#1825): Status of the Group panel is saved and reused for next startup of JabRef

### Removed
- Removed 2nd preview style
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/net/sf/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,11 @@ private void fillMenu() {
mb.add(search);

groups.add(new JCheckBoxMenuItem(groupSelector.getToggleAction()));
if (prefs.getBoolean(JabRefPreferences.GROUP_SIDEPANE_VISIBLE)) {
sidePaneManager.register(groupSelector);
sidePaneManager.show(GroupSelector.class);
}

groups.addSeparator();
groups.add(addToGroup);
groups.add(removeFromGroup);
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/net/sf/jabref/gui/groups/GroupSelector.java
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ private void revalidateGroups(TreePath[] selectionPaths, Enumeration<TreePath> e
@Override
public void componentOpening() {
valueChanged(null);
Globals.prefs.putBoolean(JabRefPreferences.GROUP_SIDEPANE_VISIBLE, Boolean.TRUE);
}

@Override
Expand All @@ -721,6 +722,7 @@ public void componentClosing() {
panel.getMainTable().getTableModel().updateGroupingState(MainTableDataModel.DisplayOption.DISABLED);
}
getToggleAction().setSelected(false);
Globals.prefs.putBoolean(JabRefPreferences.WEB_SEARCH_VISIBLE, Boolean.FALSE);
}

private void setGroups(GroupTreeNode groupsRoot) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ public class JabRefPreferences {
public static final String BIB_LOC_AS_PRIMARY_DIR = "bibLocAsPrimaryDir";
public static final String SELECTED_FETCHER_INDEX = "selectedFetcherIndex";
public static final String WEB_SEARCH_VISIBLE = "webSearchVisible";
public static final String GROUP_SIDEPANE_VISIBLE = "groupSidepaneVisible";
public static final String ALLOW_FILE_AUTO_OPEN_BROWSE = "allowFileAutoOpenBrowse";
public static final String CUSTOM_TAB_NAME = "customTabName_";
public static final String CUSTOM_TAB_FIELDS = "customTabFields_";
Expand Down Expand Up @@ -761,6 +762,7 @@ private JabRefPreferences() {
defaults.put(OPEN_FOLDERS_OF_ATTACHED_FILES, Boolean.FALSE);
defaults.put(ALLOW_FILE_AUTO_OPEN_BROWSE, Boolean.TRUE);
defaults.put(WEB_SEARCH_VISIBLE, Boolean.FALSE);
defaults.put(GROUP_SIDEPANE_VISIBLE, Boolean.FALSE);
defaults.put(SELECTED_FETCHER_INDEX, 0);
defaults.put(BIB_LOC_AS_PRIMARY_DIR, Boolean.FALSE);
defaults.put(DB_CONNECT_SERVER_TYPE, "MySQL");
Expand Down

0 comments on commit 1f6c2e3

Please sign in to comment.