In order to replace GTK+'s GtkPolicyType. It's bit-compatible with it, too.
All callers have been updated to use it.
This is a purely accessory change in terms of X11 Display usage cleanup,
but helps see better what is left.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
ES6 finally adds standard class syntax to the language, so we can
replace our custom Lang.Class framework with the new syntax. Any
classes that inherit from GObject will need special treatment,
so limit the port to regular javascript classes for now.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
dialogContent is set to one of the elements of the list DialogContent,
but not all of those have a checkBoxText property. When logging out (as
opposed to shutting down), this causes a warning:
JS WARNING: [resource:///org/gnome/shell/ui/endSessionDialog.js
763]: reference to undefined property "checkBoxText"
(The line number corresponds to this line in 3.28.3.)
The warning is apparently not triggered if the undefined property is
used as part of a boolean expression:
gjs> var x = {};
gjs> x.a;
typein:2:1 strict warning: reference to undefined property "a"
gjs> if (x.b) { log('oh no'); }
gjs> x.c || ''
""
_setCheckBoxLabel() just checks the truthiness of its 'text' argument,
and the empty string is false-y, so passing '' rather than undefined has
no functional effect.
If we're started by systemd, we won't be in the user's display session.
However, this is still the session that will get locked & unlocked. Ask
logind what the 'display' or 'greeter' session is, and watch for the
Unlock signal for that session to know when to unlock.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/137
When not using arrow notation with anonymous functions, we use Lang.bind()
to bind `this` to named callbacks. However since ES5, this functionality
is already provided by Function.prototype.bind() - in fact, Lang.bind()
itself uses it when no extra arguments are specified. Just use the built-in
function directly where possible, and use arrow notation in the few places
where we pass additional arguments.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
Any symbols (including class properties) that should be visible
outside the module it's defined in need to be defined as global.
For now gjs still allows the access for 'const', but get rid of
the warnings spill now by changing it.
https://bugzilla.gnome.org/show_bug.cgi?id=785084
The following code is a syntax error in ES6:
let a = 'something';
let a = 'other thing';
Previously GJS would silently accept this code, but in the next release the
SpiderMonkey JS engine will be more ES6-compliant.
https://bugzilla.gnome.org/show_bug.cgi?id=778425
Interrupting update installation can mess up the package database quite
a bit and could lead to totally destroying the distro installtion. To
avoid running out of juice during an upgrade, warn when someone tries to
install updates on battery power.
https://bugzilla.gnome.org/show_bug.cgi?id=722898
This adds a checkbox for installing software updates to the shut down
dialog. The implementation relies on an already prepared offline update
and uses PackageKit's pk-trigger-offline-update helper to trigger the
installation.
https://bugzilla.gnome.org/show_bug.cgi?id=722898
This moves the dialog type overriding that gnome-software uses to bring
up restartInstallDialogContent from _sync() to OpenAsync(), in order to
ensure the type is overridden early enough to show the correct buttons.
While at this, make sure the & symbol in the button's label is escaped
to avoid runtime warnings, now that the label actually gets used.
https://bugzilla.gnome.org/show_bug.cgi?id=722898
Sometimes gnome-session hands us a bad object path for JIT inhibitors
it creates for XSMP clients. While this is a bug in gnome-session, we
shouldn't show an empty-looking dialog here.
https://bugzilla.gnome.org/show_bug.cgi?id=706612
The end session dialog was waiting a second before updating
its text to display the timer. It is nicer to show the correct
message from the start.
https://bugzilla.gnome.org/show_bug.cgi?id=702056
It turns out that we never destroyed modal dialogs when closing
them, causing them to still linger in the scene graph even when
there were no references to them in the JS. The one case where
we don't want to destroy modal dialogs after being closed is
endSessionDialog, so provide a parameter that allows classes
to override this behavior.
https://bugzilla.gnome.org/show_bug.cgi?id=697295
Right now if a user logs out, they are thrown to the login screen
imediately, without even seeing the dialog close.
This commit fades the dialog out before processing the logout.
https://bugzilla.gnome.org/show_bug.cgi?id=694296
Modal dialogs take an optional timestamp in their close method.
If the timestamp is not passed in, then global.get_current_time()
is used.
Some callers of the close method pass in global.get_current_time()
unnecessarly (since it's the default).
This commit drops the argument for those cases.
https://bugzilla.gnome.org/show_bug.cgi?id=694296