apprt/gtk: log the libadwaita version at startup if we use it

This commit is contained in:
Mitchell Hashimoto
2024-09-11 10:27:28 -07:00
parent 8186a8835b
commit 2b5d436792

View File

@ -107,6 +107,18 @@ pub fn init(core_app: *CoreApp, opts: Options) !App {
} }
} }
// If we're using libadwaita, log the version
if ((comptime adwaita.versionAtLeast(0, 0, 0)) and
adwaita.enabled(&config))
{
log.info("libadwaita version build={s} runtime={}.{}.{}", .{
c.ADW_VERSION_S,
c.adw_get_major_version(),
c.adw_get_minor_version(),
c.adw_get_micro_version(),
});
}
// The "none" cursor is used for hiding the cursor // The "none" cursor is used for hiding the cursor
const cursor_none = c.gdk_cursor_new_from_name("none", null); const cursor_none = c.gdk_cursor_new_from_name("none", null);
errdefer if (cursor_none) |cursor| c.g_object_unref(cursor); errdefer if (cursor_none) |cursor| c.g_object_unref(cursor);