Skip to content

Commit dee343a

Browse files
committed
data/luarc - added check for gui so that we don't hang darktable
lua/init.c - code cleanup
1 parent 8c1dfc3 commit dee343a

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

data/luarc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ local dt = require "darktable"
2424

2525
-- make sure we don't hang darktable when starting the scripts
2626

27-
if dt.has_gui then
27+
if dt.configuration.has_gui then
2828
require "tools/script_manager"
2929
end
3030

src/lua/init.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,7 @@ static int run_early_script(lua_State* L)
118118
char *luarc = g_build_filename(basedir, "luarc", NULL);
119119
dt_lua_check_print_error(L, luaL_dofile(L, luarc));
120120
g_free(luarc);
121-
fprintf(stderr, "%s\n", "past the luarc");
122-
/* Move this to scripp_manager
123-
if(darktable.gui != NULL)
124-
{
125-
// run user init script
126-
dt_loc_get_user_config_dir(basedir, sizeof(basedir));
127-
luarc = g_build_filename(basedir, "luarc", NULL);
128-
dt_lua_check_print_error(L, luaL_dofile(L, luarc));
129-
g_free(luarc);
130-
}*/
121+
131122
if(!lua_isnil(L,1)){
132123
const char *lua_command = lua_tostring(L, 1);
133124
dt_lua_check_print_error(L,luaL_dostring(L,lua_command));

0 commit comments

Comments
 (0)