The banner will show a message indicating a failure to Unlock the panel,
but we still should "lock" widgets by making them sensitive accordingly
to the current permission.
Fixes!1708
This makes sure the focus is immediately on the GtkFileDialog instead of
the CcAvatarChooser behind it. This was already added in !1685, but was
accidentally removed in !1822.
Fixes#2315
The crop corners were drawn with the center of the corner lines at the
edges of the crop. This resulted in the corners being visually cut if
the crop is dragged to the edge of the image. Instead, we can draw the
corner lines such that they are inside the edge of the crop, i.e.
shifted by half their linewidth.
We now use relative moves to draw the lines, which simplifies the
movements.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1824>
If crop.x changes due to a drag, crop.x + crop.width remains fixed, as
thet is the opposite edge. However, in the mapping of paintable to
widget coordinates, crop->x + crop->width can vary due to rounding
errors. This fixes that, so that crop->x + crop->width does not vary,
with the same fix in the y direction.
However, the edges of the circle can still remain jittery due to integer
rounding, which is not fixed by using 'width / 2.0' instead of 'width /
2', since the width and height might differ by a pixel. Instead, draw an
ellipse, which removes edge jitter completely.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1824>
The resizing and movement mechanics for the avatar crop can be finicky,
because:
1. The crop resets to the last valid crop when you drag out of range, so
that a somewhat quick drag does not go to the edge.
2. A corner drag only works in one direction, as the use of
eval_radial_line is not correct.
3. A side drag acts the same as a corner drag.
4. A slow drag won't move the crop, especially if the widget is larger.
All these issues are fixed with this partial rewrite of the resize and
movement logic:
1. A drag out of range will result in a size that is guaranteed to touch
the edge, making a crop to the edge much easier.
2. Instead of fixing eval_radial_line, we just "bind" one side to the
pointer position, making both directions act the same for a corner
drag.
3. A side drag now scales around the center for the orthogonal side.
4. Rounding errors in calculating the previous delta are prevented.
Meson extracts them by itself and add them as dependencies for the target.
It means one less location to keep track of files, and a lot less boilerplate
around the meson files
Error building template class 'CcSearchPanel' for an instance of type 'CcSearchPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcDisplayPanel' for an instance of type 'CcDisplayPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcMousePanel' for an instance of type 'CcMousePanel': .:0:0 Invalid object type 'CcIllustratedRow'
Error building template class 'CcKeyboardPanel' for an instance of type 'CcKeyboardPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcRegionPanel' for an instance of type 'CcRegionPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcUaPanel' for an instance of type 'CcUaPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcAvatarChooser'
Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcTzDialog'
cc_tz_dialog_get_selected_location: assertion 'CC_IS_TZ_DIALOG (self)' failed
dumped core
Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcInfoOverviewPanel' for an instance of type 'CcInfoOverviewPanel': .:0:0 Invalid object type 'CcHostnameEntry'
AdwBanner is a new adaptive widget that replaces GtkInfoBar.
AdwBanner adapts better to mobile sizes and has an API
that fits with how we use infobars.
This commit changes CcPermissionInfobar to use an AdwBanner
internally instead of a GtkInfoBar. It also re-implements
part of GtkLockButton, as AdwBanner does not support adding
arbitrary widgets.
The start title buttons of the main window should be displayed if and
only if the end title buttons are. Only the left-most header bar should have
the start title button set and only right-most header bar the end title buttons.
Therefore, the title buttons property should be bound to the leaflet state:
When unfolded the start title buttons of the sidebar's header bar are
the only ones visible then, and not a second pair in the panel's header bar.
Likewise, in a folded state of the leaflet, the panel's header bar displays
all availble title buttons – start and end – as the panel is the only widget
displaying a header bar.
Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
The CcCropArea dialog fails to update cursor to 'default'
one when leaving the CcCropArea into the GtkHeaderBar.
Fix that by setting 'default' cursor in the "leave" event
of CcCropArea.
Closes#2359
the transient parent for the dialog was wrongly set to
its own window, causing following g_critical message:
Gtk-CRITICAL **: gtk_window_set_transient_for: assertion 'parent == NULL || GTK_IS_WINDOW (parent)' failed
libaccountsservice documents that it is undefined to access an
ActUser object's properties before the 'is-loaded' property is
set to try.
Control-center unfortunately sometimes accesses objects that
aren't fully loaded, leading to log spew and memory corruption.
This commit fixes the problem by setting up a signal handler
to listen for the is-loaded notification when necessary.
Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2348
Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2349
Fixes following warning when activating Users panel:
user-accounts-cc-panel-WARNING **: Error retrieving app filter for user (null): User 4294967295 does not exist
Initialize CcAvatarChooser a bit earlier so it does
not get used by show_user() before creation.
Fixes#2219
This is part of an initiative to use "app" instead of "applications",
see: https://gitlab.gnome.org/Teams/Design/initiatives/-/issues/123
Redo of !1539 that was closed by a ghosting user.
Replaces "application" with "app" in user facing strings in these
panels:
- applications
- camera, location, microphone
- default-apps
- multitasking
- notifications
- removable-media
- search
- usage
- user-accounts
Fixes: #2208.
GtkStyleContext will be deprecated in gtk 4.10.
https://docs.gtk.org/gtk4/class.StyleContext.html
This preserves code blocks where additional GtkStyleContext operations
were used, such as gtk_style_context_save/restore.
GTK assumes that a widget will be created for a flow box item. So always
return one instead of falling back to returning NULL. This can primarily
happen if an image loader is missing.