diff options
author | Alexander Larsson <alexl@redhat.com> | 2004-02-13 10:54:41 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2004-02-13 10:54:41 +0000 |
commit | bcb03985f04272a8435f500e93f0f08950902966 (patch) | |
tree | db061f72e984d5b0022c2925d6ca8fe1788031e0 /src/nautilus-spatial-window.c | |
parent | 51d7a33ea0ac16fb937f0b7c0b95d2e86c429240 (diff) | |
download | nautilus-bcb03985f04272a8435f500e93f0f08950902966.tar.gz |
New functions
2004-02-13 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-utilities.[ch]:
(nautilus_have_broken_filenames),
(nautilus_get_uri_shortname_for_display):
New functions
* libnautilus-private/nautilus-file.c:
Use the public nautilus_have_broken_filenames instead of private copy
Make display names for toplevel uris better.
* src/nautilus-location-entry.c: (try_to_expand_path):
Use the public nautilus_have_broken_filenames instead of private copy
* src/nautilus-spatial-window.c:
(location_button_clicked_callback),
(nautilus_spatial_window_set_location_button):
Use nautilus_get_uri_shortname_for_display()
* src/nautilus-window.c: (compute_default_title):
Special casing toplevel stuff not needed, since this is
handled by the display name change.
Diffstat (limited to 'src/nautilus-spatial-window.c')
-rw-r--r-- | src/nautilus-spatial-window.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c index ca454da9d..20ab205a6 100644 --- a/src/nautilus-spatial-window.c +++ b/src/nautilus-spatial-window.c @@ -444,32 +444,6 @@ menu_popup_pos (GtkMenu *menu, *push_in = TRUE; } -static char * -get_uri_name (GnomeVFSURI *uri) -{ - char *name, *short_name; - const char *method; - - if (!gnome_vfs_uri_has_parent (uri) && - g_ascii_strcasecmp (uri->method_string, "file") != 0) { - method = nautilus_get_vfs_method_display_name (uri->method_string); - if (method == NULL) { - method = uri->method_string; - } - - short_name = gnome_vfs_uri_extract_short_name (uri); - if (short_name == NULL || - strcmp (short_name, GNOME_VFS_URI_PATH_STR) == 0) { - return g_strdup (method); - } - name = g_strdup_printf ("%s: %s", method, short_name); - g_free (short_name); - } else { - name = gnome_vfs_uri_extract_short_name (uri); - } - return name; -} - static void location_button_clicked_callback (GtkWidget *widget, NautilusSpatialWindow *window) { @@ -484,7 +458,7 @@ location_button_clicked_callback (GtkWidget *widget, NautilusSpatialWindow *wind uri = gnome_vfs_uri_ref (window->details->location); while (uri != NULL) { - name = get_uri_name (uri); + name = nautilus_get_uri_shortname_for_display (uri); menu_item = gtk_image_menu_item_new_with_label (name); g_free (name); gtk_widget_show (menu_item); @@ -525,7 +499,7 @@ nautilus_spatial_window_set_location_button (NautilusSpatialWindow *window, uri = gnome_vfs_uri_new (location); } if (uri != NULL) { - name = get_uri_name (uri); + name = nautilus_get_uri_shortname_for_display (uri); gtk_button_set_label (GTK_BUTTON (window->details->location_button), name); g_free (name); |