Commit 33faf2ae authored by Michael Terry's avatar Michael Terry

Make it clearer that SMB needs a share name

parent 8d15219c
......@@ -13,7 +13,7 @@
<object class="GtkLabel">
<property name="visible">1</property>
<property name="hexpand">1</property>
<property name="label" translatable="yes">Server Addresses</property>
<property name="label" translatable="yes">Network Locations</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
......@@ -26,7 +26,7 @@
<object class="GtkLabel">
<property name="visible">1</property>
<property name="hexpand">1</property>
<property name="label" translatable="yes" comments="Translators: This is followed by a list of valid adresses (smb://gnome.org, ssh://192.168.0.1, ftp://[2001:db8::1])">Server addresses are made up of a protocol prefix and an address. Examples:</property>
<property name="label" translatable="yes" comments="Translators: This is followed by a list of valid adresses (smb://gnome.org/deja-dup, ssh://192.168.0.1, ftp://[2001:db8::1])">Network locations are made up of a protocol prefix, an address, and sometimes a path depending on the protocol. Examples:</property>
<property name="wrap">1</property>
<property name="width-chars">40</property>
<property name="max-width-chars">40</property>
......@@ -40,7 +40,7 @@
<object class="GtkLabel">
<property name="visible">1</property>
<property name="hexpand">1</property>
<property name="label">smb://gnome.org, ssh://192.168.0.1, ftp://[2001:db8::1]</property>
<property name="label">smb://gnome.org/deja-dup, ssh://192.168.0.1, ftp://[2001:db8::1]</property>
<property name="wrap">1</property>
<property name="width-chars">40</property>
<property name="max-width-chars">40</property>
......
......@@ -35,7 +35,7 @@ public class ConfigLocationCustom : ConfigLocationTable
address.entry.set_icon_from_icon_name(Gtk.EntryIconPosition.SECONDARY,
"dialog-question-symbolic");
address.entry.icon_press.connect(show_hint);
add_widget(_("Server _Address"), address);
add_widget(_("_Network Location"), address);
hint = create_hint(address.entry);
......
......@@ -168,6 +168,13 @@ public class BackendRemote : BackendFile
var root = get_root_from_settings();
if (root.get_uri_scheme() == "smb" && root.get_basename() == "/") {
// Special sanity check for some edge cases like smb:// where if the user
// just puts in smb://server/ as the root, GIO thinks it's a valid root,
// but the share never ends up mounted.
throw new IOError.FAILED("%s", _("Samba network locations must include both a hostname and a share name."));
}
try {
yield root.mount_enclosing_volume(MountMountFlags.NONE, mount_op, null);
} catch (IOError.ALREADY_MOUNTED e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment