-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Configure backup path in prefs #9809
Conversation
TODO: Enable/disable backup
src/main/java/org/jabref/logic/autosaveandbackup/BackupManager.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/autosaveandbackup/BackupManager.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/autosaveandbackup/BackupManager.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/gui/preferences/file/FileTabViewModel.java
Outdated
Show resolved
Hide resolved
TODO: test flag if createBackup
src/main/java/org/jabref/logic/autosaveandbackup/BackupManager.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/autosaveandbackup/BackupManager.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/autosaveandbackup/BackupManager.java
Outdated
Show resolved
Hide resolved
* upstream/main: (31 commits) Fixes #9372 Change default File Chooser to show supported files extensions Fix path in devs documentation (#9810) New translations JabRef_en.properties (Tagalog) New translations JabRef_en.properties (Persian) New translations JabRef_en.properties (Indonesian) New translations JabRef_en.properties (Portuguese, Brazilian) New translations JabRef_en.properties (Vietnamese) New translations JabRef_en.properties (Chinese Traditional) New translations JabRef_en.properties (Chinese Simplified) New translations JabRef_en.properties (Ukrainian) New translations JabRef_en.properties (Turkish) New translations JabRef_en.properties (Swedish) New translations JabRef_en.properties (Russian) New translations JabRef_en.properties (Portuguese) New translations JabRef_en.properties (Polish) New translations JabRef_en.properties (Norwegian) New translations JabRef_en.properties (Dutch) New translations JabRef_en.properties (Korean) New translations JabRef_en.properties (Japanese) New translations JabRef_en.properties (Italian) ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments.
Yeah, the enable and disable of the backup (start/stop of BackupManager with other configuraiton) really needs to be done.
src/main/java/org/jabref/logic/autosaveandbackup/BackupManager.java
Outdated
Show resolved
Hide resolved
* upstream/main: (68 commits) Bump org.junit.platform:junit-platform-launcher from 1.9.2 to 1.9.3 Bump org.jsoup:jsoup from 1.15.4 to 1.16.1 Bump org.junit.jupiter:junit-jupiter from 5.9.2 to 5.9.3 Bump com.puppycrawl.tools:checkstyle from 10.9.3 to 10.10.0 Bump com.vladsch.flexmark:flexmark from 0.64.0 to 0.64.2 Refresh example styles Squashed 'buildres/csl/csl-styles/' changes from 4728902faa..a985762505 New translations JabRef_en.properties (Tagalog) New translations JabRef_en.properties (Persian) New translations JabRef_en.properties (Indonesian) New translations JabRef_en.properties (Portuguese, Brazilian) New translations JabRef_en.properties (Vietnamese) New translations JabRef_en.properties (Chinese Traditional) New translations JabRef_en.properties (Chinese Simplified) New translations JabRef_en.properties (Ukrainian) New translations JabRef_en.properties (Turkish) New translations JabRef_en.properties (Swedish) New translations JabRef_en.properties (Russian) New translations JabRef_en.properties (Portuguese) New translations JabRef_en.properties (Polish) ... # Conflicts: # src/main/java/org/jabref/gui/preferences/file/FileTab.java # src/main/java/org/jabref/gui/preferences/file/FileTabViewModel.java # src/main/java/org/jabref/logic/autosaveandbackup/BackupManager.java
src/main/java/org/jabref/logic/autosaveandbackup/BackupManager.java
Outdated
Show resolved
Hide resolved
I checkout the PR, but then I can't seem to trigger the backup manager dialog. I have tried closing JabRef from IntelliJ and from the Taskmanager by ending the process but neither has worked; when I start JabRef again, the backup dialog doesn't show. Keep in mind that the "Create backup" is enabled. polish: besides that problem, I think the backup path text field should be disabled when the "Create backup" checkbox is unchecked. |
Did you also modify the library without saving? I did and I got the dialog:
Current state: We should also have a button "reset to default" (same icon as in "Reset preferences") |
Yes, I modified the library before closing it. I also changed the backup path. |
A restart might be necessary after changing the prefs, the back up manager
is started very early
Houssem Nasri ***@***.***> schrieb am Fr., 5. Mai 2023, 01:51:
… Yes, I modified the library before closing it. I also changed the backup
path.
—
Reply to this email directly, view it on GitHub
<#9809 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACOFZEE6UOQD53GWPFAJTTXEQ6IRANCNFSM6AAAAAAXOGJY5M>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
* upstream/main: Minimal config for openRewrite Fix missing # CHANGELOG.md Removed unused code Refined ui Dissolved FileTab and moved contents to EntryTab Renamed CustomEditorFieldsTab to EntryEditorTabsTab Fixed antipattern, fixed radiobutton with checkbox Renamed ImportExportPreferences to ExportPreferences Separated WebSearchPrefs and ExportPrefs Separated WebSearchTab and ExportTab Renamed ImportExportTab to WebSearchTab # Conflicts: # src/main/java/org/jabref/gui/preferences/export/ExportTab.java # src/main/java/org/jabref/gui/preferences/file/FileTab.fxml # src/main/java/org/jabref/gui/preferences/file/FileTabViewModel.java
@Siedlerchr It is working now! A restart was needed as you said. Also, I noticed that if I open JabRef, make a change, and then close it (kill the process) very fast, the backup dialog doesn't show the next time. |
Yep, you have to wait a few seconds because the backup path is using seconds in the filename only as minimum That's why I added a sleep in the test as well |
issue: Crossref field changes aren't recorded; It is probably not caused by this pr but I'm documenting it here to not forget it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM codewise, I didn't look too much into the tests but they look good overall. It would be great if you can get the backup directory to be updated without restarting, otherwise, a "you need to restart" message is fine.
Adds a new option in the preferences to enable/disable backups and to choose the backup directory
Fallback/Default dir is always app dir as usual
Compulsory checks