xgettext gained some support for template strings, and no longer
fails when encountering '/' somewhere between backticks.
Unfortunately its support is still buggy as hell, and it is now
silently dropping translatable strings, yay. I hate making the
code worse, but until xgettext really gets its shit together,
the only viable way forward seems to be to not use template
strings in any files listed in POTFILES.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1014
While gnome-shell will now check for extension updates, the checks
are performed infrequently. Opening the Extensions app implies that
the user's current focus is on extensions, so it is an appropriate
time to schedule another updates check.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
Now that we have support for extension updates in the shell, we
need some place to display the updates to the user.
As we are establishing the Extensions app as the primary way for
managing extensions, it's a natural place for that functionality.
Show which extensions have updates available, and offer a log out
button (so gnome-shell can apply the updates when logging back in).
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
Until now, it didn't matter whether an extension was installed in the
user's home or system-wide. However with support for uninstallation,
there is now a significant different, as that action is only available
for user extensions.
Account for that by separating extensions by type, so that users don't
have to second-guess which extensions can be fully-managed and which
appear as part of the system.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
The newly added expander gives us a place where we can display
more details without cluttering the interface.
Take advantage of that by including the extension website, version
and author.
(Author is in the mockups, but will not actually be shown until
the extensions website is changed to include it in its metadata;
however best to have UI and string in place for the freezes)
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
The description can be useful information, but also increases the
visual complexity of the extensions list. Move it into a hidden
details area that can be expanded, which unclutters the interface
while keeping the information readily available.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
The current fixed two-line label requires a custom widget, which
make moving to a widget template harder.
As the description will soon move elsewhere anyway, just go back
to a single line with a standard label for now.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
Extensions can have a major impact on stability and performance. Now that
the tool will become the main way for users to manage their extensions, it
is an appropriate place to warn the user of that risk.
Add a small info popover to the headerbar to display that warning, together
with the previously removed hint of where to go for finding new extensions.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
Currently when the extensions list is scrolled, it is possible to
keynav out of view, as the scrolling doesn't follow the key focus.
Hook up the adjustment to fix that.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
Currently the main window is a plain Gtk.ApplicationWindow that is
built and managed from within the application.
As the application becomes more complex, it makes sense to decouple
the two and handle the window from a separate ExtensionsWindow class.
Not least this is a prerequisite of using a widget template for the
window.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
GNOME Software will remove its extension support, so we should stop
referencing it in addition to extensions.gnome.org.
In fact, the placeholder is not the best place to hint at where new
extensions can be found, as the user will never see it in case the
distribution includes pre-installed extensions.
So remove the hint altogether, we will add it back in a more prominent
place later.
With the whole placeholder now being much lighter, we can stop dimming
the remaining elements.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
We have three interactions with an extension's prefs module:
- we import the module
- we call its init() hook
- we call its buildPrefsWidget() hook
The first two are one-time actions where we expect most getCurrentExtension()
calls (local imports, initTranslations() etc.).
However it's still possible that the extension will use the utility function
in buildPrefsWidget() as well, either directly or via other functions like
getSettings(): Make sure getCurrentExtension() returns the correct extension
in that case, not the last one whose preferences were initialized.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/873
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/merge_requests/805
ES6 allows to omit property names where they match the name of the
assigned variable, which makes code less redunant 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/merge_requests/805
Xgettext learned about template strings now, which is good. However
it's still buggy, so instead of the "classic" xgettext issue with
backticks, we now have exciting new issues to find work-arounds for.
One issue is that it doesn't detect backticks inside string constants
as regular characters, so having an odd number of backticks throws off
its regex.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792
We disable and enable extensions inside the `notify::active` signal
handler, but we shouldn't do that in case the change didn't come from
the user but because something else changed the state of the extension.
This causes an issue when the extensionPrefs window is open and the
session gets locked: The extensions are temporarily disabled by the
shell, extensionPrefs updates its switches on the state change and adds
those extensions to the `disabled-extensions` gsettings key inside the
signal handler. Now when the session is unlocked again, the extensions
won't be enabled again since they're forced-disabled.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/705
gjs no longer has an implicit dependency on GTK 3.0, so without
requesting an explicit version, we will get the highest available.
Our code isn't GTK-4 ready, so request 3.0 explicitly.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/686
By direclty using the underlying GSetting, whether or not an extension
appears as enabled or disabled currently depends only on whether it is
included in the 'enabled-extensions' list or not.
However this doesn't necessarily reflect the real extension state, as an
extension may be in error state, or enabled via the session mode.
Switch to the extensions D-Bus API to ensure that the list of extensions
and each extension's state correctly reflects the state in gnome-shell.
https://bugzilla.gnome.org/show_bug.cgi?id=789852
Extensions are used to calling the getCurrentExtension() utility function,
both from the extension itself and from its preferences. For the latter,
that relies on the extensions map in ExtensionUtils being populated from
the separated extension-prefs process just like from gnome-shell.
This won't be the case anymore when we switch to the extensions D-Bus API,
but as we know which extension we are showing the prefs dialog for, we
can patch in a simple replacement that gives extensions the expected API.
https://bugzilla.gnome.org/show_bug.cgi?id=789852
Each row represents an extension, so it makes sense to associate the
rows with the actual extensions instead of linking rows and extensions
by looking up the UUID in the external extensions map in ExtensionUtils.
This will also make it much easier to stop using the shared extension
loading / map in favor of the extension D-Bus API.
https://bugzilla.gnome.org/show_bug.cgi?id=789852
The existing 'ExtensionStatusChanged' signal has a fixed set of parameters,
which means we cannot add additional state without an API break. Deprecate
it in favor of a new 'ExtensionStateChanged' signal which addresses this
issue by taking the full serialized extension as parameter.
https://bugzilla.gnome.org/show_bug.cgi?id=789852
Extension preferences Application class is just a container for a GtkApplication
so instead of using composition we can inherit from the base GObject class.
Also replace signal connections with vfunc's.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/631
The current code is carefully avoiding an overly wide line length as
well as adding literal new lines to the string due to indentation. It's
clever and barely legible.
Instead, use one string per line similar to how they appear in the actual
output, and join them together when setting the clipboard text.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/608
We can use that newer method where we don't care about the actual position
of an element inside the array.
(Array.includes() and Array.indexOf() do behave differently in edge cases,
for example in the handling of NaN, but those don't matter to us)
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/152
After the Adwaita refresh, the button shows up oval rather than
circular. To address this, make sure that the "image-button" class
is applied as well by using the dedicated setter function.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/482