Commit Graph

820 Commits

Author SHA1 Message Date
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 8b36a630c5
Add badges to `README.md`. (#1406) 2022-08-25 16:04:38 +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
Manu 808be82128
Merge pull request #1394 from real-yfprojects/pre-commit-setup
Pre commit setup
2022-08-16 22:15:46 +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
real-yfprojects 63b2eb1089 Configure pre-commit hooks and configure black for tests also.
These include flake8 linting, black and isort formatting
as well as some general hooks with minor checks.

* .pre-commit-config.yaml

* pyproject.toml : Run black on test files also.
2022-08-16 18:20:34 +02:00
yfprojects b80e01c726
Create .git-blame-ignore-revs (#1395)
This will exclude the commit reformatting the whole repository with black from git blame as suggested in the black docs and in #929.
2022-08-16 06:49:10 +02:00
yfprojects ceb04d7c74
Move linting to the top in test.yml (#1391) 2022-08-15 15:43:00 +02:00
Manu b6a24debb7 Apply automatic formatting 2022-08-15 15:23:55 +02:00
Manu 7c97f79b31 Add config files for autmatic 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
yfprojects 8a94457b8d
Add spaces after `assert` and enhance git py diff. By @real-yfprojects (#1385) 2022-08-13 20:21:16 +02:00
Manu d8e4a93cdd
Improve the extract and diff dialog. By @real-yfprojects (#1219) 2022-07-25 22:16:24 +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
Manu 33639aeaed
Add missing Qt dependency for tests (#1376) 2022-07-25 11:07:38 +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
Manuel Riel e0911a61f4
Add older Ubuntu version to tests (#1330) 2022-05-26 08:10:14 +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
yfprojects efe710540a
Determine source files for translations dynamically. By @real-yfprojects (#1309) 2022-05-22 08:02:19 +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 a9170c3b91
Minor: fix macOS build (#1284) 2022-05-06 16:29:17 +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