Commit Graph

582 Commits

Author SHA1 Message Date
Jan Tojnar 6c96a5e7b6 build: Bump Meson dependency to 0.59.0
Required for switching to `gnome.post_install()` function
with `update_desktop_database` kwarg.

Even newer version is available in bullseye-backports in Debian
so it should probably be fine.
2022-12-30 16:35:55 +00:00
Philip Withnall 54ebc3739e ci: Add missing dependencies
`libdbus-1-dev` is needed for the interfaces dir from `dbus-1.pc`, and
`desktop-file-utils` is needed for `update-desktop-database`.

These are needed due to updating Debian Unstable.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-12-30 16:35:15 +00:00
Philip Withnall 8c2a1dd73b Merge branch 'main' into 'main'
Update Hindi (hi) translation

See merge request pwithnall/malcontent!151
2022-11-29 11:29:51 +00:00
Hemish 3d1ec3047f Update Hindi (hi) translation 2022-11-29 13:07:23 +05:30
Philip Withnall 327173ba11 Merge branch 'hun-20220922' into 'main'
Update Hungarian translation

See merge request pwithnall/malcontent!150
2022-10-10 11:56:49 +00:00
Philip Withnall afb3f9630c Merge branch 'main' into 'main'
po: add Georgian translation

See merge request pwithnall/malcontent!149
2022-10-10 11:55:41 +00:00
Balázs Úr c577543af8 Update Hungarian translation 2022-09-22 21:55:47 +00:00
NorwayFun af4cd80fd5 add Georgian translation 2022-09-14 07:50:37 +00:00
NorwayFun 2ef945255c add Georgian 2022-09-14 07:50:08 +00:00
Georges Basile Stavracas Neto 741bc8a2b0 Merge branch 'gbsneto/release-0-11-0' into 'main'
0.11.0

See merge request pwithnall/malcontent!147
2022-08-12 15:10:26 +00:00
Georges Basile Stavracas Neto 810c16bbf1 0.11.0 2022-08-12 12:06:34 -03:00
Georges Basile Stavracas Neto e1c5b8a4fe Merge branch '52-focusable' into 'main'
restrict-applications-selector: Make rows not focusable

Closes #52

See merge request pwithnall/malcontent!146
2022-08-12 14:58:06 +00:00
Philip Withnall 950abf2e44 user-controls: Mark rows as not focusable
Only the controls inside them should be focusable. This saves having to
press the tab key twice as much as needed.

The row to open the restrict applications dialogue remains focusable, as
it doesn’t contain an interactive widget. It’s essentially one big
button.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #52
2022-07-25 23:53:24 +02:00
Philip Withnall 2e72916afb restrict-applications-selector: Make rows not focusable
The toggle switches remain focusable, but the rows should not be
focusable. Otherwise tabbing through the list involves two tabs per row.

The screen reader continues to work correctly with this MR applied: when
tabbing to a new switch, it reads out the label from the row, plus the
switch state.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #52
2022-07-25 23:53:24 +02:00
Philip Withnall 2f64f3865e Merge branch 'piotrdrag/fix-string' into 'main'
main: Restore previous whitespace in string

See merge request pwithnall/malcontent!145
2022-07-24 18:55:29 +00:00
Piotr Drąg 8416b0f263 main: Restore previous whitespace in string
So that we don’t change the string for no reason,
invalidating all existing translations.
2022-07-24 15:47:45 +02:00
Georges Basile Stavracas Neto a859e22e26 Merge branch 'wip/wjt/more-gtk4' into 'main'
Fix some build system leftovers from the GTK 4 port

See merge request pwithnall/malcontent!144
2022-07-22 12:22:04 +00:00
Will Thompson 8eba2f2ef3 Prepare for 0.11.0 release 2022-07-22 11:26:28 +01:00
Will Thompson ffba5dab43 libmalcontent-ui: Bump API version
An app which currently depends on malcontent-ui-0.pc or
MalcontentUi-0.gir will fail to compile or run, respectively, aganist
the GTK 4-ified version.

Bump the API version, which is used in both those names. This will also
(I think) allow the two versions of libmalcontent-ui to be
parallel-installed.
2022-07-22 11:13:33 +01:00
Will Thompson 922ae096be libmalcontent-ui: Fix includes for GIR
The libmalcontent-ui API exposes types from GTK 4 (not 3) and
libadwaita.
2022-07-22 11:12:47 +01:00
Will Thompson 1c7fe694fa Don't depend on gtk+-3.0 if xmllint is found
When validating the .ui files, we need to determine the path to GTK 4's
relaxng schema. Previously this was erroneously looked up in the prefix
of GTK 3, which malcontent otherwise doesn't depend on.

