Skip to content
Commits on Source (10)
Version 1.72.2
--------------
- Various fixes ported from the development branch.
- Closed bugs and merge requests:
* gi/arg-cache.cpp: Fix building on Visual Studio [!772, Chun-wei Fan]
* doc: Reflect support for constructor with GObject [!773, Sonny Piers]
Version 1.72.1
--------------
......
gjs (1.72.1-0~ubuntu22.04.1) jammy; urgency=medium
gjs (1.72.2-0ubuntu1) jammy; urgency=medium
* New upstream release (LP: #1981722)
-- Jeremy Bicha <jbicha@ubuntu.com> Thu, 14 Jul 2022 17:01:31 +0200
-- Jeremy Bicha <jbicha@ubuntu.com> Wed, 10 Aug 2022 12:26:00 -0400
gjs (1.72.0-3~ubuntu22.04.2) jammy; urgency=medium
......
......@@ -2,7 +2,7 @@
pristine-tar = True
debian-branch = ubuntu/jammy
debian-tag=ubuntu/%(version)s
upstream-branch = upstream/latest
upstream-branch = upstream/1.72.x
upstream-vcs-tag = %(version)s
[buildpackage]
......
......@@ -41,14 +41,15 @@ var MyLabel = GObject.registerClass({
Children: [ 'label-child' ], // Template children
InternalChildren: [ 'internal-box' ] // Template internal (private) children
}, class MyLabel extends Gtk.Label {
// Currently GObjects use _init, not construct
_init(params) {
constructor(params) {
// Chaining up
super._init(params);
super(params);
}
});
```
Note that before GJS 1.72 (GNOME 42), you had to override `_init()` instead of `constructor()` and chain-up with `super._init()`. This is still supported in GJS 1.72 and later.
### GType Objects
This is the object that represents a type in the GObject type system. Internally a GType is an integer, but you can't access that integer in GJS.
......@@ -168,8 +169,8 @@ var MyLabel = GObject.registerClass({
}
}
}, class ExampleApplication extends GObject.Object {
_init() {
super._init();
constructor() {
super();
this.emit('my-signal', 'a string parameter');
}
});
......@@ -241,4 +242,4 @@ try {
} catch(e) {
log('Failed to read file: ' + e.message);
}
```
\ No newline at end of file
```
......@@ -17,8 +17,8 @@ var GjsListStore = GObject.registerClass({
GTypeName: 'GjsListStore',
Implements: [Gio.ListModel],
}, class MyList extends GObject.Object {
_init() {
super._init();
constructor() {
super();
/* We'll use a native Array as internal storage for the list model */
this._items = [];
......
......@@ -28,8 +28,8 @@ var ExampleApplication = GObject.registerClass({
},
Signals: {'examplesig': {param_types: [GObject.TYPE_INT]}},
}, class ExampleApplication extends Gtk.Application {
_init() {
super._init({
constructor() {
super({
application_id: 'org.gnome.gjs.ExampleApplication',
flags: Gio.ApplicationFlags.FLAGS_NONE,
});
......
......@@ -29,8 +29,8 @@ const ExampleWindow = GObject.registerClass({
'button',
],
}, class ExampleWindow extends Gtk.Window {
_init(params = {}) {
super._init(params);
constructor(params = {}) {
super(params);
// The template has been initialized and you can access the children
this.box.visible = true;
......
......@@ -29,8 +29,8 @@ const ExampleWindow = GObject.registerClass({
'button',
],
}, class ExampleWindow extends Gtk.Window {
_init(params = {}) {
super._init(params);
constructor(params = {}) {
super(params);
// The template has been initialized and you can access the children
this.box.visible = true;
......
......@@ -262,7 +262,7 @@ struct RegisteredInterface : BaseInfo {
};
struct Callback : Nullable, BaseInfo {
constexpr explicit Callback(GIInterfaceInfo* info)
explicit Callback(GIInterfaceInfo* info)
: BaseInfo(info, GjsAutoTakeOwnership{}),
m_scope(GI_SCOPE_TYPE_INVALID) {}
......
......@@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2019 Philip Chimento <philip.chimento@gmail.com>
# SPDX-FileCopyrightText: 2019 Chun-wei Fan <fanchunwei@src.gnome.org>
project('gjs', 'cpp', 'c', version: '1.72.1', license: ['MIT', 'LGPL2+'],
project('gjs', 'cpp', 'c', version: '1.72.2', license: ['MIT', 'LGPL2+'],
meson_version: '>= 0.52.0',
default_options: ['cpp_std=c++17', 'cpp_rtti=false', 'c_std=c99',
'warning_level=2', 'b_pch=true' ])
......