Skip to content

Commit

Permalink
Hide uninstall package button on unmodifiable paths
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Feb 18, 2019
1 parent 5751762 commit ce241a0
Show file tree
Hide file tree
Showing 4 changed files with 1,070 additions and 3 deletions.
10 changes: 7 additions & 3 deletions builtin/mainmenu/tab_content.lua
Expand Up @@ -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
Expand Down

0 comments on commit ce241a0

Please sign in to comment.