diff options
22 files changed, 131 insertions, 57 deletions
@@ -1,3 +1,66 @@ +2001-10-04 Maciej Stachowiak <mjs@noisehavoc.org> + + * libnautilus-private/nautilus-file-attributes.h, + libnautilus-private/nautilus-file-private.h: Rename CUSTOM_NAME + attribute to DISPLAY_NAME. + + * libnautilus-private/nautilus-file.h, + libnautilus-private/nautilus-file.c: + (nautilus_file_get_name): Always return the real name of the file. + (nautilus_file_get_display_name): New function which returns the + display name of the file, taking into account special names that + may be set for .desktop files or gmc-style links, as + nautilus_file_get_name formerly did. + (nautilus_file_compare_display_name): Use display name and rename + for clarity. + + (destroy, compare_by_name, nautilus_file_get_string_attribute, + nautilus_file_get_all_attributes, nautilus_self_check_file): + Adjust for custom_name->display_name change, use + nautilus_file_get_display_name instead of natilus_file_get_name + where appropriate. + + * libnautilus-private/nautilus-directory-async.c: + (nautilus_directory_set_up_request), (link_info_done, + (link_info_gmc_link_read_callback): Adjust for custom_name->display_name change. + + + In all the places below, use nautilus_file_get_display_name + instead of nautilus_file_get_name: + + * components/text/nautilus-text-view.c: (file_read_callback): + * components/tree/nautilus-tree-model.c: + (nautilus_tree_model_monitor_add), + (nautilus_tree_model_node_begin_monitoring_no_connect): + * components/tree/nautilus-tree-view.c: + (nautilus_tree_view_insert_model_node), + (nautilus_tree_view_update_model_node): + * libnautilus-private/nautilus-program-chooser.c: + (get_file_name_for_display): + * libnautilus-private/nautilus-program-choosing.c: + (application_cannot_open_location): + * src/file-manager/fm-directory-view.c: + (fm_directory_view_display_selection_info), + (real_file_limit_reached), (file_name_from_uri), + (add_script_to_script_menus), (add_submenu_to_script_menus), + (copy_or_cut_files), (get_executable_text_file_action), + (fm_directory_view_activate_file), (finish_loading): + * src/file-manager/fm-error-reporting.c: + (fm_report_error_loading_directory), + (fm_report_error_renaming_file), (fm_report_error_setting_group), + (fm_report_error_setting_owner), + (fm_report_error_setting_permissions), (fm_rename_file): + * src/file-manager/fm-icon-view.c: + (icon_container_preview_callback), (get_icon_text_callback): + * src/file-manager/fm-list-view.c: (match_row_name): + * src/file-manager/fm-properties-window.c: + (name_field_update_to_match_file), + (update_properties_window_title), (create_permissions_page), + (create_properties_window): + * src/file-manager/fm-search-list-view.c: (real_adding_file): + * src/nautilus-window-manage-views.c: (compute_default_title): + * src/nautilus-window.c: (nautilus_window_set_viewed_file): + 2001-10-02 Darin Adler <darin@bentspoon.com> Fix the longstanding problem where the Notes and History sidebar diff --git a/components/text/nautilus-text-view.c b/components/text/nautilus-text-view.c index 586ee76ca..645f593b1 100644 --- a/components/text/nautilus-text-view.c +++ b/components/text/nautilus-text-view.c @@ -328,7 +328,7 @@ file_read_callback (GnomeVFSAsyncHandle *vfs_handle, callback_data); return; } else { - name = nautilus_file_get_name (text_view->details->file); + name = nautilus_file_get_display_name (text_view->details->file); message = g_strdup_printf (_("Sorry, but %s is too large for Nautilus to load all of it."), name); diff --git a/components/tree/nautilus-tree-model.c b/components/tree/nautilus-tree-model.c index f94e7c5f7..db051c7d9 100644 --- a/components/tree/nautilus-tree-model.c +++ b/components/tree/nautilus-tree-model.c @@ -331,7 +331,7 @@ nautilus_tree_model_monitor_add (NautilusTreeModel *model, monitor_attributes = nautilus_icon_factory_get_required_file_attributes (); monitor_attributes = g_list_prepend (monitor_attributes, NAUTILUS_FILE_ATTRIBUTE_IS_DIRECTORY); - monitor_attributes = g_list_prepend (monitor_attributes, NAUTILUS_FILE_ATTRIBUTE_CUSTOM_NAME); + monitor_attributes = g_list_prepend (monitor_attributes, NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME); nautilus_file_monitor_add (nautilus_tree_node_get_file (model->details->root_node), model, monitor_attributes); @@ -417,7 +417,7 @@ nautilus_tree_model_node_begin_monitoring_no_connect (NautilusTreeModel monitor_attributes = nautilus_icon_factory_get_required_file_attributes (); monitor_attributes = g_list_prepend (monitor_attributes, NAUTILUS_FILE_ATTRIBUTE_IS_DIRECTORY); - monitor_attributes = g_list_prepend (monitor_attributes, NAUTILUS_FILE_ATTRIBUTE_CUSTOM_NAME); + monitor_attributes = g_list_prepend (monitor_attributes, NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME); nautilus_directory_file_monitor_add (directory, model, TRUE, TRUE, diff --git a/components/tree/nautilus-tree-view.c b/components/tree/nautilus-tree-view.c index b4d733c08..6ac2f931b 100644 --- a/components/tree/nautilus-tree-view.c +++ b/components/tree/nautilus-tree-view.c @@ -231,7 +231,7 @@ nautilus_tree_view_insert_model_node (NautilusTreeView *view, NautilusTreeNode * if (parent_view_node == NULL && !nautilus_tree_node_is_toplevel (node)) { register_unparented_node (view, node); } else { - text[0] = nautilus_file_get_name (file); + text[0] = nautilus_file_get_display_name (file); text[1] = NULL; if (nautilus_tree_view_model_node_to_view_node (view, node) == NULL) { @@ -437,7 +437,7 @@ nautilus_tree_view_update_model_node (NautilusTreeView *view, NautilusTreeNode * (file, "accept", NAUTILUS_ICON_SIZE_FOR_MENUS, is_anti_aliased (view)); - name = nautilus_file_get_name (file); + name = nautilus_file_get_display_name (file); eel_ctree_set_node_info (EEL_CTREE (view->details->tree), view_node, diff --git a/libnautilus-private/nautilus-directory-async.c b/libnautilus-private/nautilus-directory-async.c index aed87ae6d..1f6e8dd78 100644 --- a/libnautilus-private/nautilus-directory-async.c +++ b/libnautilus-private/nautilus-directory-async.c @@ -555,7 +555,7 @@ nautilus_directory_set_up_request (Request *request, } if (g_list_find_custom (file_attributes, - NAUTILUS_FILE_ATTRIBUTE_CUSTOM_NAME, + NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME, eel_strcmp_compare_func) != NULL) { request->file_info = TRUE; request->link_info = TRUE; @@ -2704,10 +2704,10 @@ link_info_done (NautilusDirectory *directory, file->details->got_link_info = TRUE; g_free (file->details->activation_uri); - g_free (file->details->custom_name); + g_free (file->details->display_name); g_free (file->details->custom_icon_uri); file->details->activation_uri = g_strdup (uri); - file->details->custom_name = g_strdup (name); + file->details->display_name = g_strdup (name); file->details->custom_icon_uri = g_strdup (icon); nautilus_directory_async_state_changed (directory); @@ -2809,7 +2809,7 @@ link_info_gmc_link_read_callback (GnomeVFSResult result, if (path != NULL) { /* FIXME: this gnome_metata_get call is synchronous, but better to * have it here where the results will at least be cached than in - * nautilus_file_get_name. + * nautilus_file_get_display_name. */ res = gnome_metadata_get (path, "icon-name", &size, &name); } else { diff --git a/libnautilus-private/nautilus-file-attributes.h b/libnautilus-private/nautilus-file-attributes.h index df28ad33b..1957826c7 100644 --- a/libnautilus-private/nautilus-file-attributes.h +++ b/libnautilus-private/nautilus-file-attributes.h @@ -40,6 +40,6 @@ #define NAUTILUS_FILE_ATTRIBUTE_METADATA "metadata" #define NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE "MIME type" #define NAUTILUS_FILE_ATTRIBUTE_TOP_LEFT_TEXT "top left text" -#define NAUTILUS_FILE_ATTRIBUTE_CUSTOM_NAME "custom name" +#define NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME "display name" #endif /* NAUTILUS_FILE_ATTRIBUTES_H */ diff --git a/libnautilus-private/nautilus-file-private.h b/libnautilus-private/nautilus-file-private.h index 0e09a4bbf..668b7fcdc 100644 --- a/libnautilus-private/nautilus-file-private.h +++ b/libnautilus-private/nautilus-file-private.h @@ -69,7 +69,7 @@ struct NautilusFileDetails char *top_left_text; /* Info you might get from a link (.desktop, .directory or nautilus link) */ - char *custom_name; + char *display_name; char *custom_icon_uri; char *activation_uri; diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c index 1f9208b25..6f0d178f5 100644 --- a/libnautilus-private/nautilus-file.c +++ b/libnautilus-private/nautilus-file.c @@ -448,7 +448,7 @@ destroy (GtkObject *object) gnome_vfs_file_info_unref (file->details->info); } g_free (file->details->top_left_text); - g_free (file->details->custom_name); + g_free (file->details->display_name); g_free (file->details->custom_icon_uri); g_free (file->details->activation_uri); g_free (file->details->compare_by_emblem_cache); @@ -1518,8 +1518,8 @@ compare_by_name (NautilusFile *file_1, NautilusFile *file_2) gboolean sort_last_1, sort_last_2; int compare; - name_1 = nautilus_file_get_name (file_1); - name_2 = nautilus_file_get_name (file_2); + name_1 = nautilus_file_get_display_name (file_1); + name_2 = nautilus_file_get_display_name (file_2); sort_last_1 = strchr (SORT_LAST_CHARACTERS, name_1[0]) != NULL; sort_last_2 = strchr (SORT_LAST_CHARACTERS, name_2[0]) != NULL; @@ -1898,20 +1898,21 @@ nautilus_file_compare_for_sort (NautilusFile *file_1, * using the same sorting order as sort by name. **/ int -nautilus_file_compare_name (NautilusFile *file, - const char *pattern) +nautilus_file_compare_display_name (NautilusFile *file, + const char *pattern) { char *name; int result; g_return_val_if_fail (pattern != NULL, -1); - name = nautilus_file_get_name (file); + name = nautilus_file_get_display_name (file); result = eel_strcoll (name, pattern); g_free (name); return result; } + gboolean nautilus_file_is_hidden_file (NautilusFile *file) { @@ -2253,18 +2254,26 @@ nautilus_file_set_integer_metadata (NautilusFile *file, } char * -nautilus_file_get_name (NautilusFile *file) +nautilus_file_get_display_name (NautilusFile *file) { - char *name; - if (file == NULL) { return NULL; } + g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL); - if (file->details->got_link_info && file->details->custom_name != NULL) { - return g_strdup (file->details->custom_name); + if (file->details->got_link_info && file->details->display_name != NULL) { + return g_strdup (file->details->display_name); + } else { + return nautilus_file_get_name (file); } +} + + +char * +nautilus_file_get_name (NautilusFile *file) +{ + char *name; name = gnome_vfs_unescape_string (file->details->relative_uri, "/"); if (name != NULL) { @@ -2277,6 +2286,7 @@ nautilus_file_get_name (NautilusFile *file) */ return g_strdup (file->details->relative_uri); } + void nautilus_file_monitor_add (NautilusFile *file, @@ -3978,7 +3988,7 @@ nautilus_file_get_string_attribute (NautilusFile *file, const char *attribute_na */ if (strcmp (attribute_name, "name") == 0) { - return nautilus_file_get_name (file); + return nautilus_file_get_display_name (file); } if (strcmp (attribute_name, "type") == 0) { return nautilus_file_get_type_as_string (file); @@ -4916,7 +4926,7 @@ nautilus_file_get_all_attributes (void) attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_METADATA); attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE); attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_TOP_LEFT_TEXT); - attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_CUSTOM_NAME); + attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME); return attributes; } @@ -5195,7 +5205,7 @@ nautilus_self_check_file (void) nautilus_file_unref (file_1); file_1 = nautilus_file_get (EEL_TRASH_URI); - EEL_CHECK_STRING_RESULT (nautilus_file_get_name (file_1), _("Trash")); + EEL_CHECK_STRING_RESULT (nautilus_file_get_display_name (file_1), _("Trash")); nautilus_file_unref (file_1); /* sorting */ diff --git a/libnautilus-private/nautilus-file.h b/libnautilus-private/nautilus-file.h index e9bed7db8..a5b9ff43d 100644 --- a/libnautilus-private/nautilus-file.h +++ b/libnautilus-private/nautilus-file.h @@ -122,6 +122,7 @@ void nautilus_file_invalidate_all_attributes (Nautilu /* Basic attributes for file objects. */ gboolean nautilus_file_contains_text (NautilusFile *file); +char * nautilus_file_get_display_name (NautilusFile *file); char * nautilus_file_get_name (NautilusFile *file); char * nautilus_file_get_uri (NautilusFile *file); char * nautilus_file_get_uri_scheme (NautilusFile *file); @@ -270,7 +271,7 @@ int nautilus_file_compare_for_sort (Nautilu NautilusFileSortType sort_type, gboolean directories_first, gboolean reversed); -int nautilus_file_compare_name (NautilusFile *file_1, +int nautilus_file_compare_display_name (NautilusFile *file_1, const char *pattern); /* filtering functions for use by various directory views */ diff --git a/libnautilus-private/nautilus-program-chooser.c b/libnautilus-private/nautilus-program-chooser.c index 00022dcfd..fb1d96c9a 100644 --- a/libnautilus-private/nautilus-program-chooser.c +++ b/libnautilus-private/nautilus-program-chooser.c @@ -260,7 +260,7 @@ get_file_name_for_display (NautilusFile *file) g_assert (NAUTILUS_IS_FILE (file)); - full_name = nautilus_file_get_name (file); + full_name = nautilus_file_get_display_name (file); truncated_name = eel_str_middle_truncate (full_name, MAX_DISPLAYED_FILE_NAME_LENGTH); g_free (full_name); diff --git a/libnautilus-private/nautilus-program-choosing.c b/libnautilus-private/nautilus-program-choosing.c index 674477eba..f3c4e0eb6 100644 --- a/libnautilus-private/nautilus-program-choosing.c +++ b/libnautilus-private/nautilus-program-choosing.c @@ -488,7 +488,7 @@ application_cannot_open_location (GnomeVFSMimeApplication *application, char *message; char *file_name; - file_name = nautilus_file_get_name (file); + file_name = nautilus_file_get_display_name (file); if (nautilus_mime_has_any_applications_for_file (file)) { message = g_strdup_printf (_("\"%s\" can't open \"%s\" because \"%s\" can't access files at \"%s\" " diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c index e4b1661f0..f1c3398a6 100644 --- a/src/file-manager/fm-directory-view.c +++ b/src/file-manager/fm-directory-view.c @@ -1393,7 +1393,7 @@ fm_directory_view_display_selection_info (FMDirectoryView *view) } if (first_item_name == NULL) { - first_item_name = nautilus_file_get_name (file); + first_item_name = nautilus_file_get_display_name (file); } } @@ -1608,7 +1608,7 @@ real_file_limit_reached (FMDirectoryView *view) g_assert (FM_IS_DIRECTORY_VIEW (view)); file = fm_directory_view_get_directory_as_file (view); - directory_name = nautilus_file_get_name (file); + directory_name = nautilus_file_get_display_name (file); nautilus_file_unref (file); /* Note that the number of items actually displayed varies somewhat due @@ -2826,7 +2826,7 @@ file_name_from_uri (const char *uri) char *file_name; file = nautilus_file_get (uri); - file_name = nautilus_file_get_name (file); + file_name = nautilus_file_get_display_name (file); nautilus_file_unref (file); return file_name; @@ -3561,7 +3561,7 @@ add_script_to_script_menus (FMDirectoryView *directory_view, char *name; GdkPixbuf *pixbuf; - name = nautilus_file_get_name (file); + name = nautilus_file_get_display_name (file); tip = g_strdup_printf (_("Run \"%s\" on any selected items"), name); launch_parameters = script_launch_parameters_new (file, directory_view); @@ -3605,7 +3605,7 @@ add_submenu_to_script_menus (FMDirectoryView *directory_view, char *name; GdkPixbuf *pixbuf; - name = nautilus_file_get_name (file); + name = nautilus_file_get_display_name (file); pixbuf = nautilus_icon_factory_get_pixbuf_for_file (file, NULL, NAUTILUS_ICON_SIZE_FOR_MENUS, TRUE); add_submenu (directory_view->details->ui, menu_path, name, pixbuf); @@ -3831,7 +3831,7 @@ copy_or_cut_files (FMDirectoryView *view, count = g_list_length (view->details->clipboard_contents); if (count == 1) { - name = nautilus_file_get_name (view->details->clipboard_contents->data); + name = nautilus_file_get_display_name (view->details->clipboard_contents->data); if (cut) { status_string = g_strdup_printf (_("\"%s\" will be moved " "if you select the Paste Files command"), @@ -4468,7 +4468,7 @@ get_executable_text_file_action (FMDirectoryView *view, NautilusFile *file) } - file_name = nautilus_file_get_name (file); + file_name = nautilus_file_get_display_name (file); prompt = g_strdup_printf (_("\"%s\" is an executable text file. " "Do you want to run it, or display its contents?"), file_name); @@ -4657,7 +4657,7 @@ fm_directory_view_activate_file (FMDirectoryView *view, parameters->file = file; parameters->choice = choice; - file_name = nautilus_file_get_name (file); + file_name = nautilus_file_get_display_name (file); timed_wait_prompt = g_strdup_printf (_("Opening \"%s\""), file_name); g_free (file_name); @@ -4837,7 +4837,7 @@ finish_loading (FMDirectoryView *view) attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE); attributes = g_list_prepend (attributes, - NAUTILUS_FILE_ATTRIBUTE_CUSTOM_NAME); + NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME); nautilus_directory_file_monitor_add (view->details->model, &view->details->model, diff --git a/src/file-manager/fm-error-reporting.c b/src/file-manager/fm-error-reporting.c index 4868174fd..264880429 100644 --- a/src/file-manager/fm-error-reporting.c +++ b/src/file-manager/fm-error-reporting.c @@ -51,7 +51,7 @@ fm_report_error_loading_directory (NautilusFile *file, return; } - file_name = nautilus_file_get_name (file); + file_name = nautilus_file_get_display_name (file); switch (error) { case GNOME_VFS_ERROR_ACCESS_DENIED: @@ -92,7 +92,7 @@ fm_report_error_renaming_file (NautilusFile *file, /* Truncate names for display since very long file names with no spaces * in them won't get wrapped, and can create insanely wide dialog boxes. */ - original_name = nautilus_file_get_name (file); + original_name = nautilus_file_get_display_name (file); original_name_truncated = eel_str_middle_truncate (original_name, MAXIMUM_DISPLAYED_FILE_NAME_LENGTH); g_free (original_name); @@ -157,7 +157,7 @@ fm_report_error_setting_group (NautilusFile *file, return; } - file_name = nautilus_file_get_name (file); + file_name = nautilus_file_get_display_name (file); switch (error) { case GNOME_VFS_ERROR_NOT_PERMITTED: @@ -172,7 +172,7 @@ fm_report_error_setting_group (NautilusFile *file, /* We should invent decent error messages for every case we actually experience. */ g_warning ("Hit unhandled case %d (%s) in fm_report_error_setting_group, tell sullivan@eazel.com", error, gnome_vfs_result_to_string (error)); - file_name = nautilus_file_get_name (file); + file_name = nautilus_file_get_display_name (file); message = g_strdup_printf (_("Sorry, couldn't change the group of \"%s\"."), file_name); g_free (file_name); } @@ -195,7 +195,7 @@ fm_report_error_setting_owner (NautilusFile *file, return; } - file_name = nautilus_file_get_name (file); + file_name = nautilus_file_get_display_name (file); switch (error) { case GNOME_VFS_ERROR_READ_ONLY_FILE_SYSTEM: @@ -227,7 +227,7 @@ fm_report_error_setting_permissions (NautilusFile *file, return; } - file_name = nautilus_file_get_name (file); + file_name = nautilus_file_get_display_name (file); switch (error) { case GNOME_VFS_ERROR_READ_ONLY_FILE_SYSTEM: @@ -306,7 +306,7 @@ fm_rename_file (NautilusFile *file, g_free); /* Start the timed wait to cancel the rename. */ - old_name = nautilus_file_get_name (file); + old_name = nautilus_file_get_display_name (file); wait_message = g_strdup_printf (_("Renaming \"%s\" to \"%s\"."), old_name, new_name); diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c index 5b103fb7f..5ac49d491 100644 --- a/src/file-manager/fm-icon-view.c +++ b/src/file-manager/fm-icon-view.c @@ -1702,7 +1702,7 @@ icon_container_preview_callback (NautilusIconContainer *container, */ if (fm_icon_view_get_zoom_level (icon_view) <= NAUTILUS_ZOOM_LEVEL_SMALLER) { if (start_flag) { - file_name = nautilus_file_get_name (file); + file_name = nautilus_file_get_display_name (file); message = g_strdup_printf (_("pointing at \"%s\""), file_name); g_free (file_name); nautilus_view_report_status @@ -2002,7 +2002,7 @@ get_icon_text_callback (NautilusIconContainer *container, *editable_text = NULL; } else { /* Strip the suffix for nautilus object xml files. */ - *editable_text = nautilus_file_get_name (file); + *editable_text = nautilus_file_get_display_name (file); } /* Handle link files specially. */ diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c index 7fe654c9a..e31785828 100644 --- a/src/file-manager/fm-list-view.c +++ b/src/file-manager/fm-list-view.c @@ -431,7 +431,7 @@ match_row_name (gconstpointer a, void *callback_data) row = (EelCListRow *) a; pattern = (const char *) callback_data; - return nautilus_file_compare_name + return nautilus_file_compare_display_name (NAUTILUS_FILE (row->data), pattern); } diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c index 236643100..1f20dd8e5 100644 --- a/src/file-manager/fm-properties-window.c +++ b/src/file-manager/fm-properties-window.c @@ -315,7 +315,7 @@ name_field_update_to_match_file (NautilusEntry *name_field) * an edit in progress. If the name hasn't changed (but some other * aspect of the file might have), then don't clobber changes. */ - current_name = nautilus_file_get_name (file); + current_name = nautilus_file_get_display_name (file); if (eel_strcmp (original_name, current_name) != 0) { gtk_object_set_data_full (GTK_OBJECT (name_field), "original_name", @@ -518,7 +518,7 @@ update_properties_window_title (GtkWindow *window, NautilusFile *file) g_assert (NAUTILUS_IS_FILE (file)); g_assert (GTK_IS_WINDOW (window)); - name = nautilus_file_get_name (file); + name = nautilus_file_get_display_name (file); title = g_strdup_printf (_("%s Properties"), name); gtk_window_set_title (window, title); @@ -2050,7 +2050,7 @@ create_permissions_page (FMPropertiesWindow *window) append_title_value_pair (page_table, _("Last Changed:"), file, "date_permissions"); } else { - file_name = nautilus_file_get_name (file); + file_name = nautilus_file_get_display_name (file); prompt_text = g_strdup_printf (_("The permissions of \"%s\" could not be determined."), file_name); g_free (file_name); add_prompt (GTK_VBOX (vbox), prompt_text, TRUE); @@ -2133,7 +2133,7 @@ create_properties_window (StartupData *startup_data) */ attributes = nautilus_icon_factory_get_required_file_attributes (); attributes = g_list_prepend (attributes, - NAUTILUS_FILE_ATTRIBUTE_CUSTOM_NAME); + NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME); nautilus_file_monitor_add (window->details->original_file, window, attributes); g_list_free (attributes); diff --git a/src/file-manager/fm-search-list-view.c b/src/file-manager/fm-search-list-view.c index 0a4d76f8d..ee154ed35 100644 --- a/src/file-manager/fm-search-list-view.c +++ b/src/file-manager/fm-search-list-view.c @@ -643,7 +643,7 @@ real_adding_file (FMListView *view, NautilusFile *file) attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE); attributes = g_list_prepend (attributes, - NAUTILUS_FILE_ATTRIBUTE_CUSTOM_NAME); + NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME); nautilus_file_monitor_add (file, view, attributes); g_list_free (attributes); } diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index 56dd7dd08..05147dc5d 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -2284,7 +2284,7 @@ nautilus_window_set_viewed_file (NautilusWindow *window, } if (file != NULL) { - attributes = g_list_prepend (NULL, NAUTILUS_FILE_ATTRIBUTE_CUSTOM_NAME); + attributes = g_list_prepend (NULL, NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME); nautilus_file_monitor_add (file, window, attributes); g_list_free (attributes); } diff --git a/src/nautilus-object-window.c b/src/nautilus-object-window.c index 56dd7dd08..05147dc5d 100644 --- a/src/nautilus-object-window.c +++ b/src/nautilus-object-window.c @@ -2284,7 +2284,7 @@ nautilus_window_set_viewed_file (NautilusWindow *window, } if (file != NULL) { - attributes = g_list_prepend (NULL, NAUTILUS_FILE_ATTRIBUTE_CUSTOM_NAME); + attributes = g_list_prepend (NULL, NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME); nautilus_file_monitor_add (file, window, attributes); g_list_free (attributes); } diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c index 56dd7dd08..05147dc5d 100644 --- a/src/nautilus-spatial-window.c +++ b/src/nautilus-spatial-window.c @@ -2284,7 +2284,7 @@ nautilus_window_set_viewed_file (NautilusWindow *window, } if (file != NULL) { - attributes = g_list_prepend (NULL, NAUTILUS_FILE_ATTRIBUTE_CUSTOM_NAME); + attributes = g_list_prepend (NULL, NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME); nautilus_file_monitor_add (file, window, attributes); g_list_free (attributes); } diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c index 0a61a7025..d488dd6a4 100644 --- a/src/nautilus-window-manage-views.c +++ b/src/nautilus-window-manage-views.c @@ -157,7 +157,7 @@ compute_default_title (const char *text_uri) title = g_strdup (""); } else { file = nautilus_file_get (text_uri); - title = nautilus_file_get_name (file); + title = nautilus_file_get_display_name (file); nautilus_file_unref (file); } diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 56dd7dd08..05147dc5d 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -2284,7 +2284,7 @@ nautilus_window_set_viewed_file (NautilusWindow *window, } if (file != NULL) { - attributes = g_list_prepend (NULL, NAUTILUS_FILE_ATTRIBUTE_CUSTOM_NAME); + attributes = g_list_prepend (NULL, NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME); nautilus_file_monitor_add (file, window, attributes); g_list_free (attributes); } |