Commit Graph

42 Commits

Author SHA1 Message Date
mosfet80
3137dea940 remove Python2 code 2023-03-04 17:51:43 -06:00
Chris Hennes
0da14beb27 Addon Manager: Correct typo 2023-03-01 21:21:37 -06:00
Chris Hennes
43cc8b12c1 Addon Manager: Cleanup package_details.py 2023-02-20 21:09:51 -06:00
Chris Hennes
9c6164bc07 Addon Manager: Add SPDX license ID to all files 2023-02-20 15:39:47 -06:00
Chris Hennes
c8b65c91ce Addon Manager: Reload page when following links
Partially addresses #8361 by ensuring that when an external link is followed, the internal page gets reloaded instead of showing an error page.
2023-02-10 12:19:44 -07:00
Chris Hennes
e188802ca6 Addon Manager: Update license headers 2023-01-28 13:07:29 -07:00
Chris Hennes
89c191e160 Addon Manager: Refactor installation code
Improve testability of installation code by refactoring it to completely
separate the GUI and non-GUI code, and to provide more robust support
for non-GUI access to some type of Addon Manager activity.
2022-12-17 17:49:13 -06:00
luz paz
21eddcb15e Addon Manager: Fix trailing whitespace 2022-11-30 12:46:02 +01:00
Chris Hennes
b407332475 Addon Manager: Qt6 migration part 1, use PySide
Migrate all uses of "import PySide 2" to use "import PySide" so that the
FreeCAD-provided wrappers can switch between Qt versions.
2022-11-06 13:19:36 +01:00
Chris Hennes
46fc605fca Addon Manager: Refactoring and pylint cleanup 2022-08-21 14:32:15 -05:00
Chris Hennes
9250850c9c Addon Manager: pylint cleanup in startup workers 2022-08-10 09:17:02 -05:00
Chris Hennes
4c63094331 Addon Manager: Worker refactor (round 1) 2022-08-09 10:23:26 -05:00
luz paz
8ee6e78f7d AddonManager: Fix source comment typos
[skip ci]
2022-08-02 16:35:03 -04:00
Chris Hennes
19f07586c9 Addon Manager: pylint cleanup of list diplay 2022-07-31 15:38:42 -05:00
Chris Hennes
1480c1f594 Addon Manager: Black reformat 2022-04-06 14:30:22 -05:00
Chris Hennes
49b5e7b0c4 Addon Manager: Fix display of Macro wiki details 2022-03-29 15:47:15 -05:00
Chris Hennes
c2055689a5 Addon Manager: Refactor to improve testability 2022-03-09 23:14:59 -06:00
Chris Hennes
0d6a506447 Addon Manager: Renaming and cleanup 2022-02-27 22:50:54 -06:00
Chris Hennes
1a7fcd575e Addon Manager: Auto-create toolbar button
When installing a macro, prompt user to install a toolbar button
automatically. Fills in the details of the button using the macro's
metadata, including an icon if the __icon__ metadata variable points to
a file.

Also:
* Support XPM data for macro icon
* Support online icons
* Fix bug in macro uninstall
* Cleaned up macro code
2022-02-26 21:06:37 -06:00
Chris Hennes
a3d8a0e635 Addon Manager: Show correct buttons when no git
If git and/or GitPython are not installed, the Addon Manager cannot
check to see if there are any available updates. In that case, show
the "Uninstall" and "Update" buttons. If no update is available,
clicking the update button will simply download a new copy of the
addon.
2022-02-23 17:02:23 -06:00
Chris Hennes
a21b99fed2 Addon Manager: Add GUI for enabling/disabling addons 2022-02-20 22:09:57 -06:00
Chris Hennes
781f0bd626 Addon Manager: Improve macro metadata extraction 2022-02-18 17:10:52 -06:00
Chris Hennes
d357d59c02 Addon Manager: Black reformat 2022-02-18 08:38:57 -06:00
Chris Hennes
524992b8db Addon Manager: Correct macro display
If the "download macros" preference is off, the macro will not yet have
a URL to load the data from. Make sure to load the macro before
attempting to display it. Also resolves the issue with macros being
unable to be installed under similar circumstances.
2022-02-17 17:28:52 -06:00
Chris Hennes
0ce24d985f Addon Manager: Fix bug in macro git state 2022-02-14 21:56:13 -06:00
Chris Hennes
8edc1ebe73 Addon Manager: Make branch switching scarier 2022-02-13 20:19:32 -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
ba42231b9c Addon Manager: Check for requires newer FreeCAD 2022-02-10 15:25:40 -06:00
Chris Hennes
fa5cec69f9 Addon Manager: Add timeout to page load 2022-02-05 13:11:10 -06:00
Chris Hennes
57a5143864 Addon Manager: Fallback when QtWebEngine is missing 2022-02-04 10:28:17 -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
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
f48d79a227 Addon Manager: Improve display of installation details 2022-01-01 11:41:23 -06:00
Chris Hennes
c746be388f Addon Manager: Improve macro scanning performance 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
06774459ba Addon Manager: Add option to hide obsolete and py2 addons 2021-12-30 21:36:32 -06:00
Chris Hennes
ae5391eaf9 Addon Manager: Clean up report window output 2021-12-30 20:06:22 -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
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