Added compatibility for lua events API change 6.2.1.
This commit is contained in:
@@ -37,6 +37,7 @@ du.check_min_api_version("5.0.0", "executable_manager")
|
||||
local PS = dt.configuration.running_os == "windows" and "\\" or "/"
|
||||
|
||||
local gettext = dt.gettext
|
||||
local CURR_API_STRING = dt.configuration.api_version_string
|
||||
|
||||
gettext.bindtextdomain("executable_manager",dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
@@ -214,7 +215,7 @@ if dt.gui.current_view().id == "lighttable" then
|
||||
else
|
||||
if not exec_man.event_registered then
|
||||
dt.register_event(
|
||||
"view-changed",
|
||||
CURR_API_STRING >= "6.2.1" and "executable_manager", "view-changed" or "view-changed" ,
|
||||
function(event, old_view, new_view)
|
||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||
install_module()
|
||||
|
||||
Reference in New Issue
Block a user