diff --git a/src/Mod/AddonManager/AddonManager.py b/src/Mod/AddonManager/AddonManager.py
index 07a655ec53..416569c1c1 100644
--- a/src/Mod/AddonManager/AddonManager.py
+++ b/src/Mod/AddonManager/AddonManager.py
@@ -79,6 +79,10 @@ class CommandAddonManager:
lock = threading.Lock()
+ def __init__(self):
+ FreeCADGui.addPreferencePage(os.path.join(os.path.dirname(__file__),
+ "AddonManagerOptions.ui"),"Addon Manager")
+
def GetResources(self) -> Dict[str,str]:
return {"Pixmap": "AddonManager",
"MenuText": QT_TRANSLATE_NOOP("Std_AddonMgr", "&Addon manager"),
@@ -129,12 +133,21 @@ class CommandAddonManager:
h = pref.GetInt("WindowHeight", 600)
self.dialog.resize(w, h)
- # figure out our cache update frequency:
+ # figure out our cache update frequency: there is a combo box in the preferences dialog with three
+ # options: never, daily, and weekly. Check that first, but allow it to be overridden by a more specific
+ # DaysBetweenUpdates selection, if the user has provided it. For that parameter we use:
# -1: Only manual updates (default)
# 0: Update every launch
# >0: Update every n days
self.update_cache = False
- days_between_updates = pref.GetInt("DaysBetweenUpdates", -1)
+ update_frequency = pref.GetInt("UpdateFrequencyComboEntry", 0)
+ if update_frequency == 0:
+ days_between_updates = -1
+ elif update_frequency == 1:
+ days_between_updates = 1
+ elif update_frequency == 2:
+ days_between_updates = 7
+ days_between_updates = pref.GetInt("DaysBetweenUpdates", days_between_updates)
last_cache_update_string = pref.GetString("LastCacheUpdate", "never")
cache_path = FreeCAD.getUserCachePath()
am_path = os.path.join(cache_path,"AddonManager")
diff --git a/src/Mod/AddonManager/AddonManagerOptions.ui b/src/Mod/AddonManager/AddonManagerOptions.ui
index c6588394f1..f291ed89c5 100644
--- a/src/Mod/AddonManager/AddonManagerOptions.ui
+++ b/src/Mod/AddonManager/AddonManagerOptions.ui
@@ -1,13 +1,13 @@
- Dialog
-
+ Gui::Dialog::DlgSettingsAddonManager
+
0
0
390
- 247
+ 628
@@ -15,7 +15,7 @@
-
-
+
If this option is selected, when launching the Addon Manager,
installed addons will be checked for available updates
@@ -27,8 +27,56 @@ installed addons will be checked for available updates
false
+
+ AutoCheck
+
+
+ Addons
+
+ -
+
+
-
+
+
+ Cache update frequency
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ UpdateFrequencyComboEntry
+
+
+ Addons
+
+
-
+
+ Manual (no automatic updates)
+
+
+ -
+
+ Daily
+
+
+ -
+
+ Weekly
+
+
+
+
+
+
-
@@ -37,99 +85,147 @@ installed addons will be checked for available updates
-
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 24
+
+
+
+
+ 0
+ 48
+
+
You can use this window to specify additional addon repositories
-to be scanned for available addons
+to be scanned for available addons. To include a specific branch, add it to the end
+of the line after a space (e.g. https://github.com/FreeCAD/FreeCAD master).
+
+
+ CustomRepositories
+
+
+ Addons
-
-
+
+
+ Proxy
+
+
+
-
+
+
+ No proxy
+
+
+ NoProxyCheck
+
+
+ Addons
+
+
+
+ -
+
+
+ User system proxy
+
+
+ SystemProxyCheck
+
+
+ Addons
+
+
+
+ -
+
+
+ User-defined proxy:
+
+
+ true
+
+
+ UserProxyCheck
+
+
+ Addons
+
+
+
+ -
+
+
+
+ 0
+ 24
+
+
+
+ ProxyUrl
+
+
+ Addons
+
+
+
+
+
+
+ -
+
- Qt::Horizontal
+ Qt::Vertical
-
-
- -
-
-
- Proxy
+
+
+ 20
+ 40
+
-
-
- -
-
-
- No proxy
-
-
-
- -
-
-
- User system proxy
-
-
-
- -
-
-
- User defined proxy :
-
-
- true
-
-
-
- -
-
-
- -
-
-
- Qt::Horizontal
-
-
- QDialogButtonBox::Cancel|QDialogButtonBox::Ok
-
-
+
+
+
+ Gui::PrefCheckBox
+ QCheckBox
+
+
+
+ Gui::PrefComboBox
+ QComboBox
+
+
+
+ Gui::PrefTextEdit
+ QTextEdit
+
+
+
+ Gui::PrefRadioButton
+ QRadioButton
+
+
+
+ Gui::PrefLineEdit
+ QLineEdit
+
+
+
-
-
- buttonBox
- accepted()
- Dialog
- accept()
-
-
- 257
- 237
-
-
- 157
- 246
-
-
-
-
- buttonBox
- rejected()
- Dialog
- reject()
-
-
- 325
- 237
-
-
- 286
- 246
-
-
-
-
+
diff --git a/src/Mod/AddonManager/Resources/AddonManager.qrc b/src/Mod/AddonManager/Resources/AddonManager.qrc
index be3f70b57d..71aaa095d3 100644
--- a/src/Mod/AddonManager/Resources/AddonManager.qrc
+++ b/src/Mod/AddonManager/Resources/AddonManager.qrc
@@ -1,5 +1,6 @@
+ icons/preferences-addon_manager.svg
icons/3D_Printing_Tools_workbench_icon.svg
icons/A2plus_workbench_icon.svg
icons/AirPlaneDesign_workbench_icon.svg
diff --git a/src/Mod/AddonManager/Resources/icons/preferences-addon_manager.svg b/src/Mod/AddonManager/Resources/icons/preferences-addon_manager.svg
new file mode 100644
index 0000000000..f630e855ac
--- /dev/null
+++ b/src/Mod/AddonManager/Resources/icons/preferences-addon_manager.svg
@@ -0,0 +1,521 @@
+
+
+
+