Patch #32326: NDOF support of rotation and panning the view at the same time
[blender.git] / release / scripts / startup / bl_ui / space_userpref.py
index a31d4791e72ab845aac242256e65dd51ec49b212..b0b587056b1345ca0b997c45b30858401470a8d4 100644 (file)
 
 # <pep8 compliant>
 import bpy
-from bpy.types import Header, Menu, Operator, Panel
+from bpy.types import Header, Menu, Panel
 import os
 import addon_utils
 
-from bpy.props import StringProperty, BoolProperty, EnumProperty
-from blf import gettext as _
-
 
 def ui_items_general(col, context):
     """ General UI Theme Settings (User Interface)
@@ -66,10 +63,10 @@ def opengl_lamp_buttons(column, lamp):
     col = split.column()
     col.active = lamp.use
     row = col.row()
-    row.label(text=_("Diffuse:"))
+    row.label(text="Diffuse:")
     row.prop(lamp, "diffuse_color", text="")
     row = col.row()
-    row.label(text=_("Specular:"))
+    row.label(text="Specular:")
     row.prop(lamp, "specular_color", text="")
 
     col = split.column()
@@ -82,23 +79,25 @@ class USERPREF_HT_header(Header):
 
     def draw(self, context):
         layout = self.layout
+
         layout.template_header(menus=False)
 
         userpref = context.user_preferences
 
         layout.operator_context = 'EXEC_AREA'
-        layout.operator("wm.save_homefile", text=_("Save As Default"))
+        layout.operator("wm.save_homefile", text="Save As Default")
 
         layout.operator_context = 'INVOKE_DEFAULT'
 
         if userpref.active_section == 'INPUT':
-            layout.operator("wm.keyconfig_export")
             layout.operator("wm.keyconfig_import")
+            layout.operator("wm.keyconfig_export")
         elif userpref.active_section == 'ADDONS':
             layout.operator("wm.addon_install")
             layout.menu("USERPREF_MT_addons_dev_guides")
         elif userpref.active_section == 'THEMES':
             layout.operator("ui.reset_default_theme")
+            layout.operator("wm.theme_install")
 
 
 class USERPREF_PT_tabs(Panel):
@@ -128,7 +127,7 @@ class USERPREF_MT_appconfigs(Menu):
     preset_operator = "wm.appconfig_activate"
 
     def draw(self, context):
-        self.layout.operator("wm.appconfig_default", text=_("Blender (default)"))
+        self.layout.operator("wm.appconfig_default", text="Blender (default)")
 
         # now draw the presets
         Menu.draw_preset(self, context)
@@ -139,16 +138,17 @@ class USERPREF_MT_splash(Menu):
 
     def draw(self, context):
         layout = self.layout
+
         split = layout.split()
         row = split.row()
         row.label("")
         row = split.row()
-        row.label(_("Interaction:"))
+        row.label("Interaction:")
         # XXX, no redraws
         # text = bpy.path.display_name(context.window_manager.keyconfigs.active.name)
         # if not text:
         #     text = "Blender (default)"
-        row.menu("USERPREF_MT_appconfigs", text=_("Preset"))
+        row.menu("USERPREF_MT_appconfigs", text="Preset")
 
 
 class USERPREF_PT_interface(Panel):
@@ -171,13 +171,13 @@ class USERPREF_PT_interface(Panel):
         row = layout.row()
 
         col = row.column()
-        col.label(text=_("Display:"))
+        col.label(text="Display:")
         col.prop(view, "show_tooltips")
         col.prop(view, "show_tooltips_python")
-        col.prop(view, "show_object_info", text=_("Object Info"))
+        col.prop(view, "show_object_info", text="Object Info")
         col.prop(view, "show_large_cursors")
-        col.prop(view, "show_view_name", text=_("View Name"))
-        col.prop(view, "show_playback_fps", text=_("Playback FPS"))
+        col.prop(view, "show_view_name", text="View Name")
+        col.prop(view, "show_playback_fps", text="Playback FPS")
         col.prop(view, "use_global_scene")
         col.prop(view, "object_origin_size")
 
@@ -185,19 +185,20 @@ class USERPREF_PT_interface(Panel):
         col.separator()
         col.separator()
 
-        col.prop(view, "show_mini_axis", text=_("Display Mini Axis"))
+        col.prop(view, "show_mini_axis", text="Display Mini Axis")
         sub = col.column()
         sub.active = view.show_mini_axis
-        sub.prop(view, "mini_axis_size", text=_("Size"))
-        sub.prop(view, "mini_axis_brightness", text=_("Brightness"))
+        sub.prop(view, "mini_axis_size", text="Size")
+        sub.prop(view, "mini_axis_brightness", text="Brightness")
 
         col.separator()
         row.separator()
         row.separator()
 
         col = row.column()
-        col.label(text=_("View Manipulation:"))
-        col.prop(view, "use_mouse_auto_depth")
+        col.label(text="View Manipulation:")
+        col.prop(view, "use_mouse_depth_cursor")
+        col.prop(view, "use_mouse_depth_navigate")
         col.prop(view, "use_zoom_to_mouse")
         col.prop(view, "use_rotate_around_active")
         col.prop(view, "use_global_pivot")
@@ -212,8 +213,8 @@ class USERPREF_PT_interface(Panel):
         col.separator()
         col.separator()
 
-        col.label(text=_("2D Viewports:"))
-        col.prop(view, "view2d_grid_spacing_min", text=_("Minimum Grid Spacing"))
+        col.label(text="2D Viewports:")
+        col.prop(view, "view2d_grid_spacing_min", text="Minimum Grid Spacing")
         col.prop(view, "timecode_style")
 
         row.separator()
@@ -229,24 +230,27 @@ class USERPREF_PT_interface(Panel):
         col.prop(view, "show_manipulator")
         sub = col.column()
         sub.active = view.show_manipulator
-        sub.prop(view, "manipulator_size", text=_("Size"))
-        sub.prop(view, "manipulator_handle_size", text=_("Handle Size"))
-        sub.prop(view, "manipulator_hotspot", text=_("Hotspot"))
+        sub.prop(view, "manipulator_size", text="Size")
+        sub.prop(view, "manipulator_handle_size", text="Handle Size")
+        sub.prop(view, "manipulator_hotspot", text="Hotspot")
 
         col.separator()
         col.separator()
         col.separator()
 
-        col.label(text=_("Menus:"))
+        col.label(text="Menus:")
         col.prop(view, "use_mouse_over_open")
-        col.label(text=_("Menu Open Delay:"))
-        col.prop(view, "open_toplevel_delay", text=_("Top Level"))
-        col.prop(view, "open_sublevel_delay", text=_("Sub Level"))
+        col.label(text="Menu Open Delay:")
+        col.prop(view, "open_toplevel_delay", text="Top Level")
+        col.prop(view, "open_sublevel_delay", text="Sub Level")
 
         col.separator()
 
         col.prop(view, "show_splash")
 
+        if os.name == "nt":
+            col.prop(view, "quit_dialog")
+
 
 class USERPREF_PT_edit(Panel):
     bl_space_type = 'USER_PREFERENCES'
@@ -268,97 +272,102 @@ class USERPREF_PT_edit(Panel):
         row = layout.row()
 
         col = row.column()
-        col.label(text=_("Link Materials To:"))
+        col.label(text="Link Materials To:")
         col.prop(edit, "material_link", text="")
 
         col.separator()
         col.separator()
         col.separator()
 
-        col.label(text=_("New Objects:"))
+        col.label(text="New Objects:")
         col.prop(edit, "use_enter_edit_mode")
-        col.label(text=_("Align To:"))
+        col.label(text="Align To:")
         col.prop(edit, "object_align", text="")
 
         col.separator()
         col.separator()
         col.separator()
 
-        col.label(text=_("Undo:"))
+        col.label(text="Undo:")
         col.prop(edit, "use_global_undo")
-        col.prop(edit, "undo_steps", text=_("Steps"))
-        col.prop(edit, "undo_memory_limit", text=_("Memory Limit"))
+        col.prop(edit, "undo_steps", text="Steps")
+        col.prop(edit, "undo_memory_limit", text="Memory Limit")
 
         row.separator()
         row.separator()
 
         col = row.column()
-        col.label(text=_("Grease Pencil:"))
-        col.prop(edit, "grease_pencil_manhattan_distance", text=_("Manhattan Distance"))
-        col.prop(edit, "grease_pencil_euclidean_distance", text=_("Euclidean Distance"))
-        #col.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke")
-        col.prop(edit, "grease_pencil_eraser_radius", text=_("Eraser Radius"))
-        col.prop(edit, "use_grease_pencil_smooth_stroke", text=_("Smooth Stroke"))
+        col.label(text="Grease Pencil:")
+        col.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
+        col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
+        #col.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke")
+        col.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
+        col.prop(edit, "use_grease_pencil_smooth_stroke", text="Smooth Stroke")
         col.separator()
         col.separator()
         col.separator()
-        col.label(text=_("Playback:"))
+        col.label(text="Playback:")
         col.prop(edit, "use_negative_frames")
+        col.separator()
+        col.separator()
+        col.separator()
+        col.label(text="Animation Editors:")
+        col.prop(edit, "fcurve_unselected_alpha", text="F-Curve Visibility")
 
         row.separator()
         row.separator()
 
         col = row.column()
-        col.label(text=_("Keyframing:"))
+        col.label(text="Keyframing:")
         col.prop(edit, "use_visual_keying")
-        col.prop(edit, "use_keyframe_insert_needed", text=_("Only Insert Needed"))
+        col.prop(edit, "use_keyframe_insert_needed", text="Only Insert Needed")
 
         col.separator()
 
-        col.prop(edit, "use_auto_keying", text=_("Auto Keyframing:"))
+        col.prop(edit, "use_auto_keying", text="Auto Keyframing:")
 
         sub = col.column()
 
-        # sub.active = edit.use_keyframe_insert_auto # incorrect, timeline can enable
-        sub.prop(edit, "use_keyframe_insert_available", text=_("Only Insert Available"))
+        #~ sub.active = edit.use_keyframe_insert_auto # incorrect, time-line can enable
+        sub.prop(edit, "use_keyframe_insert_available", text="Only Insert Available")
 
         col.separator()
 
-        col.label(text=_("New F-Curve Defaults:"))
-        col.prop(edit, "keyframe_new_interpolation_type", text=_("Interpolation"))
-        col.prop(edit, "keyframe_new_handle_type", text=_("Handles"))
-        col.prop(edit, "use_insertkey_xyz_to_rgb", text=_("XYZ to RGB"))
+        col.label(text="New F-Curve Defaults:")
+        col.prop(edit, "keyframe_new_interpolation_type", text="Interpolation")
+        col.prop(edit, "keyframe_new_handle_type", text="Handles")
+        col.prop(edit, "use_insertkey_xyz_to_rgb", text="XYZ to RGB")
 
         col.separator()
         col.separator()
         col.separator()
 
-        col.label(text=_("Transform:"))
+        col.label(text="Transform:")
         col.prop(edit, "use_drag_immediately")
 
         row.separator()
         row.separator()
 
         col = row.column()
-        col.prop(edit, "sculpt_paint_overlay_color", text=_("Sculpt Overlay Color"))
+        col.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color")
 
         col.separator()
         col.separator()
         col.separator()
 
-        col.label(text=_("Duplicate Data:"))
-        col.prop(edit, "use_duplicate_mesh", text=_("Mesh"))
-        col.prop(edit, "use_duplicate_surface", text=_("Surface"))
-        col.prop(edit, "use_duplicate_curve", text=_("Curve"))
-        col.prop(edit, "use_duplicate_text", text=_("Text"))
-        col.prop(edit, "use_duplicate_metaball", text=_("Metaball"))
-        col.prop(edit, "use_duplicate_armature", text=_("Armature"))
-        col.prop(edit, "use_duplicate_lamp", text=_("Lamp"))
-        col.prop(edit, "use_duplicate_material", text=_("Material"))
-        col.prop(edit, "use_duplicate_texture", text=_("Texture"))
-        #col.prop(edit, "use_duplicate_fcurve", text=_("F-Curve"))
-        col.prop(edit, "use_duplicate_action", text=_("Action"))
-        col.prop(edit, "use_duplicate_particle", text=_("Particle"))
+        col.label(text="Duplicate Data:")
+        col.prop(edit, "use_duplicate_mesh", text="Mesh")
+        col.prop(edit, "use_duplicate_surface", text="Surface")
+        col.prop(edit, "use_duplicate_curve", text="Curve")
+        col.prop(edit, "use_duplicate_text", text="Text")
+        col.prop(edit, "use_duplicate_metaball", text="Metaball")
+        col.prop(edit, "use_duplicate_armature", text="Armature")
+        col.prop(edit, "use_duplicate_lamp", text="Lamp")
+        col.prop(edit, "use_duplicate_material", text="Material")
+        col.prop(edit, "use_duplicate_texture", text="Texture")
+        #col.prop(edit, "use_duplicate_fcurve", text="F-Curve")
+        col.prop(edit, "use_duplicate_action", text="Action")
+        col.prop(edit, "use_duplicate_particle", text="Particle")
 
 
 class USERPREF_PT_system(Panel):
@@ -385,78 +394,82 @@ class USERPREF_PT_system(Panel):
         colsplit = column.split(percentage=0.85)
 
         col = colsplit.column()
-        col.label(text=_("General:"))
+        col.label(text="General:")
         col.prop(system, "dpi")
         col.prop(system, "frame_server_port")
-        col.prop(system, "scrollback", text=_("Console Scrollback"))
-        col.prop(system, "author", text=_("Author"))
-        col.prop(system, "use_scripts_auto_execute")
-        col.prop(system, "use_tabs_as_spaces")
+        col.prop(system, "scrollback", text="Console Scrollback")
 
-        col.separator()
         col.separator()
         col.separator()
 
-        col.label(text=_("Sound:"))
+        col.label(text="Sound:")
         col.row().prop(system, "audio_device", expand=True)
         sub = col.column()
         sub.active = system.audio_device != 'NONE'
         #sub.prop(system, "use_preview_images")
-        sub.prop(system, "audio_channels", text=_("Channels"))
-        sub.prop(system, "audio_mixing_buffer", text=_("Mixing Buffer"))
-        sub.prop(system, "audio_sample_rate", text=_("Sample Rate"))
-        sub.prop(system, "audio_sample_format", text=_("Sample Format"))
+        sub.prop(system, "audio_channels", text="Channels")
+        sub.prop(system, "audio_mixing_buffer", text="Mixing Buffer")
+        sub.prop(system, "audio_sample_rate", text="Sample Rate")
+        sub.prop(system, "audio_sample_format", text="Sample Format")
 
-        col.separator()
         col.separator()
         col.separator()
 
-        col.label(text=_("Screencast:"))
+        col.label(text="Screencast:")
         col.prop(system, "screencast_fps")
         col.prop(system, "screencast_wait_time")
-        col.separator()
+
         col.separator()
         col.separator()
 
+        if hasattr(system, "compute_device"):
+            col.label(text="Compute Device:")
+            col.row().prop(system, "compute_device_type", expand=True)
+            sub = col.row()
+            sub.active = system.compute_device_type != 'CPU'
+            sub.prop(system, "compute_device", text="")
+
         # 2. Column
         column = split.column()
         colsplit = column.split(percentage=0.85)
 
         col = colsplit.column()
-        col.label(text=_("OpenGL:"))
+        col.label(text="OpenGL:")
         col.prop(system, "gl_clip_alpha", slider=True)
         col.prop(system, "use_mipmaps")
-        col.label(text=_("Anisotropic Filtering"))
+        col.prop(system, "use_gpu_mipmap")
+        col.prop(system, "use_16bit_textures")
+        col.label(text="Anisotropic Filtering")
         col.prop(system, "anisotropic_filter", text="")
         col.prop(system, "use_vertex_buffer_objects")
-        #Anti-aliasing is disabled as it breaks broder/lasso select
-        #col.prop(system, "use_antialiasing")
-        col.label(text=_("Window Draw Method:"))
+        # Anti-aliasing is disabled as it breaks border/lasso select
+        #col.prop(system, "use_antialiasing")
+        col.label(text="Window Draw Method:")
         col.prop(system, "window_draw_method", text="")
-        col.label(text=_("Text Draw Options:"))
+        col.label(text="Text Draw Options:")
         col.prop(system, "use_text_antialiasing")
-        col.label(text=_("Textures:"))
-        col.prop(system, "gl_texture_limit", text=_("Limit Size"))
-        col.prop(system, "texture_time_out", text=_("Time Out"))
-        col.prop(system, "texture_collection_rate", text=_("Collection Rate"))
+        col.label(text="Textures:")
+        col.prop(system, "gl_texture_limit", text="Limit Size")
+        col.prop(system, "texture_time_out", text="Time Out")
+        col.prop(system, "texture_collection_rate", text="Collection Rate")
 
         col.separator()
         col.separator()
         col.separator()
 
-        col.label(text=_("Sequencer:"))
+        col.label(text="Sequencer / Clip Editor:")
         col.prop(system, "prefetch_frames")
         col.prop(system, "memory_cache_limit")
 
         # 3. Column
         column = split.column()
 
-        column.label(text=_("Solid OpenGL lights:"))
+        column.label(text="Solid OpenGL lights:")
 
         split = column.split(percentage=0.1)
         split.label()
-        split.label(text=_("Colors:"))
-        split.label(text=_("Direction:"))
+        split.label(text="Colors:")
+        split.label(text="Direction:")
 
         lamp = system.solid_lights[0]
         opengl_lamp_buttons(column, lamp)
@@ -469,12 +482,12 @@ class USERPREF_PT_system(Panel):
 
         column.separator()
 
-        column.label(text=_("Color Picker Type:"))
+        column.label(text="Color Picker Type:")
         column.row().prop(system, "color_picker_type", text="")
 
         column.separator()
 
-        column.prop(system, "use_weight_color_range", text=_("Custom Weight Paint Range"))
+        column.prop(system, "use_weight_color_range", text="Custom Weight Paint Range")
         sub = column.column()
         sub.active = system.use_weight_color_range
         sub.template_color_ramp(system, "weight_color_range", expand=True)
@@ -490,6 +503,15 @@ class USERPREF_PT_system(Panel):
             row.prop(system, "use_translate_tooltips", text="Tooltips")
 
 
+class USERPREF_MT_interface_theme_presets(Menu):
+    bl_label = "Presets"
+    preset_subdir = "interface_theme"
+    preset_operator = "script.execute_preset"
+    preset_type = 'XML'
+    preset_xml_map = (("user_preferences.themes[0]", "Theme"), )
+    draw = Menu.draw_preset
+
+
 class USERPREF_PT_theme(Panel):
     bl_space_type = 'USER_PREFERENCES'
     bl_label = "Themes"
@@ -499,32 +521,40 @@ class USERPREF_PT_theme(Panel):
     @staticmethod
     def _theme_generic(split, themedata):
 
-        row = split.row()
+        col = split.column()
 
-        subsplit = row.split(percentage=0.95)
+        def theme_generic_recurse(data):
+            col.label(data.rna_type.name)
+            row = col.row()
+            subsplit = row.split(percentage=0.95)
 
-        padding1 = subsplit.split(percentage=0.15)
-        padding1.column()
+            padding1 = subsplit.split(percentage=0.15)
+            padding1.column()
 
-        subsplit = row.split(percentage=0.85)
+            subsplit = row.split(percentage=0.85)
 
-        padding2 = subsplit.split(percentage=0.15)
-        padding2.column()
+            padding2 = subsplit.split(percentage=0.15)
+            padding2.column()
 
-        colsub_pair = padding1.column(), padding2.column()
+            colsub_pair = padding1.column(), padding2.column()
 
-        props_type = {}
+            props_type = {}
 
-        for i, prop in enumerate(themedata.rna_type.properties):
-            attr = prop.identifier
-            if attr == "rna_type":
-                continue
+            for i, prop in enumerate(data.rna_type.properties):
+                if prop.identifier == "rna_type":
+                    continue
+
+                props_type.setdefault((prop.type, prop.subtype), []).append(prop)
 
-            props_type.setdefault((prop.type, prop.subtype), []).append(prop.identifier)
+            for props_type, props_ls in sorted(props_type.items()):
+                if props_type[0] == 'POINTER':
+                    for i, prop in enumerate(props_ls):
+                        theme_generic_recurse(getattr(data, prop.identifier))
+                else:
+                    for i, prop in enumerate(props_ls):
+                        colsub_pair[i % 2].row().prop(data, prop.identifier)
 
-        for props_type, props_ls in sorted(props_type.items()):
-            for i, attr in enumerate(props_ls):
-                colsub_pair[i % 2].row().prop(themedata, attr)
+        theme_generic_recurse(themedata)
 
     @classmethod
     def poll(cls, context):
@@ -537,7 +567,18 @@ class USERPREF_PT_theme(Panel):
         theme = context.user_preferences.themes[0]
 
         split_themes = layout.split(percentage=0.2)
-        split_themes.prop(theme, "theme_area", expand=True)
+
+        sub = split_themes.column()
+
+        sub.label(text="Presets:")
+        subrow = sub.row(align=True)
+
+        subrow.menu("USERPREF_MT_interface_theme_presets", text=USERPREF_MT_interface_theme_presets.bl_label)
+        subrow.operator("wm.interface_theme_preset_add", text="", icon='ZOOMIN')
+        subrow.operator("wm.interface_theme_preset_add", text="", icon='ZOOMOUT').remove_active = True
+        sub.separator()
+
+        sub.prop(theme, "theme_area", expand=True)
 
         split = layout.split(percentage=0.4)
 
@@ -550,71 +591,75 @@ class USERPREF_PT_theme(Panel):
             col = split.column()
 
             ui = theme.user_interface.wcol_regular
-            col.label(text=_("Regular:"))
+            col.label(text="Regular:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_tool
-            col.label(text=_("Tool:"))
+            col.label(text="Tool:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_radio
-            col.label(text=_("Radio Buttons:"))
+            col.label(text="Radio Buttons:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_text
-            col.label(text=_("Text:"))
+            col.label(text="Text:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_option
-            col.label(text=_("Option:"))
+            col.label(text="Option:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_toggle
-            col.label(text=_("Toggle:"))
+            col.label(text="Toggle:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_num
-            col.label(text=_("Number Field:"))
+            col.label(text="Number Field:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_numslider
-            col.label(text=_("Value Slider:"))
+            col.label(text="Value Slider:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_box
-            col.label(text=_("Box:"))
+            col.label(text="Box:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_menu
-            col.label(text=_("Menu:"))
+            col.label(text="Menu:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_pulldown
-            col.label(text=_("Pulldown:"))
+            col.label(text="Pulldown:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_menu_back
-            col.label(text=_("Menu Back:"))
+            col.label(text="Menu Back:")
+            ui_items_general(col, ui)
+
+            ui = theme.user_interface.wcol_tooltip
+            col.label(text="Tooltip:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_menu_item
-            col.label(text=_("Menu Item:"))
+            col.label(text="Menu Item:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_scroll
-            col.label(text=_("Scroll Bar:"))
+            col.label(text="Scroll Bar:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_progress
-            col.label(text=_("Progress Bar:"))
+            col.label(text="Progress Bar:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_list_item
-            col.label(text=_("List Item:"))
+            col.label(text="List Item:")
             ui_items_general(col, ui)
 
             ui = theme.user_interface.wcol_state
-            col.label(text=_("State:"))
+            col.label(text="State:")
 
             row = col.row()
 
@@ -637,12 +682,51 @@ class USERPREF_PT_theme(Panel):
             colsub.row().prop(ui, "inner_key_sel")
             colsub.row().prop(ui, "blend")
 
+            col.separator()
+            col.separator()
+
             ui = theme.user_interface
+            col.label("Icons:")
+
+            row = col.row()
+
+            subsplit = row.split(percentage=0.95)
+
+            padding = subsplit.split(percentage=0.15)
+            colsub = padding.column()
+            colsub = padding.column()
+            colsub.row().prop(ui, "icon_file")
+
+            subsplit = row.split(percentage=0.85)
+
+            padding = subsplit.split(percentage=0.15)
+            colsub = padding.column()
+            colsub = padding.column()
+            colsub.row().prop(ui, "icon_alpha")
+
             col.separator()
             col.separator()
 
-            split = col.split(percentage=0.93)
-            split.prop(ui, "icon_file")
+            ui = theme.user_interface.panel
+            col.label("Panels:")
+
+            row = col.row()
+
+            subsplit = row.split(percentage=0.95)
+
+            padding = subsplit.split(percentage=0.15)
+            colsub = padding.column()
+            colsub = padding.column()
+            rowsub = colsub.row()
+            rowsub.prop(ui, "show_header")
+            rowsub.label()
+
+            subsplit = row.split(percentage=0.85)
+
+            padding = subsplit.split(percentage=0.15)
+            colsub = padding.column()
+            colsub = padding.column()
+            colsub.row().prop(ui, "header")
 
             layout.separator()
             layout.separator()
@@ -650,7 +734,7 @@ class USERPREF_PT_theme(Panel):
             col = split.column()
 
             for i, ui in enumerate(theme.bone_color_sets):
-                col.label(text=_("Color Set") + " %d:" % (i + 1))  # i starts from 0
+                col.label(text="Color Set" + " %d:" % (i + 1))  # i starts from 0
 
                 row = col.row()
 
@@ -689,43 +773,50 @@ class USERPREF_PT_file(Panel):
 
         userpref = context.user_preferences
         paths = userpref.filepaths
+        system = userpref.system
 
         split = layout.split(percentage=0.7)
 
         col = split.column()
-        col.label(text=_("File Paths:"))
+        col.label(text="File Paths:")
 
         colsplit = col.split(percentage=0.95)
         col1 = colsplit.split(percentage=0.3)
 
         sub = col1.column()
-        sub.label(text=_("Fonts:"))
-        sub.label(text=_("Textures:"))
-        sub.label(text=_("Texture Plugins:"))
-        sub.label(text=_("Sequence Plugins:"))
-        sub.label(text=_("Render Output:"))
-        sub.label(text=_("Scripts:"))
-        sub.label(text=_("Sounds:"))
-        sub.label(text=_("Temp:"))
-        sub.label(text=_("Image Editor:"))
-        sub.label(text=_("Animation Player:"))
+        sub.label(text="Fonts:")
+        sub.label(text="Textures:")
+        sub.label(text="Render Output:")
+        sub.label(text="Scripts:")
+        sub.label(text="Sounds:")
+        sub.label(text="Temp:")
+        sub.label(text="I18n Branches:")
+        sub.label(text="Image Editor:")
+        sub.label(text="Animation Player:")
 
         sub = col1.column()
         sub.prop(paths, "font_directory", text="")
         sub.prop(paths, "texture_directory", text="")
-        sub.prop(paths, "texture_plugin_directory", text="")
-        sub.prop(paths, "sequence_plugin_directory", text="")
         sub.prop(paths, "render_output_directory", text="")
         sub.prop(paths, "script_directory", text="")
         sub.prop(paths, "sound_directory", text="")
         sub.prop(paths, "temporary_directory", text="")
+        sub.prop(paths, "i18n_branches_directory", text="")
         sub.prop(paths, "image_editor", text="")
         subsplit = sub.split(percentage=0.3)
         subsplit.prop(paths, "animation_player_preset", text="")
         subsplit.prop(paths, "animation_player", text="")
 
+        col.separator()
+        col.separator()
+
+        colsplit = col.split(percentage=0.95)
+        sub = colsplit.column()
+        sub.label(text="Author:")
+        sub.prop(system, "author", text="")
+
         col = split.column()
-        col.label(text=_("Save & Load:"))
+        col.label(text="Save & Load:")
         col.prop(paths, "use_relative_paths")
         col.prop(paths, "use_file_compression")
         col.prop(paths, "use_load_ui")
@@ -740,47 +831,58 @@ class USERPREF_PT_file(Panel):
         col.prop(paths, "save_version")
         col.prop(paths, "recent_files")
         col.prop(paths, "use_save_preview_images")
-        col.label(text=_("Auto Save:"))
+        col.label(text="Auto Save:")
         col.prop(paths, "use_auto_save_temporary_files")
         sub = col.column()
         sub.active = paths.use_auto_save_temporary_files
-        sub.prop(paths, "auto_save_time", text=_("Timer (mins)"))
+        sub.prop(paths, "auto_save_time", text="Timer (mins)")
+
+        col.separator()
+
+        col.label(text="Scripts:")
+        col.prop(system, "use_scripts_auto_execute")
+        col.prop(system, "use_tabs_as_spaces")
+
 
 from bl_ui.space_userpref_keymap import InputKeyMapPanel
 
 
 class USERPREF_MT_ndof_settings(Menu):
-    # accessed from the window keybindings in C (only)
+    # accessed from the window key-bindings in C (only)
     bl_label = "3D Mouse Settings"
 
     def draw(self, context):
         layout = self.layout
+
         input_prefs = context.user_preferences.inputs
 
         layout.separator()
         layout.prop(input_prefs, "ndof_sensitivity")
+        layout.prop(input_prefs, "ndof_orbit_sensitivity")
 
         if context.space_data.type == 'VIEW_3D':
             layout.separator()
             layout.prop(input_prefs, "ndof_show_guide")
 
             layout.separator()
-            layout.label(text="orbit options")
-            if input_prefs.view_rotate_method == 'TRACKBALL':
-                layout.prop(input_prefs, "ndof_roll_invert_axis")
-                layout.prop(input_prefs, "ndof_tilt_invert_axis")
-                layout.prop(input_prefs, "ndof_rotate_invert_axis")
-            else:
-                layout.prop(input_prefs, "ndof_orbit_invert_axes")
+            layout.label(text="Orbit options")
+            layout.prop(input_prefs, "ndof_turntable")
+            layout.prop(input_prefs, "ndof_roll_invert_axis")
+            layout.prop(input_prefs, "ndof_tilt_invert_axis")
+            layout.prop(input_prefs, "ndof_rotate_invert_axis")
 
             layout.separator()
-            layout.label(text="pan options")
+            layout.label(text="Pan options")
             layout.prop(input_prefs, "ndof_panx_invert_axis")
             layout.prop(input_prefs, "ndof_pany_invert_axis")
             layout.prop(input_prefs, "ndof_panz_invert_axis")
 
+            layout.label(text="Zoom options")
+            layout.prop(input_prefs, "ndof_zoom_invert")
+            layout.prop(input_prefs, "ndof_zoom_updown")
+
             layout.separator()
-            layout.label(text="fly options")
+            layout.label(text="Fly options")
             layout.prop(input_prefs, "ndof_fly_helicopter", icon='NDOF_FLY')
             layout.prop(input_prefs, "ndof_lock_horizon", icon='NDOF_DOM')
 
@@ -800,7 +902,7 @@ class USERPREF_PT_input(Panel, InputKeyMapPanel):
         col = row.column()
 
         sub = col.column()
-        sub.label(text=_("Presets:"))
+        sub.label(text="Presets:")
         subrow = sub.row(align=True)
 
         subrow.menu("USERPREF_MT_interaction_presets", text=bpy.types.USERPREF_MT_interaction_presets.bl_label)
@@ -808,19 +910,20 @@ class USERPREF_PT_input(Panel, InputKeyMapPanel):
         subrow.operator("wm.interaction_preset_add", text="", icon='ZOOMOUT').remove_active = True
         sub.separator()
 
-        sub.label(text=_("Mouse:"))
+        sub.label(text="Mouse:")
         sub1 = sub.column()
         sub1.active = (inputs.select_mouse == 'RIGHT')
         sub1.prop(inputs, "use_mouse_emulate_3_button")
         sub.prop(inputs, "use_mouse_continuous")
         sub.prop(inputs, "drag_threshold")
+        sub.prop(inputs, "tweak_threshold")
 
-        sub.label(text=_("Select With:"))
+        sub.label(text="Select With:")
         sub.row().prop(inputs, "select_mouse", expand=True)
 
         sub = col.column()
-        sub.label(text=_("Double Click:"))
-        sub.prop(inputs, "mouse_double_click_time", text=_("Speed"))
+        sub.label(text="Double Click:")
+        sub.prop(inputs, "mouse_double_click_time", text="Speed")
 
         sub.separator()
 
@@ -828,10 +931,10 @@ class USERPREF_PT_input(Panel, InputKeyMapPanel):
 
         sub.separator()
 
-        sub.label(text=_("Orbit Style:"))
+        sub.label(text="Orbit Style:")
         sub.row().prop(inputs, "view_rotate_method", expand=True)
 
-        sub.label(text=_("Zoom Style:"))
+        sub.label(text="Zoom Style:")
         sub.row().prop(inputs, "view_zoom_method", text="")
         if inputs.view_zoom_method in {'DOLLY', 'CONTINUE'}:
             sub.row().prop(inputs, "view_zoom_axis", expand=True)
@@ -842,8 +945,8 @@ class USERPREF_PT_input(Panel, InputKeyMapPanel):
         #col.separator()
 
         sub = col.column()
-        sub.label(text=_("Mouse Wheel:"))
-        sub.prop(inputs, "invert_zoom_wheel", text=_("Invert Wheel Zoom Direction"))
+        sub.label(text="Mouse Wheel:")
+        sub.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction")
         #sub.prop(view, "wheel_scroll_lines", text="Scroll Lines")
 
         col.separator()
@@ -878,12 +981,13 @@ class USERPREF_PT_input(Panel, InputKeyMapPanel):
 class USERPREF_MT_addons_dev_guides(Menu):
     bl_label = "Development Guides"
 
-    # menu to open webpages with addons development guides
+    # menu to open web-pages with addons development guides
     def draw(self, context):
         layout = self.layout
-        layout.operator('wm.url_open', text=_('API Concepts'), icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro'
-        layout.operator('wm.url_open', text=_('Addon Guidelines'), icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons'
-        layout.operator('wm.url_open', text=_('How to share your addon'), icon='URL').url = 'http://wiki.blender.org/index.php/Dev:Py/Sharing'
+
+        layout.operator("wm.url_open", text="API Concepts", icon='URL').url = "http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro"
+        layout.operator("wm.url_open", text="Addon Guidelines", icon='URL').url = "http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons"
+        layout.operator("wm.url_open", text="How to share your addon", icon='URL').url = "http://wiki.blender.org/index.php/Dev:Py/Sharing"
 
 
 class USERPREF_PT_addons(Panel):
@@ -892,24 +996,24 @@ class USERPREF_PT_addons(Panel):
     bl_region_type = 'WINDOW'
     bl_options = {'HIDE_HEADER'}
 
-    _addons_fake_modules = {}
+    _support_icon_mapping = {
+        'OFFICIAL': 'FILE_BLEND',
+        'COMMUNITY': 'POSE_DATA',
+        'TESTING': 'MOD_EXPLODE',
+        }
 
     @classmethod
     def poll(cls, context):
         userpref = context.user_preferences
         return (userpref.active_section == 'ADDONS')
 
-    @staticmethod
-    def module_get(mod_name):
-        return USERPREF_PT_addons._addons_fake_modules[mod_name]
-
     @staticmethod
     def is_user_addon(mod, user_addon_paths):
         if not user_addon_paths:
-            user_script_path = bpy.utils.user_script_path()
-            if user_script_path is not None:
-                user_addon_paths.append(os.path.join(user_script_path, "addons"))
-            user_addon_paths.append(os.path.join(bpy.utils.resource_path('USER'), "scripts", "addons"))
+            for path in (bpy.utils.script_path_user(),
+                         bpy.utils.script_path_pref()):
+                if path is not None:
+                    user_addon_paths.append(os.path.join(path, "addons"))
 
         for path in user_addon_paths:
             if bpy.path.is_subdir(mod.__file__, path):
@@ -933,17 +1037,18 @@ class USERPREF_PT_addons(Panel):
         used_ext = {ext.module for ext in userpref.addons}
 
         # collect the categories that can be filtered on
-        addons = [(mod, addon_utils.module_bl_info(mod)) for mod in addon_utils.modules(USERPREF_PT_addons._addons_fake_modules)]
+        addons = [(mod, addon_utils.module_bl_info(mod)) for mod in addon_utils.modules(addon_utils.addons_fake_modules)]
 
         split = layout.split(percentage=0.2)
         col = split.column()
         col.prop(context.window_manager, "addon_search", text="", icon='VIEWZOOM')
-        col.label(text=_("Categories"))
-        col.prop(context.window_manager, "addon_filter", expand=True)
 
-        col.label(text=_("Supported Level"))
+        col.label(text="Supported Level")
         col.prop(context.window_manager, "addon_support", expand=True)
 
+        col.label(text="Categories")
+        col.prop(context.window_manager, "addon_filter", expand=True)
+
         col = split.column()
 
         # set in addon_utils.modules(...)
@@ -975,11 +1080,11 @@ class USERPREF_PT_addons(Panel):
             if info["support"] not in support:
                 continue
 
-            # check if add-on should be visible with current filters
-            if (filter == "All") or \
-                    (filter == info["category"]) or \
-                    (filter == "Enabled" and is_enabled) or \
-                    (filter == "Disabled" and not is_enabled):
+            # check if addon should be visible with current filters
+            if ((filter == "All") or
+                (filter == info["category"]) or
+                (filter == "Enabled" and is_enabled) or
+                (filter == "Disabled" and not is_enabled)):
 
                 if search and search not in info["name"].lower():
                     if info["author"]:
@@ -997,44 +1102,43 @@ class USERPREF_PT_addons(Panel):
 
                 rowsub = row.row()
                 rowsub.active = is_enabled
-                rowsub.label(text='%s: %s' % (info['category'], info["name"]))
+                rowsub.label(text='%s: %s' % (info["category"], info["name"]))
                 if info["warning"]:
                     rowsub.label(icon='ERROR')
 
                 # icon showing support level.
-                if info["support"] == 'OFFICIAL':
-                    rowsub.label(icon='FILE_BLEND')
-                elif info["support"] == 'COMMUNITY':
-                    rowsub.label(icon='POSE_DATA')
-                else:
-                    rowsub.label(icon='QUESTION')
+                rowsub.label(icon=self._support_icon_mapping.get(info["support"], 'QUESTION'))
 
                 if is_enabled:
                     row.operator("wm.addon_disable", icon='CHECKBOX_HLT', text="", emboss=False).module = module_name
                 else:
                     row.operator("wm.addon_enable", icon='CHECKBOX_DEHLT', text="", emboss=False).module = module_name
 
-                # Expanded UI (only if additional infos are available)
+                # Expanded UI (only if additional info is available)
                 if info["show_expanded"]:
                     if info["description"]:
                         split = colsub.row().split(percentage=0.15)
-                        split.label(text=_('Description:'))
+                        split.label(text="Description:")
                         split.label(text=info["description"])
                     if info["location"]:
                         split = colsub.row().split(percentage=0.15)
-                        split.label(text=_('Location:'))
+                        split.label(text="Location:")
                         split.label(text=info["location"])
+                    if mod:
+                        split = colsub.row().split(percentage=0.15)
+                        split.label(text="File:")
+                        split.label(text=mod.__file__)
                     if info["author"]:
                         split = colsub.row().split(percentage=0.15)
-                        split.label(text=_('Author:'))
+                        split.label(text="Author:")
                         split.label(text=info["author"])
                     if info["version"]:
                         split = colsub.row().split(percentage=0.15)
-                        split.label(text=_('Version:'))
+                        split.label(text="Version:")
                         split.label(text='.'.join(str(x) for x in info["version"]))
                     if info["warning"]:
                         split = colsub.row().split(percentage=0.15)
-                        split.label(text=_("Warning:"))
+                        split.label(text="Warning:")
                         split.label(text='  ' + info["warning"], icon='ERROR')
 
                     user_addon = USERPREF_PT_addons.is_user_addon(mod, user_addon_paths)
@@ -1042,13 +1146,13 @@ class USERPREF_PT_addons(Panel):
 
                     if tot_row:
                         split = colsub.row().split(percentage=0.15)
-                        split.label(text=_("Internet:"))
+                        split.label(text="Internet:")
                         if info["wiki_url"]:
-                            split.operator("wm.url_open", text=_("Link to the Wiki"), icon='HELP').url = 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.url_open", text=_("Report a Bug"), icon='URL').url = info["tracker_url"]
+                            split.operator("wm.url_open", text="Report a Bug", icon='URL').url = info["tracker_url"]
                         if user_addon:
-                            split.operator("wm.addon_remove", text=_("Remove"), icon='CANCEL').module = mod.__name__
+                            split.operator("wm.addon_remove", text="Remove", icon='CANCEL').module = mod.__name__
 
                         for i in range(4 - tot_row):
                             split.separator()
@@ -1060,7 +1164,7 @@ class USERPREF_PT_addons(Panel):
 
         if missing_modules and filter in {"All", "Enabled"}:
             col.column().separator()
-            col.column().label(text=_("Missing script files"))
+            col.column().label(text="Missing script files")
 
             module_names = {mod.__name__ for mod, info in addons}
             for module_name in sorted(missing_modules):
@@ -1075,292 +1179,5 @@ class USERPREF_PT_addons(Panel):
                 if is_enabled:
                     row.operator("wm.addon_disable", icon='CHECKBOX_HLT', text="", emboss=False).module = module_name
 
-
-class WM_OT_addon_enable(Operator):
-    "Enable an addon"
-    bl_idname = "wm.addon_enable"
-    bl_label = "Enable Add-On"
-
-    module = StringProperty(
-            name="Module",
-            description="Module name of the addon to enable",
-            )
-
-    def execute(self, context):
-        mod = addon_utils.enable(self.module)
-
-        if mod:
-            info = addon_utils.module_bl_info(mod)
-
-            info_ver = info.get("blender", (0, 0, 0))
-
-            if info_ver > bpy.app.version:
-                self.report({'WARNING'}, ("This script was written Blender "
-                                          "version %d.%d.%d and might not "
-                                          "function (correctly), "
-                                          "though it is enabled") %
-                                         info_ver)
-            return {'FINISHED'}
-        else:
-            return {'CANCELLED'}
-
-
-class WM_OT_addon_disable(Operator):
-    "Disable an addon"
-    bl_idname = "wm.addon_disable"
-    bl_label = "Disable Add-On"
-
-    module = StringProperty(
-            name="Module",
-            description="Module name of the addon to disable",
-            )
-
-    def execute(self, context):
-        addon_utils.disable(self.module)
-        return {'FINISHED'}
-
-
-class WM_OT_addon_install(Operator):
-    "Install an addon"
-    bl_idname = "wm.addon_install"
-    bl_label = "Install Add-On..."
-
-    overwrite = BoolProperty(
-            name="Overwrite",
-            description="Remove existing addons with the same ID",
-            default=True,
-            )
-    target = EnumProperty(
-            name="Target Path",
-            items=(('DEFAULT', "Default", ""),
-                   ('PREFS', "User Prefs", "")),
-            )
-
-    filepath = StringProperty(
-            name="File Path",
-            description="File path to write file to",
-            )
-    filter_folder = BoolProperty(
-            name="Filter folders",
-            default=True,
-            options={'HIDDEN'},
-            )
-    filter_python = BoolProperty(
-            name="Filter python",
-            default=True,
-            options={'HIDDEN'},
-            )
-    filter_glob = StringProperty(
-            default="*.py;*.zip",
-            options={'HIDDEN'},
-            )
-
-    @staticmethod
-    def _module_remove(path_addons, module):
-        module = os.path.splitext(module)[0]
-        for f in os.listdir(path_addons):
-            f_base = os.path.splitext(f)[0]
-            if f_base == module:
-                f_full = os.path.join(path_addons, f)
-
-                if os.path.isdir(f_full):
-                    os.rmdir(f_full)
-                else:
-                    os.remove(f_full)
-
-    def execute(self, context):
-        import traceback
-        import zipfile
-        import shutil
-
-        pyfile = self.filepath
-
-        if self.target == 'DEFAULT':
-            # dont use bpy.utils.script_paths("addons") because we may not be able to write to it.
-            path_addons = bpy.utils.user_resource('SCRIPTS', "addons", create=True)
-        else:
-            path_addons = bpy.context.user_preferences.filepaths.script_directory
-            if path_addons:
-                path_addons = os.path.join(path_addons, "addons")
-
-        if not path_addons:
-            self.report({'ERROR'}, "Failed to get addons path")
-            return {'CANCELLED'}
-
-        # create dir is if missing.
-        if not os.path.exists(path_addons):
-            os.makedirs(path_addons)
-
-        # Check if we are installing from a target path,
-        # doing so causes 2+ addons of same name or when the same from/to
-        # location is used, removal of the file!
-        addon_path = ""
-        pyfile_dir = os.path.dirname(pyfile)
-        for addon_path in addon_utils.paths():
-            if os.path.samefile(pyfile_dir, addon_path):
-                self.report({'ERROR'}, "Source file is in the addon search path: %r" % addon_path)
-                return {'CANCELLED'}
-        del addon_path
-        del pyfile_dir
-        # done checking for exceptional case
-
-        addons_old = {mod.__name__ for mod in addon_utils.modules(USERPREF_PT_addons._addons_fake_modules)}
-
-        #check to see if the file is in compressed format (.zip)
-        if zipfile.is_zipfile(pyfile):
-            try:
-                file_to_extract = zipfile.ZipFile(pyfile, 'r')
-            except:
-                traceback.print_exc()
-                return {'CANCELLED'}
-
-            if self.overwrite:
-                for f in file_to_extract.namelist():
-                    WM_OT_addon_install._module_remove(path_addons, f)
-            else:
-                for f in file_to_extract.namelist():
-                    path_dest = os.path.join(path_addons, os.path.basename(f))
-                    if os.path.exists(path_dest):
-                        self.report({'WARNING'}, "File already installed to %r\n" % path_dest)
-                        return {'CANCELLED'}
-
-            try:  # extract the file to "addons"
-                file_to_extract.extractall(path_addons)
-
-                # zip files can create this dir with metadata, don't need it
-                macosx_dir = os.path.join(path_addons, '__MACOSX')
-                if os.path.isdir(macosx_dir):
-                    shutil.rmtree(macosx_dir)
-
-            except:
-                traceback.print_exc()
-                return {'CANCELLED'}
-
-        else:
-            path_dest = os.path.join(path_addons, os.path.basename(pyfile))
-
-            if self.overwrite:
-                WM_OT_addon_install._module_remove(path_addons, os.path.basename(pyfile))
-            elif os.path.exists(path_dest):
-                self.report({'WARNING'}, "File already installed to %r\n" % path_dest)
-                return {'CANCELLED'}
-
-            #if not compressed file just copy into the addon path
-            try:
-                shutil.copyfile(pyfile, path_dest)
-
-            except:
-                traceback.print_exc()
-                return {'CANCELLED'}
-
-        addons_new = {mod.__name__ for mod in addon_utils.modules(USERPREF_PT_addons._addons_fake_modules)} - addons_old
-        addons_new.discard("modules")
-
-        # disable any addons we may have enabled previously and removed.
-        # this is unlikely but do just incase. bug [#23978]
-        for new_addon in addons_new:
-            addon_utils.disable(new_addon)
-
-        # possible the zip contains multiple addons, we could disallow this
-        # but for now just use the first
-        for mod in addon_utils.modules(USERPREF_PT_addons._addons_fake_modules):
-            if mod.__name__ in addons_new:
-                info = addon_utils.module_bl_info(mod)
-
-                # show the newly installed addon.
-                context.window_manager.addon_filter = 'All'
-                context.window_manager.addon_search = info["name"]
-                break
-
-        # incase a new module path was created to install this addon.
-        bpy.utils.refresh_script_paths()
-
-        # TODO, should not be a warning.
-        # self.report({'WARNING'}, "File installed to '%s'\n" % path_dest)
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-        wm = context.window_manager
-        wm.fileselect_add(self)
-        return {'RUNNING_MODAL'}
-
-
-class WM_OT_addon_remove(Operator):
-    "Disable an addon"
-    bl_idname = "wm.addon_remove"
-    bl_label = "Remove Add-On"
-
-    module = StringProperty(
-            name="Module",
-            description="Module name of the addon to remove",
-            )
-
-    @staticmethod
-    def path_from_addon(module):
-        for mod in addon_utils.modules(USERPREF_PT_addons._addons_fake_modules):
-            if mod.__name__ == module:
-                filepath = mod.__file__
-                if os.path.exists(filepath):
-                    if os.path.splitext(os.path.basename(filepath))[0] == "__init__":
-                        return os.path.dirname(filepath), True
-                    else:
-                        return filepath, False
-        return None, False
-
-    def execute(self, context):
-        path, isdir = WM_OT_addon_remove.path_from_addon(self.module)
-        if path is None:
-            self.report('WARNING', "Addon path %r could not be found" % path)
-            return {'CANCELLED'}
-
-        # incase its enabled
-        addon_utils.disable(self.module)
-
-        import shutil
-        if isdir:
-            shutil.rmtree(path)
-        else:
-            os.remove(path)
-
-        context.area.tag_redraw()
-        return {'FINISHED'}
-
-    # lame confirmation check
-    def draw(self, context):
-        self.layout.label(text="Remove Addon: %r?" % self.module)
-        path, isdir = WM_OT_addon_remove.path_from_addon(self.module)
-        self.layout.label(text="Path: %r" % path)
-
-    def invoke(self, context, event):
-        wm = context.window_manager
-        return wm.invoke_props_dialog(self, width=600)
-
-
-class WM_OT_addon_expand(Operator):
-    "Display more information on this add-on"
-    bl_idname = "wm.addon_expand"
-    bl_label = ""
-
-    module = StringProperty(
-            name="Module",
-            description="Module name of the addon to expand",
-            )
-
-    def execute(self, context):
-        module_name = self.module
-
-        # unlikely to fail, module should have already been imported
-        try:
-            # mod = __import__(module_name)
-            mod = USERPREF_PT_addons.module_get(module_name)
-        except:
-            import traceback
-            traceback.print_exc()
-            return {'CANCELLED'}
-
-        info = addon_utils.module_bl_info(mod)
-        info["show_expanded"] = not info["show_expanded"]
-        return {'FINISHED'}
-
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)