Commit Graph

354 Commits

Author SHA1 Message Date
Chris Hennes
17aed10f6f Addon Manager: Renaming and cleanup 2022-02-27 22:50:54 -06:00
0penBrain
4db58c2c6e AddonManager: improve dark mode heuristic 2022-02-27 18:44:58 -06:00
Chris Hennes
51fc82b6cf Addon Manager: Add packages requested by Ickby 2022-02-26 21:40:12 -06:00
Chris Hennes
b8d01aa269 Addon Manager: Add wiki macro icon scraping 2022-02-26 21:06:37 -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
386f68aa81 Addon Manager: Add unit test framework
Adds the framework for unit testing, and a few tests of the utilities functions.
2022-02-25 23:17:59 -06:00
Chris Hennes
27a7c60802 Addon Manager: Minor improvements to utilities 2022-02-25 20:41:03 -06:00
Chris Hennes
038d9cfb2f Addon Manager: Improve darkmode check 2022-02-24 12:05:08 -06:00
Chris Hennes
e0c45fe763 Addon Manager: Remove restart need for pref packs
The actual need to restart was removed by aaf4fad0c, this commit
updates the Addon Manager user interface to stop telling the user
they need to restart. Now restarting is only required for addons
that contain workbenches. Macros and pref packs to not need a
restart.
2022-02-24 09:49:15 -06:00
Chris Hennes
416ef8bf82 Addon Manager: Switch cache strategy to PreferNetwork 2022-02-24 09:25:02 -06:00
Chris Hennes
1d13bf8b44 Addon Manager: Fix compact view tag label 2022-02-24 09:16:07 -06:00
Chris Hennes
5eb081363b Addon Manager: Fix corrupted ZIP downloads
The code that followed redirects was resulting in a double-download
of the data. This corrects the problem by manually re-queueing a
new network request for each redirect, instead of trying to tell the
QNetworkAccessManager to follow them automatically.
2022-02-23 20:37:27 -06:00
Chris Hennes
e7ca40623c Addon Manager: Minor fixes and error tweaks
* Correct display of tags in list view
* Add error checking for branch name and url match
* Convert some messages to logs
2022-02-23 18:32:05 -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
Uwe
933484e387 fix more typos to silence the spellchecker CI 2022-02-21 13:20:06 +01:00
Chris Hennes
ff67ebce8a Addon Manager: Add GUI for enabling/disabling addons 2022-02-20 22:09:57 -06:00
luz paz
a937fa7ee2 AddonManager: move superfluous whitespace out of translation [skip ci] 2022-02-20 16:40:40 -06:00
Chris Hennes
964ff6428b Addon Manager: Improve macro metadata extraction 2022-02-18 17:10:52 -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
d1edc70001 Addon Manager: Add error checking for proxy setup
Also make a minor tweak to the enabled status of the check all for updates button.
2022-02-18 08:37:20 -06:00
Chris Hennes
ad3449e81b Addon Manager: Force recache on custom repo change 2022-02-17 19:17:09 -06:00
Chris Hennes
e000430696 Addon Manager: Improve manual update display 2022-02-17 19:00: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
212e19eaad Addon Manager: Fix missing update button connection 2022-02-17 18:26:24 -06:00
Chris Hennes
2760b13701 Addon Manager: Fix custom repos ending in .git 2022-02-17 18:03:14 -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
a0ce80ce2d Addon Manager: Better failure diagnostics 2022-02-15 22:55:59 -06:00
Chris Hennes
97d1c114d0 Addon Manager: Fix race condition 2022-02-15 13:04:49 -06:00
Chris Hennes
db80d65865 Addon Manager: Fix bug in macro git state 2022-02-14 21:56:13 -06:00
Yorik van Havre
e1028eb65e Merged crowdin translations 2022-02-14 12:31:57 +01:00
Yorik van Havre
93fc8c5357 Updated ts files 2022-02-14 12:31:47 +01: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
e6126eb2dc Addon Manager: Fix tags on compact view 2022-02-02 13:49:41 -06:00
Yorik van Havre
d7c5800da2 Merged crowdin translations 2022-02-01 12:59:42 +01:00
Yorik van Havre
5bdd1699f4 Updated ts files 2022-02-01 12:54:40 +01:00
Chris Hennes
7959ebced5 Addon Manager: Correct display of Maintainers 2022-01-31 19:28:06 -06:00
Chris Hennes
2ac7052236 Addon Manager: Add search and display of tags 2022-01-31 15:24:40 -06:00
Chris Hennes
e702d0aef2 Addon Manager: Run uninstall.py when uninstalling AddOn 2022-01-27 23:34:18 -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
e71c9a91af AddonManager: Correct bug with older Qt data 2022-01-27 10:48:25 -06:00
Chris Hennes
77be240b68 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
bfcf054284 Addon Manager: Refactor to eliminate extra event loop 2022-01-26 22:02:08 -06:00
Chris Hennes
8809ed4253 Addon Manager: Improve startup speed 2022-01-26 18:41:14 -06:00