The add user button is shown only if the panel is unlocked, but
tooltips are also set for the case when the panel is not unlocked.
Let's move the tooltip text in the UI file directly and remove
the obsolete codes.
Make the panel class provide a cancellable that will be cancelled when the panel
is destroyed. Panel implementations can use this and not have to mangage the
cancellable themselves. Consolidate cases where panels had multiple cancellables
that were all being used for this behaviour.
Otherwise we might potentially be using the GtkSettings for the wrong
screen, which might make a difference if one screen has animations
enabled but another doesn’t.
(This is an edge case I spotted while reading the code, but not one that
I’ve experienced practically.)
Signed-off-by: Philip Withnall <withnall@endlessm.com>
On FreeBSD, the default full name of a user is 'User &'. The '&'
character included in the name is expected to be replaced with the login
name when it is displayed on the user interface. However, it seems that
AccountsService doesn't know it. It just returns 'User &' to the caller,
and it causes the markup to be broken in the user panel.
setlocale() is not threadsafe except when used only to query the locale
without changing it. Let's use uselocale() instead, which changes the
locale only on the calling thread. Much better.
In the User Accounts panel's carousel, longer real names
push the window geometry to super wide levels -- even with
the 255-char limitation in place.
Fix that by ellipsizing the real name label.
Changes from !373 causes crashes when "Add User" dialog is canceled.
Check return value and generate user avatar only if valid user is
returned to fix the crashes.
Switch from GtkBuilder to using GtkTemplate.
Rename .[ch] and .ui files to standard names.
Rename widget IDs to be more readable.
Drop widget IDs that are not used.
Move code into the .ui file that can be.
Connect signals in swapped form.