Define the GTK dependency once, and use that variable everywhere.
2022-07-22 11:09:35 +01:00
Georges Basile Stavracas Neto 2da5d5597e Merge branch 'gbsneto/gtk4' into 'main'
GTK4

See merge request pwithnall/malcontent!141
2022-07-20 22:27:51 +00:00
Georges Basile Stavracas Neto fe785d357d user-controls: Remove AdwPreferencesPage
AdwPreferencesPage is intended to be used as the first widget
inside page. It has an AdwClamp and a scrolled window to handle
just that.

Putting it in the MctUserControls widget is undesired, because
it introduces an oddly positioned scrolled window in the parental
controls page of Initial Setup, and if we ever reintroduce this
widgetry in Settings, it would suffer from the same problem.

Remove AdwPreferencesPage from MctUserControls, and replace it
with a vertical box. Add an AdwPreferencesPage in malcontent-controls
to compensate for that.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 9a35a09e24 malcontent-control: Update copyright headers
Append myself as the author of the files I've meaninfully changed.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto e8e9231d89 libmalcontent-ui: Cleanup CSS
Use named colors, and reimplement the disabled slider with a CSS
grayscale filter.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 61141a6670 restrict-applications-selector: Center-align app list
Simply expanding this list is enough to let the AdwClamp of
the parent AdwPreferencesGroup center it.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto d204944ae2 main: Improve visuals of loading label
Replace the manual scaling of the font size by a proper style
class, and center-align it vertically.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto a4ac1d644d user-selector: Purge items after listing users
The first call to act_user_manager_list_users() may lazily load
and notify the 'is-loaded' property, in which case we end up
indirectly recursing into reload_users(). Because we recurse
*after* purging carousel items, the same user is added twice:
once in the leaf recursion call, and once again in the call that
notified the 'is-loaded' property.

A simple workaround to this is purging carousel items after the
call to act_user_manager_list_users().
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto b5e516bea0 user-controls: Don't set popover direction
Let GTK handle that as it sees fit.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto e5ecc02488 user-controls: Remove OARS widgetry size group
We don't actually want the menu button to have the same size
of the popover, since the popover can grow pretty wide.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto b25a4e2119 carousel: Simplify arrow handling
The CSS-based animation is incompatible with the layout machinery
of GTK4, and we can't easily reintroduce it without another major
surgery in the carousel code, so just drop it for now.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 15172723dd carousel: Use revealer to calculate arrow offset
Now that the inner GtkStack has margins, it has an odd offset from
what we would expect. A better widget to use is the GtkRevealer,
which must cover the entire allocation, and therefore will always
produce the expected x offset.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 4887ded149 carousel: Replace size-allocate callback by a layout manager
GTK4 has no size-allocate signal anymore, but we can use a custom
layout manager to produce the same effect.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 3656cffcc0 carousel: Cleanup overlays
There are overlays inside overlays and that is not playing well
with event delivery - the main box is eating away clicks from the
userlist avatars.

Remove all that, and the extra overlays, and just leave one simple
overlay handling the whole widgetry.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 1d20fc50c9 carousel: Improve carousel box
This makes the carousel look more like what it used to.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto cd7d6a3845 carousel: Reindent file
No functional changes, just reindent the file.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto a9290f86b9 main: Make unlock button a pill
And set the 'suggested-action' style class too. This makes the
button more inline with modern GNOME HIG.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 486183a017 carousel: Move margins to inner stack 2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 0134e5d875 main: Remove has-default from buttons
This property is read-only in GTK4.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 8a8fe7b346 restrict-applications-dialog: Use close-request
Instead of delete-event. Pretty straightforward, 1:1 port to this
new signal.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 977b82f681 main: Remove can-default 2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto adaea91a4c carousel: Remove pass-through from overlay children
It doesn't exist anymore.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 3e1c14bda3 project: Port to GtkStack API changes 2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 6cd201166b main: Remove use-popover property from GtkMenuButton
It doesn't exist anymore.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 58fc4e0a5b main: Reimplement primary menu accellerator as a shortcut
In GTK4, the replacement to accelerators like this are shortcut
controllers.

Add a global shortcut controller to the primary menu button, and
bind it to F10.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 6fc250d5cf main: Adapt to GtkHeaderBar API changes 2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto dc1f68c7bc application: Port to gtk_show_uri_full()
A pretty straightfoward port, and most importantly, this function
actually exists in GTK4 :)
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto b71b83f348 carousel: Port MctCarousel to GTK4
Make it an AdwBin subclass. Purge all GtkContainer usage, and expose
GTK4-inspired API to add items to the carousel, and also to control
the internal GtkRevealer.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 0fca70768a carousel: Make MctCarouselItem subclass GtkButton
And add a setter to its internal child.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto e088443645 carousel: use double to translate coordinates
That's what GTK4 expects now.
2022-07-20 19:23:12 -03:00