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
b92973df00
cleanup: Simplify promisify() calls
...
If the finish function isn't specified, promisify will now try
to use the async name without '_async'/'_begin' suffix (if any)
and '_finish' appended.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/214 >
2022-02-11 16:22:38 +01:00
Florian Müllner
0b7e8f9720
user-theme: Stop using Gio._LocalFilePrototype
...
Now that promisify() works on interfaces, we don't need this
cludge anymore.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/214 >
2022-02-11 16:22:38 +01:00
Florian Müllner
01537b401f
user-theme: Use libadwaita for preferences
...
libadwaita has now become stable and will be part of the GNOME 42
platform. Time to embrace it and get fancier preferences with
less code.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/209 >
2022-02-08 19:22:41 +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
53f5a92dc8
user-theme: Stop using header func for separators
...
GTK4 provides built-in support for this common pattern, so use
that instead.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148 >
2021-01-14 14:40:55 +01:00
Florian Müllner
3bef6be7c1
user-theme: Port to GTK4
...
With the previous preparations in place, the actual GTK4 port is
now trivial:
- replace Gtk.Container methods with widget-specific methods
- stop using show_all()
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148 >
2021-01-14 14:40:55 +01:00
Florian Müllner
b83d38a72e
user-theme: Track GSettings to sync checkmark
...
GTK4 removes the generic GtkWidget API for accessing an inserted
action group, so we need an alternative for tracking the currently
selected theme.
Using the underlying GSettings object looks like the easiest option,
so do that.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148 >
2021-01-14 14:40:54 +01:00
Florian Müllner
5b73960f34
extensions: 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-extensions/-/merge_requests/148 >
2021-01-14 14:40:54 +01: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
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