Commit Graph

634 Commits

Author SHA1 Message Date
Florian Müllner
eff625fcb8 native-window-placement: Adjust to gnome-shell changes
The extension was affected pretty badly by the window picker overhaul;
adjust to all(?) the major and minor changes to get it to work again.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/124
2020-07-07 17:39:36 +02:00
Florian Müllner
3742f79d4b window-list: Adjust to gnome-shell changes
The window picker saw a significant overhaul. Amazingly the adjustments
necessary are relatively small ...

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/124
2020-07-07 17:31:52 +02:00
Florian Müllner
b6a3503f5e window-list: Remove some dead code
Since PanelMenu.Button started to inherit from St.Widget, the custom
_allocate() function isn't called anymore.

Simply changing the function to vfunc_allocate() doesn't work as other
changes happened in the meantime, so for now just remove it altogether.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/124
2020-07-07 17:31:52 +02:00
Florian Müllner
aeaba3f379 window-list: Replace removed Clutter.BoxLayout method
The method was deprecated for years and has finally been removed.
Just set appropriate expand/align properties on the children and
add them with the usual add_child() method.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/122
2020-05-28 02:46:06 +02:00
Florian Müllner
f96943a4dc window-list: Replace allocation-changed signal
It has been removed in favor of notify::allocation.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/122
2020-05-28 02:46:06 +02:00
Florian Müllner
60ad2e37ff window-list: Stop using obsolete StBin properties
Those properties were deprecated (and made no-ops) last cycle, and
have now been removed altogether.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/122
2020-05-28 02:46:06 +02:00
Florian Müllner
8c53fd9590 workspace-indicator: Stop using obsolete StBin properties
Those properties were deprecated (and made no-ops) last cycle, and
have now been removed altogether.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/122
2020-05-28 02:46:06 +02:00
Florian Müllner
9db7b96f24 window-list: Modernize preference dialog a bit
The current widget uses UI patterns that are reminiscent of GNOME 2.
It doesn't take a lot to make it look more modern: Simply giving the
radio group a distinct background and border allows us to move the
whole UI to the center, making the dialog more balanced and visually
pleasing.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/121
2020-05-03 19:51:24 +02:00
Florian Müllner
c87cfc822a auto-move: Overhaul preference dialog
auto-move uses the same outdated UI pattern as workspace-indicator did
until commit 90d3c5c51d, imposing the same problems for a future GTK4
port.

So replace treeview and toolbar with an editable list like we did for
the other extension.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/121
2020-05-03 19:51:24 +02:00
Florian Müllner
ac937b9549 user-theme: Make rows non-selectable
A row has to be activated to select a theme, not merely selected.
The selection therefore doesn't do anything, so disable it.
2020-04-29 21:44:13 +02:00
Florian Müllner
5b2bdd138a user-themes: Support session mode styles
Session mode stylesheets are installed in gnome-shell's theme
directory instead of a subdirectory of the global themes direc-
tory.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/118
2020-04-17 16:33:03 +00:00
Florian Müllner
90d3c5c51d workspace-indicator: Overhaul prefs widget
Inline toolbars are an outdated UI pattern, and both the toolbar widget
and the inline styling have been removed from GTK4. Making sure the
extension doesn't get in the way of a future GTK4 port is a good excuse
for modernizing the UI, so do just that :-)

Replace treeview and toolbar with an editable list as outline in the HIG:
https://developer.gnome.org/hig/stable/lists.html.en

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/120
2020-04-17 17:54:15 +02:00
Milan Crha
b00e531626 window-list: Invalid current mode selected in Preferences
It seems that gtk+ resets the active radio whenever a new radio button
is added into the group, thus rather restore the current mode after
the group is fully populated.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/119
2020-04-17 09:37:13 +02:00
Florian Müllner
739b1e11a0 user-themes: Add preference widget
While we don't endorse or support 3rd party theming, the extension
exists and is actively used. However right now the most convenient
way of setting it up is by installing Tweak Tool; give users an
alternative by providing a simple settings dialog ourselves.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/117
2020-04-12 04:13:25 +02:00
Florian Müllner
8fb5476a1c build: Drop syntax-checks from meson test
Those checks are just as well handled by the CI, and removing them
makes for a nice build system cleanup.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/116
2020-04-11 01:08:02 +02:00
Florian Müllner
4722b89cc3 cleanup: Don't linebreak before closing parentheses
Otherwise recent versions of eslint want "dangling" commas,
which is at least ugly considering that most functions don't
allow adding arguments at leisure.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/116
2020-04-11 01:03:38 +02:00
Florian Müllner
bce63d3168 places-menu: Emphasize eject buttons here as well
We already align the buttons correctly here, but otherwise they can
use the same treatment as in the drive-menu.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/223
2020-04-10 14:31:40 +00:00
Florian Müllner
0426d1d8d5 drive-menu: Emphasize eject buttons as distinct controls
The buttons currently appear more as an attachment to the label
than as distinct controls. Address that by:

 - applying .button styling
 - increasing spacing between label and button
 - aligning buttons at the end

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/223
2020-04-10 14:31:40 +00:00
Xiaoguang Wang
f9aaa732b2 windowPicker: Wrong signal ID _nWorkspacesNotifyId
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/106
2020-04-10 16:27:41 +02:00
Florian Müllner
7d5c985004 build: Switch to js68 for tests
It's what the cool kids use nowadays ...
2020-03-07 23:07:37 +01:00
Florian Müllner
1ee3803265 window-list: Fix typo
Whoops, missed a shift-press there. Another issues that sneaked
in thanks to the broken eslint check.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/105
2020-01-26 23:43:18 +01:00
Florian Müllner
b25c4d07a7 style: Avoid unnecessary parentheses
The eslint check in CI is broken, and some style nits weren't caught
as a consequence.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/105
2020-01-26 23:43:18 +01: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
c958e2d0fd window-list: Force single-line window titles
While window titles really really shouldn't contain newline characters,
they are under application control and therefore may very well do.
Force the corresponding labels to be single line, to prevent offending
applications from messing up the whole window list layout.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/202
2020-01-17 15:03:54 +01:00
Florian Müllner
9c964eaf1b drive-menu: Stop using deprecated child properties
StBoxLayout's child properties were deprecated in favor of the generic
expand/align properties.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/102
2020-01-09 20:16:39 +01:00
Florian Müllner
0500480d75 window-list: Stop using deprecated child properties
StBoxLayout's child properties were deprecated in favor of the generic
expand/align properties.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/102
2020-01-09 20:15:52 +01:00
Florian Müllner
37a09b7be1 apps-menu: Stop using deprecated (child) properties
StBoxLayout's child properties were deprecated in favor of the generic
expand/align properties.

