There's a list user_widgets that contains all of the entries and
selections during authentication. This is only freed upon
finalizing the GtkMountOperation. It's possible (and true for the
GVFS SMB implementation) that a MountOperation can have the
gtk_mount_operation_ask_password_do_gtk () function called multiple
times (i.e. bad password). The user_widgets list grows with now
invalid pointers to old widgets (causing unexpected behavior and
seg faults).
Free the user_widgets list upon dialog destruction, we don't need it
anymore.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5059
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5058
It is already explicitly assumed that anonymous authentication will
be used when available, but it is not clear to the user since neither
of the check buttons are selected. Select the Anonymous check button
by default.
When computing a transform value, there is nothing
to do, but we still need to copy the matrix from
src to dest, since it depends on the other transforms
in the array whether we are using the src or the
dest in the end.
This fixes cases like
-gtk-icon-transform: perspective(100px) matrix(1,2,...);
which would otherwise end up with a zero matrix.
Functions already exist for providing a unique drag action for gdk_drop_finish().
Reuse these functions in the drag_enter/motion callbacks, since they require
a unique action as the return value.
Fixes#3187
For default popover arrow position and default height-for-width layout mode,
natural_width is calculated first with for_size=-1 and orientation=HORIZONTAL,
at the end of gtk_popover_measure() natural_width won't be added with tail_height.
Then to measure with for_size=natural_width and orientation=VERTICAL, obviously
for_size shouldn't be substract with tail_height.
The wrong logic will force content in popover gets less width and then text labels
in popover may get wrapped unnecessarily.
The new content-fit property was wrongly suggesting to manually set
widgets' overflow property, but that property is not really intended to
be set by external code. This commit removes those suggestions and
directly set picture's overflow to be hidden.
It allows to specify the resize mode of the paintable inside the
GtkPicture allocation. This also deprecates the keep-aspect-ratio
property.
Fixes#5027.
We were modifying the removed value before passing
it to the items-changed signal, so we always ended
up with removed == 0 in our signal emission, instead
of passing the original value on, as we should.
Pointed out in !4870
The PangoWeight enum agrees with the numeric values
we use here, so we can do this without a switch and
support numeric weight values at the same time.
The width of the left gutter and the height of the top gutter
are now used while computing the child allocations for e.g.
anchors, otherwise - if such a gutter is present - the
widget would be at the wrong position.
Closes#5016
In a list with a visible scrollbar, the scrollbar usually becomes
invisible when the numbers of items is less than the required amount
to scroll. If, however, the list is emptied all at once,
the scrollbar remains. This happens because when there's an empty
list gtk_list_view_size_allocate() returns early before the scrollbar
adjustment is updated.
Given that the list is empty, simply reset the adjustment values
to zero.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4370
GtkCheckButton is not derived from GtkToggleButton anymore.
This caused some issues in GtkPrinterOptionWidget which
did not port handling of the button.
Print backends loaded in GtkPrintUnixDialog's load_print_backends()
are not freed later as done in e.g. GtkPageSetupUnixDialog.
This commit destroys and unref those print backends.
Closes#5019
Something like letter-spacing: -0.5px make a lot of
sense. But we were handling the number as integer
somewhere, loosing the fractional part.
Fixes: #5034