Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions luaa.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,12 @@ luaA_pixbuf_to_surface(lua_State *L)
* @treturn gears.surface A cairo surface as light user datum.
* @treturn nil|string The error message, if any.
* @staticfct load_image
* @deprecated awesome.pixbuf_to_surface
*/
static int
luaA_load_image(lua_State *L)
{
/* TODO: Deprecate this function, Lua can use GdkPixbuf directly plus
* awesome.pixbuf_to_surface
*/

luaA_deprecate(L, "awesome.pixbuf_to_surface");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggestion for awesome.pixbuf_to_surface in that comment has since become outdated as well. I think gears.surface would be a better suggestion.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gears.surface uses awesome.pixbuf_to_surface internally, and I would argue that it's better to put a function as close to the replaced one in functionality in @deprecate

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do it one step at a time, this will do.

GError *error = NULL;
const char *filename = luaL_checkstring(L, 1);
cairo_surface_t *surface = draw_load_image(L, filename, &error);
Expand Down
Loading