Commit Graph

83 Commits

Author SHA1 Message Date
Florian Müllner
40b65f21f3 Post-release version bump 2021-01-14 18:34:05 +01:00
Florian Müllner
edd34c50d9 Port extensions app and portal to GTK4
With the previous preparations in place, it is time to take the plunge.

As both the app and the portal use the same small library for handling
external windows, port everything at once to avoid the hassle of building
and installing two versions of the library.

With the portal using GTK4 now, all extensions must port their preference
widgets as well.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1495>
2021-01-14 13:03:21 +00:00
Florian Müllner
1bb0e1b9fc extensions-app: Explicitly dispose window when removed
Unlike in previous GTK version (or Clutter), destroy() no longer
breaks reference cycles but just releases the reference held by
GTK itself.

So any reference we hold - either the explicit property or any signal
handlers that bind the window as `this` - prevents the window from
being disposed when closed, and the application won't quit.

Work around this by explicitly running dispose() on the window when
it is removed from the application.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1495>
2021-01-14 13:03:21 +00:00
Florian Müllner
3af90918a3 extensions-app: Stop using :margin shortcut
The property has been removed in GTK4, so prepare for a port by
setting the four individual margin properties instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1495>
2021-01-14 13:03:21 +00:00
Florian Müllner
ad6fbaa245 extensions-app: Don't use deprecated margin-left/right properties
Use the text-direction-aware start/end variants instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1495>
2021-01-14 13:03:21 +00:00
Florian Müllner
8eb1792d39 extensions-app: Use consistent style for property names
GtkBuilder understands both dashes and underscores in property names,
and we currently use a mix of both. The actual properties use dashes,
so settle on that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1495>
2021-01-14 13:03:21 +00:00
Florian Müllner
20a68a609c extensions-app: Set title on window instead of headerbar
GTK4 will remove the GtkHeaderBar:title property, so stop using it
and set the window's title property instead, as that's what headbars
use in both GTK3 and GTK4 unless explicitly overridden.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1495>
2021-01-14 13:03:21 +00:00
Florian Müllner
c9c7629753 extensions-app: Remove stray angle brackets
Not sure how those sneaked in. GtkBuilder apparently ignores them,
but that's no reason for keeping them.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1495>
2021-01-14 13:03:21 +00:00
Florian Müllner
eb0339e223 shew: Use Xlib to set transient hint
The GDK API for setting the hint has been removed in GDK4, so prepare
for a port by using the underlying Xlib API directly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1495>
2021-01-14 13:03:21 +00:00
Florian Müllner
9ef9a5ff8a build: Pre-generate man pages at dist time
The man pages don't change very often, but draw in both docbook and
asciidoc. The latter is particularly problematic, as some distros
still ship only a python2 version of the tool.

Address this by generating the man pages at dist time, and including
the result in the tarball.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1553>
2020-12-28 02:25:24 +01:00
Florian Müllner
93115c3d8f Change upcoming version (again)
The extension website doesn't handle the chosen scheme correctly,
so use 40.alpha.1 instead.
2020-12-25 23:30:25 +01:00
Florian Müllner
adaa5ec6bd build: Change upcoming version to 40.alpha2
I messed up and released 40.alpha at the same time as 3.38.2, when it's
supposed to be in January. In order to re-align with the schedule, change
the upcoming version to 40.alpha2 so we don't have to skip a release and
will be back on track in time of 40.beta.
2020-12-22 01:46:14 +01:00
Florian Müllner
f2ee1587da Post-release version bump 2020-12-02 20:40:04 +01:00
Florian Müllner
12d9761c29 Tag version 40.alpha
Update NEWS.
2020-12-02 18:44:14 +01:00
Florian Müllner
9ef59b3b4f extensions-app: Add extension filtering
It's possible for the list of installed extension to get long
enough to make searching more convenient than scrolling.

Support that by implementing the standard search pattern[0]
with a hidden search bar and a toggle in the headerbar.

[0] https://developer.gnome.org/hig/stable/search.html.en

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3382
2020-11-12 22:05:46 +00:00
Florian Müllner
8d43deaad5 extensions-app: Add quit action
It's good practice to support the standard <ctrl>-q shortcut, so
add a corresponding action and set its accel accordingly.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3335
2020-10-28 21:45:18 +01:00
Florian Müllner
deb78b9ada Bump version to 40.alpha
The GNOME project has adopted a new versioning scheme[0], and
GNOME 3.38 will be followed by GNOME 40.

