Commit Graph

699 Commits

Author SHA1 Message Date
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
Julian Hofer 648c916adb Update flatpak install rule
- Add the necessary flag `--no-build-isolation`
- Use `FLATPAK_DEST` instead of hardcoding `/app`
- Rename FLATPAK_XML to APPSTREAM_METADATA
2022-11-08 12:31:23 +01:00
Julian Hofer d7aff48822 Remove flatpak folder
The building happens at flathub, and we don't use this one for anything at the moment
2022-11-08 12:31:23 +01:00
Manu 99eb2871d7 Add Dutch language update 2022-11-05 20:10:59 +01:00
Manu 7550ae5b29 Pin pyobjc to v8 branch 2022-11-05 20:07:02 +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 ddcd3c7b0e
Update `actions/checkout` to v3. (#1433)
The second version of the checkout action is no longer supported by Github Actions because it uses Node.js 12.

* .github/workflows/build-macos.yml
* .github/workflows/test.yml
2022-10-15 13:53:29 +02: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
Manu 496acfde99
Enhance community docs and bug reporting. By @real-yfprojects (#1419) 2022-09-18 21:06:40 +02:00
real-yfprojects 17cf8102f0
Add pull request template.
* .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
2022-09-18 08:46:53 +02:00
real-yfprojects be194d92d9
Add CONTRIBUTING file.
* .github/CONTRIBUTING.md
2022-09-18 08:31:04 +02:00
yfprojects 3b40ce8e01
Create feature_request.md
* .github/ISSUE_TEMPLATE/feature_request.md
2022-09-18 08:31:03 +02:00
yfprojects 52b1e65c92
Create bug_form.yaml 2022-09-18 08:31:03 +02:00
yfprojects ff0b8883f8
Create config.yml
Link docs, discussions and FAQ on the issue page.

* .github/ISSUE_TEMPLATE/config.yml
2022-09-18 08:31:02 +02:00
yfprojects fd2d2d69cf
Update bug_report.md 2022-09-18 08:31:02 +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 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