Skip to content

Commit

Permalink
Remove modstore leftovers. Fix core.show_path_select_dialog documenta…
Browse files Browse the repository at this point in the history
…tion (#8572)

This was forgotten in #5852.
  • Loading branch information
Desour authored and SmallJoker committed Jun 7, 2019
1 parent cb00632 commit 2ba6785
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
11 changes: 0 additions & 11 deletions builtin/mainmenu/tab_content.lua
Expand Up @@ -153,11 +153,6 @@ local function handle_buttons(tabview, fields, tabname, tabdata)
return true
end

if fields["btn_mod_mgr_install_local"] ~= nil then
core.show_file_open_dialog("mod_mgt_open_dlg", fgettext("Select Package File:"))
return true
end

if fields["btn_contentdb"] ~= nil then
local dlg = create_store_dlg()
dlg:set_parent(tabview)
Expand Down Expand Up @@ -201,12 +196,6 @@ local function handle_buttons(tabview, fields, tabname, tabdata)
return true
end

if fields["mod_mgt_open_dlg_accepted"] and
fields["mod_mgt_open_dlg_accepted"] ~= "" then
pkgmgr.install_mod(fields["mod_mgt_open_dlg_accepted"],nil)
return true
end

return false
end

Expand Down
9 changes: 5 additions & 4 deletions doc/menu_lua_api.txt
Expand Up @@ -89,13 +89,14 @@ core.set_background(type, texturepath,[tile],[minsize])
core.set_clouds(<true/false>)
core.set_topleft_text(text)
core.show_keys_menu()
core.file_open_dialog(formname,caption)
^ shows a file open dialog
core.show_path_select_dialog(formname, caption, is_file_select)
^ shows a path select dialog
^ formname is base name of dialog response returned in fields
^ -if dialog was accepted "_accepted"
^^ will be added to fieldname containing the path
^ will be added to fieldname containing the path
^ -if dialog was canceled "_cancelled"
^ will be added to fieldname value is set to formname itself
^ if `is_file_select` is `true`, a file and not a folder will be selected
^ returns nil or selected file/folder
core.get_screen_info()
^ returns {
Expand Down Expand Up @@ -240,4 +241,4 @@ Limitations of Async operations
-No access to global lua variables, don't even try
-Limited set of available functions
e.g. No access to functions modifying menu like core.start,core.close,
core.file_open_dialog
core.show_path_select_dialog

0 comments on commit 2ba6785

Please sign in to comment.