Commit Graph

95 Commits

Author SHA1 Message Date
luz paz
a937fa7ee2 AddonManager: move superfluous whitespace out of translation [skip ci] 2022-02-20 16:40:40 -06:00
Chris Hennes
743c18bae0 Addon Manager: Fix bug in error messaging 2022-02-18 08:47:39 -06:00
Chris Hennes
6396c33959 Addon Manager: Black reformat 2022-02-18 08:38:57 -06:00
Chris Hennes
2298e8cb41 Addon Manager: Correct displayed modification time 2022-02-17 18:31:36 -06:00
Chris Hennes
6ef54d046b Addon Manager: Add -ff-only option to pull 2022-02-17 18:26:47 -06:00
Chris Hennes
2760b13701 Addon Manager: Fix custom repos ending in .git 2022-02-17 18:03:14 -06:00
Chris Hennes
f19f4e65b2 Addon Manager: Add branch switching GUI
For users with git and GitPython installed, a new button is added to the
details view allowing them to change the branch they are on. Some other
minor UI changes are made to accomodate this new behavior.
2022-02-13 20:19:32 -06:00
Chris Hennes
994071c43b Addon Manager: Switch to QWebEngineView for README
Rather than manually parsing the output from the repo's host, the Addon Manager
now uses an embedded QWebEngineView to display the README data. This makes the
display more repo-location agnostic (rather than trying to parse the specific
code from GitHub, Gitlab, etc.). Special handling of known hosts is still
provided to improve the display of the page, but it is not required. Clicking a
link on the page still loads in a new system browser window, with the exception
of links to the FreeCAD wiki, which are loaded in the same browser. This is
expected to be used primarily to access traslated pages for Macros, so no
advanced web-browsing features are displayed (e.g. back buttons, history
access, etc.).
2022-02-02 23:42:29 -06:00
Chris Hennes
c62dc32739 Addon Manager: Translation cleanup
pylupdate does not extract translations when f-strings are used for the
translated text, so all f-strings are migrated to calls to format().
Several other minor translation issues are also addressed.

