Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Issue #4437 - Some bugs in preference->Entry table columns #4546

Merged
merged 14 commits into from
Jan 12, 2019
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We updated updated the Related Articles tab to accept JSON from the new version of the Mr. DLib service
- We added an option in the preference dialog box that allows user to choose behavior after dragging and dropping files in Entry Editor. [#4356](https://github.com/JabRef/jabref/issues/4356)
- We added the ability to have an export preference where previously "File"-->"Export"/"Export selected entries" would not save the user's preference[#4495](https://github.com/JabRef/jabref/issues/4495)

- We added the ability to add field names from the Preferences Dialog [#4546](https://github.com/JabRef/jabref/issues/4546)
- We added the ability change the column widths directly in the main table. [#4546](https://github.com/JabRef/jabref/issues/4546)



Expand Down Expand Up @@ -91,7 +92,6 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where only one PDF file could be imported [#4422](https://github.com/JabRef/jabref/issues/4422)
- We fixed an issue where "Move to group" would always move the first entry in the library and not the selected [#4414](https://github.com/JabRef/jabref/issues/4414)
- We fixed an issue where an older dialog appears when downloading full texts from the quality menu. [#4489](https://github.com/JabRef/jabref/issues/4489)
- We fixed an issue where uncaught exceptions were logged but the user wasn't informed about their occurance. [#2288] (https://github.com/JabRef/jabref/issues/2288)



Expand All @@ -107,7 +107,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- Set/clear/append/rename fields: available through Edit menu
- Manage keywords: available through Edit menu
- Copy linked files to folder: available through File menu

- We removed the option to change the column widths in the preferences dialog. [#4546](https://github.com/JabRef/jabref/issues/4546)



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public PersistenceVisualStateTable(final MainTable mainTable, JabRefPreferences
this.preferences = preferences;

mainTable.getColumns().addListener(this::onColumnsChanged);
mainTable.getColumns().forEach(col -> col.sortTypeProperty().addListener(obs -> updateColumnSortType(col.getText(), col.getSortType())));
mainTable.getColumns().forEach(col -> col.sortTypeProperty().addListener(obs ->
updateColumnSortType(col.getText(), col.getSortType())));
mainTable.getColumns().forEach(col -> col.widthProperty().addListener(obs -> updateColumnPreferences()));

}

Expand Down Expand Up @@ -63,8 +65,10 @@ private void updateColumnPreferences() {
}
}

// Finally, we store the new preferences.
preferences.putStringList(JabRefPreferences.COLUMN_NAMES, columnNames);
preferences.putStringList(JabRefPreferences.COLUMN_WIDTHS, columnsWidths);
if (columnNames.size() == columnsWidths.size() &&
columnNames.size() == preferences.getStringList(preferences.COLUMN_NAMES).size()) {
preferences.putStringList(JabRefPreferences.COLUMN_NAMES, columnNames);
preferences.putStringList(JabRefPreferences.COLUMN_WIDTHS, columnsWidths);
}
}
}
161 changes: 68 additions & 93 deletions src/main/java/org/jabref/gui/preferences/TableColumnsTab.java

Large diffs are not rendered by default.

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 @@ -164,8 +164,6 @@ Close\ window=Luk vindue

Closed\ library=Lukkede library

Column\ width=Kolonnebredde

Command\ line\ id=Kommandolinje-id

Contained\ in=Indeholdt i
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ Close\ window=Fenster schließen

Closed\ library=Bibliothek geschlossen

Column\ width=Spaltenbreite

Command\ line\ id=Kommandozeilen ID
Comments=Kommentare

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_el.properties
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ Close\ window=Κλείσιμο παραθύρου

Closed\ library=Κλειστή βιβλιοθήκη

Column\ width=Μήκος στήλης

Command\ line\ id=id γραμμής εντολών
Comments=Σχόλια

Expand Down
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 @@ -167,8 +167,6 @@ Close\ window=Close window

Closed\ library=Closed library

Column\ width=Column width

Command\ line\ id=Command line id
Comments=Comments

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ Close\ window=Cerrar ventana

Closed\ library=Biblioteca cerrada

Column\ width=Ancho de columna

Command\ line\ id=Id de línea de comando
Comments=Comentarios

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ Close\ window=Fermer la fenêtre

Closed\ library=Fichier fermé

Column\ width=Largeur de colonne

Command\ line\ id=Identifiant de la ligne de commande
Comments=Commentaires

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_in.properties
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ Close\ window=Tutup jendela

Closed\ library=Basisdata ditutup

Column\ width=Lebar kolom

Command\ line\ id=id perintah baris

Contained\ in=Terkandung di
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_it.properties
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ Close\ window=Chiudi la finestra

Closed\ library=Libreria chiusa

Column\ width=Larghezza della colonna

Command\ line\ id=Identificativo della riga di comando
Comments=Commenti

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_ja.properties
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ Close\ window=ウィンドウを閉じる

Closed\ library=データベースを閉じました

Column\ width=列幅

Command\ line\ id=コマンドラインID
Comments=コメント

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_nl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ Close\ window=Sluit venster

Closed\ library=Sluit library

Column\ width=Kolombreedte

Command\ line\ id=Commandoregel id
Comments=Opmerkingen

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_no.properties
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ Close\ window=Lukk vindu

Closed\ library=Lukket library

Column\ width=Kolonnebredde

Command\ line\ id=Kommandolinje-id

Contained\ in=Inneholdt i
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_pt_BR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ Close\ window=Fechar Janela

Closed\ library=Base de dados fechada

Column\ width=Largura da coluna

Command\ line\ id=ID da linha de comando

Contained\ in=Contido em
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ Close\ window=Закрыть окно

Closed\ library=Закрытая БД

Column\ width=Ширина столбца

Command\ line\ id=Ид. командной строки

Contained\ in=Содержится в
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_sv.properties
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ Close\ window=Stäng fönster

Closed\ library=Stängde libraryn

Column\ width=Kolumnbredd

Command\ line\ id=Kommandorads-id

Contained\ in=Finns i
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_tl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ Close\ window=Isara ang window

Closed\ library=Nasara ang library

Column\ width=Lapad ng haligi

Command\ line\ id=Linya ng utos para sa id
Comments=Komento

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_tr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ Close\ window=Pencereyi kapat

Closed\ library=Kapalı veritabanı

Column\ width=Sütun genişliği

Command\ line\ id=Komut satır no
Comments=Yorumlar

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_vi.properties
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ Close\ window=Đóng cửa sổ

Closed\ library=CSDL được đóng

Column\ width=Chiều rộng cột

Command\ line\ id=Chỉ số (id) của dòng lệnh
Comments=Nhận xét

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/l10n/JabRef_zh.properties
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ Close\ window=关闭窗口

Closed\ library=关闭文献库

Column\ width=列宽

Command\ line\ id=命令行 id
Comments=注释

Expand Down