gtk_text_iter_backward_line() checks the value of
real->line_char_offset without previously calling
ensure_char_offsets (real) to make sure the former
is up-to-date.
As a consequence of this, when gtk_text_iter_backward_line()
is called after a gtk_text_buffer_insert_range() in the
first line of buffer, the iter is not moved to the start of
the line, and the return value is wrong.
Fixed by adding the ensure_char_offsets() call.
A test case for this bug is added to the textiter gtk testsuite.
priv->trigger_event is never set, so it is always NULL. This means the
gtk_menu_popup*() methods use the current event. The only way to get any
other event to combobox_menu_popup() was from the button-press-event
handler I just removed, which would end up being the current one anyway.
So, bin priv->trigger_event & explicitly pass NULL to gtk_menu_popup*().
gtk_show_uri_on_window() will pass enough information for Portal helpers
to allow dialogue parenting in Flatpak, gtk_show_uri() won't, so
deprecate it.
https://bugzilla.gnome.org/show_bug.cgi?id=778678
Update the autotools scripts to support Visual Studio 2017 builds by
copying the Visual Studio 2013 projects and updateing the items as
necessary to obtain the Visual Studio 2017 projects.
Note that the format of the toolset string changed, so allow one to
pass in and thus use a custom toolset string, otherwise the default
toolset string will be generated as it was before.
Note also the Visual Studio 2017 aims to be compatible with Visual
Studio 2015 on the CRT level, so binaries built with 2017 should
work without problems with the binaries built with 2015.
We can't pass the same string to two different snapshot states since
removing one of them will free the passed string, so just create another
one for the second state.
Clamping the anchor values as introduced in commit 9a5ffcd to fix bug
777176 breaks menu positioning.
By keeping the anchors rectangle size greater than zero, we end up
deducting some positive value from the original position, so there is no
need to clamp() actually, keeping the values positive is enough and
avoids the issue with menu positioning on the menubar.
An additional benefit is to make the code a lot simpler.
https://bugzilla.gnome.org/show_bug.cgi?id=778009