Skip to content

Commit 2ba6785

Browse files
DesourSmallJoker
authored andcommittedJun 7, 2019
Remove modstore leftovers. Fix core.show_path_select_dialog documentation (#8572)
This was forgotten in #5852.
1 parent cb00632 commit 2ba6785

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed
 

‎builtin/mainmenu/tab_content.lua

-11
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,6 @@ local function handle_buttons(tabview, fields, tabname, tabdata)
153153
return true
154154
end
155155

156-
if fields["btn_mod_mgr_install_local"] ~= nil then
157-
core.show_file_open_dialog("mod_mgt_open_dlg", fgettext("Select Package File:"))
158-
return true
159-
end
160-
161156
if fields["btn_contentdb"] ~= nil then
162157
local dlg = create_store_dlg()
163158
dlg:set_parent(tabview)
@@ -201,12 +196,6 @@ local function handle_buttons(tabview, fields, tabname, tabdata)
201196
return true
202197
end
203198

204-
if fields["mod_mgt_open_dlg_accepted"] and
205-
fields["mod_mgt_open_dlg_accepted"] ~= "" then
206-
pkgmgr.install_mod(fields["mod_mgt_open_dlg_accepted"],nil)
207-
return true
208-
end
209-
210199
return false
211200
end
212201

‎doc/menu_lua_api.txt

+5-4
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,14 @@ core.set_background(type, texturepath,[tile],[minsize])
8989
core.set_clouds(<true/false>)
9090
core.set_topleft_text(text)
9191
core.show_keys_menu()
92-
core.file_open_dialog(formname,caption)
93-
^ shows a file open dialog
92+
core.show_path_select_dialog(formname, caption, is_file_select)
93+
^ shows a path select dialog
9494
^ formname is base name of dialog response returned in fields
9595
^ -if dialog was accepted "_accepted"
96-
^^ will be added to fieldname containing the path
96+
^ will be added to fieldname containing the path
9797
^ -if dialog was canceled "_cancelled"
9898
^ will be added to fieldname value is set to formname itself
99+
^ if `is_file_select` is `true`, a file and not a folder will be selected
99100
^ returns nil or selected file/folder
100101
core.get_screen_info()
101102
^ returns {
@@ -240,4 +241,4 @@ Limitations of Async operations
240241
-No access to global lua variables, don't even try
241242
-Limited set of available functions
242243
e.g. No access to functions modifying menu like core.start,core.close,
243-
core.file_open_dialog
244+
core.show_path_select_dialog

0 commit comments

Comments
 (0)
Please sign in to comment.