Commit Graph

70 Commits

Author SHA1 Message Date
Carlos Soriano
d0c45f19b8 gtkplacesview: use g_utf8_collate for sorting
Also rename the variable, since we usually use location
for GFiles variables.
2015-08-21 14:49:11 +02:00
Carlos Soriano
036ba25eb1 gtkplacesview: add a loading property
So clients of the view can know if the view is busy.

https://bugzilla.gnome.org/show_bug.cgi?id=753786
2015-08-21 13:29:21 +02:00
Carlos Soriano
89a34210cb gtkplacesview: improve networks feedback
Add a spinner when networks are being fetched and make
the network section permanent and show a placeholder with
a message that no networks were found in case there are no
networks. In this way users from previous versions won't be
confused with the fact that no networks are shown.

https://bugzilla.gnome.org/show_bug.cgi?id=753786
2015-08-21 13:29:20 +02:00
Carlos Soriano
7347a69328 gtkplacesview: add networks in network:///
Previously we had a network item in the sidebar, which now
is replaced by the network section on other-locations view.
However we were not exposing the networks in network:///.

Fetch them and add them in the network section of other-locations
view.

https://bugzilla.gnome.org/show_bug.cgi?id=753786
2015-08-21 13:28:12 +02:00
Carlos Soriano
16bea59b78 gtkplacesview: style fix
https://bugzilla.gnome.org/show_bug.cgi?id=753786
2015-08-21 12:04:05 +02:00
Carlos Soriano
af78792720 gtkplacesview: allow to cancel connection to server
We were not allowing to cancel the operation at all, and at
most the operation was cancelled only when clicked connect again.

Also due to gvfs bug 753735 we actually weren't cancelling
at all, and therefore creating multiple dialogs.
2015-08-18 01:05:20 +02:00
Georges Basile Stavracas Neto
e548c71394 placesview: show Disconnect instead of Eject
Since we're dealing with networks, terms like "Eject" or
the eject button are misleading, since we're not actually
ejecting but disconnecting.

Fix that by showing the appropriate icon and tooltip.
2015-08-10 15:35:56 -03:00
Georges Basile Stavracas Neto
0dff248516 placesview: sort by path
As pointed out by Cosimo, we should sort the
items according to their path.
2015-08-10 15:33:34 -03:00
Georges Basile Stavracas Neto
025f74161d placesview: plug a leak 2015-08-10 15:24:43 -03:00
Georges Basile Stavracas Neto
1219b67cdb placesview: no url for networks
We are not showing the URL of network locations
anymore, since they are distracting and not
necessary.

The code, however, forgot to cleanup the URL,
so we are still showing the URL for network
locations.

Fix that by properly cleanup the URL for network
locations.
2015-08-10 14:59:50 -03:00
Georges Basile Stavracas Neto
5e3d0b19b0 placesview: jumps to the default location
When we connect to a server, the default and expected
behavior is going to the default location, which usually
is the home directory or a writable directory.

GtkPlacesSidebar behaves properly, while GtkPlacesView
doesn't.

Fix that by jumping to the default locations instead of
the root location.
2015-08-10 10:42:43 -03:00
Ting-Wei Lan
68e00e9e5d placesview: Fix wrong property type when creating a GtkLabel
The type of xalign property of GtkLabel is float, not int. Using wrong type
crashes GtkFileChooser on x86_64 when compiling with clang.

https://bugzilla.gnome.org/show_bug.cgi?id=753284
2015-08-05 23:31:13 +08:00
Georges Basile Stavracas Neto
98f9532a22 placesview: don't show mount for Computer row
The "Computer" row from places view is an abstract volume
that represents the root of the current partition. As such,
it cannot be mounted or unmounted.

Remove the related item on context menu for Computer row.
2015-07-29 19:39:03 -03:00
Georges Basile Stavracas Neto
e51946270a placesview: simplify code
Since we started adding a persistent Computer item,
all the code related to the view modes became obsolete,
since the view is never empty anymore. So, drop this
dead code and use the plain stack to manage the empty
search results view.

Also, this patch fixed a very annoying keyboard navigation
issue where we couldn't go from the On This Computer to Networks
lists, because they were two separate widgets. Merge the two
lists into a single one, and update headers accordingly.
2015-07-28 11:46:25 -03:00
Georges Basile Stavracas Neto
317ba620e2 placesview: plug some memory leaks
The GFile containing the Computer item was not
properly dereferenced, so plug that leak by both
dereferencing it and adding some reference management
on GtkPlacesViewRow.
2015-07-28 07:03:09 -03:00
Georges Basile Stavracas Neto
a5e762e6a7 placesview: show Computer item
GtkPlacesView widget manages persistent locations,
factoring out GtkPlacesSidebar functionality.

It, however, does not completely shows all sidebar
locations, since Computer is still missing.

Add a Computer item, adjusting some internal behavior
to make that possible.
2015-07-28 07:03:09 -03:00
Georges Basile Stavracas Neto
5134e4b3bd placesview: don't show network addresses
It is distracting, not relevant and too space
consuming.

Remove the network addresses label.
2015-07-28 07:03:09 -03:00
Georges Basile Stavracas Neto
c00f216d92 placesview: fix documentation
The doc for gtk_places_view_get_search_query was being
set twice, while gtk_places_view_set_search_query was
never set.

Fix that by correcting the wrong getter documentation.
2015-07-28 07:03:09 -03:00
Matthias Clasen
8102425f03 places view: Disconnect from volume monitor
Just unreffing the volume monitor object won't stop it from emitting
signals that we are connected to. Disconnect from the signals in
finalize.
2015-07-20 21:23:06 -04:00
Georges Basile Stavracas Neto
7af88d40b1 placesview: add view for fixed drives and networks
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
2015-07-15 23:11:52 -03:00