StBin now uses the same Clutter.Actor properties instead of its own.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/102
2020-01-09 20:13:11 +01:00
Florian Müllner
25b6b562d9 windowPicker: Adjust to gnome-shell changes
WorkspacesDisplay now takes an adjustment for the workspace position,
provide that.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/100
2020-01-09 19:25:25 +01:00
Willy Stadnick
a2b014ccbf screenshot-window-sizer: Fix cycling through all valid sizes
When cycling through window sizes, we should skip any sizes that are
bigger than the available area. We do that, but the current code
assumes that the possible sizes are sorted, which is no longer the
case since the addition of "phone" sizes in commit 5b43d4733c.

As a result, we may now skip sizes that would fit perfectly fine.
Address this by filtering out invalid sizes beforehand instead of
assuming a certain order (wich no longer work due to the addition
of a portrait format).

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/97
2019-11-26 00:49:08 +01:00
Florian Müllner
95131dc252 workspace-indicator: Exclude DESKTOP windows from window previews
While nautilus removed its desktop support a while ago in favor of an
extension, it's still possible that some external X11 desktop icon app
is used. As DESKTOP windows cannot be moved between workspaces or stacked,
and aren't perceived as regular windows, it doesn't make sense to show
them as previews in the workspace switcher.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/93
2019-11-21 21:42:16 +00:00
Florian Müllner
f3acb27d61 window-list: Exclude DESKTOP windows from window previews
While nautilus removed its desktop support a while ago in favor of an
extension, it's still possible that some external X11 desktop icon app
is used. As DESKTOP windows cannot be moved between workspaces or stacked,
and aren't perceived as regular windows, it doesn't make sense to show
them as previews in the workspace switcher.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/93
2019-11-21 21:42:16 +00:00
Florian Müllner
a904d51cf7 window-list: Fix faking overview
The public overview properties are now read-only, so switch to the
private properties which back them to fake the overview visibility.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/96
2019-11-21 22:38:50 +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
9077687c0a places-menu: Fix loop
Fix fallout from commit 63c07bdc73.
2019-08-21 20:00:22 +00:00
Florian Müllner
fcbfaec53e apps-menu: Adjust to mutter API change
The global grab API got dropped from mutter's Clutter fork, so use the
corresponding input device API instead.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/90
2019-08-21 19:39:11 +02: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
63c07bdc73 cleanup: Don't shadow variables
Having variables that share the same name in overlapping scopes is
confusing and error-prone, and is best avoided.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:44 +00:00
Florian Müllner
fdc3dda484 cleanup: Fix stray/missing spaces
Those are wrong according to our style guidelines, but the previous
eslint ruleset didn't catch them.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:44 +00:00
Florian Müllner
fca516e58a cleanup: Disambiguate assignments in arrow functions
As arrow functions have an implicit return value, an assignment of
this.foo = bar could have been intended as a this.foo === bar
comparison. To catch those errors, we will disallow these kinds
of assignments unless they are marked explicitly by an extra pair
of parentheses.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:43 +00:00
Florian Müllner
c14f7f6fb8 cleanup: Use consistent style for ternary operator
We are currently inconsistent whether to put the operators in front
of the corresonding line or at the end of the preceding one. The
former makes more sense, so go with that.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:43 +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
a1f38d818d cleanup: Use some more array destructuring
Array destructuring has been supported by gjs/mozjs for quite some time,
so we are already using it heavily where it makes sense.

However one place still sneaked through where using destructuring makes
sense, as the element's position has semantic meaning (instead of just
making it the first, second, ... element).

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:43 +00:00
Florian Müllner
9646149f9a cleanup: Use object shorthand where possible
ES6 allows to omit property names where they match the name of the
assigned variable, which makes code less redundant and thus cleaner.
We will soon enforce that in our eslint rules, so make sure we use
the shorthand wherever possible.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:43 +00:00
Florian Müllner
b6d02f8e1f cleanup: Use operator shorthands where possible
Shorthands like a += b are well-established, so prefer them over the
less concise a = a + b.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91
2019-08-21 15:13:43 +00:00