| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Adjust the code path where we read the HTTP content, demonstrating
`Gio.OutputStream.splice()` which can handle the case where there is no
`content-length` header in an HTTP response.
fixes #498
|
|
|
|
|
| |
Add a simple example of using `Gtk.Widget.add_tick_callback()` to
demonstrate how it can be used to implement simple tweening.
|
|
|
|
|
|
|
|
|
| |
* Use ES modules
* Use `console`
* Port examples to GTK4 (except `calc.js` and `webkit.js`)
* Port examples to libsoup 3.0
* Don't use `var`
* Stop using `bytearray`
|
| |
|
|
|
|
|
| |
Clutter as a standalone library is being retired.
https://discourse.gnome.org/t/retiring-clutter-and-friends/8949
|
| |
|
|
|
| |
gnome-panel-3.0 isn't a thing anymore
|
|
|
|
|
| |
Add some basic examples of using GtkBuilder templates in GJS, with a
few comments covering the few options available.
|
|
|
|
| |
Future commits will also be made under this email address.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on looking at the git logs, add copyright notices to files which
were missing them, assuming the copyright belongs to people who made major
contributions to each file.
Some assumptions were made as to who to assign the copyright to, such as,
what copyright assignment did the contributor make in other files added in
the same commit? What email address did they use to make the commit? What
copyright assignment did they make in other commits using the same email
address?
|
|
|
|
|
|
|
|
|
|
|
| |
ESLint has deprecated jsdoc and instead recommends eslint-plugin-jsdoc.
lint-condo does not have eslint-plugin-jsdoc. We only use lint-condo for
eslint currently and it is simpler to instead use yarn to install and
manage eslint.
Some module files had JSDoc comments which violated the jsdoc
plugin's more stringent rules.
|
| |
|
|
|
|
|
|
| |
This adds a SPDX-License-Identifier comment to all files that are part
of GJS, part of its unit tests, or auxiliary tools. (Except for some
files like the debugger scripts that don't support comments.)
|
|
|
|
|
|
|
|
| |
The provenance of this image wasn't known, so replace it with a new image
that is known to be in the public domain.
Downloaded from https://www.flickr.com/photos/135396164@N05/30127978380
Dedicated to the public domain, CC0-1.0.
|
|
|
|
|
| |
This example was originally copied from Seed's examples, so it gets the
copyright and license information from Seed.
|
|
|
|
| |
I noticed it was broken while testing it with a new test.jpg image.
|
|\
| |
| |
| |
| | |
Update ESLint CI image.
See merge request GNOME/gjs!451
|
| |
| |
| |
| | |
- In ESLint v6, dangling commas on functions are now linted.
|
|/
|
|
|
|
| |
Add a simple implementation of GListModel, primarily as a demonstration
of implementing interfaces in genera, but particularly this interface as
it will be used quite a bit in Gtk4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the case where you don't need anything special from your GObject
property getters and setters, just correct handling of notify signals
and default values, it's now possible to leave out the getters and
setters, and GJS will just do the right thing. This is convenient for
JS code authors as well as avoiding problems caused by missing getters
and setters.
This only works for read-write properties. If a read-only or write-only
property is missing its accessor, then one is generated which throws.
If the property name consists of multiple words, then accessors will be
generated for all three variants: kebab-case, snake_case, and camelCase.
Additionally, if you do provide accessors for one of these, then they
will be copied to the other two variants.
See: #306
|
| |
|
|
|
|
|
| |
Apparently eslint has fixed some oversights in its dangling comma
detection.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This is done quite inconsistently across the codebase, so we pick the
most common style and enforce it. That is, no space before function
parentheses, except in the case of anonymous functions and async arrow
functions, where we add a space so as not to conflict with the rule of
spaces around keywords.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
We have this compiler warning enabled for the C++ code, so we may as
well have it for the JS code too. This one actually did catch a sort-of
bug.
Like some other rules where the fix isn't straightforward, we disable it
for tweener.js.
|
|
|
|
|
| |
This improves readability, having lots of extra parentheses is hard on
the eye.
|
|
|
|
|
|
| |
function foo() { ... } is shorter than var foo = function() { ... };,
and there's also less chance to have a discrepancy between the names of
the function and the variable holding it.
|
|
|
|
|
| |
This rule was already observed almost everywhere so let's make it
consistent.
|
|
|
|
|
|
|
| |
Using == for comparisons is a well-known gotcha that we should avoid.
However, we ignore the rule in tweener.js to reduce the risk of
regressions in the unmaintained code.
|
|
|
|
|
|
| |
This allows omitting the braces on a one-line block (note one-statement
is not necessarily one-line!) but enforces consistent brace style
between if and else clauses which can be a source of bugs.
|
|
|
|
| |
This is useful for making diffs smaller and easier to read.
|
|
|
|
|
|
| |
Use camelcase variables everywhere, but don't yet enable the rule for
real; it hasn't been in eslint that long and not all distributions have
caught up.
|
|
|
|
|
| |
Some of these show that there were rules active that we didn't really
care about, so we disable those rules; others were fixed.
|
|
|
|
| |
Use the no-tabs rule in eslint to enforce this in the future.
|
| |
|
|
|
|
| |
As discussed in the code review of !207.
|
|
|
|
|
| |
Run `eslint --fix examples --format unix`. Examples don't have a real
history, so that is acceptable.
|
|
|
|
| |
It was missing needed instructions.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This intends to fix a few linter errors without affecting the ability to
'git blame' large sections of code.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In introspection, libraries are a pair of (namespace, version). But
it's possible to request "the latest" version of a namespace, and this
is in fact what many projects do.
The problem is that for say GTK+ which has 2.0, 3.0, and is just releasing
4.0, most people's scripts imported gi.Gtk and expected to receive 3.0, and
will explode when installing 4.0.
Let's start warning about unversioned imports when there are multiple
versions available, and get people to do:
imports.gi.versions.Gtk = '3.0';
const Gtk = imports.gi.Gtk;
(Original patch by Colin Walters; revised by Philip Chimento.)
https://bugzilla.gnome.org/show_bug.cgi?id=689654
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we removed JSBool, JS_TRUE, and JS_FALSE in the previous commit, we
now also make usage of gboolean, TRUE, and FALSE consistent. In some
places, JSBool and gboolean were used interchangeably. Here, we take the
approach of using C++ bool, true, and false everywhere, except when
required by the API, e.g. for the return type of idle functions.
In a few instances, TRUE and FALSE were used in comments in JS code; here
we change those to true and false to avoid confusion.
Fixes a few formatting glitches in lines of code that were touched
anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=742249
|
| |
|