[gnome-bluetooth/wip/hadess/more-precise-state] lib: Fix enums being inaccessible from GJS
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/more-precise-state] lib: Fix enums being inaccessible from GJS
- Date: Tue, 23 Aug 2022 14:12:34 +0000 (UTC)
commit ab2e8dac222a8efd68c874a9ffeadbbb34d33ad6
Author: Bastien Nocera <hadess hadess net>
Date: Tue Aug 23 16:08:24 2022 +0200
lib: Fix enums being inaccessible from GJS
Add enum type generation code to the gir sources. This fixes enum types
showing up as 'undefined' in gjs.
The change did not impact Python.
--✀--
const {Gio, GLib, GnomeBluetooth, GObject} = imports.gi;
client = new GnomeBluetooth.Client();
client.connect('notify', () => {
print(client.default_adapter_state);
});
ml = new GLib.MainLoop(null, false);
ml.run()
--✀--
lib/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/lib/meson.build b/lib/meson.build
index 69ba8f58..ed1a881a 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -122,7 +122,7 @@ pkg.generate(
)
if enable_gir
- gir_sources = sources + headers
+ gir_sources = sources + headers + enum_sources
gir_incs = [
'Gio-2.0',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]