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:
authorThomas Dinges <blender@dingto.org>2010-05-31 15:38:13 +0400
committerThomas Dinges <blender@dingto.org>2010-05-31 15:38:13 +0400
commitccda04131a7e1a8d6d011e6d3453979b540f5d52 (patch)
treef88344fe7d605f87464d0e7d19def19d020fe87a /release/scripts/ui/space_userpref.py
parentbff5410504c5bfe9ab898f22cba9a7519cba53c9 (diff)
Python Open Link operator.
* Unified some code for Opening an URL to use only one operator: WM_OT_url_open * Removed the HELP_OT_url operators.
Diffstat (limited to 'release/scripts/ui/space_userpref.py')
-rw-r--r--release/scripts/ui/space_userpref.py20
1 files changed, 3 insertions, 17 deletions
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py
index 1a8c1f04d6a..d0d91c2accf 100644
--- a/release/scripts/ui/space_userpref.py
+++ b/release/scripts/ui/space_userpref.py
@@ -1224,9 +1224,9 @@ class USERPREF_PT_addons(bpy.types.Panel):
split = column.row().split(percentage=0.15)
split.label(text="Internet:")
if info["wiki_url"]:
- split.operator("wm.addon_links", text="Link to the Wiki").link = info["wiki_url"]
+ split.operator("wm.url_open", text="Link to the Wiki", icon='HELP').url = info["wiki_url"]
if info["tracker_url"]:
- split.operator("wm.addon_links", text="Report a Bug").link = info["tracker_url"]
+ split.operator("wm.url_open", text="Report a Bug", icon='URL').url = info["tracker_url"]
if info["wiki_url"] and info["tracker_url"]:
split.separator()
@@ -1421,19 +1421,6 @@ class WM_OT_addon_expand(bpy.types.Operator):
return {'FINISHED'}
-class WM_OT_addon_links(bpy.types.Operator):
- "Open a website in the webbrowser"
- bl_idname = "wm.addon_links"
- bl_label = ""
-
- link = StringProperty(name="Link", description="Link to open")
-
- def execute(self, context):
- import webbrowser
- webbrowser.open(self.properties.link)
- return {'FINISHED'}
-
-
classes = [
USERPREF_HT_header,
USERPREF_PT_tabs,
@@ -1451,8 +1438,7 @@ classes = [
WM_OT_addon_enable,
WM_OT_addon_disable,
WM_OT_addon_install,
- WM_OT_addon_expand,
- WM_OT_addon_links]
+ WM_OT_addon_expand]
def register():