UI: Help menu minor tweaks

Show "Operators Cheatsheet" and Python API link only when developers extra is enabled.
Fix URL for User Communities, Developer Community and Release Notes (which 404s
now just like the wiki anyway since the page for 2.80 is being made).
This commit is contained in:
Pablo Vazquez 2018-07-27 02:02:11 +02:00
parent cb42850ef2
commit 7d768fc855

@ -495,12 +495,26 @@ class INFO_MT_help(Menu):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
show_developer = context.user_preferences.view.show_developer_ui
layout.operator( layout.operator(
"wm.url_open", text="Manual", icon='HELP', "wm.url_open", text="Manual", icon='HELP',
).url = "https://docs.blender.org/manual/en/dev/" ).url = "https://docs.blender.org/manual/en/dev/"
layout.operator( layout.operator(
"wm.url_open", text="Release Log", icon='URL', "wm.url_open", text="Report a Bug", icon='URL',
).url = "http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/%d.%d" % bpy.app.version[:2] ).url = "https://developer.blender.org/maniphest/task/edit/form/1"
layout.separator()
layout.operator(
"wm.url_open", text="User Communities", icon='URL',
).url = "https://www.blender.org/community/"
layout.operator(
"wm.url_open", text="Developer Community", icon='URL',
).url = "https://www.blender.org/get-involved/developers/"
layout.separator() layout.separator()
layout.operator( layout.operator(
@ -509,24 +523,22 @@ class INFO_MT_help(Menu):
layout.operator( layout.operator(
"wm.url_open", text="Blender Store", icon='URL', "wm.url_open", text="Blender Store", icon='URL',
).url = "https://store.blender.org" ).url = "https://store.blender.org"
layout.operator( layout.operator(
"wm.url_open", text="Developer Community", icon='URL', "wm.url_open", text="Release Notes", icon='URL',
).url = "https://www.blender.org/get-involved/" ).url = "https://www.blender.org/download/releases/%d-%d/" % bpy.app.version[:2]
layout.operator(
"wm.url_open", text="User Community", icon='URL',
).url = "https://www.blender.org/support/user-community"
layout.separator()
layout.operator(
"wm.url_open", text="Report a Bug", icon='URL',
).url = "https://developer.blender.org/maniphest/task/edit/form/1"
layout.separator() layout.separator()
if show_developer:
layout.operator( layout.operator(
"wm.url_open", text="Python API Reference", icon='URL', "wm.url_open", text="Python API Reference", icon='URL',
).url = bpy.types.WM_OT_doc_view._prefix ).url = bpy.types.WM_OT_doc_view._prefix
layout.operator("wm.operator_cheat_sheet", icon='TEXT') layout.operator("wm.operator_cheat_sheet", icon='TEXT')
layout.operator("wm.sysinfo", icon='TEXT')
layout.operator("wm.sysinfo")
layout.separator() layout.separator()
layout.operator("wm.splash", icon='BLENDER') layout.operator("wm.splash", icon='BLENDER')