Florian Müllner
563d7770d3
lint: Sync with gnome-shell
...
gnome-shell started transitioning to gjs' object spacing rule,
i.e. `{foo: 42}` instead of `{ foo: 42 }`.
We have a much smaller code base than the shell and aren't using
a secondary "allowed-but-deprecated" configuration that allows a
gradual transition, so just pull the switch and update to the new
style.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/240 >
2022-08-20 19:00:32 +02:00
Florian Müllner
72a9696249
build: Remove unused stylesheets
...
The only reason for installing empty stylesheets is minimizing
build system differences between extensions. That's not a very
good reason and we don't do this for other optional files like
schemas.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/223 >
2022-03-24 00:53:13 +01:00
Florian Müllner
9f673f27ef
cleanup: Use static class blocks for gtype registration
...
gjs enabled support for static class blocks, which gives us a
less error-prone and more readable alternative to _classInit(),
provided we make sure to call registerClass() first.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/215 >
2022-02-18 03:34:06 +00:00
Florian Müllner
08db193b31
cleanup: Use regular constructors in GObject subclasses
...
As a side-effect of supporting class fields, regular constructors
now work in GObject subclasses. Using _init() still works and
there's no functional difference, but it's simply much nicer
to use the same syntax for all classes.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/215 >
2022-02-18 03:34:06 +00:00
Florian Müllner
d0b9c9b54a
cleanup: Document functions
...
gjs now enforces this in its eslint configuration. Adding type
information generally is a good idea, so add appropriate comments
to public functions before picking up that configuration change.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/180 >
2021-08-13 04:48:22 +02:00
Florian Müllner
e094dead91
windowsNavigator: Adjust to gnome-shell change
...
Parts of WindowPreview were moved to C for performance reasons, which
turned a formerly private JS property into a GObject property.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/302
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/170 >
2021-04-08 16:38:40 +02:00
Florian Müllner
cf3690a434
windowsNavigator: Adjust to gnome-shell changes
...
Unsurprisingly, the big overview changes in gnome-shell broke the
extension. Make the necessary adjustments to get it working again:
- changed constructor parameters for Workspace/WorkspacesView
- overall state handling done by adjustment
- window preview layout changes
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/296
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/163 >
2021-03-10 15:28:37 +00:00
Thun Pin
737c897624
window-navigator: Adjust to 3.38 overview changes
...
gnome-shell's overview code changed significantly in 3.38,
adjust the extension to work without the separate overlay.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/259
2020-11-18 23:54:18 +00:00
Florian Müllner
330e7b312d
windowsNavigator: Adjust to deprecated API removal
...
The old raise/lower methods have been deprecated for years, and
mutter finally removed those APIs.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/104
2020-01-26 23:30:55 +01:00
Florian Müllner
01f921541f
windowsNavigator: Use normal inheritance for non-GObject class
...
More fallout from commit 63615cb657 .
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/104
2020-01-26 23:30:55 +01:00
Florian Müllner
cc52f4a260
windowsNavigator: Add missing imports
...
Commit 63615cb657 missed that, which is an easy mistake to make.
But how on earth did CI not catch this?!
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/104
2020-01-26 23:25:38 +01:00
Florian Müllner
30ad3d670f
extensions: Stop setting GTypeName
...
The type name generated by gjs now includes the filename, so we
don't have to set it ourselves to make sure it's unique.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/95
2019-11-21 22:25:43 +01:00
Marco Trevisan (Treviño)
63615cb657
cleanup: Use inheritance for Actor classes instead of composition
...
Use GObject types when inheriting from native actor classes.
Related to https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/89
2019-11-21 21:22:26 +00:00
Florian Müllner
7c170e7e90
cleanup: Always use type-safe comparisons
...
The type coercion performed by the regular == and != operators can
have surprising results. It is therefore considered good practice
to use the type-safe === and !== variants instead.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:44 +00:00
Florian Müllner
ed7a292805
cleanup: Don't use comparison operator when checking falsy values
...
We mostly use the regular == and != comparison operators over their
type-safe === and !== counterparts. This is about to change, but there
are some places where we don't care whether a value is null, undefined
or 0; just check for falsiness there instead of using operators, so
we can start to consistently use the type-safe operators everywhere
else in a follow-up commit.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:44 +00:00
Florian Müllner
eb79f5b512
cleanup: Require "dangling" commas
...
Since ES5, trailing commas in arrays and object literals are valid.
We generally haven't used them so far, but they are actually a good
idea, as they make additions and removals in diffs much cleaner.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:44 +00:00
Florian Müllner
eceff51ba1
cleanup: Use consistent brace style of blocks
...
Our coding style has always been to avoid braces when all blocks
are single-lines. Make sure we apply that style consistently.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:44 +00:00
Florian Müllner
2497dc6d31
cleanup: Use object destructuring where possible
...
ES6's destructuring is a nice way of assigning a variable in a concise way,
without duplicating the name of the object property. Use it consistently
where possible.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:43 +00:00
Florian Müllner
e217f23767
cleanup: Avoid unnecessary parentheses
...
Extra parentheses usually add noise rather than clarity, so avoid
them.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:43 +00:00
Florian Müllner
376502e952
windowsNavigator: Don't add linebreak before operator
...
When breaking overly long conditions into multiple lines, the operator
should end the previous line instead of starting the new one.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:43 +00:00
Florian Müllner
3671d5a299
cleanup: Use an extension object instead of globals
...
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/143
2019-04-08 06:00:29 +00:00
Florian Müllner
a024d9f005
windowsNavigator: Use subclasses instead of injections
...
gnome-shell moved to ES6 classes, which means the constructor is
no longer a regular method that we can swap out with an injected
version.
Instead, do our modifications in subclasses and use them to replace
the original classes.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/143
2019-04-08 06:00:29 +00:00
Florian Müllner
db35d7ae7c
style: Change indentation style of object literals
...
Instead of keeping the first property on the same line as the opening
brace and aligning the properties, use a four-space indent. This brings
us closer to gjs' coding style, and as a bonus helps keeping lines in
the soft 80 character limit.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/57
2019-02-28 23:29:24 +01:00
Florian Müllner
0d41643866
cleanup: Use destructuring for imports from GI
...
This is *much* nicer than repetitive "imports.gi" lines ...
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/54
2019-02-16 00:49:44 +01:00
Florian Müllner
3861ffae31
extensions: Mark exported symbols
...
eslint obviously doesn't know about gnome-shell's extension API, so
the various entry points trigger unused-variable errors. To fix,
explicitly mark those symbols as exported.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50
2019-01-28 06:51:20 +01:00
Florian Müllner
08a04b2f02
cleanup: Mark unused (but useful) variables as ignored
...
While we aren't using those destructured variables, they are still useful
to document the meaning of those elements. We don't want eslint to keep
warning about them though, so mark them accordingly.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50
2019-01-28 06:51:09 +01:00
Florian Müllner
7b363fd659
cleanup: Mark unused arguments as unused
...
This will stop eslint from warning about them, while keeping their
self-documenting benefit.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50
2019-01-28 06:51:02 +01:00
Florian Müllner
1be7061da0
style: Fix stray/missing spaces
...
Spotted by eslint.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/49
2019-01-28 06:37:28 +01:00
Florian Müllner
f75d1d75af
style: Fix stray/missing semi-colons
...
Spotted by eslint.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/49
2019-01-28 06:37:28 +01:00
Florian Müllner
b741b1bbe2
cleanup: Remove empty init() functions
...
The method is optional, so there's no point at all in letting the
shell call an empty method during initialization.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/49
2019-01-28 06:37:28 +01:00
Florian Müllner
a317d75f70
cleanups: Clean up unused imports
...
Spotted by eslint.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/49
2019-01-28 06:37:28 +01:00
Jonas Ådahl
6583eae622
Remove usage of MetaScreen
...
As of the libmutter API version 3 MetaScreen does no longer exist.
Functionality that previously depended on MetaScreen has been moved
elsewhere (e.g. MetaDisplay or MetaWorkspaceManager etc).
https://bugzilla.gnome.org/show_bug.cgi?id=759538
2018-07-06 19:53:08 +02:00
Florian Müllner
ba27cc4a64
cleanup: Get rid of Lang.bind()
...
After replacing Lang.Class with ES6 classes and adopting arrow notation
for anonymous callbacks, we only use the Lang module 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.
So just use the built-in function directly instead of the wrapper.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/30
2017-12-01 20:50:52 +01:00
Florian Müllner
968ae427f1
cleanup: Use arrow-notation for anonymous functions
...
Arrow notation is great, but as we only started using it recently,
we currently have a wild mix of Lang.bind(), function() and () => {}.
To make the style consistent again, change all anonymous functions
to arrow notation.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/30
2017-12-01 20:40:32 +01:00
Florian Müllner
ba38019049
build: Remove autotools support
...
Complete the switch to meson and drop autotools support ...
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/31
2017-12-01 17:43:21 +01:00
Florian Müllner
3ab01aebec
build: Support the meson build system
...
Meson is on track to replace autotools as the build system of choice,
so support it in addition to autotools.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/31
2017-12-01 17:41:04 +01:00
Florian Müllner
8c551ba8ee
windowsNavigator: Use regular for() loops
...
"for each ... in" has been deprecated for a long time and won't be
supported in upcoming SpiderMonkey versions, so replace it with
"for ... of" instead.
2017-10-26 20:03:12 +02:00
Giovanni Campagna
01f168341f
windowsNavigator: update for gnome-shell changes
2013-09-03 10:36:31 +02:00
Giovanni Campagna
274a6f040c
Update descriptions of extensions
...
Mark classic mode extensions as such, so bug reports don't go
lost in my inbox.
2013-05-20 19:06:59 +02:00
Giovanni Campagna
5052c6d350
windowsNavigator: update for gnome-shell changes
...
The position of a workspace is not part of a geometry object.
2013-05-01 00:45:06 +02:00
Giovanni Campagna
348f0faf22
windowsNavigator: fix a warning in disable()
2013-02-04 23:58:33 +01:00
Giovanni Campagna
b907e44fdf
windowsNavigator: update for gnome-shell changes
...
Update for the new way to layout window overlays
2013-02-04 23:52:17 +01:00
Giovanni Campagna
9d9ef27317
WindowsNavigator: fix with recent shell
...
Recently WindowsNavigator would just crash the shell upon entering
the overview. I'm not sure where the bug was, probably it was due to
the new window layout code.
2012-11-20 16:37:20 +01:00
Giovanni Campagna
5ca52e89d5
windowsNavigator: update for gnome-shell changes
...
The ViewSelector was refactored for modekill feature. Update
accordingly.
2012-08-22 16:19:33 +02:00
Giovanni Campagna
e1c1fc73e2
windowsNavigator: only access tooltip if it's known to exist
...
Apparently, windowOverlay._text can be null sometimes. In that
case, do nothing instead of crashing.
2012-04-26 22:50:11 +02:00
bhuztez
82bd3efc73
windowsNavigator: do nothing when viewtab is not active
...
The keybindings should only kick-in when the "windows" tab is active,
otherwise it is confusing and could conflict with other combinations.
2012-03-03 02:11:25 +01:00
Giovanni Campagna
dfca68062c
build system: add additional automatic metadata
...
Add "gettext-domain", "extension-id" (containing the base part of the
UUID) and "gschemabase" (which, combined with "extension-id", gives
the GSettings schema) to metadata.json, autogenerated by the build
system.
2012-02-08 18:00:56 +01:00
Giovanni Campagna
8bc650ae19
windowsNavigator: improve the appearance of tooltips
...
Based on a patch by Simon Friis Vindum <simonfv@mail.com >
2012-02-06 21:18:39 +01:00
Giovanni Campagna
037a65c3d1
windowsNavigator: allows input from the keypad
...
Based on a patch by Simon Friis Vindum <simonfv@mail.com >
2012-02-06 16:42:34 +01:00
Giovanni Campagna
6442791482
windowsNavigator: fix switching with azerty keyboards
...
Some keyboard layouts (in particular, azerty / french) require
pressing shift to obtain numerals. Therefore we should not cancel
the switch when shift is pressed.
Also, we should accept indifferently left or right modifiers.
2011-12-01 17:05:29 +01:00