Open the new development cycle by switching to the new scheme, as
well as to post-release bumps as recommended.

[0] https://discourse.gnome.org/t/new-gnome-versioning-scheme/4235

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1456
2020-10-06 15:06:03 +02:00
Florian Müllner
b3c106c63b Bump version to 3.38.1
Update NEWS.
2020-10-05 20:36:03 +02:00
Bastien Nocera
3029119c9a subprojects: Update libgvc
This update is necessary to add support for recent UCM related changes
in ALSA and PulseAudio.

See https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/10

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1444
2020-09-21 15:08:46 +02:00
Florian Müllner
de78ed980c Bump version to 3.38.0
Update NEWS.
2020-09-14 17:56:13 +02:00
Florian Müllner
2ab6edda03 Bump version to 3.37.92
Update NEWS.
2020-09-06 01:04:54 +02:00
Florian Müllner
852303f71b Bump version to 3.37.91
Update NEWS.
2020-08-24 17:56:01 +02:00
Florian Müllner
33ff3dc44f Bump version to 3.37.90
Update NEWS.
2020-08-11 17:41:51 +02:00
Florian Müllner
7031449f01 Bump version to 3.37.3
Update NEWS.
2020-07-07 19:01:21 +02:00
Florian Müllner
35d21c0bca Bump version to 3.37.2
Update NEWS.
2020-06-03 01:29:26 +02:00
Koki Fukuda
3522338b3d extensions-tool: Escape '\' and '"' in json string
If user-input string contains '\' and/or '"', extensions-tool
generates invalid json.
This fixes that by escaping '\' and '"'.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1279
2020-05-28 11:23:19 +00:00
Florian Müllner
9cad7ae975 extensions-app: Indicate extension errors
Currently there is no indication that an extension had an error except
for the sensitivity of the switch (which may have a different cause).

This is useful information to users, so add a small error indicator
alongside the updates icon and show the actual error in the details.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2337
2020-05-21 21:45:04 +00:00
Florian Müllner
d2583aa47b extensions-app: Reset switch handle when it becomes insensitive
Currently the switches handle position reflects the requested
extension state (as in: the user (de)activated the switch),
while the actual extension state is reflected by the underlying
state.

That doesn't work well when the switch is insensitive though (for
example on error), because the desaturation neuters the color
that reflects the state.

Address this by resetting the switch handle to the state when
making it insensitive.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1263
2020-05-21 21:29:31 +00:00
Florian Müllner
94dca1606f extensions-app: Add permission to talk to gnome-session
This is required for offering a "Logout" option when handling extension
updates.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2735
2020-05-07 15:58:06 +00:00
Florian Müllner
27774582b6 extensions-app: Fix Logout call
Commit 764527c8c9 adjusted the "call" call to promisification that
never happened (in this bit of code).

We can either add back a callback or properly promisify the call;
this opts for the latter.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2735
2020-05-07 15:58:06 +00:00
AsciiWolf
05485fe04c extensions-app: Fix translatable string
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1231
2020-05-01 14:14:35 +02:00
Florian Müllner
f1af37f220 Bump version to 3.37.1
Update NEWS.
2020-04-29 21:40:33 +02:00
Florian Müllner
b02e3719b3 extensions-app: Rename executable
We kept the old binary name when overhauling the tool for the Extensions
app to avoid unnecessary churn for packagers/distributors.

However we now have a reason to "free" the old name, so rename the binary
to match the (sub)project name.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1220
2020-04-28 00:06:19 +02:00
Andy Holmes
3dc4f01113
JS: migrate from the global window to globalThis
As of mozjs68 (gjs-1.64) `globalThis` is recommended over `window` and
it makes more sense in this context anyways. Migrate the few instances
of `window` we use and adjust the eslint configuration.

`window` will continue to resolve to `globalThis`, so this won't affect
extensions or other downstream users.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2322

closes #2322
2020-04-26 19:07:02 -07:00
Jan Tojnar
9f1ad5d86d extension-tool/build: Install completions relative to our datadír
It is a good practice to install files relative to our own variables

https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/

and it is required on systems like NixOS.

Thanks to Iñigo, bash-completion support that since 2.10:

https://github.com/scop/bash-completion/pull/344

