nautilus/libnautilus-private/nautilus-file-utilities.h

100 lines
4.3 KiB
C
Raw Normal View History

/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-file-utilities.h - interface for file manipulation routines.
reviewed by: Pavel Cisler <pavel@eazel.com> Fix bug 6286 (get 3 directory loads instead of 1 when you activate file in directory view [as opposed to typing location]). This is mostly right, but there's still a relatively common case where we get a 2nd directory load. I'll have to write a bug report about that case, but it's no worse than before and quite a bit better. * src/file-manager/fm-directory-view.c: (fm_directory_view_destroy): Stop monitoring. Also change the old monitoring code to use different "client" pointers so multiple monitors don't interfere with each other. (activate_callback): Stop monitoring when we get to the point of actually activating (unless we are opening through the shell). Also do some small cleanup to "command:" handling code and fix minor storage leak. (cancel_activate_callback): Stop monitoring if we cancel. (fm_directory_view_activate_file): Start monitoring so the load can be shared between all who need it. This is the same optimization done at the shell level. (load_directory): Use the new client pointer approach so multiple monitors don't interfere with each other. (finish_loading): Use the new client pointer approach so multiple monitors don't interfere with each other. (disconnect_model_handlers): Use the new client pointer approach so multiple monitors don't interfere with each other. (monitor_file_for_open_with): Use the new client pointer approach so multiple monitors don't interfere with each other. (monitor_file_for_activation): New function that monitors the file list so we don't get multiple directory loads. Fix tests now that gnome-vfs has a fix for bug 6798 (URI functions don't always treat domain names as case-insensitive) and fix bug 6799 (nautilus_uris_match_ignore_fragments gives wrong result for URIs with trailing "/" characters). * libnautilus-extensions/nautilus-file-utilities.h: * libnautilus-extensions/nautilus-file-utilities.c: (nautilus_make_uri_canonical_strip_fragment): New function. (uris_match): Use new function to handle fragments better. (nautilus_self_check_file_utilities): Update checks to expect fixes in gnome-vfs and here. Note that both bugs 6798 and 6799 are now fixed. * help/.cvsignore: * help/nautilus-user-manual/.cvsignore: * help/nautilus-user-manual/C/.cvsignore: * omf-install/.cvsignore: Ignore generated files in some new directories.
2001-02-22 01:59:29 +00:00
Copyright (C) 1999, 2000, 2001 Eazel, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: John Sullivan <sullivan@eazel.com>
*/
#ifndef NAUTILUS_FILE_UTILITIES_H
#define NAUTILUS_FILE_UTILITIES_H
Only use <gio/gio.h> include 2007-12-14 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-bookmark.c: * libnautilus-private/nautilus-bookmark.h: * libnautilus-private/nautilus-desktop-icon-file.c: * libnautilus-private/nautilus-desktop-link-monitor.c: * libnautilus-private/nautilus-desktop-link.c: * libnautilus-private/nautilus-desktop-link.h: * libnautilus-private/nautilus-directory-private.h: * libnautilus-private/nautilus-directory.h: * libnautilus-private/nautilus-emblem-utils.h: * libnautilus-private/nautilus-file-changes-queue.h: * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: * libnautilus-private/nautilus-file-utilities.c: * libnautilus-private/nautilus-file-utilities.h: * libnautilus-private/nautilus-file.c: * libnautilus-private/nautilus-file.h: * libnautilus-private/nautilus-icon-info.c: * libnautilus-private/nautilus-icon-info.h: * libnautilus-private/nautilus-link.c: * libnautilus-private/nautilus-mime-actions.h: * libnautilus-private/nautilus-mime-application-chooser.c: * libnautilus-private/nautilus-monitor.c: * libnautilus-private/nautilus-monitor.h: * libnautilus-private/nautilus-open-with-dialog.c: * libnautilus-private/nautilus-open-with-dialog.h: * libnautilus-private/nautilus-program-choosing.c: * libnautilus-private/nautilus-program-choosing.h: * libnautilus-private/nautilus-progress-info.h: * libnautilus-private/nautilus-recent.h: * libnautilus-private/nautilus-search-directory.c: * libnautilus-private/nautilus-search-engine-simple.c: * libnautilus-private/nautilus-trash-monitor.c: * libnautilus-private/nautilus-trash-monitor.h: * libnautilus-private/nautilus-ui-utilities.c: * libnautilus-private/nautilus-view-factory.h: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-directory-view.h: * src/file-manager/fm-icon-container.c: * src/file-manager/fm-icon-view.c: * src/file-manager/fm-tree-model.h: * src/file-manager/fm-tree-view.c: * src/nautilus-application.c: * src/nautilus-application.h: * src/nautilus-bookmark-list.c: * src/nautilus-bookmark-list.h: * src/nautilus-desktop-window.c: * src/nautilus-image-properties-page.c: * src/nautilus-location-entry.c: * src/nautilus-navigation-window.c: * src/nautilus-pathbar.c: * src/nautilus-pathbar.h: * src/nautilus-places-sidebar.c: * src/nautilus-property-browser.c: * src/nautilus-query-editor.c: * src/nautilus-window-menus.c: Only use <gio/gio.h> include svn path=/trunk/; revision=13529
2007-12-14 10:31:25 +00:00
#include <gio/gio.h>
Made NautilusFile async. like NautilusDirectory already was. * RENAMING: Added a renaming idea. * libnautilus-extensions/nautilus-directory-async.c: (cancel_get_info), (cancel_metafile_read), (nautilus_directory_cancel): Added the new getting of file info to the cancel logic. (nautilus_compare_file_with_name): Changed to get the name in a way that works with files with no info. (nautilus_async_destroying_file): Handle the cancelling for the get_file_info case. (lacks_info), (wants_info), (request_is_satisfied): Add code to handle the need for file info for a newly created NautilusFile. (get_info_callback), (start_getting_file_info), (state_changed): Add code to get file info for files that lack it. * libnautilus-extensions/nautilus-directory-private.h: Add fields for getting file info for new files. * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_notify_files_moved): Moved the logic about updating the name on a file as it is moved into nautilus-file.c. * libnautilus-extensions/nautilus-file-attributes.h: Added a "deep count" attribute and function as a placeholder for work that I'll be doing for John shortly. * libnautilus-extensions/nautilus-file-private.h: Moved the calls relating to updating an existing NautilusFile so they are private and added one for a name change. * libnautilus-extensions/nautilus-file-utilities.h: Added interface for new nautilus_read_entire_file family of calls that I still need to implement. * libnautilus-extensions/nautilus-file.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_new_from_name), (nautilus_file_new_from_info): Added a way to create a file without having GnomeVFSFileInfo yet. (nautilus_file_get): Don't get the GnomeVFSFileInfo; let the async. logic handler that. (rename_update_info_and_metafile): Handle new name field. (nautilus_file_rename): Use new name field. (nautilus_file_get_gnome_vfs_uri): Common code shared in a couple of places. Started fixing the "no file object for root" problem. (nautilus_file_matches_uri): Use nautilus_file_get_gnome_vfs_uri. (nautilus_file_update_info): Handle NULL case and new name field. (nautilus_file_update_name): New function used by move code in nautilus-directory.c. (nautilus_file_compare_by_type): Handle NULL info case. (nautilus_file_compare_for_sort_internal): Handle NULL info case. (nautilus_file_compare_name): Use new name field. (nautilus_file_get_metadata), (nautilus_file_get_metadata_list): Handle NULL file and use new name field. (nautilus_file_set_metadata), (nautilus_file_set_metadata_list): Use new name field. (nautilus_file_get_name): Handle NULL file and use new name field. (nautilus_file_get_uri): Use nautilus_file_get_gnome_vfs_uri. (info_missing): New function to handle NULL file case, NULL info case, and check the valid_fields more thoroughly. (nautilus_file_get_date_as_string), (nautilus_file_get_size), (nautilus_file_can_get_permissions), (nautilus_file_get_owner_as_string), (nautilus_file_get_group_as_string), (nautilus_file_get_size_as_string), (nautilus_file_get_type_as_string), (nautilus_file_get_file_type), (nautilus_file_get_mime_type), (nautilus_file_is_mime_type), (nautilus_file_is_symbolic_link), Use info_missing to handle NULL file and NULL info cases and to do valid_fields checks as needed. (nautilus_file_get_permissions_as_string): Move file check so the NULL case will work properly. (nautilus_file_get_mime_type_as_string_attribute): Got rid of redundant g_free call. (nautilus_file_get_string_attribute): Remove file check so NULL case will work properly. (nautilus_file_get_emblem_names): Handle NULL file case. (nautilus_file_get_keywords): Handle NULL file case. (nautilus_file_is_executable): Remove file check so NULL case will work properly. (nautilus_file_mark_gone): Add code to get rid of info which we don't need to keep around for files that are gone. (nautilus_file_activate_custom): Added FIXME comments. * libnautilus-extensions/nautilus-gdk-extensions.c: (nautilus_get_largest_fitting_font): Changed so it handles the case of NULL for passed-in text properly. * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_for_file): Formatting. (nautilus_icon_factory_get_pixbuf_for_file): Handle NULL file by returning NULL for the pixbuf. (nautilus_icon_factory_get_pixmap_and_mask_for_file): Handle NULL for the pixbuf by return NULL for the pixmap/mask. * src/nautilus-main.c: (print_leaks), (main): Do the leak printing from an atexit function so more of the cleanup will run first. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_pixmap_new_empty): A simple cover for allocating a GtkPixmap before we have a GdkPixmap to display. * src/nautilus-sidebar-title.c: (nautilus_sidebar_title_initialize): Create the widgets when the title is set up instead of creating them "as needed". (update_icon): Always update the icon, even if the file is NULL. (update_title): Always update the title, even if the file is NULL. Also got rid of the line-breaking code. We instead use the line- breaking code inside GtkLabel, which we can tweak as needed by setting a line width. We may need to revisit this, but lets not re-add our own line-break code unless we have to. (append_and_eat), (update_more_info): Always update the info field, even if the file is NULL. I rewrote this. (add_emblem), (update_emblems): Always update the emblems, even if the file is NULL. (update_notes): Always update the notes, even if the file is NULL. (update_all): Update all the pieces separately (the old code was doing them strangely bunched up). (nautilus_sidebar_title_set_uri): Always ask for the directory item count, even when the item is not yet known to be a directory. * src/nautilus-window.c: (nautilus_window_constructed): Get rid of the call to gtk_widget_show_all that was showhing things that were intentionally hidden. (nautilus_window_load_content_view_menu): Removed an unused variable that was set up but never examined.
2000-06-20 22:09:36 +00:00
#define NAUTILUS_SAVED_SEARCH_EXTENSION ".savedSearch"
#define NAUTILUS_SAVED_SEARCH_MIMETYPE "application/x-gnome-saved-search"
reviewed by Maciej Stachowiak <mjs@eazel.com> 2001-02-20 John Harper <jsh@eazel.com> reviewed by Maciej Stachowiak <mjs@eazel.com> Fixed bug where a renamed node in the tree view doesn't get resorted: * libnautilus-extensions/nautilus-ctree.c (set_node_info): if the ctree is in auto-sort mode, sort the branch containing the changed node Fixed a crash in the tree view when expanding nodes that have been moved across directories: * components/tree/nautilus-tree-node.c (nautilus_tree_node_remove_children): new function, unparents all children of the given node (nautilus_tree_node_destroy): emit a warning if the list of children is non-null (then call remove_children). Ideally the remove_children function should get called before the final unref of a directory node * components/tree/nautilus-tree-model.c (report_node_removed_internal): call nautilus_tree_node_remove_children before unref'ing the node Mostly fixed bug where expansion state hash table accumulates cruft over time (e.g. directories that no longer exist or got moved to locations where they can never be displayed): * components/tree/nautilus-tree-view.h (NautilusTreeViewDetails): added `view_node_to_uri_map' hash table. This is used to map view nodes to the URIs we believe they are displaying. This is necessary since by the time we find out about changes to nodes, the names of the underlying NautilusFile objects have often already been changed * components/tree/nautilus-tree-view.c (unlink_view_node_from_uri, link_view_node_with_uri, map_view_node_to_uri): functions accessing the new hash table (nautilus_tree_view_would_include_file): new function, returns true iff the given file may possibly appear in the tree view. Climbs through all parents of the file to do this (nautilus_tree_view_model_node_renamed_callback): only propagates the expansion state if the would_include function indicates that the new URI of the file would be included in the tree view * components/tree/nautilus-tree-model.c (report_node_changed): no need to suppress the `node_removed' signal when renaming the node (now that the view always deletes the expansion state of the correct URI) * libnautilus-extensions/nautilus-file.c, libnautilus-extensions/nautilus-file-private.h, libnautilus-extensions/nautilus-file-utilities.c, libnautilus-extensions/nautilus-file-utilities.h (nautilus_file_name_matches_hidden_pattern, nautilus_file_name_matches_backup_pattern): moved these functions from being private in nautilus-file to being public in nautilus-file-utilities Fixed tree view bug where moving nodes across directories still loses the expansion state: * components/tree/nautilus-tree-model.c (nautilus_tree_model_directory_files_changed_callback): separated the cases of the file being deleted and it being moved across directories. In the move case emit the `being_renamed' signal so the expansion state gets propagated (nautilus_tree_view_remove_model_node, forget_view_node): moved the code to delete the expansion state from forget_view_node to nautilus_tree_view_remove_model_node - avoids deleting expansion state of nodes that will later be renamed. It may leave non-existent directories in the expansion state, but this is a lesser bug than losing the expansion state totally. Also, use the map_view_node_to_uri function to find the URI whose expansion state needs to be removed Fixed the bug where tree view icons often got chopped at top and bottom when they're drawn (if the icon height is greater than the font height). This means that fewer rows may fit in the same vertical space, but visually it's (imho) a huge improvement (I think this is bug 6085): * components/tree/nautilus-tree-view.c (nautilus_tree_view_initialize): call gtk_clist_set_row_height with the maximum of the font height and the icon height * libnautilus-extensions/nautilus-ctree.c (draw_row): always calculate row_center_offset locally, and do it in such a way that the text really is in the center of the row! Fixed bug 5165 - repeatedly expanding and collapsing an empty directory doesn't change how the node's icon is drawn after the first expansion: * libnautilus-extensions/nautilus-ctree.c (real_tree_expand, real_tree_collapse): before returning, call tree_draw_node on the node that changed state
2001-02-21 07:19:48 +00:00
/* Recognizing special file names. */
Move vfs extensions to eel. * libnautilus-extensions/nautilus-file-utilities.c: * libnautilus-extensions/nautilus-file-utilities.h: Move vfs extensions to eel. * components/services/install-view/nautilus-service-install-view.c: * components/services/install/server/main.c: * components/services/inventory/eazel-inventory-collect-hardware.c: (add_info): * components/services/inventory/eazel-inventory-service.c: (impl_Trilobite_Eazel_Inventory_upload): * components/text/nautilus-text-view.c: (handle_service_menu_item): * components/tree/nautilus-tree-view.c: (select_current_location), (tree_load_location_callback), (got_activation_uri_callback): * libnautilus-extensions/nautilus-bookmark.c: (nautilus_bookmark_compare_with), (nautilus_bookmark_compare_uris), (bookmark_file_changed_callback): * libnautilus-extensions/nautilus-directory-async.c: (top_left_cancel), (activation_uri_cancel), (top_left_start), (activation_uri_start): * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_make_uri_canonical), (nautilus_directory_new), (nautilus_directory_notify_files_moved), (nautilus_self_check_directory): * libnautilus-extensions/nautilus-drag.c: (nautilus_drag_items_in_trash), (nautilus_drag_default_drop_action_for_icons): * libnautilus-extensions/nautilus-file-operations.c: (format_and_ellipsize_uri_for_dialog), (nautilus_file_operations_copy_move): * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_internal), (nautilus_file_get_parent_uri_for_display), (nautilus_file_can_rename), (nautilus_file_get_uri_scheme), (nautilus_file_is_in_trash), (nautilus_self_check_file): * libnautilus-extensions/nautilus-icon-dnd.c: (nautilus_icon_container_selection_items_local): * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_name_for_file), (nautilus_icon_factory_get_emblem_icons_for_file): * libnautilus-extensions/nautilus-link.c: (nautilus_link_local_get_image_uri): * libnautilus-extensions/nautilus-metafile.c: (construct_private_metafile_vfs_uri), (metafile_read_cancel), (metafile_read_restart): * libnautilus-extensions/nautilus-tabs.c: * libnautilus-extensions/nautilus-theme.c: * libnautilus-extensions/nautilus-thumbnails.c: (make_thumbnail_uri): * libnautilus-extensions/nautilus-trash-file.c: (nautilus_trash_file_initialize): * libnautilus-extensions/nautilus-trash-monitor.c: (nautilus_trash_files_changed_callback), (nautilus_trash_monitor_initialize): * src/file-manager/fm-desktop-icon-view.c: (update_trash_link_and_delete_copies): * src/file-manager/fm-directory-view.c: (show_trash_callback), (trash_or_delete_files_common), (fm_directory_view_trash_or_delete_files), (fm_directory_view_move_copy_items): * src/file-manager/fm-properties-window.c: (is_merged_trash_directory): * src/nautilus-application.c: (nautilus_make_uri_list_from_shell_strv): * src/nautilus-first-time-druid.c: (read_file_handle_cancel_cover), (initiate_file_download): * src/nautilus-location-bar.c: (try_to_expand_path), (nautilus_location_bar_set_location), (nautilus_location_bar_get_location), (nautilus_location_bar_update_label): * src/nautilus-profiler.c: (nautilus_profiler_bonobo_ui_report_callback): * src/nautilus-property-browser.c: (add_pattern_to_browser), (emblem_dialog_clicked): * src/nautilus-sidebar.c: (receive_dropped_uri_list): * src/nautilus-theme-selector.c: (add_theme_to_icons): * src/nautilus-window-manage-views.c: (set_displayed_location), (check_bookmark_location_matches), (handle_go_elsewhere), (viewed_file_changed_callback), (determined_initial_view_callback), (open_location_prefer_existing_window_callback), (report_redirect_callback): * src/nautilus-window-menus.c: (show_bogus_bookmark_window): Update for vfs extensions move to eel. Also cleanup the #include state of some of these files. Removed unused #includes. Remove some cut-n-paste code in services components and use the extensions in eel directly.
2001-04-04 11:29:08 +00:00
gboolean nautilus_file_name_matches_hidden_pattern (const char *name_or_relative_uri);
gboolean nautilus_file_name_matches_backup_pattern (const char *name_or_relative_uri);
No parameters is indicated by "(void)" instead of "()". * components/help/help-method.c: (help_uri_new): No parameters is indicated by "(void)" instead of "()". (help_uri_to_string): Changed to share more code (I think I might have fixed a leak too). (init_help_module): No parameters is indicated by "(void)" instead of "()". Also fixed a bug where the wrong lock is unlocked. (convert_file_to_uri): Use g_strcasecmp instead of strcmp since we are checking MIME types. (transform_file), (transform_absolute_file), (file_from_path), (find_help_file), (transform_relative_file): Merged these so they share a lot of common code. * components/services/vault/command-line/vault-operations.c: (vault_list): Fixed a g_strconcat that was missing a trailing NULL. * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-file-attributes.h: * libnautilus-extensions/nautilus-directory-async.c: (cancel_top_left_read), (top_left_read_done), (top_left_read_callback), (top_left_read_more_callback), (start_getting_top_lefts), Changed top_left code to use nautilus_read_file calls. (cancel_metafile_read), Changed to reflect name changes in nautilus_read_file calls. (cancel_get_activation_uri), (nautilus_directory_cancel), (set_up_request_by_file_attributes), (nautilus_async_destroying_file), (lacks_activation_uri), (wants_activation_uri), (request_is_satisfied), (activation_uri_found), (activation_uri_nautilus_link_read_callback), (activation_uri_gmc_link_read_callback), (activation_uri_gmc_link_read_more_callback), (start_getting_activation_uris), (nautilus_directory_async_state_changed): Add code to fetch activation URIs for either GMC or Nautilus-style link files. (lacks_top_left): Changed to share common nautilus_file_should_get_top_left_text function so we don't have lots of different code reading the preferences about top-left text. (is_needy): Enhanced and renamed is_wanted so it takes into account files that are and aren't interesting. (start_getting_directory_counts), (deep_count_start): (start_getting_file_info), Change to use is_needy. * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-directory.c: Tweaked spacing. * libnautilus-extensions/nautilus-file-private.h: Added a self_owned flag so we do better with files that don't have parent directories and the fields to support activation_uri. * libnautilus-extensions/nautilus-file-utilities.h: * libnautilus-extensions/nautilus-file-utilities.c: (read_file_close_callback), (read_file_close), (read_file_succeeded), (read_file_failed), (read_file_read_callback), (read_file_read_chunk), (read_file_open_callback), (nautilus_read_file_async), (nautilus_read_entire_file_async), (nautilus_read_file_cancel): Added a variation of the read file call that takes a function to decide whether to keep reading or not. * libnautilus-extensions/nautilus-file.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_new_from_name), (nautilus_file_get), (nautilus_file_get_parent_uri_as_string), (get_file_for_parent_directory), (nautilus_file_rename), (nautilus_file_get_gnome_vfs_uri), (nautilus_file_get_uri), Add code that handles the "self_owned" flag to make files without parents work better. (destroy): Fixed some leaks I noticed. (nautilus_file_get_top_left_text), (nautilus_file_should_get_top_left_text): Added this so that all code can share a single call when deciding whether to get text based on local vs. non-local. (nautilus_file_get_activation_uri): Changed to work with new async. code to fetch this. * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_for_file): Call nautilus_file_should_get_top_left_text. * libnautilus-extensions/nautilus-link.h: * libnautilus-extensions/nautilus-link.c: (nautilus_link_is_link_file_name): Named so it's clear it looks at the file name only. (xml_get_root_property), (nautilus_link_get_root_property): Added these to share a lot of common code. (nautilus_link_get_additional_text): Use the new calls. (make_local_path), (icon_read_done_callback), (nautilus_link_get_image_uri), (nautilus_link_get_link_uri), (nautilus_link_get_display_name): Other cleanup and rewrite. (nautilus_link_get_link_uri_given_file_contents): Add API that can work with the async. I/O version. * libnautilus-extensions/nautilus-stock-dialogs.c: (timed_wait_free), (nautilus_timed_wait_start): Added some asserts. * src/file-manager/fm-directory-view.c: (activate_callback), (fm_directory_view_activate_file): Use call_when_ready and the new async. stuff. * src/file-manager/fm-error-reporting.c: (fm_report_error_setting_group): Added a (low-quality) error message for the case where you aren't alowed to change the group of something. * src/file-manager/fm-icon-view.c: (icon_position_changed_callback): Added missing NULL in a call to g_strconcat. (get_icon_text_callback): Fix storage leak. * src/file-manager/fm-properties-window.c: (activate_owner_callback): Fixed a timed_wait_start/stop mismatch that was causing an assert and other badness when you changed the owner. * src/file-manager/fm-search-list-view.c: (get_attribute_from_column): Added a missing case to prevent a crash, but had to put in a FIXME since the code isn't really working. * src/nautilus-application.c: (nautilus_application_startup): Fixed bug where you wouldn't see error messages on startup. Also improved one of the error messages by adding some blank lines.
2000-07-26 03:07:30 +00:00
/* These functions all return something something that needs to be
* freed with g_free, is not NULL, and is guaranteed to exist.
*/
char * nautilus_get_xdg_dir (const char *type);
Move vfs extensions to eel. * libnautilus-extensions/nautilus-file-utilities.c: * libnautilus-extensions/nautilus-file-utilities.h: Move vfs extensions to eel. * components/services/install-view/nautilus-service-install-view.c: * components/services/install/server/main.c: * components/services/inventory/eazel-inventory-collect-hardware.c: (add_info): * components/services/inventory/eazel-inventory-service.c: (impl_Trilobite_Eazel_Inventory_upload): * components/text/nautilus-text-view.c: (handle_service_menu_item): * components/tree/nautilus-tree-view.c: (select_current_location), (tree_load_location_callback), (got_activation_uri_callback): * libnautilus-extensions/nautilus-bookmark.c: (nautilus_bookmark_compare_with), (nautilus_bookmark_compare_uris), (bookmark_file_changed_callback): * libnautilus-extensions/nautilus-directory-async.c: (top_left_cancel), (activation_uri_cancel), (top_left_start), (activation_uri_start): * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_make_uri_canonical), (nautilus_directory_new), (nautilus_directory_notify_files_moved), (nautilus_self_check_directory): * libnautilus-extensions/nautilus-drag.c: (nautilus_drag_items_in_trash), (nautilus_drag_default_drop_action_for_icons): * libnautilus-extensions/nautilus-file-operations.c: (format_and_ellipsize_uri_for_dialog), (nautilus_file_operations_copy_move): * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_internal), (nautilus_file_get_parent_uri_for_display), (nautilus_file_can_rename), (nautilus_file_get_uri_scheme), (nautilus_file_is_in_trash), (nautilus_self_check_file): * libnautilus-extensions/nautilus-icon-dnd.c: (nautilus_icon_container_selection_items_local): * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_name_for_file), (nautilus_icon_factory_get_emblem_icons_for_file): * libnautilus-extensions/nautilus-link.c: (nautilus_link_local_get_image_uri): * libnautilus-extensions/nautilus-metafile.c: (construct_private_metafile_vfs_uri), (metafile_read_cancel), (metafile_read_restart): * libnautilus-extensions/nautilus-tabs.c: * libnautilus-extensions/nautilus-theme.c: * libnautilus-extensions/nautilus-thumbnails.c: (make_thumbnail_uri): * libnautilus-extensions/nautilus-trash-file.c: (nautilus_trash_file_initialize): * libnautilus-extensions/nautilus-trash-monitor.c: (nautilus_trash_files_changed_callback), (nautilus_trash_monitor_initialize): * src/file-manager/fm-desktop-icon-view.c: (update_trash_link_and_delete_copies): * src/file-manager/fm-directory-view.c: (show_trash_callback), (trash_or_delete_files_common), (fm_directory_view_trash_or_delete_files), (fm_directory_view_move_copy_items): * src/file-manager/fm-properties-window.c: (is_merged_trash_directory): * src/nautilus-application.c: (nautilus_make_uri_list_from_shell_strv): * src/nautilus-first-time-druid.c: (read_file_handle_cancel_cover), (initiate_file_download): * src/nautilus-location-bar.c: (try_to_expand_path), (nautilus_location_bar_set_location), (nautilus_location_bar_get_location), (nautilus_location_bar_update_label): * src/nautilus-profiler.c: (nautilus_profiler_bonobo_ui_report_callback): * src/nautilus-property-browser.c: (add_pattern_to_browser), (emblem_dialog_clicked): * src/nautilus-sidebar.c: (receive_dropped_uri_list): * src/nautilus-theme-selector.c: (add_theme_to_icons): * src/nautilus-window-manage-views.c: (set_displayed_location), (check_bookmark_location_matches), (handle_go_elsewhere), (viewed_file_changed_callback), (determined_initial_view_callback), (open_location_prefer_existing_window_callback), (report_redirect_callback): * src/nautilus-window-menus.c: (show_bogus_bookmark_window): Update for vfs extensions move to eel. Also cleanup the #include state of some of these files. Removed unused #includes. Remove some cut-n-paste code in services components and use the extensions in eel directly.
2001-04-04 11:29:08 +00:00
char * nautilus_get_user_directory (void);
char * nautilus_get_desktop_directory (void);
GFile * nautilus_get_desktop_location (void);
Added new files. 2003-05-15 Alexander Larsson <alexl@redhat.com> * libnautilus-private/Makefile.am: Added new files. * libnautilus-private/apps_nautilus_preferences.schemas.in: * libnautilus-private/nautilus-global-preferences.[ch]: New prefs for home and trash links. * libnautilus-private/nautilus-desktop-directory.[ch]: New files. Implements the NautilusDesktop object for the virtual x-nautilus-desktop: uri. The directory merges the contents of the directory with the real desktop directory. * libnautilus-private/nautilus-desktop-directory-file.[ch]: New files. Implements the Nautilusfile corresponding to NautilusDestkopDirectory. * libnautilus-private/nautilus-desktop-icon-file.[ch]: New files. Implement NautilusFile for a virtual file in a NautilusDesktopDirectory. Gets all the actual file data from a NautilusDesktopLink. * libnautilus-private/nautilus-desktop-link-monitor.[ch]: New files. Keep track of home and trash visibility prefs and mounted volumes and create/destroy corresponding NautilusDesktopLink object. * libnautilus-private/nautilus-desktop-link.[ch]: New files. Keeps track of all the real information in a desktop icon link. These are home, trash and volume links at the moment. * libnautilus-private/nautilus-directory-async.c: Indentation correction. * libnautilus-private/nautilus-directory.c: (nautilus_directory_new): Create NautilusDesktopDirectory objects for x-nautilus-desktop: uris * libnautilus-private/nautilus-dnd.c: (nautilus_drag_items_local): Handle NULL GnomeVFSURIs. (nautilus_drag_items_on_desktop): New function to check if items are on the desktop. (nautilus_drag_default_drop_action_for_icons): Special case desktop uris. (nautilus_drag_selection_includes_special_link): Convert from old-style special links to current. * libnautilus-private/nautilus-dnd.h: New function nautilus_drag_items_on_desktop. * libnautilus-private/nautilus-file-operations.c: (is_special_link), (nautilus_file_operations_copy_move): Convert from old-style special links to current. (nautilus_file_operations_delete): Special case desktop links * libnautilus-private/nautilus-file-utilities.[ch]: (nautilus_get_desktop_directory): (nautilus_get_gmc_desktop_directory): Change desktop dir to ~/Desktop (nautilus_get_desktop_directory_uri): New function to return desktop dir as a uri. * libnautilus-private/nautilus-file.c: (nautilus_file_new_from_relative_uri), (nautilus_file_get_internal): Handle creation of desktop icon files. (nautilus_file_can_rename), (rename_guts), (nautilus_file_get_drop_target_uri): Update for new special links. (nautilus_file_is_in_desktop): Update for new desktop dir. (nautilus_file_get_uri): Fix uris for self owned files. This changed due to the new canonicalization rules for foo: * libnautilus-private/nautilus-icon-dnd.c: (nautilus_icon_container_selection_items_local), (handle_nonlocal_move): Handle desktop uri. * src/Nautilus_shell.server.in: icon view handles x-nautilus-desktop: uris * src/nautilus-application.c: (finish_startup): Initialize the desktop link monitor * src/nautilus-desktop-window.c: (nautilus_desktop_window_update_directory): Show x-nautilus-desktop: * src/file-manager/fm-desktop-icon-view.c: (fm_desktop_icon_view_finalize), (fm_desktop_icon_view_init), (volume_ops_callback), (trash_link_is_selection), (volume_link_is_selection), (volume_link_device_type), (real_supports_zooming): * src/file-manager/fm-directory-view.c: Remove lots of old support for desktop icon. Reimplement some of it with the new desktop icon support. * src/file-manager/fm-directory-view.h: New function fm_directory_view_get_backing_uri * src/file-manager/fm-icon-container.c: (fm_icon_container_get_icon_text): Don't show extra text for desktop icons (get_sort_category): Update for new desktop icons * src/file-manager/fm-icon-view.c: (icon_view_handle_uri_list): Use get_backing_uri() * src/file-manager/fm-properties-window.c: (get_target_file): Use the new desktop icon support. * libnautilus-private/nautilus-icon-container.c: (lay_down_icons_tblr): Don't loop forever if icon doesn't in the height of the container.
2003-05-15 17:19:27 +00:00
char * nautilus_get_desktop_directory_uri (void);
char * nautilus_get_home_directory_uri (void);
gboolean nautilus_is_desktop_directory_file (GFile *dir,
const char *filename);
gboolean nautilus_is_root_directory (GFile *dir);
gboolean nautilus_is_desktop_directory (GFile *dir);
gboolean nautilus_is_home_directory (GFile *dir);
gboolean nautilus_is_home_directory_file (GFile *dir,
const char *filename);
gboolean nautilus_is_in_system_dir (GFile *location);
char * nautilus_get_gmc_desktop_directory (void);
Move vfs extensions to eel. * libnautilus-extensions/nautilus-file-utilities.c: * libnautilus-extensions/nautilus-file-utilities.h: Move vfs extensions to eel. * components/services/install-view/nautilus-service-install-view.c: * components/services/install/server/main.c: * components/services/inventory/eazel-inventory-collect-hardware.c: (add_info): * components/services/inventory/eazel-inventory-service.c: (impl_Trilobite_Eazel_Inventory_upload): * components/text/nautilus-text-view.c: (handle_service_menu_item): * components/tree/nautilus-tree-view.c: (select_current_location), (tree_load_location_callback), (got_activation_uri_callback): * libnautilus-extensions/nautilus-bookmark.c: (nautilus_bookmark_compare_with), (nautilus_bookmark_compare_uris), (bookmark_file_changed_callback): * libnautilus-extensions/nautilus-directory-async.c: (top_left_cancel), (activation_uri_cancel), (top_left_start), (activation_uri_start): * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_make_uri_canonical), (nautilus_directory_new), (nautilus_directory_notify_files_moved), (nautilus_self_check_directory): * libnautilus-extensions/nautilus-drag.c: (nautilus_drag_items_in_trash), (nautilus_drag_default_drop_action_for_icons): * libnautilus-extensions/nautilus-file-operations.c: (format_and_ellipsize_uri_for_dialog), (nautilus_file_operations_copy_move): * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_internal), (nautilus_file_get_parent_uri_for_display), (nautilus_file_can_rename), (nautilus_file_get_uri_scheme), (nautilus_file_is_in_trash), (nautilus_self_check_file): * libnautilus-extensions/nautilus-icon-dnd.c: (nautilus_icon_container_selection_items_local): * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_name_for_file), (nautilus_icon_factory_get_emblem_icons_for_file): * libnautilus-extensions/nautilus-link.c: (nautilus_link_local_get_image_uri): * libnautilus-extensions/nautilus-metafile.c: (construct_private_metafile_vfs_uri), (metafile_read_cancel), (metafile_read_restart): * libnautilus-extensions/nautilus-tabs.c: * libnautilus-extensions/nautilus-theme.c: * libnautilus-extensions/nautilus-thumbnails.c: (make_thumbnail_uri): * libnautilus-extensions/nautilus-trash-file.c: (nautilus_trash_file_initialize): * libnautilus-extensions/nautilus-trash-monitor.c: (nautilus_trash_files_changed_callback), (nautilus_trash_monitor_initialize): * src/file-manager/fm-desktop-icon-view.c: (update_trash_link_and_delete_copies): * src/file-manager/fm-directory-view.c: (show_trash_callback), (trash_or_delete_files_common), (fm_directory_view_trash_or_delete_files), (fm_directory_view_move_copy_items): * src/file-manager/fm-properties-window.c: (is_merged_trash_directory): * src/nautilus-application.c: (nautilus_make_uri_list_from_shell_strv): * src/nautilus-first-time-druid.c: (read_file_handle_cancel_cover), (initiate_file_download): * src/nautilus-location-bar.c: (try_to_expand_path), (nautilus_location_bar_set_location), (nautilus_location_bar_get_location), (nautilus_location_bar_update_label): * src/nautilus-profiler.c: (nautilus_profiler_bonobo_ui_report_callback): * src/nautilus-property-browser.c: (add_pattern_to_browser), (emblem_dialog_clicked): * src/nautilus-sidebar.c: (receive_dropped_uri_list): * src/nautilus-theme-selector.c: (add_theme_to_icons): * src/nautilus-window-manage-views.c: (set_displayed_location), (check_bookmark_location_matches), (handle_go_elsewhere), (viewed_file_changed_callback), (determined_initial_view_callback), (open_location_prefer_existing_window_callback), (report_redirect_callback): * src/nautilus-window-menus.c: (show_bogus_bookmark_window): Update for vfs extensions move to eel. Also cleanup the #include state of some of these files. Removed unused #includes. Remove some cut-n-paste code in services components and use the extensions in eel directly.
2001-04-04 11:29:08 +00:00
char * nautilus_get_pixmap_directory (void);
gboolean nautilus_should_use_templates_directory (void);
char * nautilus_get_templates_directory (void);
char * nautilus_get_templates_directory_uri (void);
void nautilus_create_templates_directory (void);
char * nautilus_get_searches_directory (void);
char * nautilus_compute_title_for_location (GFile *file);
/* This function returns something that needs to be freed with g_free,
* is not NULL, but is not garaunteed to exist */
char * nautilus_get_desktop_directory_uri_no_create (void);
Some build fixes. * acconfig.h: * configure.in: Removed the NAUTILUS_PREFIX that I added. I did it wrong. * libnautilus-extensions/nautilus-file-utilities.h: * libnautilus-extensions/nautilus-file-utilities.c: (nautilus_pixmap_file): * components/hardware/nautilus-hardware-view.c: (setup_overview_form): * components/services/startup/nautilus-view/nautilus-service-startup-view.c: (setup_form_title), (setup_signup_form), (setup_config_form): * libnautilus-extensions/nautilus-icon-canvas-item.c: (map_pixbuf): * libnautilus-extensions/nautilus-icon-factory.c: (make_full_icon_path): * src/nautilus-application.c: (display_caveat): * src/nautilus-property-browser.c: (nautilus_property_browser_initialize), (nautilus_emblem_dialog_new), (make_category_link): * src/nautilus-zoom-control.c: (nautilus_zoom_control_initialize): Replaced most uses of gnome_pixmap_file on "nautilus/" with a call to a new nautilus_pixmap_file in an attempt to make installations where nautilus has a different prefix from gnome-libs work. I now think this is a waste of time, but Mathieu Lacage says this is still an improvement. * components/help/Makefile.am: * components/help/hyperbola-filefmt.c: (fmt_map_entry): Use HYPERBOLA_DATADIR instead of NAUTILUS_PREFIX. * components/websearch/ntl-web-search.c: (web_search_populate_engines): Use WEB_SEARCH_DATADIR instead of NAUTILUS_PREFIX. * components/mozilla/nautilus-mozilla-content-view.c: (nautilus_mozilla_content_view_initialize), (mozilla_content_view_set_busy_cursor), (mozilla_content_view_request_progress_change), (mozilla_content_view_clear_busy_cursor), (mozilla_load_location_callback), (bonobo_mozilla_callback), (mozilla_merge_bonobo_items_callback), (mozilla_title_changed_callback), (mozilla_location_changed_callback), (mozilla_net_status_callback), (mozilla_link_message_callback), (mozilla_progress_callback), (mozilla_open_uri_callback): Took a cut at fixing the Mozilla component for the new API. Ramiro will have to take care of the rest. * components/services/install/lib/Makefile.am: * components/services/time/command-line/Makefile.am: * components/services/time/nautilus-view/Makefile.am: * components/services/time/service/Makefile.am: * components/services/trilobite/libtrilobite/Makefile.am: * components/services/trilobite/sample/command-line/Makefile.am: * components/services/trilobite/sample/service/Makefile.am: * libnautilus/Makefile.am: Updated all ORBit IDL compiles to use IDL_CFLAGS as suggested in the form of a patch by Martijn van Beers. * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-file-utilities.c: (nautilus_get_user_main_directory), (nautilus_get_pixmap_directory): * libnautilus-extensions/nautilus-link-set.c: (get_link_set_document): * src/Makefile.am: * src/nautilus-property-browser.c: (nautilus_property_browser_drag_data_get), (make_drag_image), (get_xml_path), (make_properties_from_directory): * src/nautilus-link-set-window.c: (get_link_set_names): * src/file-manager/Makefile.am: * src/file-manager/fm-properties-window.c: (get_property_names): Used NAUTILUS_DATADIR and DATADIR instead of NAUTILUS_PREFIX. * libnautilus-extensions/nautilus-file-utilities.h: * libnautilus-extensions/nautilus-file-utilities.c: (nautilus_get_uri_from_local_path): Added a new helper function for use when you have a path and need a URI. This does a better job than just adding a "file://" on the front. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (get_first_callback), (nautilus_gtk_container_get_first_child): * src/nautilus-window-toolbars.c: (setup_button): * src/nautilus-window.c: (replace_special_current_view_in_content_view_menu): Implemented the first_child function and used it where appropriate. * libnautilus-extensions/nautilus-preferences-item.c: (add_icon_themes): Use nautilus_get_pixmap_directory intead of misusing gnome_pixmap_file by calling it on a directory name. * nautilus-installer/src/support.c: (create_pixmap), (create_image): Added FIXMEs since it isn't clear if this code will work with a Nautilus prefix that's not the same as the gnome-libs prefix. * Makefile.am: Tweaked white space.
2000-06-13 19:05:33 +00:00
/* A version of gnome's gnome_pixmap_file that works for the nautilus prefix.
* Otherwise similar to gnome_pixmap_file in that it checks to see if the file
* exists and returns NULL if it doesn't.
*/
/* FIXME bugzilla.gnome.org 42425:
* We might not need this once we get on gnome-libs 2.0 which handles
No parameters is indicated by "(void)" instead of "()". * components/help/help-method.c: (help_uri_new): No parameters is indicated by "(void)" instead of "()". (help_uri_to_string): Changed to share more code (I think I might have fixed a leak too). (init_help_module): No parameters is indicated by "(void)" instead of "()". Also fixed a bug where the wrong lock is unlocked. (convert_file_to_uri): Use g_strcasecmp instead of strcmp since we are checking MIME types. (transform_file), (transform_absolute_file), (file_from_path), (find_help_file), (transform_relative_file): Merged these so they share a lot of common code. * components/services/vault/command-line/vault-operations.c: (vault_list): Fixed a g_strconcat that was missing a trailing NULL. * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-file-attributes.h: * libnautilus-extensions/nautilus-directory-async.c: (cancel_top_left_read), (top_left_read_done), (top_left_read_callback), (top_left_read_more_callback), (start_getting_top_lefts), Changed top_left code to use nautilus_read_file calls. (cancel_metafile_read), Changed to reflect name changes in nautilus_read_file calls. (cancel_get_activation_uri), (nautilus_directory_cancel), (set_up_request_by_file_attributes), (nautilus_async_destroying_file), (lacks_activation_uri), (wants_activation_uri), (request_is_satisfied), (activation_uri_found), (activation_uri_nautilus_link_read_callback), (activation_uri_gmc_link_read_callback), (activation_uri_gmc_link_read_more_callback), (start_getting_activation_uris), (nautilus_directory_async_state_changed): Add code to fetch activation URIs for either GMC or Nautilus-style link files. (lacks_top_left): Changed to share common nautilus_file_should_get_top_left_text function so we don't have lots of different code reading the preferences about top-left text. (is_needy): Enhanced and renamed is_wanted so it takes into account files that are and aren't interesting. (start_getting_directory_counts), (deep_count_start): (start_getting_file_info), Change to use is_needy. * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-directory.c: Tweaked spacing. * libnautilus-extensions/nautilus-file-private.h: Added a self_owned flag so we do better with files that don't have parent directories and the fields to support activation_uri. * libnautilus-extensions/nautilus-file-utilities.h: * libnautilus-extensions/nautilus-file-utilities.c: (read_file_close_callback), (read_file_close), (read_file_succeeded), (read_file_failed), (read_file_read_callback), (read_file_read_chunk), (read_file_open_callback), (nautilus_read_file_async), (nautilus_read_entire_file_async), (nautilus_read_file_cancel): Added a variation of the read file call that takes a function to decide whether to keep reading or not. * libnautilus-extensions/nautilus-file.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_new_from_name), (nautilus_file_get), (nautilus_file_get_parent_uri_as_string), (get_file_for_parent_directory), (nautilus_file_rename), (nautilus_file_get_gnome_vfs_uri), (nautilus_file_get_uri), Add code that handles the "self_owned" flag to make files without parents work better. (destroy): Fixed some leaks I noticed. (nautilus_file_get_top_left_text), (nautilus_file_should_get_top_left_text): Added this so that all code can share a single call when deciding whether to get text based on local vs. non-local. (nautilus_file_get_activation_uri): Changed to work with new async. code to fetch this. * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_for_file): Call nautilus_file_should_get_top_left_text. * libnautilus-extensions/nautilus-link.h: * libnautilus-extensions/nautilus-link.c: (nautilus_link_is_link_file_name): Named so it's clear it looks at the file name only. (xml_get_root_property), (nautilus_link_get_root_property): Added these to share a lot of common code. (nautilus_link_get_additional_text): Use the new calls. (make_local_path), (icon_read_done_callback), (nautilus_link_get_image_uri), (nautilus_link_get_link_uri), (nautilus_link_get_display_name): Other cleanup and rewrite. (nautilus_link_get_link_uri_given_file_contents): Add API that can work with the async. I/O version. * libnautilus-extensions/nautilus-stock-dialogs.c: (timed_wait_free), (nautilus_timed_wait_start): Added some asserts. * src/file-manager/fm-directory-view.c: (activate_callback), (fm_directory_view_activate_file): Use call_when_ready and the new async. stuff. * src/file-manager/fm-error-reporting.c: (fm_report_error_setting_group): Added a (low-quality) error message for the case where you aren't alowed to change the group of something. * src/file-manager/fm-icon-view.c: (icon_position_changed_callback): Added missing NULL in a call to g_strconcat. (get_icon_text_callback): Fix storage leak. * src/file-manager/fm-properties-window.c: (activate_owner_callback): Fixed a timed_wait_start/stop mismatch that was causing an assert and other badness when you changed the owner. * src/file-manager/fm-search-list-view.c: (get_attribute_from_column): Added a missing case to prevent a crash, but had to put in a FIXME since the code isn't really working. * src/nautilus-application.c: (nautilus_application_startup): Fixed bug where you wouldn't see error messages on startup. Also improved one of the error messages by adding some blank lines.
2000-07-26 03:07:30 +00:00
* gnome_pixmap_file better, using GNOME_PATH.
*/
Move vfs extensions to eel. * libnautilus-extensions/nautilus-file-utilities.c: * libnautilus-extensions/nautilus-file-utilities.h: Move vfs extensions to eel. * components/services/install-view/nautilus-service-install-view.c: * components/services/install/server/main.c: * components/services/inventory/eazel-inventory-collect-hardware.c: (add_info): * components/services/inventory/eazel-inventory-service.c: (impl_Trilobite_Eazel_Inventory_upload): * components/text/nautilus-text-view.c: (handle_service_menu_item): * components/tree/nautilus-tree-view.c: (select_current_location), (tree_load_location_callback), (got_activation_uri_callback): * libnautilus-extensions/nautilus-bookmark.c: (nautilus_bookmark_compare_with), (nautilus_bookmark_compare_uris), (bookmark_file_changed_callback): * libnautilus-extensions/nautilus-directory-async.c: (top_left_cancel), (activation_uri_cancel), (top_left_start), (activation_uri_start): * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_make_uri_canonical), (nautilus_directory_new), (nautilus_directory_notify_files_moved), (nautilus_self_check_directory): * libnautilus-extensions/nautilus-drag.c: (nautilus_drag_items_in_trash), (nautilus_drag_default_drop_action_for_icons): * libnautilus-extensions/nautilus-file-operations.c: (format_and_ellipsize_uri_for_dialog), (nautilus_file_operations_copy_move): * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_internal), (nautilus_file_get_parent_uri_for_display), (nautilus_file_can_rename), (nautilus_file_get_uri_scheme), (nautilus_file_is_in_trash), (nautilus_self_check_file): * libnautilus-extensions/nautilus-icon-dnd.c: (nautilus_icon_container_selection_items_local): * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_name_for_file), (nautilus_icon_factory_get_emblem_icons_for_file): * libnautilus-extensions/nautilus-link.c: (nautilus_link_local_get_image_uri): * libnautilus-extensions/nautilus-metafile.c: (construct_private_metafile_vfs_uri), (metafile_read_cancel), (metafile_read_restart): * libnautilus-extensions/nautilus-tabs.c: * libnautilus-extensions/nautilus-theme.c: * libnautilus-extensions/nautilus-thumbnails.c: (make_thumbnail_uri): * libnautilus-extensions/nautilus-trash-file.c: (nautilus_trash_file_initialize): * libnautilus-extensions/nautilus-trash-monitor.c: (nautilus_trash_files_changed_callback), (nautilus_trash_monitor_initialize): * src/file-manager/fm-desktop-icon-view.c: (update_trash_link_and_delete_copies): * src/file-manager/fm-directory-view.c: (show_trash_callback), (trash_or_delete_files_common), (fm_directory_view_trash_or_delete_files), (fm_directory_view_move_copy_items): * src/file-manager/fm-properties-window.c: (is_merged_trash_directory): * src/nautilus-application.c: (nautilus_make_uri_list_from_shell_strv): * src/nautilus-first-time-druid.c: (read_file_handle_cancel_cover), (initiate_file_download): * src/nautilus-location-bar.c: (try_to_expand_path), (nautilus_location_bar_set_location), (nautilus_location_bar_get_location), (nautilus_location_bar_update_label): * src/nautilus-profiler.c: (nautilus_profiler_bonobo_ui_report_callback): * src/nautilus-property-browser.c: (add_pattern_to_browser), (emblem_dialog_clicked): * src/nautilus-sidebar.c: (receive_dropped_uri_list): * src/nautilus-theme-selector.c: (add_theme_to_icons): * src/nautilus-window-manage-views.c: (set_displayed_location), (check_bookmark_location_matches), (handle_go_elsewhere), (viewed_file_changed_callback), (determined_initial_view_callback), (open_location_prefer_existing_window_callback), (report_redirect_callback): * src/nautilus-window-menus.c: (show_bogus_bookmark_window): Update for vfs extensions move to eel. Also cleanup the #include state of some of these files. Removed unused #includes. Remove some cut-n-paste code in services components and use the extensions in eel directly.
2001-04-04 11:29:08 +00:00
char * nautilus_pixmap_file (const char *partial_path);
Fixed bug 640 (icon cache never frees images (awaiting GdkPixbuf fix)). Also took care of bug 3145 (zillions of 'main_loops != NULL' assertion failures when quitting) and bug 3138 (Some code in the icon factory is cut and pasted from elsewhere). And a few unrelated things that came up while I was busy working on these. * configure.in: Applied patch from Dan Winship to fix handling of CFLAGS and LDFLAGS. Fixes some missing quoting and other mistakes. * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-icon-factory-private.h: * libnautilus-extensions/nautilus-thumbnails.c: * libnautilus-extensions/nautilus-thumbnails.h: Broke out the thumbnailing code into its own source file for clarity. * libnautilus-extensions/nautilus-directory.c: * libnautilus-extensions/nautilus-file-utilities.h: * libnautilus-extensions/nautilus-file-utilities.c: (nautilus_make_directory_and_parents): Moved nautilus_make_directory_and_parents into a place where the thumbnail code can share it instead of requiring its own copy. * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-global-preferences.c: (destroy_global_prefs_dialog), (global_preferences_get_dialog), (nautilus_global_preferences_dialog_update), (nautilus_global_preferences_initialize): * libnautilus-extensions/nautilus-preferences.h: * libnautilus-extensions/nautilus-preferences.c: (preferences_initialize_if_needed), (preferences_shutdown): * src/nautilus-application.c: (nautilus_application_destroy): Changed code so that it cleans up with g_atexit instead of with an explicit shutdown call. This makes it sequence correctly with other atexit code. * libnautilus-extensions/nautilus-icon-canvas-item.h: * libnautilus-extensions/nautilus-icon-canvas-item.c: (nautilus_icon_canvas_item_destroy), (nautilus_icon_canvas_item_set_attach_points), (emblem_layout_next): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_update_icon): Added a Nautilus prefix to the EmblemAttachPoints typedef, since it's public. * libnautilus-extensions/nautilus-icon-factory.h: * libnautilus-extensions/nautilus-icon-factory.c: Changed the icon factory structure so that it will actually free pixbufs when done with them. Made some other small fixes to the icon factory in passing, including removing some redundant code and fixing the logic for getting custom icons and deleting the icon factory and g_atexit time. * src/file-manager/fm-icon-view.c: (play_file), (preview_sound): Restructured the logic for playing sound previews a little to get rid of compiler warnings and close some loopholes in the old code. * src/nautilus-main.c: (is_event_loop_needed), (quit_if_in_main_loop), (nautilus_gtk_main_quit_all), (event_loop_unregister), (nautilus_main_event_loop_register), (nautilus_main_is_event_loop_mainstay), (nautilus_main_event_loop_quit), (main): Fixed the main loop quitting logic so that it is a bit simpler and works with the gnome-vfs code that runs event handling after the last main loop is gone.
2000-09-20 00:44:07 +00:00
A pass at cleaning up the volume monitor. Made all the details of NautilusVolume private. * libnautilus-private/filesystem-attributes.xml: Changed the "description" string to be named "default_volume_name" and also marked it to be localized. * libnautilus-private/nautilus-file-utilities.h: * libnautilus-private/nautilus-file-utilities.c: (nautilus_get_data_file_path): Added a new utility function to locate a file that's either in the user's directory or in the Nautilus datadir. * src/nautilus-property-browser.c: (read_browser_xml): Use nautilus_get_data_file_path. * libnautilus-private/nautilus-trash-directory.c: (get_trash_volume): * libnautilus-private/nautilus-trash-monitor.c: (add_one_volume_trash): * src/file-manager/fm-desktop-icon-view.c: (volume_in_black_list), (create_unique_volume_name), (create_mount_link), (volume_unmounted_callback), (update_disks_menu): * src/nautilus-application.c: (volume_mounted_callback), (volume_unmounted_callback): * src/nautilus-bookmark-list.c: (nautilus_bookmark_list_get_file_path): Use only calls from the NautilusVolume public API -- no getting at the structure directly. Also fix callers that were using nautilus_volume_monitor_get_volume_mount_uri to correctly understand that they get the mount path, not the mount URI. * libnautilus-private/nautilus-volume-monitor.h: * libnautilus-private/nautilus-volume-monitor.c: (load_file_system_table): Fix storage leaks. Use the new nautilus_get_data_file_path. Translate the default volume names as they are loaded. Check for duplicate entries while loading the table. Don't bother checking the name of the root node, since there are plenty of other things about the file that we don't check and there's no reason we particularly need to check that. Fix some storage leaks. Free the doc, since I'm not seeing a "nautilus --quit" segfault. (nautilus_volume_monitor_initialize): Only initialize stuff that g_new0 won't set up for us. (nautilus_volume_is_removable): Rename so it's a call on NautilusVolume, not the NautilusVolumeMonitor. (volume_is_removable): Fix logic so we don't have to have so many different calls to fclose. (nautilus_volume_get_name): Rename so it's a call on NautilusVolume, not the NautilusVolumeMonitor. (modify_volume_name_for_display): Don't bother supplying a name if passed NULL, since that won't ever be helpful the way this is used. (nautilus_volume_get_target_uri): Rename so it's a call on NautilusVolume, not the NautilusVolumeMonitor. (nautilus_volume_should_integrate_trash): Rename so it's a call on NautilusVolume, not the NautilusVolumeMonitor. Get the information from the file system type, so we don't have to copy it into each NautilusVolume object. (nautilus_volume_get_mount_path): Rename so it's a call on NautilusVolume, and don't call it a URI since it's really a path. (nautilus_volume_get_device_type): New call. (make_volume_name_from_path): Get the default from the file system type rather than passing it in. (free_mount_list): Get rid of some dumb extra code. (copy_volume), (nautilus_volume_free): Update for smaller set of fields. (create_volume), (finish_creating_volume), (finish_creating_volume_and_prepend): Restructure so we don't need to keep so much stuff around in the NautilusVolume object. * src/nautilus-first-time-druid.c: (druid_set_first_time_file_flag): Some tiny tweaking.
2001-08-15 21:04:01 +00:00
/* Locate a file in either the uers directory or the datadir. */
char * nautilus_get_data_file_path (const char *partial_path);
gboolean nautilus_is_file_roller_installed (void);
/* Return an allocated file name that is guranteed to be unique, but
* tries to make the name readable to users.
* This isn't race-free, so don't use for security-related things
*/
char * nautilus_ensure_unique_file_name (const char *directory_uri,
const char *base_name,
const char *extension);
Move vfs extensions to eel. * libnautilus-extensions/nautilus-file-utilities.c: * libnautilus-extensions/nautilus-file-utilities.h: Move vfs extensions to eel. * components/services/install-view/nautilus-service-install-view.c: * components/services/install/server/main.c: * components/services/inventory/eazel-inventory-collect-hardware.c: (add_info): * components/services/inventory/eazel-inventory-service.c: (impl_Trilobite_Eazel_Inventory_upload): * components/text/nautilus-text-view.c: (handle_service_menu_item): * components/tree/nautilus-tree-view.c: (select_current_location), (tree_load_location_callback), (got_activation_uri_callback): * libnautilus-extensions/nautilus-bookmark.c: (nautilus_bookmark_compare_with), (nautilus_bookmark_compare_uris), (bookmark_file_changed_callback): * libnautilus-extensions/nautilus-directory-async.c: (top_left_cancel), (activation_uri_cancel), (top_left_start), (activation_uri_start): * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_make_uri_canonical), (nautilus_directory_new), (nautilus_directory_notify_files_moved), (nautilus_self_check_directory): * libnautilus-extensions/nautilus-drag.c: (nautilus_drag_items_in_trash), (nautilus_drag_default_drop_action_for_icons): * libnautilus-extensions/nautilus-file-operations.c: (format_and_ellipsize_uri_for_dialog), (nautilus_file_operations_copy_move): * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_internal), (nautilus_file_get_parent_uri_for_display), (nautilus_file_can_rename), (nautilus_file_get_uri_scheme), (nautilus_file_is_in_trash), (nautilus_self_check_file): * libnautilus-extensions/nautilus-icon-dnd.c: (nautilus_icon_container_selection_items_local): * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_name_for_file), (nautilus_icon_factory_get_emblem_icons_for_file): * libnautilus-extensions/nautilus-link.c: (nautilus_link_local_get_image_uri): * libnautilus-extensions/nautilus-metafile.c: (construct_private_metafile_vfs_uri), (metafile_read_cancel), (metafile_read_restart): * libnautilus-extensions/nautilus-tabs.c: * libnautilus-extensions/nautilus-theme.c: * libnautilus-extensions/nautilus-thumbnails.c: (make_thumbnail_uri): * libnautilus-extensions/nautilus-trash-file.c: (nautilus_trash_file_initialize): * libnautilus-extensions/nautilus-trash-monitor.c: (nautilus_trash_files_changed_callback), (nautilus_trash_monitor_initialize): * src/file-manager/fm-desktop-icon-view.c: (update_trash_link_and_delete_copies): * src/file-manager/fm-directory-view.c: (show_trash_callback), (trash_or_delete_files_common), (fm_directory_view_trash_or_delete_files), (fm_directory_view_move_copy_items): * src/file-manager/fm-properties-window.c: (is_merged_trash_directory): * src/nautilus-application.c: (nautilus_make_uri_list_from_shell_strv): * src/nautilus-first-time-druid.c: (read_file_handle_cancel_cover), (initiate_file_download): * src/nautilus-location-bar.c: (try_to_expand_path), (nautilus_location_bar_set_location), (nautilus_location_bar_get_location), (nautilus_location_bar_update_label): * src/nautilus-profiler.c: (nautilus_profiler_bonobo_ui_report_callback): * src/nautilus-property-browser.c: (add_pattern_to_browser), (emblem_dialog_clicked): * src/nautilus-sidebar.c: (receive_dropped_uri_list): * src/nautilus-theme-selector.c: (add_theme_to_icons): * src/nautilus-window-manage-views.c: (set_displayed_location), (check_bookmark_location_matches), (handle_go_elsewhere), (viewed_file_changed_callback), (determined_initial_view_callback), (open_location_prefer_existing_window_callback), (report_redirect_callback): * src/nautilus-window-menus.c: (show_bogus_bookmark_window): Update for vfs extensions move to eel. Also cleanup the #include state of some of these files. Removed unused #includes. Remove some cut-n-paste code in services components and use the extensions in eel directly.
2001-04-04 11:29:08 +00:00
char * nautilus_unique_temporary_file_name (void);
GFile * nautilus_find_existing_uri_in_hierarchy (GFile *location);
GFile *
nautilus_find_file_insensitive (GFile *parent, const gchar *name);
#endif /* NAUTILUS_FILE_UTILITIES_H */