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-location-entry.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-location-entry.c')
-rw-r--r-- | src/nautilus-location-entry.c | 23 |
1 files changed, 3 insertions, 20 deletions
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 <libgnomeui/gnome-stock-icons.h> #include <libgnomeui/gnome-uidefs.h> #include <libgnomevfs/gnome-vfs.h> +#include <libnautilus-private/nautilus-file-utilities.h> #include <libnautilus-private/nautilus-entry.h> #include <libnautilus-private/nautilus-icon-dnd.h> #include <libnautilus/nautilus-clipboard.h> @@ -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); |