Adjust package state display

This commit is contained in:
Ellwood Zwovic
2017-07-24 19:03:10 -07:00
parent b3c8645c93
commit 9b424b52ce

View File

@@ -794,16 +794,17 @@ class USERPREF_PT_packages(bpy.types.Panel):
leftcol = left.column(align=True)
if pkg.installed:
if pkg.url:
right.operator(PACKAGE_OT_uninstall.bl_idname,
if pkg.url and pkg.user:
right.operator(PACKAGE_OT_uninstall.bl_idname,
text="Uninstall").package_name=pkg.name
else:
elif pkg.user:
right.label("Installed")
right.scale_y = 2
if pkg.user:
right.label("Installed")
else:
l = right.label("System package")
right.enabled = False
right.enabled = False
elif not pkg.user:
l = right.label("System package")
right.scale_y = 2
right.enabled = False
else:
if pkg.url:
right.operator(PACKAGE_OT_install.bl_idname,
@@ -953,6 +954,7 @@ def build_composite_packagelist(installed: list, available: list) -> OrderedDict
if packages_are_equivilent(pkg, masterpkg):
masterpkg.installed = True
masterpkg.installed_location = pkg.installed_location
masterpkg.user = pkg.user
break
else:
masterlist[pkg.name].add_version(pkg)