1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Hide uninstall package button on unmodifiable paths (#8255)

This commit is contained in:
rubenwardy 2019-03-05 07:12:58 +00:00 committed by Loïc Blot
parent b5defcffba
commit 5d2624ab82
3 changed files with 21 additions and 3 deletions

View file

@ -134,9 +134,13 @@ local function get_formspec(tabview, name, tabdata)
end
retval = retval .. "textarea[5.85,2.2;6.35,2.9;;" ..
fgettext("Information:") .. ";" .. desc .. "]" ..
"button[5.5,4.65;3.25,1;btn_mod_mgr_delete_mod;" ..
fgettext("Uninstall Package") .. "]"
fgettext("Information:") .. ";" .. desc .. "]"
if core.may_modify_path(selected_pkg.path) then
retval = retval ..
"button[5.5,4.65;3.25,1;btn_mod_mgr_delete_mod;" ..
fgettext("Uninstall Package") .. "]"
end
end
return retval
end