placesview: List only available protocols as available

We display a list of supported protocols in the server_addresses_popover.

However, this curated list contains protocols which may or may not be
available, depending on the respective gvfs backend being installed.

So, populate the list only with protocols which are available.

https://gitlab.gnome.org/GNOME/gtk/issues/1476
This commit is contained in:
António Fernandes
2018-11-24 01:49:43 +00:00
parent 4bdf968702
commit bb3653ad7d
2 changed files with 53 additions and 133 deletions

View File

@ -65,7 +65,7 @@
</packing>
</child>
<child>
<object class="GtkGrid">
<object class="GtkGrid" id="available_protocols_grid">
<property name="visible">1</property>
<property name="margin-top">12</property>
<property name="hexpand">1</property>
@ -86,72 +86,6 @@
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label" translatable="yes">AppleTalk</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label" translatable="yes">File Transfer Protocol</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label" translatable="yes">Network File System</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label" translatable="yes">Samba</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label" translatable="yes">SSH File Transfer Protocol</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label" translatable="yes">WebDAV</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
@ -166,72 +100,6 @@
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label">afp://</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label" translatable="yes" comments="Translators: do not translate ftp:// and ftps://">ftp:// or ftps://</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label">nfs://</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label" translatable="yes">smb://</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label" translatable="yes" comments="Translators: do not translate sftp:// and ssh://">sftp:// or ssh://</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label" translatable="yes" comments="Translators: do not translate dav:// and davs://">dav:// or davs://</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
</object>
<packing>
<property name="position">3</property>