---

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1194
2020-04-13 15:27:09 +00:00
Florian Müllner
1b5cf0b8a8 build: Bump version requirement
We are currently optionally using a 0.53 feature, bump the requirement
to make it non-optional.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1186
2020-04-07 23:13:27 +02:00
Florian Müllner
306b005943 extensions-tool: Add small indicator template
Adding an additional icon to the top bar is one of the more common
patterns used by extensions. Make this easier by providing a template
for it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812
2020-04-07 20:27:00 +00:00
Florian Müllner
d229abf07d extensions-tool: Prompt for template when appropriate
When creating an extension interactively, we currently always use
the default template unless the --template option is used.

Instead, display the list of available templates to the user and
prompt them to pick one if it wasn't specified.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812
2020-04-07 20:27:00 +00:00
Florian Müllner
6f6251c0bc extensions-tool: Add --template create option
We now have everything in place to allow users to pick a template
other than the default one (although at the moment it's the only
one we have), so add a corresponding option.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812
2020-04-07 20:27:00 +00:00
Florian Müllner
fd034e3551 extensions-tool: Add hidden --list-templates option
This isn't a very useful option on its own, but will be used to
provide completions for a user-visible --template option.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812
2020-04-07 20:27:00 +00:00
Florian Müllner
f9bee05d49 extensions-tool: Add template metadata
When we allow users to choose between different templates, we should
provide some context for each template to facilitate that choice.

Add that metadata in the form of a .desktop file, which allows us to
specify name and description, and is well supported by our translation
infrastructure.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812
2020-04-07 20:27:00 +00:00
Florian Müllner
37c6fbc6b2 extensions-tool: Prepare for alternative templates
The template used when creating a new extension is intentionally
minimal, as the sample code in the old extensions-tool proved to
be annoying more often than not.

However as we support per-command options, we don't have to limit
ourselves to a single template, and can offer alternatives for
common use cases.

To prepare for that, namespace the existing template by moving it
into a subfolder.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812
2020-04-07 20:27:00 +00:00
Florian Müllner
9719604b79 extensions-tool: Separate create metadata when prompting
When using the create command's --interactive option, we prompt for
any metadata that wasn't passed on the command line. As every prompt
is preceded by a short multi-line description, it is hard to follow
when everything is lumped together.

Improve legibility by separating all prompts by newlines.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812
2020-04-07 20:27:00 +00:00
Florian Müllner
b6262f0666 extensions-tool: Handle NULL input when prompting for metadata
g_data_input_stream_read_line_utf8() may return NULL, for example
when interrupting the prompt with ^D. Handle that case and keep
prompting until we got a line.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812
2020-04-07 20:27:00 +00:00
Florian Müllner
d80ef67d1d extension-tool: Use enable/disable D-Bus API if possible
Commit 4589da957 added D-Bus API for enabling/disabling extensions,
use that if possible to provide better feedback and not clutter the
settings with non-existent UUIDs.

The old code path is preserved as fallback to keep the commands
working from outside a running shell session.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391
2020-04-05 13:42:50 +02:00
Florian Müllner
62f3457a95 extensions-tool/uninstall: Error out for system extensions
UninstallExtensions() only returns whether the operation was successful,
not why it failed. However we know that only user extensions can be
uninstalled, so check that first to provide a more meaningful error.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391
2020-04-05 13:42:50 +02:00
Florian Müllner
636ab4b0e9 extensions-tool: Split out get_extension_property() helper
For the prefs command, we first fetch the extension info to check
whether the extension exists and actually has preferences. This
pattern can be useful for other commands and properties, so split
out a generic helper function.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391
2020-04-05 13:42:50 +02:00
Florian Müllner
23e382dd33 extensions-tool: Log existing errors
In many cases we currently only indicate failure in the return value,
which is easily missed. Print some meaningful errors instead.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391
2020-04-05 13:42:50 +02:00
Florian Müllner
f5a170ce46 extensions-tool: Add common option to silence errors
Error reporting is useful when used interactively, but often undesirable
when used in scripts. Account for that with a common --quiet option,
which is more convenient than redirection stderr to /dev/null.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391
2020-04-05 13:42:50 +02:00
Florian Müllner
fbd6beea2c extensions-app: Validate .desktop file during meson test
... if desktop-file-validate is available.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1160
2020-04-05 11:02:00 +00:00