filechooserwidget: use places view to manage fixed devices

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
This commit is contained in:
Georges Basile Stavracas Neto
2015-07-14 14:48:49 -03:00
parent 7db399d975
commit 79f2400c0d
2 changed files with 87 additions and 7 deletions

View File

@ -17,11 +17,13 @@
<property name="can_focus">False</property>
<property name="hscrollbar_policy">never</property>
<property name="local_only">True</property>
<property name="show_other_locations">True</property>
<style>
<class name="sidebar"/>
</style>
<signal name="open-location" handler="places_sidebar_open_location_cb" swapped="no"/>
<signal name="show-error-message" handler="places_sidebar_show_error_message_cb" swapped="no"/>
<signal name="show-other-locations" handler="places_sidebar_show_other_locations_cb" swapped="no"/>
</object>
<packing>
<property name="resize">False</property>
@ -248,6 +250,17 @@
<property name="name">list</property>
</packing>
</child>
<child>
<object class="GtkPlacesView" id="places_view">
<property name="visible">True</property>
<property name="local_only" bind-source="GtkFileChooserWidget" bind-property="local-only" bind-flags="default|sync-create" />
<signal name="open-location" handler="places_sidebar_open_location_cb" swapped="no"/>
<signal name="show-error-message" handler="places_sidebar_show_error_message_cb" swapped="no"/>
</object>
<packing>
<property name="name">other_locations</property>
</packing>
</child>
<child>
<object class="GtkGrid">
<property name="visible">True</property>