NOTE: This code has been run through the Black reformatter, which adds
trailing commas in many places that the stock Qt 5.x pylupdate does not
recognize. This code must be processed with the corrected pylupdate to
generate the correct translations.
2022-01-27 23:11:31 -06:00
Chris Hennes
8809ed4253 Addon Manager: Improve startup speed 2022-01-26 18:41:14 -06:00
Chris Hennes
e9d6a2c4a4 Addon Manager: Create NetworkManager class
To enable single-login authenticated proxy use, and simplified multi-threaded
network accesses, this commit adds a new wrapper around a QNetworkAccessManager
and includes a global instantiation of the class intended to exist for the
lifetime of the program. This instance can be used to enqueue any number of
network requests, which the manager will send out to the networking subsystem
in an appropriate manner.
2022-01-25 13:30:58 -06:00
Chris Hennes
8d96cadb69 Addon manager: install dependencies (#5376)
Addon Manager: Dependency Installation

The Addon Manager can now attempt to use pip directly to install
required packages as specified in either metadata.txt or
requirements.txt files provided by AddOns. The packages are installed
into FreeCAD.getUserAppDataDir()/AdditionalPythonPackages directory.
Only simplified requirements.txt data is supported: any version
information is stripped out, and only packages are supported (that is,
no pip arguments, included files, etc.). Further, packages are checked
against a list of allowed packages prior to being suggested for
installation. Addon authors should submit a PR to the FreeCAD repo
adding their requirements to the allowed list, for packages that are not
already on the list (this is a malware-prevention mechanism).
2022-01-21 10:19:21 -06:00
Chris Hennes
37ac9f4d24 AddonManager:Correct funcion name 2022-01-11 07:38:40 -06:00
Chris Hennes
910baff0d0 Addon Manager: Remove progress object from git pull 2022-01-10 10:45:23 -06:00
Chris Hennes
ce03fe0d31 Addon Manager: Add version-based Addon deprecation 2022-01-09 21:02:57 -06:00
Chris Hennes
06144dd944 Addon Manager: Display download progress 2022-01-09 00:46:07 -06:00
Chris Hennes
131ca065d9 Addon Manager: Correct typo 2022-01-08 22:39:42 -06:00
Chris Hennes
47ca151c81 Addon Manager: Clean up thread termination 2022-01-08 22:30:05 -06:00
Chris Hennes
a34aa34b0b Addon Manager: Correct bad metadata update 2022-01-08 21:07:32 -06:00
Chris Hennes
13a626d228 Addon Manager: Improve stability when cache update interrupted 2022-01-08 19:47:57 -06:00
Chris Hennes
ad2169e5ae Addon manager dependency resolver (#5339)
Squashed:
* Addon Manager: Refactor metadata.txt download
* Addon Manager: Basic dependency walker
* Addon Manager: Add basic support for dependencies
* Addon Manager: Improve network detection messaging
* Addon Manager: Black reformat
* Addon Manager: Display dependency info in dialog
* Addon Manager: Dependency dialog added
* Addon Manager: Improve display of update all results
* Addon Manager: Improve display of package list
* Addon Manager: Fix codespell
* Addon Manager: Clean up unused signal
2022-01-07 10:16:44 -06:00
Chris Hennes
dfdc6e4f65 Addon Manager: Handle symlinking failure 2022-01-06 19:22:00 -06:00
Chris Hennes
172243138a Addon Manager: Improve display of installation details 2022-01-01 11:41:23 -06:00
Chris Hennes
6f1c2627b2 Addon Manager: Remove unused imports 2022-01-01 09:43:06 -06:00
Chris Hennes
382eabbb62 Addon Manager: Improve wiki page data extraction 2022-01-01 09:16:32 -06:00
Chris Hennes
d20c24f618 Addon Manager: Fix macro cache loading 2022-01-01 09:16:32 -06:00
Chris Hennes
e450e50bb2 Addon Manager: Implement simple macro metadata cache 2022-01-01 09:16:32 -06:00
Chris Hennes
2751cb7a51 Addon Manager: Add option to hide obsolete and py2 addons 2021-12-30 21:36:32 -06:00
Chris Hennes
20a74ce423 Addon Manager: Clean up report window output 2021-12-30 20:06:22 -06:00
Chris Hennes
7874b0dd6c Addon Manager: Do not change image size
The new UI has much more space available to display README files: remove
the code that scaled the images to (sometimes unreadable) 300x300 size.
2021-12-29 23:51:21 -06:00
Chris Hennes
0b0646dfe9 Addon Manager: Fix github macro update code 2021-12-21 17:23:02 -06:00
Chris Hennes
37e18c9a04 Addon Manager: Correct macro installation location 2021-12-21 14:48:35 -06:00
Chris Hennes
77e0d06bb8 Addon Manager: Bugfix for zip installation 2021-12-20 18:57:26 -06:00
Chris Hennes
aaff737bd6 Addon Manager: Fix macro update code 2021-12-20 13:12:45 -06:00
Chris Hennes
eb4aacf2ff Addon Manager: Bug fixes for detailed display 2021-12-18 20:29:42 -06:00
Chris Hennes
3cc2d402cf Addon Manager: Black reformatting 2021-12-18 20:29:42 -06:00
Chris Hennes
14bcba5c55 Addon Manager: Improve display of install details
As suggested in the forums, this adds display of the installation date and
installed version to the expanded display and detail view.
2021-12-18 20:29:42 -06:00
Chris Hennes
f785436cff Addon Manager: Improve cache behavior
Also includes a number of bug fixes.
2021-12-18 20:29:42 -06:00
Chris Hennes
e42eec2558 Addon Manager: Begin UI redesign
Migrate to a UI that looks more like other software package managers, giving
more space to each addon by hiding the list when an addon is selected, and
providing a "back" button to get back.

Implements a two-style view option for the list of addons: expanded and
condensed, via a delegate that provides the drawing function for each row in
the table based on two different widget designs.
2021-12-18 20:29:42 -06:00
Chris Hennes
ba3d921f3f Addon Manager: Bugfixes and cleanup of refactor 2021-12-18 20:29:42 -06:00
Chris Hennes
fa8cac06f4 Addon Manager: Add support for salsa.debian.org
The pyrate has moved to salsa.debian.org, so this commit adds the
beginnings of support for those repos.The Markdown library is required
for nice rendering of repos that don't have a package.xml metadata file.
2021-12-18 20:29:42 -06:00
Chris Hennes
a225695dd8 Addon Manager: Rework backend to use package.xml
This shifts to use the model-view-controller pattern for the list of addons,
and moves to using a full model class rather than an indexed array for the
data storage and management. This enables much more information to be stored
as part of the new AddonManagerRepo data type. It now wraps the Macro class
for macros, supports Preference Packs, and provides access to the Metadata
object.
2021-12-18 20:29:42 -06:00
Syres916
842abfcee4 [AddonManager] stderr remove translate 2021-09-18 13:05:36 +01:00
Syres916
de3e44a117 [AddonManager] Handle stderr from git status
See discussion https://forum.freecadweb.org/viewtopic.php?f=10&t=62265
2021-09-18 11:19:42 +01:00
Yorik van Havre
88744fcf52 AddonManager: Handles git module with no Repo attribute - Fixes #4072 2021-08-18 11:32:19 +02:00
M G Berberich
b95852c8a9 AddonManager: parse addonflags.json with json module
Parses addonflags.json with the python json-module instead of using
regular expressions.
2021-06-21 12:52:31 +02:00
Roy-043
9639cdff45 AddonManager: Fix Macros URL 2021-05-12 14:53:16 +02:00
Ondrej Flidr
7d0f808b9c tabs to spaces 2021-04-21 15:31:40 +02:00
Ondrej Flidr
b457dc4062 revert dynamic char limit 2021-04-21 13:38:51 +02:00
Ondrej Flidr
87e6dddd37 fix path lenght for ecryptfs 2021-04-21 13:37:10 +02:00