animationUtils: Group together various animation helpers
The environment module is used to initialize the environment, yet it currently also defines the adjustAnimationTime() function. Ideally it should not export any utility functions, in particular once converted to ESM. The function cannot be moved to the existing Utils module, as that depends on an initialized environment, and can therefore not be imported from environment.js, so use that opportunity to group together several animation helpers in a new animationUtils module. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2822>
This commit is contained in:
@ -13,7 +13,7 @@ const Dialog = imports.ui.dialog;
|
||||
const ModalDialog = imports.ui.modalDialog;
|
||||
const ShellEntry = imports.ui.shellEntry;
|
||||
const CheckBox = imports.ui.checkBox;
|
||||
const Util = imports.misc.util;
|
||||
const {wiggle} = imports.misc.animationUtils;
|
||||
|
||||
var KeyringDialog = GObject.registerClass(
|
||||
class KeyringDialog extends ModalDialog.ModalDialog {
|
||||
@ -83,7 +83,7 @@ class KeyringDialog extends ModalDialog.ModalDialog {
|
||||
});
|
||||
this.prompt.connect('notify::warning', () => {
|
||||
if (this._passwordEntry && this.prompt.warning !== '')
|
||||
Util.wiggle(this._passwordEntry);
|
||||
wiggle(this._passwordEntry);
|
||||
});
|
||||
warningBox.add_child(warning);
|
||||
|
||||
|
@ -16,7 +16,7 @@ const Main = imports.ui.main;
|
||||
const ModalDialog = imports.ui.modalDialog;
|
||||
const ShellEntry = imports.ui.shellEntry;
|
||||
const UserWidget = imports.ui.userWidget;
|
||||
const Util = imports.misc.util;
|
||||
const {wiggle} = imports.misc.animationUtils;
|
||||
|
||||
const DialogMode = {
|
||||
AUTH: 0,
|
||||
@ -267,7 +267,7 @@ var AuthenticationDialog = GObject.registerClass({
|
||||
this._infoMessageLabel.hide();
|
||||
this._nullMessageLabel.hide();
|
||||
|
||||
Util.wiggle(this._passwordEntry);
|
||||
wiggle(this._passwordEntry);
|
||||
}
|
||||
|
||||
/* Try and authenticate again */
|
||||
|
Reference in New Issue
Block a user