diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2019-08-03 23:31:36 -0700 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2019-08-13 22:18:32 -0700 |
commit | ced56f3d223e95a82840c50771b908714a80c372 (patch) | |
tree | 8643a5f8634fa29d6e2c30ca9127ef2a6a2d7a3f /examples | |
parent | 4d3f567674b7fde48362b1c1e25222e16f30b586 (diff) | |
download | gjs-ced56f3d223e95a82840c50771b908714a80c372.tar.gz |
CI: Add no-trailing-spaces to eslint rules
Some git clients or editors will enforce this anyway, and we don't want
them to put spacing fixes in unrelated commits, so fix 'em all now.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gtk-application.js | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/examples/gtk-application.js b/examples/gtk-application.js index 99a3fd98..d4893a7b 100644 --- a/examples/gtk-application.js +++ b/examples/gtk-application.js @@ -39,43 +39,43 @@ var ExampleApplication = GObject.registerClass({ return this._exampleprop; } - + set exampleprop(value) { this._exampleprop = value; - + // notify() has to be called, if you want it this.notify('exampleprop'); } - + // Example signal emission emitExamplesig(number) { this.emit('examplesig', number); } - + vfunc_startup() { super.vfunc_startup(); - + // An example GAction, see: https://wiki.gnome.org/HowDoI/GAction let exampleAction = new Gio.SimpleAction({ name: 'exampleAction', parameter_type: new GLib.VariantType('s'), }); - + exampleAction.connect('activate', (action, param) => { param = param.deepUnpack().toString(); - + if (param === 'exampleParameter') log('Yes!'); }); - + this.add_action(exampleAction); } - + vfunc_activate() { super.vfunc_activate(); - + this.hold(); - + // Example ApplicationWindow let window = new Gtk.ApplicationWindow({ application: this, @@ -83,16 +83,16 @@ var ExampleApplication = GObject.registerClass({ default_width: 300, default_height: 200, }); - + let label = new Gtk.Label({label: this.exampleprop}); window.add(label); - + window.connect('delete-event', () => { this.quit(); }); - + window.show_all(); - + // Example GNotification, see: https://developer.gnome.org/GNotification/ let notif = new Gio.Notification(); notif.set_title('Example Notification'); @@ -100,20 +100,20 @@ var ExampleApplication = GObject.registerClass({ notif.set_icon( new Gio.ThemedIcon({name: 'dialog-information-symbolic'}) ); - + // A default action for when the body of the notification is clicked notif.set_default_action("app.exampleAction('exampleParameter')"); - + // A button for the notification notif.add_button( 'Button Text', "app.exampleAction('exampleParameter')" ); - + // This won't actually be shown, since an application needs a .desktop // file with a base name matching the application id this.send_notification('example-notification', notif); - + // Withdraw this.withdraw_notification('example-notification'); } |