Commit Graph

8 Commits

Author SHA1 Message Date
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 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 631df4f1a5 project: Adapt to GtkBox API changes
GtkBox provides a different API surface, such as gtk_box_append()
and gtk_box_prepend(), so switch to that.
2022-07-20 19:23:12 -03:00
Philip Withnall 5efc773bda malcontent-control: Add API to select users by username
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-10-19 17:54:37 +01:00
Philip Withnall 8da1088e9b user-selector: Fix some const-to-non-const cast warnings
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-18 12:08:42 +00:00
Philip Withnall ee342d374b malcontent-control: Add MctUserSelector:show-administrators property
We don’t want to show administrators in the parental controls app,
since child accounts are not administrators (if they are, they are too
powerful to be constrained by parental controls).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-03 17:29:17 +00:00
Philip Withnall 1623876fbc malcontent-control: Add an MctUserSelector widget
This isn’t used yet, but will be soon. It encapsulates an
`ActUserManager` with an `MctCarousel` to provide an all-inclusive
widget for selecting a user account.

It’s based off code from the user accounts panel of
gnome-control-center, licenced as GPLv2+, and authored by many people
over time (see
https://gitlab.gnome.org/GNOME/gnome-control-center/commits/master/panels/user-accounts).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-30 09:31:40 +00:00