[gnome-builder/gnome-builder-42] snippets/gobject: Use regular constructor in js scope
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-42] snippets/gobject: Use regular constructor in js scope
- Date: Wed, 20 Apr 2022 22:24:24 +0000 (UTC)
commit fa58d92f3df80e329d8c081eef3a4a3a678a3dc1
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Apr 2 15:28:37 2022 +0200
snippets/gobject: Use regular constructor in js scope
Regular constructors now work in GObject subclasses, and the js
template has already been updated to use them instead of the
custom _init().
It makes sense to do the same in the corresponding snippet.
src/plugins/snippets/snippets/gobject.snippets | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/snippets/snippets/gobject.snippets b/src/plugins/snippets/snippets/gobject.snippets
index 1f6672481..71cdb1b52 100644
--- a/src/plugins/snippets/snippets/gobject.snippets
+++ b/src/plugins/snippets/snippets/gobject.snippets
@@ -188,8 +188,8 @@ snippet gobject
- desc Create GObject
var $1 = GObject.registerClass(
class ${1:ClassName} extends ${2:GObject.Object} {
- _init(${3}) {
- super._init();
+ constructor(${3}) {
+ super();
$0
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]