From cfc239ebeda4c9c94e0de439101fa2b4f4b44400 Mon Sep 17 00:00:00 2001 From: Bill Ferguson Date: Sat, 25 Dec 2021 15:25:49 -0500 Subject: [PATCH] Updated image.register_action and added image.destroy_action --- .../lua.api.manual/darktable/gui/libs/image.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/content/lua.api.manual/darktable/gui/libs/image.md b/content/lua.api.manual/darktable/gui/libs/image.md index 09bc925..47bf3c5 100644 --- a/content/lua.api.manual/darktable/gui/libs/image.md +++ b/content/lua.api.manual/darktable/gui/libs/image.md @@ -16,6 +16,7 @@ Attributes: ``` function( + name : string, label : string, callback : function, [tooltip : string] @@ -24,6 +25,7 @@ function( Add a new button and call a callback when it is clicked +* **name** - _string_ - A unique name for the action that can be referenced later to destroy it * **label** - _string_ - The label to display on the button * **callback** - _function_ - The function to call when the button is pressed * **\[tooltip\]** - _string_ - The tooltip to use on the new button @@ -41,3 +43,16 @@ The function to call when the button is pressed * **event** - _string_ - The name of the button that was pressed * **images** - _table of [types.dt_lua_image_t](../../../types/dt_lua_image_t)_ - The images to act on when the button was clicked + +## darktable.gui.libs.image.destroy_action + +``` +function( + name : string, +) +``` + +Destroy an action created with register_action + +* **name** - _string_ - The name of the action to destroy +