Commit Graph

598 Commits

Author SHA1 Message Date
Manu 7c1b9535b2 Bump version to v0.8.11 2023-04-09 14:44:24 +01:00
Divyansh Singh b51b1ef85e
Save list view as setting. By @diivi (#1621)
* feat: add a setting for files list views

* separate logic from data class

* make mode optional

* rename display mode methods

* refactor

* move code above connect signals comment

* reorder code

---------

Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
Co-authored-by: Manu <3916435+m3nu@users.noreply.github.com>
2023-04-05 12:20:42 +01:00
yfprojects 828e02953b
Use `pf` pattern format for extract. By @real-yfprojects (#1625)
* src/vorta/borg/extract.py : The pattern file passed to borg now contains `pf`-style patterns for included paths.
2023-04-05 12:08:06 +01:00
jetchirag 6d5e738107
Retain source tab sort settings. By @jetchirag (#1649) 2023-04-04 13:18:50 +01:00
bigtedde a64493d254
Setting for Full Disk Access check. By @bigtedde (#1653) 2023-04-04 12:49:34 +01:00
Henry Spanka e3451ed49e
Handle ctime and mtime diff changes (#1675)
Borg v1.2.4 added new change types called `mtime` and `ctime` for the modification and the creation time of a file.
Our diff json parser doesn't support these changes yet.
The plain text parser doesn't need to be updated since it is only used for earlier versions of borg.
This also extends the tooltip in the diff view to show changes in `ctime` or `mtime` in a localised manner.

* src/vorta/views/diff_result.py (ChangeType): Add `CTIME` and `MTIME` linking to `MODIFIED`.

* src/vorta/views/diff_result.py (DiffData): Add fields `ctime_change` and `mtime_change`.

* src/vorta/views/diff_result.py (parse_diff_json): Parse the new change types.

* src/vorta/views/diff_result.py (DiffTree.data): Add time changes to tooltip in a human readable format.

* tests/test_diff.py : Update test data to include new change types. Add additional test cases for unittesting the new change types.
2023-04-03 10:16:09 +02:00
Henry Spanka f407032a76
Revert "Added --content-only flag for borg 1.2.4 in diff view"
This reverts commit e0fe766051.
2023-04-01 20:13:31 +02:00
Chirag Aggarwal e0fe766051 Added --content-only flag for borg 1.2.4 in diff view
Signed-off-by: Chirag Aggarwal <thechiragaggarwal@gmail.com>
2023-03-30 18:40:31 +01:00
Nkwuda Sunday Cletus d0245977d2
Disable Archive tab buttons during backup. By @sunny775 (#1587)
* Disable archive action buttons when running backup.
* Disable archive action buttons only individually.
* Fix enabling.
* fixup! Fix enabling.

---------

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
Co-authored-by: Manu <3916435+m3nu@users.noreply.github.com>
2023-03-23 14:15:07 +00:00
Divyansh Singh 3ebb078409
feat: add profile name to log messages (#1637)
* feat: add profile name to log messages

* update tests

* add profile name to all occurences of backup progress event emit

* update tests

* merge with logs link code

---------

Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com>
2023-03-22 12:16:46 +01:00
Divyansh Singh 1f1278270d
Remove paramiko dependency (#1606)
Paramiko is a encryption key parsing library. It was used for determining which ssh keys are available on the system. This removes that fairly heavy dependency at replaces it with a very basic heuristic to determine ssh key file by their first line containing `-----BEGIN(\s\w+)? PRIVATE KEY-----`.

* src/vorta/utils.py: Implement `is_ssh_private_key_file`.

* src/vorta/utils.py (get_private_keys): Use `is_ssh_private_key_file` instead of paramiko. Enforce `077` permissions on key files.

* src/vorta/views/ssh_dialog.py : Remove paramiko.

* src/vorta/views/repo_tab.py (RepoTab.init_ssh): Show filename only in `sshComboBox`.

* src/vorta/views/repo_add_dialog.py (AddRepoWindow.init_ssh_key): Show filename only in `sshComboBox`.
2023-03-17 15:03:48 +00:00
Chirag Aggarwal c4d16e250d Fixes math error for negative size in diff view in archive tab
Signed-off-by: Chirag Aggarwal <thechiragaggarwal@gmail.com>
2023-03-14 16:08:27 +01:00
Divyansh Singh 6bc532187b
Add link to the logs folder in borg warnings (#1609)
In case a borg job finishes with warning, vorta will display it and tell the user to have a look in the logs. This adds a clickable link to the log message that opens the default file explorer at the log location.

* src/vorta/application.py (VortaApp.check_failed_response): Improve wording of warning message and link logs.

* src/vorta/borg/create.py (BorgCreateJob.process_result): Link logs.
* src/vorta/borg/compact.py (BorgCompactJob.finished_event): ^^
* src/vorta/borg/check.py (BorgCheckJob.finished_event): ^^

* src/vorta/assets/UI/mainwindow.ui : Enable `openExternalLinks` for `progressText` label.
2023-03-12 07:05:46 +00:00
Vamp 961e0b5057
Migrate from appdirs to platformdirs (#1617)
Fixes #1610. Replace deprecated `appdirs` with fork `platformdirs`. Use the new `*_path` api of set fork. This changes the type of the constants defined in `vorta.config` holding locations to `pathlib.Path`.

* setup.cfg : Replace dep `appdirs` with `platformdirs`.

* src/vorta/config.py : Migrate. Simplify code for ensuring that the directories exist.

* src/vorta/log.py
* src/vorta/autostart.py
* src/vorta/application.py
* src/vorta/__main__.py
2023-03-10 16:00:39 +00:00
Divyansh Singh b01fa1056a
Replace print with logging in application.py (#1612)
Log `An instance of Vorta is already running. Opening main window.` and `Creating backup using existing Vorta instance.` with severity *info* instead of printing it.

* src/vorta/application.py (VortaApp.__init__)
2023-03-08 16:47:50 +00:00
Divyansh Singh a00ed62e49
Fix detecting whether sources are configured (#1613)
Fixes #1463. This makes the code count the database rows for the current profile only. 
Previously one could run a backup without any sources when one had sources configured in a different profile.

* src/vorta/borg/create.py (BorgCreateJob.prepare)
2023-03-02 16:55:31 +00:00
yfprojects 618a1fe278
Add tooltips to settings. (#1521)
This adds tooltips to the settings as well as a 'info' button that shows the tooltip when hovering over it.

* Add tooltips to settings.

* src/vorta/store/models.py (SettingsModel): Add `tooltip` column.

* src/vorta/store/migrations.py (run_migrations): Create `tooltip` column.

* src/vorta/store/connection.py (init_db): Populate `tooltip` column. Increase `SCHEMA_VERSION`.

* src/vorta/views/misc_tab.py (MiscTab.populate): Set tooltip of checkbox widgets.

* src/vorta/store/settings.py : Add tooltips and update label of `override_mount_permissions`

* Add *help* button to settings.

* src/vorta/assets/icons/help-about.svg: Add info icon.

* src/vorta/views/partials/tooltip_button.py: Implement `ToolTipButton`.

* src/vorta/views/misc_tab.py: Add `ToolTipButton` for each setting with a tooltip.
	Add `set_icons` and connect it to palette change.

* tests/test_misc.py (test_autostart): Update test.

---------

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
2023-02-25 10:10:43 +00:00
Roberto Previdi bcc126b634
Improve size column readability in archives tab (#1598)
Use one size unit for all archives. The unit is selected by a simple algorithm that picks the largest unit that can represent the smallest size with a given precision. Align all sizes in archive and source tab to the left.

* src/vorta/utils.py : Implement `find_best_size_formatting`. Add missing sizes to `sort_sizes`. Simplify `pretty_bytes` and add `fixed_unit` option for use with `find_best_size_formatting`. Implement `clamp` utility function. Add type hints and docstrings.

* src/vorta/views/archive_tab.py (ArchiveTab.populate_from_profile): Use `find_best_sizes_formatting`.

* src/vorta/views/source_tab.py (SizeItem.__init__): Set alignment to left.

* tests/test_utils.py : Add comprehensive tests for `pretty_bytes` and `find_best_sizes_formatting`.

Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
2023-02-21 21:01:49 +00:00
Joshua Goins a048dad136 Allow copying the public part of the first SSH key
Previously this button would only work if you had more than one SSH key
which prevents the first one from being copied.
2023-02-19 18:02:32 +00:00
Théophile Bastian 1b27b9b499 Allow creating an SSH key when bootstrapping Vorta
Fixes #1579
2023-02-09 19:28:34 +00:00
herrwusel ffafcee05c
Correctly supply prune pattern for borg >=1.2.2 (#1565)
Adds different behaviour when borg version >=1.2.2 but <2.0.0: The prune pattern is supplied without a style prefix like `sh:`.
Fixes #1564.

---------

Co-authored-by: herrwusel <herrwusel@user.noreply.github.com>
Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
2023-02-06 21:02:55 +00:00
Manu aff9fc2d2c Bump version to v0.8.10 2023-01-22 12:54:46 +01:00
Manu 2e589a065a Update translations (and Transifex config) 2023-01-22 12:52:33 +01:00
real-yfprojects 696c3fbfe1 Migrate to `--match-archives` in mount point detection.
* src/vorta/utils.py (get_mount_points)
2023-01-21 21:18:05 +01:00
real-yfprojects 5e046386d7 Specify archive using `-a` for borg v2 `mount`.
* src/vorta/views/archive_tab.py : Move all command building logic into `mount.py`.

* src/vorta/borg/mount.py (BorgMountJob.prepare): Add command building logic previously in other places.

* src/vorta/borg/mount.py (BorgMountJob.prepare): Use `-a` command line option to select a single archive.

* src/vorta/utils.py (SHELL_PATTERN_ELEMENT): A pattern that can be used to detect shell pattern syntax.

* src/vorta/utils.py (get_mount_points): Implement parsing a borg v2 cmd.
2023-01-21 21:18:05 +01:00
yfprojects b4a7c5494e Move umount logic from `archive_tab.py` into existing `BorgUmountJob`. By @real-yfprojects (#1404)
* src/vorta/borg/umount.py (BorgUmountJob.prepare): Add parameters `mount_point` and optional `archive_name`.
	Handle them correctly.

* src/vorta/views/archive_tab.py : Remove code that can now be found in `umount.py`.
	Translate error messages returned by `BorgUmountJob.prepare`.

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
2023-01-21 21:18:05 +01:00
real-yfprojects e275215c71 Specify the use of a `sh:`-style pattern when pruning with borg v2.
With borg v2.0.0b3 the default pattern style was changed to identical matching.

* src/vorta/borg/prune.py (BorgPruneJob.prepare)
2023-01-21 21:18:05 +01:00
Manu ba5c7c5511 Move rename logic for arguments into `BorgRenameJob`.
* src/vorta/borg/rename.py
* src/vorta/views/archive_tab.py
2023-01-21 21:18:05 +01:00
Manu f9d1260316 Remove compression field. Don't store timezone in db.
* src/vorta/borg/create.py (BorgCreateJob.process_result): Remove timezone from snapshot time.
	Don't save compressed size.

* src/vorta/borg/info_repo.py (BorgInfoRepoJob.process_result): Remove compressed size.

* src/vorta/borg/list_repo.py (BorgListRepoJob.process_result): Remove timezone from archive time.
2023-01-21 21:18:05 +01:00
real-yfprojects 2b2d61baa5 Implement borg v2 compatibility for most commands.
Adjust available encryptions for borg v2.
Use `-r` for all/most commands. Implement `rinfo`.
Use `ssh://` style URL as a placeholder.
Implement compatibility for `borg extract`.
Adjust for beta3, use --match-archives for deletions

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
Co-authored-by: Manu <manu@snapdragon.cc>
2023-01-21 21:18:05 +01:00
real-yfprojects fa3a6cf7e6 Add borg v2 compatibility item.
* src/vorta/borg/_compatibility.py: Add `V2` level starting with `2.0.0b1`.
2023-01-21 21:18:05 +01:00
real-yfprojects 78ec74a72c
Fix tray menu on XFCE.
The menu is build ones before the tray icon is clicked so that it is registered correctly.

* src/vorta/tray_menu.py (TrayMenu): Rename `on_user_click` to `build_menu`.

* src/vorta/tray_menu.py (TrayMenu.__init__): Call `build_menu`.
2023-01-21 19:51:56 +01:00
real-yfprojects a6f75775ed
Fix dynamic colouring.
Fixes the paste icon so that vorta can invert the its colour. Fixes #1556.
Updates icons in main window and source tab correctly when the colour palette changes.

* src/vorta/assets/icons/paste.svg : Remove fill of `path` item.

* src/vorta/views/source_tab.py : Connect `QApplication.paletteChange` to `set_icons`.
* src/vorta/views/main_window.py
2023-01-21 11:04:13 +01:00
yfprojects c620c0d9ac
Handle empty path in `FileTreeModel.addItem`. (#1552) 2023-01-20 12:51:53 +00:00
Manu ef297bbf4b
Avoid autostart warning when autostart disabled (#1549) 2023-01-20 12:25:58 +01:00
yfprojects 66340bc2a8
Add support for `--paths-from-command` to extra borg arguments. (#1538)
Backups will run although no sources are specified if `--paths-from-command` is supplied.
Also arguments after `--` will be appended to the end of the command after all other arguments.
Closes #1537.

* src/vorta/borg/create.py

* tests/test_create.py : Add test for using `--path-from-commands`.

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
2023-01-18 15:57:23 +00:00
endumiuz cace0778ac Run `borg compact` with the `--progress` option 2023-01-08 08:29:33 +01:00
real-yfprojects 84fdbe547d Pass int to `QPoint` constructor.
Before a float was passed to `QPoint(int, int)`. While this worked fine, on some machines it lead to an error.
Fixes #1535.

* src/vorta/views/main_window.py : cast division value to int.
2023-01-07 17:38:01 +01:00
real-yfprojects b80e617f25
Change label `Folders On Top` to `Folders First` in Extract and Diff view.
* src/vorta/assets/UI/diffresult.ui
* src/vorta/assets/UI/extractdialog.ui
2023-01-06 19:54:32 +01:00
yfprojects 7e7abafb3e
Catch `ProcessLookupError` in `BorgJob.cancel`. (#1520)
Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
2022-12-25 17:52:24 +01:00
endumiuz 225e84f115
Show progress on repo check (#1513)
Start `borg check` with option `--progress` and handle the progress messages. Now the long repo check phase won't look like a freeze in vorta because vorta will show status updates. Fixes #1497.

Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
2022-12-25 12:55:03 +00:00
Manu 6779baecff
Use new ssh://-style URL format as placeholder and in test (#1473) 2022-12-16 11:19:34 +01:00
fixmeee 667f3b3779
Restart timers after hibernation/sleep (#1511)
Schedules get missed, if system has been in hibernation/sleep state as
described in https://github.com/borgbase/vorta/issues/1214
Although, timers should be refreshed every 15min, it seems that all timers get
deranged by sleep state and schedules is still missed in most cases. This seems
to be a general issue with the underlying QTimer implementation.

This fix doesn't distinguish host OS and has only by tested on Linux.
If 'org.freedesktop.login1.Manager' is not available, Vorta simple doesn't
get notified if system awakes again. No no impact on other OS is expected

Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
2022-12-16 11:10:40 +01:00
real-yfprojects b072496b31
Populate repo info from profile after populating dropdowns.
* src/vorta/views/repo_tab.py (RepoTab.__init__): Move call to `populate_from_profile` from the beginning to the end.
2022-11-24 17:55:10 +01:00
real-yfprojects 031a498ee0
Don't close temp file before running `borg extract`.
Fixes #1488.
Closing deletes the temp file. This will be done by `BorgJob.run` after running the command.

* src/vorta/borg/extract.py (BorgExtractJob.prepare): Remove call to `close` of temporary file.
2022-11-10 20:19:58 +01:00
Manu 99eb2871d7 Add Dutch language update 2022-11-05 20:10:59 +01:00
Manu 9ad57d9ec6 Bump version to v0.8.9 2022-11-05 19:45:32 +01:00
real-yfprojects 722a8414ab Supply repository and archive name to borg in `BorgListArchiveJob`.
This reverts wrong modifications introduced in 0188b753b4.

* src/vorta/borg/list_archive.py (BorgListArchiveJob.prepare)
2022-11-05 15:36:52 +01:00
real-yfprojects 14a1de8c62 Add missing brackets fixing `BorgListArchiveJob`.
In python `+` takes precedence over the `if-else` operator.
Therefore brackets are needed around the latter.

* src/vorta/borg/list_archive.py (BorgListArchiveJob.prepare)
2022-11-05 15:36:52 +01:00
Manu 1ced42a878 Bump version to v0.8.8 2022-11-04 10:24:09 +01:00
Manu c3db61d74a Update translations 2022-11-04 10:23:23 +01:00
real-yfprojects b95da02b97 Fix sorting of diff results.
* src/vorta/views/diff_result.py (DiffSortProxyModel.choose_data): Return correct data for column `2`.
2022-11-03 21:12:40 +01:00
real-yfprojects c5034e171b Remove legacy `tree_view` (tree model) implementation.
* src/vorta/views/partials/tree_view.py : Delete.
2022-11-03 21:12:40 +01:00
real-yfprojects 2126ef769d Remove *unset* repository value from combobox when a repo is selected.
* src/vorta/views/repo_tab.py (init_repo_stats): Remove *unset* item from combobox.

* src/vorta/views/repo_tab.py (populate_from_profile): Move into `populate_repositories`.

* src/vorta/views/repo_tab.py (repo_unlink_action): Update unset condition. And repopulate repo combobox.

* src/vorta/views/repo_tab.py populate_repositories -> populate_from_profile
* src/vorta/views/main_window.py

* tests/test_repo.py : Fix tests.
2022-11-03 20:47:52 +01:00
real-yfprojects 14d587876e Replace `--prefix` with `-a` for borg v1.2.2 also.
* src/vorta/borg/prune.py (BorgPruneJob.prepare)
2022-11-02 17:05:03 +01:00
real-yfprojects 0188b753b4 Use `isomtime` instead of `mtime` from borg v1.2.2 on.
* src/vorta/borg/list_archive.py (BorgListArchiveJob.prepare)

* src/vorta/views/extract_dialog.py (parse_json_lines)
2022-11-02 17:05:03 +01:00
real-yfprojects ceb1a3bd3b Add compatibility feature `V122`.
* src/vorta/borg/_compatibility.py (MIN_BORG_FOR_FEATURE)
2022-11-02 17:05:03 +01:00
yfprojects 055338af2c
Link to report form chooser for critical errors. (#1451)
Currently the link will open an empty issue. Now the user can choose one of the templates.

* src/vorta/__main__.py : Replace link.
2022-10-31 17:50:32 +01:00
yfprojects 93307d278d
Add default `unset` value to repo combobox. By @real-yfprojects (#1429)
First element with index 0 is always the 'unset' option with data `None`.

* src/vorta/views/repo_tab.py (RepoTab.set_repos): Add element.

* src/vorta/views/repo_tab.py (RepoTab.repo_unlink_action): Handle the first element as unset.

* src/vorta/views/repo_tab.py (RepoTab.copy_URL_action): Handle unset state.

* tests/test_repo.py (test_repo_unlink): Fix test.

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
2022-10-13 13:12:20 +02:00
yfprojects 62ba92a0ed
Log the error when parsing a file in `~/.ssh` fails. (#1410)
This should help debugging #1304.

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
Co-authored-by: Manu <3916435+m3nu@users.noreply.github.com>
2022-08-27 21:51:31 +02:00
yfprojects 4e06b6df5a
Hide SSH dropdown for local repos. By @real-yfprojects (#1407)
* src/vorta/assets/UI/repotab.ui : Name `frameRepoSettings` and `layoutSSHKey`.

* src/vorta/views/repo_tab.py (RepoTab.init_repo_stats): Disable `frameRepoSettings` if no repo is selected.
	Disable widgets in `layoutSSHKey` in case of a local repository except from `bAddSSHKey` so the
	the user can add a key for a adding a repo.

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
2022-08-26 12:23:16 +02:00
yfprojects af311c98cf
Improve tooltips in archive tab. By @real-yfprojects (#1401)
* src/vorta/assets/UI/archivetab.ui (bCheck): Fix typo.
* src/vorta/assets/UI/archivetab.ui (compactButton): Add tooltip.
* src/vorta/assets/UI/archivetab.ui (bDelete): Fix typo.
* src/vorta/views/archive_tab.py (on_selection_change): Fix tooltip for `bMountArchive`.
* src/vorta/views/archive_tab.py (bmountarchive_refresh): Fix punctuation and set tooltip correctly. Add option for setting the icon only.
* src/vorta/views/archive_tab.py (bmountrepo_refresh): Fix punctutation.
* src/vorta/views/archive_tab.py (set_icons): Refresh only the icon of `bMountArchive`.

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
2022-08-25 09:11:12 +02:00
real-yfprojects ca497f8815 Run hooks on the code base.
This adds trailing lines to files,
removes trailing white space in all the other lines and unifies line endings.
Additionally it formats the test code with `black`.
2022-08-16 18:20:34 +02:00
Manu b6a24debb7 Apply automatic formatting 2022-08-15 15:23:55 +02:00
Marc Cousin 94e76644c4
Cleanup temp files. By @marco44 (#1384) 2022-08-14 20:42:00 +02:00
real-yfprojects 56de55ed8b
Add icons to display mode combobox.
* src/vorta/assets/icons/view-list-details.svg : Add icon for flat list

* src/vorta/assets/icons/view-list-tree.svg : Add icon for tree

* src/vorta/views/diff_result.py (DiffDialog.set_icons)

* src/vorta/views/extract_dialog.py (ExtractDialog.set_icons)
2022-07-25 16:15:47 +02:00
real-yfprojects cbc0780caa
Add icon for `folder on top` button.
* src/vorta/assets/icons/folder-on-top.svg : Add icon to repo.

* src/vorta/views/diff_result.py (DiffDialog.set_icons): Set icon.
* src/vorta/views/extract_dialog.py (ExtractDialog.set_icons): Set icon.
2022-07-25 16:15:46 +02:00
real-yfprojects 372b7107dd
Improve extract dialog GUI.
Adds a contextmenu and a simplified tree view mode, a button to collapse the tree
and the option to keep folders on top of the list.

* src/vorta/assets/UI/extractdialog.ui
* src/vorta/views/extract_dialog.py

* src/vorta/views/extract_dialog.py (ExtractFileItem): Add this variable holding the type
	 `FileSystemItem[FileData]`.
2022-07-25 16:15:46 +02:00
real-yfprojects e7772f517b
Add sorting to ExtractDialog.
* src/vorta/views/extract_dialog.py : Implement `ExtractSortProxyModel` inheriting from
	 `FileTreeSortProxyModel`.

* src/vorta/views/extract_dialog.py (ExtractDialog.__init__): Use sortproxymodel.

* src/vorta/views/extract_dialog.py (ExtractDialog): Implement `slot_sorted` that moves the viewport.
2022-07-25 16:15:45 +02:00
real-yfprojects 7eedd39319
Implement extracting exactly the selected files.
* src/vorta/borg/extract.py (BorgExtractJob.prepare): Use `patterns-from` to include only the selected items.
2022-07-25 16:15:45 +02:00
real-yfprojects 71af54f59b
Use new treemodel for extract dialog.
* src/vorta/views/extract_dialog.py: Add `ParseThread`, `ExtractTree` and `parse_json_lines`.

* src/vorta/views/extract_dialog.py (ExtractTree.__init__): Adjust signature.

* src/vorta/borg/list_archive.py (BorgListArchiveJob.prepare): Adjust format to
	include additional attributes.

* src/vorta/views/archive_tab.py (ArchiveTab): Parse extract data using `ParseThread` and
	open `ExtractDialog` afterwards.

* tests/test_archives.py (test_archive_extract): Update tests.

* src/vorta/borg/extract.py (BorgExtractJob.prepare): Adjust signature.
	Handling of the data isn't implemented yet.

* tests/test_extract.py
2022-07-25 16:15:45 +02:00
real-yfprojects 71aed9ba0e
Keep GUI responsive while processing diff results.
* src/vorta/views/archive_tab.py (ArchiveTab.list_diff_result): Start `ParseThread` that does the processing and creates the dialog.

* src/vorta/views/archive_tab.py (ArchiveTab.show_diff_result): Implement method showing `DiffResultDialog`.

* src/vorta/views/diff_result.py (ParseThread): Move processing of diff results to this thread.
2022-07-25 16:13:28 +02:00
real-yfprojects bdbc172157
Open `DiffResultDialog` as a normal dialog instead of a sheet.
* src/vorta/views/archive_tab.py (ArchiveTab.list_diff_result)
2022-07-25 16:13:28 +02:00
real-yfprojects 7003d69577
Update `diffresult.ui` with new features and prettyfy it.
* src/vorta/assets/UI/diffresult.ui : Replace `okButton` with `QDialogButtonBox`
	that has a `close` button.

* src/vorta/views/diff_result.py : Connect `buttonBox` instead of `okButton` to Dialog.

* src/vorta/assets/UI/diffresult.ui : Add title to `DiffResult` dialog and simplify file name display.

* src/vorta/assets/UI/diffresult.ui : Add comboBox to change display mode of tree view.

* src/vorta/views/diff_result.py : Connect comboBox to `DiffTree`.

* src/vorta/application.py : Remove `eventFilter` setup for palette changes.

* src/vorta/tray_menu.py : Connect directly to `app.paletteChanged`.
* src/vorta/views/archive_tab.py
* src/vorta/views/repo_tab.py
* src/vorta/views/schedule_tab.py
* src/vorta/views/source_tab.py

* src/vorta/assets/UI/diffresult.ui : Add buttons to keep folders on top when sorting and
	to expand and collapse all items.

* src/vorta/views/diff_result.py : Connect the added buttons.

* src/vorta/assets/icons/angle-up-solid.svg : Add icon for `bCollapseAll`.

* src/vorta/views/diff_result.py : Add context menu to `treeView` that allows expanding
	and copying of an item.

* src/vorta/views/diff_result.py : Add copy shortcut to `treeView`.
2022-07-25 16:13:28 +02:00
real-yfprojects c8ba273079
Use new treemodel for diff view.
Subclass `treemodel.FileTreeModel` for the purposes of the diff dialog.
Rewrite diff output parsing.
Add sorting through `QSortFilterProxyModel`.

* src/vorta/views/diff_result.py (DiffResult.__init__): Remove doubled if statement.

* src/vorta/views/diff_result.py : Rename `DiffResult` to `DiffResultDialog`.

* src/vorta/views/diff_result.py (DiffTree.__init__): Remove the use of `QVariant`.
	Since python has no type enforcement `QVariant` is not needed.

* src/vorta/views/diff_result.py (DiffTree): Subclass `treemodel.FileTreeModel` and add additional info tooltip.

* src/vorta/views/diff_result.py (parse_diff_json): Some changes for use with new model.

* src/vorta/views/diff_result.py (parse_diff_lines): Full regex based line parsing and
	other modifications to go with the new model.

* src/vorta/views/diff_result.py (FileType): Enum of possible file types.

* src/vorta/views/diff_result.py (ChangeType): Enum of possible change types.
	Currently all are mapped to `ADDED`, `MODIFIED` and `REMOVED`.

* src/vorta/views/diff_result.py (calc_size): Rename to `size_to_byte`.

* src/vorta/assets/UI/diffresult.ui : Move `alternatingRowColours` to the .ui file.

* src/vorta/views/diff_result.py (DiffResultDialog): Move `alternatingRowColours` to the .ui file.

* tests/test_diff.py : Fix tests for diff parser.

* src/vorta/views/diff_result.py : Connect to `sorted` of `DiffSortProxyModel`
	to reveal selected items in view.

* src/vorta/views/partials/treemodel.py : Add `FileTreeSortProxyModel` with abstract code.

* src/vorta/views/diff_result.py (DiffSortProxyModel): Implement `FileTreeSortProxyModel`.

* src/vorta/views/diff_result.py (DiffItem): This variable holds the type `FileSystemItem[DiffData]`.
2022-07-25 16:13:27 +02:00
real-yfprojects 3cd940455c
Implement fresh TreeModel for TreeViews.
* src/vorta/views/partials/treemodel.py
* tests/test_treemodel.py : Write tests.
2022-07-25 16:13:26 +02:00
yfprojects fd88d7ff21
Fix seconds and microseconds for fixed schedule and fix scheduling for the same day. (#1368)
Previously the seconds of the current time or the last backup time were be copied. Fixes #1363.
This also fixes an issue when the scheduled time was missed and the backup is scheduled
for the current day although the time of day set has already passed.

* src/vorta/scheduler.py (VortaScheduler.set_timer_for_profile)
2022-07-03 19:41:27 +00:00
yfprojects 305db92d4a
Log json diff line parsing errors. By @real-yfprojects (#1369) 2022-07-03 09:59:33 +04:00
Manu e53aa966fc Bump version to v0.8.7 2022-06-17 08:13:18 +04:00
Manuel Riel 170ff954ff
Deal with new archive_progress key (#1353) 2022-06-08 19:22:05 +04:00
yfprojects 091c0dcacd
Raise `ValueError` in case of unknown change type in diff json. By @real-yfprojects (#1350)
Currently an assert statement checks whether a change type was recognized.
This assert statement won't give any information on the actual change type that
is not implemented. Now a ValueError that mentiones the unknown change type in
its message will be raised instead.

* src/vorta/views/diff_result.py (parse_diff_json_lines): Replace assert statement by
	if and raise statements.

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
2022-06-07 10:32:58 +04:00
yfprojects 492a3128f8
Fix unlink action when repo combobox is empty. By @real-yfprojects (#1342)
Fixes #1341
2022-05-30 18:46:09 +04:00
tal66 422ca7f418
Show date of next backup. By @tal66 (#1319) 2022-05-29 17:44:17 +04:00
Manu c5dd5f1970 Bump version to v0.8.6 2022-05-26 07:46:27 +04:00
yfprojects 56e5c5049f
Remove call to `QTranslator.language()` in `get_locale`. (#1316) 2022-05-25 19:42:54 +04:00
Manu e58c83b5c9 Bump version to v0.8.5 2022-05-24 10:04:21 +04:00
Manuel Riel 6f3964c192
Fix macOS Archive settings form sizing (#1311) 2022-05-22 14:36:27 +04:00
yfprojects 4b6d080f05
Fix copying the current repo to the clipboard. By@real-yfprojects (#1313) 2022-05-22 11:32:57 +04:00
Manuel Riel 37850b15a2
Remove leftovers in repo selector (#1308) 2022-05-22 07:52:30 +04:00
yfprojects c797719513
Pause scheduling temporarily on failures. By @real-yfprojects (#1299) 2022-05-22 07:40:46 +04:00
yfprojects 182d3fbe0d
Only schedule backup after a manual run, improve labels. @real-yfprojects (#1302) 2022-05-21 15:06:10 +04:00
yfprojects 03480112e6
Select and delete multiple archives. By @real-yfprojects (#1307) 2022-05-21 14:49:46 +04:00
yfprojects b650ed3eb6
Preserve last creation log per profile for scheduler. By @real-yfprojects (#1296) 2022-05-16 16:00:31 +04:00
yfprojects f76aa5a5f4
Don't schedule if no repo is set. (#1288)
Fixes #1286.
2022-05-08 17:30:48 +04:00
yfprojects a06ba048c1
Hotfix for right-click archive menu. By @real-yfprojects (#1285) 2022-05-07 10:13:48 +04:00
Manu 98443036eb Bump version to v0.8.4 2022-05-06 13:59:48 +04:00
Manu c2e048546f Update translations 2022-05-06 13:59:17 +04:00
yfprojects de1ca052b5
Add support for special file types in `borg diff` output. By @real-yfprojects (#1265)
New item types were introduced to borg with borgbackup/borg#6624.
2022-05-06 11:33:13 +04:00
yfprojects b57414cfc2
Better diff selection without extra dialog. By @real-yfprojects (#1235) 2022-05-05 13:21:54 +04:00
yfprojects add1ac7041
Improve keyring logging. By @real-yfprojects (#1263)
They now log storing and retrieving passwords.
2022-04-20 12:07:01 +04:00