Commit Graph

62 Commits

Author SHA1 Message Date
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
Florian Müllner
360f5b1642 extensions-app: Add category in .desktop file
Predefined categories aren't a great way for organizing installed
applications, but they have their use in "stores" like Software
or flathub.

Not listing any category means we fall through the cracks, so
pick the (hopefully) least inappropriate one ...

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1160
2020-04-05 11:02:00 +00:00
Florian Müllner
f0a785df9d extensions-app: Add developer name in metainfo
Unlike Software, flathub doesn't fall back to the "project group"
when no developer is specified, so add one.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1160
2020-04-05 11:02:00 +00:00
Florian Müllner
e2c1bfbedd extensions-app: Add flathub badge to README
The app is now on flathub, so brag about that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1160
2020-04-05 11:02:00 +00:00
Florian Müllner
0a4974ac8c extensions-app: Do not expand headerbar switch
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2563
2020-04-03 02:29:55 +00:00
Florian Müllner
764527c8c9 js: Promisify async operations
Promises make asynchronous operations easier to manage, in particular
when used through the async/await syntax that allows for asynchronous
code to closely resemble synchronous one.

gjs has included a Gio._promisify() helper for a while now, which
monkey-patches methods that follow GIO's async pattern to return a
Promise when called without a callback argument.

Use that to get rid of all those GAsyncReadyCallbacks!

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1126
2020-03-31 05:43:40 +00:00
Florian Müllner
18742fcc32 build: Post-release version bump
With 3.36.1 out, let's start the next development cycle ...
2020-03-31 00:36:48 +02:00
Florian Müllner
c2cacc63ee extensions-app: Point homepage in metainfo to subproject
This is where the app code is located now, so it makes for a less
surprising landing page than the toplevel gnome-shell directory.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1150
2020-03-29 17:49:08 +00:00
Florian Müllner
c226081a23 extensions-app: Update README
Add the icon and use the app name instead of the subproject name.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1150
2020-03-29 17:49:08 +00:00
Florian Müllner
73df61f36d extensions-app: Add flatpak manifest
We finally have everything in place for distributing the Extensions app
as flatpak without jumping through too many hoops. Add a manifest that
can produce a nightly build like other GNOME modules, and can serve as
a template for a stable manifest on flathub.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1133
2020-03-27 23:33:30 +00:00
Florian Müllner
39e6375aff extensions-app: Move Extensions app to new subproject
The Extensions app code is now independent enough from the rest of the code
base to move it to its own subprojects, like we did for the extensions-tool.

This allows for stand-alone builds of the app, which we are about to use
for distributing it as flatpak.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1133
2020-03-27 23:33:30 +00:00
Florian Müllner
6baf490aab shew: Add small library for dealing with external windows
In order to support OpenExtensionPrefs()'s parentWindow parameter,
we will need the ability to make a window transient to an external
window identified by a string handle.

This takes the corresponding code from xdg-desktop-portal-gtk and
brings it into an introspectable form, likewise the counterpart in
libportal to export a string handle for a GtkWindow.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1087
2020-03-26 18:32:30 +01:00
Florian Müllner
fb9854c003 extensions-tool: Use new Extensions proxy
While sandboxing isn't a concern for the gnome-extensions command line
tool, using the Extensions proxy directly means that D-Bus methods are
called from the tool rather than gnome-shell, which allows the proxy
to auto-shutdown when done.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1106
2020-03-23 15:39:12 +00:00
Florian Müllner
7f6e2ff36b extensions-tool: Use OpenExtensionPrefs() method
LaunchExtensionPrefs() was deprecated in commit fda938175e,
so switch to the replacement.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1097
2020-03-22 15:31:07 +01:00
Florian Müllner
04352ae158 build: Add configuration summaries
Meson now has a summary() function to easily summarize the build
configuration after the project was configured, use that for some
fancy output when the feature is available.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1072
2020-03-21 20:44:43 +01:00
Florian Müllner
5c5dc03b78 build: Make bash-completion support optional
Whether we install bash-completion support currently depends on whether
the corresponding pkg-config dependency is found.

Turning this into a feature option keeps that behavior by default, but
also allows to explicitly enable or disable the support.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1072
2020-03-21 20:44:43 +01:00
Florian Müllner
8a89e22e8e build: Use fixed gettext domain for non-subproject extension-tool builds
Clarify how the option is supposed to be used by
 - ignoring it for non-subproject builds
 - enforcing that it is set for subproject builds

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1072
2020-03-21 20:44:43 +01:00
Florian Müllner
8f851e8adf build: Yield 'man' option to extension-tool subproject
Turns out meson has a build-in pattern of what we are doing, namely:
Set a subproject option to a parent project option of the same name.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1072
2020-03-21 20:44:43 +01:00
Florian Müllner
dc002a61eb build: Assert extension-tool version is bumped alongside gnome-shell
I always forget to keep the extension-tool version number in sync when
doing a new release. Given that it's unlikely that I'll do much better
in the future by myself, make distcheck fail when the versions don't
match.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1076
2020-03-21 18:00:25 +00:00
Florian Müllner
bf367daaba build: Fix some harmless compiler warnings
Some (newer?) GCC versions complain when a g_auto variable isn't
initialized when declared, even when the initialization is guaranteed
to happen before the variable is used or goes out of scope.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2298
2020-03-08 00:34:36 +00:00
Florian Müllner
1de008f2d5 Bump extensions-tool version as well 2020-03-08 01:33:20 +01:00
Florian Müllner
224ab2e543 extensions-tool: Add option to list updates
Now that we support extension updates, it may be useful to list
pending updates from the command line. It's easy enough to support,
so add a corresponding option to the list command.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/988
2020-02-10 22:43:00 +00:00