From bcb03985f04272a8435f500e93f0f08950902966 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 13 Feb 2004 10:54:41 +0000 Subject: New functions 2004-02-13 Alexander Larsson * 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. --- src/nautilus-location-entry.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'src/nautilus-location-entry.c') diff --git a/src/nautilus-location-entry.c b/src/nautilus-location-entry.c index f7e4a4463..06bf1de48 100644 --- a/src/nautilus-location-entry.c +++ b/src/nautilus-location-entry.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -68,24 +69,6 @@ EEL_CLASS_BOILERPLATE (NautilusLocationEntry, nautilus_location_entry, NAUTILUS_TYPE_ENTRY) -static gboolean -have_broken_filenames (void) -{ - static gboolean initialized = FALSE; - static gboolean broken; - - if (initialized) { - return broken; - } - - broken = g_getenv ("G_BROKEN_FILENAMES") != NULL; - - initialized = TRUE; - - return broken; -} - - /* utility routine to determine the string to expand to. If we don't have anything yet, accept the whole string, otherwise accept the largest part common to both */ @@ -268,7 +251,7 @@ try_to_expand_path (gpointer callback_data) } else { expand_name = g_strdup (current_file_info->name); } - if (have_broken_filenames()) { + if (nautilus_have_broken_filenames()) { expand_text = accumulate_name_locale (expand_text, expand_name); } else { expand_text = accumulate_name_utf8 (expand_text, expand_name); @@ -277,7 +260,7 @@ try_to_expand_path (gpointer callback_data) } } - if (have_broken_filenames ()) { + if (nautilus_have_broken_filenames ()) { if (expand_text) { expand_text_utf8 = g_locale_to_utf8 (expand_text, -1, NULL, NULL, NULL); g_free (expand_text); -- cgit v1.2.1