When set to PANGO_ALIGN_CENTER, text was rendered off-center
by the amount of 'free space' that the PangoLayout left (ie
the x returned by pango_layout_get_pixel_extents).
The logic was to try to switch to that nonexistent folder and thus get
an error message presented. However, no such message actually appears,
as the file chooser tries to switch to the closest parent folder that
actually exists, without bringing up an error message --- this is done
to cope with the case of the file chooser being started with a folder
that doesn't exist anymore.
Now, we just bring up an error message directly when we detect that
the user types a subfolder name that doesn't exist.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
We used to explicitly map and unmap the child GtkFileChooserWidget when
mapping and unmapping the dialog, respectively. Now that GtkWidget actually
unmaps child widgets (instead of avoiding that), we can assume that the
child GtkFileChooserWidget will be unmapped when we wanted it to be.
This fixes a warning that happened with the new GtkWidget invariant checker,
as we were mapping our child widget before calling our parent class' ::map() handler.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Buttons may also be activated at any time from gtk_widget_activate()
or related functions. In that case, just do the 'show the button
as pushed for a short amount of time' trick, but don't actually
try to grab the keyboard device.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
There is only one widget supposed to have the focused flag at a given time,
so avoid propagating the state down the hierarchy, the focused flag is now
also set in _gtk_widget_set_has_focus().
The transfer annotation was (transfer full) but the caller actually
doesn't own a reference of the object. This made the pygobject test suite
crash because pygobject was trying to unref the returned GtkButton
instance.
https://bugzilla.gnome.org/show_bug.cgi?id=639949
The state attribute is available in GdkEventMotion, GdkEventButton,
GdkEventScroll, GdkEventKey and GdkEventCrossing. This type annotation
fixes the wrapping of this attribute in the GI PyGObject bindings.
https://bugzilla.gnome.org/show_bug.cgi?id=639929
When copying allocated events, also copy the source device.
When synthesizing double or triple clicks, copy the original
button press event including device information.
https://bugzilla.gnome.org/show_bug.cgi?id=639822
In GTK 3.0 it's no longer possible to e.g. pop up something
at a text view's cursor (this wasn't exactly possible before
either without including gtktextlayout, but this is a quite
special need anyway).