Skip to content

Commit 4e36350

Browse files
authored
Merge pull request #19432 from wpferguson/add_lua_config_dirs
Expose darktable share and data directories to Lua
2 parents 49630fb + 13a9903 commit 4e36350

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

RELEASE_NOTES.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,23 +123,34 @@ changes (where available).
123123
- Fixed corruption of sidecars during large imports of images with XMP
124124
sidecars.
125125

126+
- Fixed a bug where changing the image scaling in the export module
127+
influences the result of a running export job.
128+
129+
- Make sure we always fill the complete main darkroom canvas while
130+
zooming at large scales.
131+
132+
- Make sure image changed_timestamp is updated when a sidecar file
133+
is applied.
134+
126135
## Lua
127136

128137
### API Version
129138

130-
- API version is now 9.5.0
139+
- API version is now 9.6.0
131140

132141
### New Features
133142

134-
- ???
143+
- Added darktable.query_event() to check if an event is registered.
135144

136-
### Bug Fixes
145+
- Added collection-changed event that fires when the collection changes.
137146

138-
- Fixed a bug where changing the image scaling in the export module
139-
influences the result of a running export job.
147+
- Added darktable.configuration.share_dir and darktable.configuration.data_dir
148+
to expose the darktable data and share directories.
140149

141-
- Make sure we always fill the complete main darkroom canvas while
142-
zooming at large scales.
150+
### Bug Fixes
151+
152+
- Check added to ensure view has changed before processing GUI events
153+
preventing hang on start.
143154

144155
### Add action support for Lua
145156

src/lua/configuration.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ int dt_lua_init_configuration(lua_State *L)
109109
lua_pushstring(L, tmp_path);
110110
lua_settable(L, -3);
111111

112+
lua_pushstring(L, "share_dir");
113+
dt_loc_get_sharedir(tmp_path, sizeof(tmp_path));
114+
lua_pushstring(L, tmp_path);
115+
lua_settable(L, -3);
116+
117+
lua_pushstring(L, "data_dir");
118+
dt_loc_get_datadir(tmp_path, sizeof(tmp_path));
119+
lua_pushstring(L, tmp_path);
120+
lua_settable(L, -3);
121+
112122
lua_pushstring(L, "version");
113123
lua_pushstring(L, darktable_package_version);
114124
lua_settable(L, -3);

0 commit comments

Comments
 (0)