diff options
author | Stefano Karapetsas <[email protected]> | 2012-06-13 00:05:10 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-06-13 00:05:10 +0200 |
commit | 7509b2aba6103d4c3c88b82b36b12a8a3a9329be (patch) | |
tree | 6b2c24c56ff374cee3c4a5ef466d360061d7c5c0 | |
parent | 1b5fa0a349182cd854396bf071a2706ed89d16f1 (diff) | |
download | caja-7509b2aba6103d4c3c88b82b36b12a8a3a9329be.tar.bz2 caja-7509b2aba6103d4c3c88b82b36b12a8a3a9329be.tar.xz |
fix autocompletion for remote locations
patch from http://git.gnome.org/browse/nautilus/commit/src/nautilus-location-entry.c?id=82fb99a34a6c27f6881e0a049d9882756b615f42
-rw-r--r-- | src/caja-location-entry.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/caja-location-entry.c b/src/caja-location-entry.c index a1db4fb8..e168ac86 100644 --- a/src/caja-location-entry.c +++ b/src/caja-location-entry.c @@ -81,7 +81,7 @@ try_to_expand_path (gpointer callback_data) { CajaLocationEntry *entry; GtkEditable *editable; - char *suffix, *user_location, *absolute_location; + char *suffix, *user_location, *absolute_location, *uri_scheme; int user_location_length, pos; entry = CAJA_LOCATION_ENTRY (callback_data); @@ -90,7 +90,9 @@ try_to_expand_path (gpointer callback_data) user_location_length = g_utf8_strlen (user_location, -1); entry->details->idle_id = 0; - if (!g_path_is_absolute (user_location) && user_location[0] != '~') + uri_scheme = g_uri_parse_scheme (user_location); + + if (!g_path_is_absolute (user_location) && uri_scheme == NULL && user_location[0] != '~') { { absolute_location = g_build_filename (entry->details->current_directory, user_location, NULL); suffix = g_filename_completer_get_completion_suffix (entry->details->completer, @@ -101,9 +103,11 @@ try_to_expand_path (gpointer callback_data) { suffix = g_filename_completer_get_completion_suffix (entry->details->completer, user_location); - g_free (user_location); } + g_free (user_location); + g_free (uri_scheme); + /* if we've got something, add it to the entry */ if (suffix != NULL) { |