Commit Graph

28 Commits

Author SHA1 Message Date
Chris Hennes
aa1523dcd6 Addon Manager: Black reformat 2022-04-06 14:30:22 -05:00
Chris Hennes
70e3b0874b Addon Manager: Fix display of Macro wiki details 2022-03-29 15:47:15 -05:00
Chris Hennes
c1d86b2f0b Addon Manager: Refactor to improve testability 2022-03-09 23:14:59 -06:00
Chris Hennes
17aed10f6f Addon Manager: Renaming and cleanup 2022-02-27 22:50:54 -06:00
Chris Hennes
2b637a36f7 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
18c7ef6370 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
ff67ebce8a Addon Manager: Add GUI for enabling/disabling addons 2022-02-20 22:09:57 -06:00
Chris Hennes
964ff6428b Addon Manager: Improve macro metadata extraction 2022-02-18 17:10:52 -06:00
Chris Hennes
6396c33959 Addon Manager: Black reformat 2022-02-18 08:38:57 -06:00
Chris Hennes
14db94ee2d 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
db80d65865 Addon Manager: Fix bug in macro git state 2022-02-14 21:56:13 -06:00
Chris Hennes
5ca1477d93 Addon Manager: Make branch switching scarier 2022-02-13 20:19:32 -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
ec91c97739 Addon Manager: Check for requires newer FreeCAD 2022-02-10 15:25:40 -06:00
Chris Hennes
d34d4e9d44 Addon Manager: Add timeout to page load 2022-02-05 13:11:10 -06:00
Chris Hennes
da4d04f59c Addon Manager: Fallback when QtWebEngine is missing 2022-02-04 10:28:17 -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
172243138a Addon Manager: Improve display of installation details 2022-01-01 11:41:23 -06:00
Chris Hennes
7d3c6b0cce Addon Manager: Improve macro scanning performance 2022-01-01 09:16:32 -06:00
Chris Hennes
a6e8e04d99 Addon Manager: Work around stylesheet problem in Qt 5.9 2021-12-31 11:00:02 -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
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