Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2018-03-09 23:17:43 +0300
committerJulian Eisel <eiseljulian@gmail.com>2018-03-09 23:22:24 +0300
commit41b38c5f75b371e3897685fd9a4cb953a4aa65ff (patch)
treed72e7e0bf12bc9fdba24e7eb364422a9d2a9dce0 /release/scripts
parent14e7ba0c8ac7f229a1b025103a786f267dfb9387 (diff)
Don't add "Report a Bug" button for official tracker to non-official add-ons
If no custom URL was set, add-ons would get a "Report a Bug" button opening the default developer.blender.org bug tracker. Now we only add this default button if the add-on is bundled and not installed by the user.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index ce3d6fffbb3..e61a6abbbca 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1513,12 +1513,15 @@ class USERPREF_PT_addons(Panel):
split.operator(
"wm.url_open", text="Documentation", icon='HELP',
).url = info["wiki_url"]
- split.operator(
- "wm.url_open", text="Report a Bug", icon='URL',
- ).url = info.get(
- "tracker_url",
- "https://developer.blender.org/maniphest/task/edit/form/2",
- )
+ # Only add "Report a Bug" button if tracker_url is set
+ # or the add-on is bundled (use official tracker then).
+ if info.get("tracker_url") or not user_addon:
+ split.operator(
+ "wm.url_open", text="Report a Bug", icon='URL',
+ ).url = info.get(
+ "tracker_url",
+ "https://developer.blender.org/maniphest/task/edit/form/2",
+ )
if user_addon:
split.operator(
"wm.addon_remove", text="Remove", icon='CANCEL',