We don't care about the error here, but we were relying on
g_resources_get_info to zero the size even in case of error.
No need to do that, we can just check the return value. Plus,
it makes coverity happy.
The way this code is written, we know that there is an item in
the hash table and the iter_next call will give it to us, so
no need to check the return value. Annotate the call to tell
coverity.
Previously, the (1<<31) value evaluated to the 64bit value
0xFFFFFFFF80000000
instead of
0x0000000080000000
Avoid this by explicitly casting the value to unsigned long long.
Also cast all values to unsigned long long to achieve consistency
and hopefully in the future get new values added the same way.
We "fix" this signal the same way we did for GtkEntry and
GtkTextView: slightly change the signature so that the passed
widget may be a container other than a GtkMenu, and add a
property to explicitly opt in to receiving the signal in
this case.
With the name entry being in the header bar now, we no longer
get bindings working by just letting the key event bubble up,
we have to explicitly apply them on key events that the save
entry is not handling.
They were updated in style-changed, causing the label to get set to
(None), then to the actual file name again a frame later, both of the
updates cause the GtkFileChooserButton to resize, possibly to the
minimal width, causing the layout to jump. Fix this by only updating
icon/label in style-updated when the icon theme actually changed, which
is the only case we care about here.
https://bugzilla.gnome.org/show_bug.cgi?id=752509
"Yo, we heard you like traversing NULL-terminated arrays to operate on
them, so we called g_strv_length() as the for condition, so you can
iterate the array while iterating the array."
Instead of making famed rapper and television producer Xzibit proud, we
should avoid calling g_strv_length() on an array while looping on the
array, to avoid quadratic complexity.
We do this in various places that deal with arrays of strings that we
cannot really guess are short enough not to matter — e.g. the list of
CSS selectors in the inspector, or the required authentication
information for printing.
Previous commits changes the behavior of GtkPlacesSidebar, as it stops
handling persistent devices and only manages mounted networks, XDG
directories and bookmarks.
By radically breaking the previous behavior, we may have trouble
since we provide no alternatives to that besides the private widget
GtkPlacesView.
Fix that by showing the persistent devices when not showing Other
Locations item.
We need to check on realize if we have access to a GL context, before
calling GL functions. We use gtk_gl_area_get_error() for that.
We also need to tear down the resources during unrealization, instead
of leaking them.
Commit 7db399d975 introduces
the Other Locations item, as well as some behavioral changes
to GtkPlacesSidebar. It, howevers, wrongly changes the section
of code that handles the Connect to Server item, with various
side effects depending on the environment setup.
Fix that by adding the Connect to Server at the right section
of code.
gtk_css_node_set_after/before() are now called
gtk_css_node_insert_after/before().
This brings them in line with other similar APIs (ie GtkListStore). And
it allows easier usage of the API (see changes to gtkbox.c).
Previous patch modified places sidebar widget to stop handling
fixed devices by adding an "Other Locations..." item. Up to now,
however, these changes are isolated from each other since the
bundled file manager widgets ignore the sidebar requests for
external management of fixed devices and networks.
To fix that, make the file chooser widget be aware of the
GtkPlacesSidebar::show-other-locations signal and, when requested,
show places view to manage the fixed devices and networks.
https://bugzilla.gnome.org/show_bug.cgi?id=752034
Places sidebar is a widget that enabled the user to select
XDG directories, bookmarks and mounted network locations,
as well as manages permanent and removable devices.
The new design that aims to look less clutered makes the
sidebar display only removable devices, as well as mounted
networks, bookmarks and XDG directories, and delegates the
management of permanent devices such as hard drive partitions
to GtkPlacesView, a newly introduced widget for this specific
purpose.
To delegate it, add an "Other Locations..." item to notify
when the permanent devices manager is required. Besides that,
don't show these fixes devices on the sidebar itself, as they
are not supposed to be handled by the sidebar anymore.
https://bugzilla.gnome.org/show_bug.cgi?id=752034
Places sidebar shows XDG directories, mounted and unmounted devices,
connected networks, bookmarks and actions like 'Connect to server'
and 'Insert location', which causes the sidebar to grow very quickly
and look cluttered. Because of that, new mockups for the sidebar try
to simplify it.
To make the sidebar simpler, the new mockups propose that it should
only handle connected networks and removable devices such as flash
drives and USB devices, and delegates other devices for external
widgets through the 'Other Locations' item.
To handle fixed devices and manage network connections, add a new
widget named GtkPlacesView, based on Nautilus mockups to keep
consistency between GNOME file management tools - in this case,
between Nautilus and the bundled Gtk's file chooser.
https://bugzilla.gnome.org/show_bug.cgi?id=752034
When using frame times from _NET_WM_FRAME_DRAWN and _NET_WM_FRAME_TIMINGS, we
were treating them as local monotonic times, but they are actually extended-precision
versions of the server time, and need to be translated to monotonic times in the
case where the X server and client aren't running on the same system.
This fixes rendering stalls when using X over a remote ssh connection.
https://bugzilla.gnome.org/show_bug.cgi?id=741800
With the previous approach, we could only show the spinner
before we had any results. With the new approach, we can just
leave the timeout in place and always show the spinner until
the search is done.