Commit Graph

135 Commits

Author SHA1 Message Date
Chris Hennes
a3e310ab55 Addon Manager: Improve manual update display 2022-02-17 19:00:57 -06:00
Chris Hennes
ef8be833fd Addon Manager: Fix missing update button connection 2022-02-17 18:26:24 -06:00
Chris Hennes
074c4b0a3b 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
e553a0e3ab 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
063905adfd Addon Manager: Run uninstall.py when uninstalling AddOn 2022-01-27 23:34:18 -06:00
Chris Hennes
88f6b2f432 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
e296aa6973 Addon Manager: Eliminate use of QDeadlineTimer
This class is apparently missing in some installs of Qt 5.11.3, so
remove the use of it.
2022-01-26 23:14:00 -06:00
Chris Hennes
f045a0b6f1 Addon Manager: Improve startup speed 2022-01-26 18:41:14 -06:00
Chris Hennes
4acef3f14f Addon Manager: Confirm delete 2022-01-25 13:32:02 -06:00
Chris Hennes
2b0a4dc643 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
d1a94de371 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
luz paz
19e984f8c9 Fix various typos
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,bottome,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/doc/SourceDocu`
2022-01-12 14:50:39 -06:00
Chris Hennes
70d61b9624 Addon Manager: Fix for Py3.6 w/ no fromisodate 2022-01-10 21:14:32 -06:00
Chris Hennes
3c937a5f8d Addon Manager: Clean up thread termination 2022-01-08 22:30:05 -06:00
Chris Hennes
efa08946f2 Addon Manager: Improve stability when cache update interrupted 2022-01-08 19:47:57 -06:00
Chris Hennes
3b76a23d7b Addon Manager: Silence error on missing cache 2022-01-08 11:32:33 -06:00
Chris Hennes
f8e08659d2 Addon Manager: Fix error on fast failed connection 2022-01-08 11:29:43 -06:00
Chris Hennes
4c9191d489 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
ecc6dee175 Addon Manager: Clean up copied macros on uninstall 2022-01-06 20:34:48 -06:00
Chris Hennes
f48d79a227 Addon Manager: Improve display of installation details 2022-01-01 11:41:23 -06:00
Chris Hennes
64cf6a68d8 Addon Manager: Remove unused imports 2022-01-01 09:43:06 -06:00
Chris Hennes
70c9804fc0 Addon Manager: Ensure cache is rebuilt after firstrun dialog 2022-01-01 09:16:32 -06:00
Chris Hennes
50336440dc Addon Manager: Add preference to control macro download 2022-01-01 09:16:32 -06:00
Chris Hennes
8ef9f257be Addon Manager: Remove extraneous UI elements 2022-01-01 09:16:32 -06:00
Chris Hennes
81c1187f58 Addon Manager: Fix macro cache loading 2022-01-01 09:16:32 -06:00
Chris Hennes
4c5b8f368c Addon Manager: Implement simple macro metadata cache 2022-01-01 09:16:32 -06:00
Chris Hennes
99bbe40154 Addon Manager: Work around stylesheet problem in Qt 5.9 2021-12-31 11:00:02 -06:00
Chris Hennes
ae5391eaf9 Addon Manager: Clean up report window output 2021-12-30 20:06:22 -06:00
Chris Hennes
80b95225f8 Addon Manager: Add Check for updates button 2021-12-29 22:50:23 -06:00
Chris Hennes
f429a3630e Addon Manager: Fix github macro update code 2021-12-21 17:23:02 -06:00
Chris Hennes
b371487224 Addon Manager: Correct macro installation location 2021-12-21 14:48:35 -06:00
Chris Hennes
b2fbf64b37 Addon Manager: Add Qt.Tool window flag 2021-12-20 16:12:02 -06:00
Chris Hennes
acfde1a4b6 Addon Manager: Bug fixes for detailed display 2021-12-18 20:29:42 -06:00
Chris Hennes
787b1e0f56 Addon Manager: Black reformatting 2021-12-18 20:29:42 -06:00
Chris Hennes
ef09c0af16 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
52da213a3c Addon Manager: Improve cache behavior
Also includes a number of bug fixes.
2021-12-18 20:29:42 -06:00
Chris Hennes
c6383e77f8 Addon Manager: Implement preferences in standard dialog 2021-12-18 20:29:42 -06:00
Chris Hennes
a0992902de 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
bd6b3eb404 Addon Manager: Bugfixes and cleanup of refactor 2021-12-18 20:29:42 -06:00
Chris Hennes
768a0f086f 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
mwganson
7cf6230a00 [AddonManager] -- put Restart now and Restart later as button text instead of in the dialog text 2021-10-05 22:38:00 -05:00
luz paz
2845078459 AddonManager: Consolidate preference in user.cfg from Plugins to Addons
Currently when a user first uses the Addon Manager a dialog popup
prompts them about how FC is not liable for the code plugin authors
provide. It stores the binary response in a `readWarning` boolean
within the user.cfg file.

This commit changes the location of said boolean from
`User parameter:Plugins` to `User parameter:Addons`.

It also migrates old the old setting if available.

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
Add suggestions from @chennes

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2021-08-20 10:59:23 -04:00
Yorik van Havre
3ef181a751 AddonManager: Fixed missing WB icons 2021-02-23 18:01:04 +01:00
Alex Young
bb501c336f AddonManager: removes unused imports
This patch removes all the unused imports in the AddonManager module as flagged by LGTM.
2021-02-14 21:08:23 +01:00
Matsievskiy S.V
dde64d4a0a AddonManager: update python source formatting
Update formatting in compliance with pep8 with the following exceptions:

 * truncate to 120 characters in line

 * prefer double quotes `"` to single quotes `'` in strings
2020-10-01 09:53:34 +02:00
0penBrain
9925297da9 [AddonManager] Fix issue in Execute 2020-04-01 13:27:27 +02:00
triplus
20c0a7c1eb Addons manager - check if macro icon path exists [skip ci]
I noticed Macros tab suffers from the same issue: https://github.com/FreeCAD/FreeCAD/pull/3015

Hence the same fix.
2020-02-12 12:20:19 +01:00
triplus
c21a015404 Addons manager - check if icon file exists [skip ci]
Currently .isNull is used, to detect icon validity, but such method doesn't take the file path detection into an account. Result being a lot of messages outputted to the Report view and fallback icon not being used.

This PR fixes such icon path related issues.
2020-02-06 23:08:24 +01:00
triplus
b5b32c8aa8 Addons manager close button 2020-02-05 10:50:35 +01:00
Zackles
d7d88da291 Add Proxy to Addon Manager with UI
Correct crash when Macro description is not reachable

Python crashed when under proxy - Macro list is charged - Proxy is undone ( internet connection lost) - Try to load macro description (u=None)

Add Proxy setting in Addon Manager Option UI

Correction of SSL context

Replace ssl.Purpose.CLIENT_AUTH by ssl.Purpose.SERVER_AUTH as context for a client

Add configuration of proxy setting UI

Add proxy management by urllib
2020-01-10 10:01:56 +01:00