mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
59 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Darin Adler
|
31c20fa038 |
Updated bugzilla.eazel.com references to refer to the
corresponding bugzilla.gnome.org bug. Also updated my email address. |
||
Darin Adler
|
d31bf8d65b |
Added support for nested directories inside the scripts directory,
starting with a patch by David Emory Watson <dwatson@cs.ucr.edu>. * src/file-manager/fm-directory-view.c: (get_scripts_directory): Keep the scripts directory URI and string length in a global variable. (add_scripts_directory): New function, replaces connect_script_handlers. Refs the directory, puts it on the scripts directory list, and monitors more attributes than before. (fm_directory_view_initialize): Use add_scripts_directory instead of connect_script_handlers. (fm_directory_view_destroy): Use remove_scripts_directory on the entire list instead of disconnect_script_handlers. (add_submenu): New function. (add_script_to_script_menus): Change name, pass in path. (add_submenu_to_script_menus): New function. (directory_belongs_in_scripts_menu): New function. (add_directory_to_scripts_directory_list): New function, high level call used to turn a NautilusFile into a NautilusDirectory and call add_scripts_directory. (update_directory_in_scripts_menu): New function. (update_scripts_menu): New function, replaces reset_scripts_menu and uses new nautilus_directory_get_files_list rather than nautilus_directory_call_when_ready. (open_scripts_folder_callback): Use new global variable instead of calling get_scripts_directory. (real_update_menus): Call update_scripts_menu instead of schedule_reset_scripts_menu. (remove_scripts_directory): New function, replaces disconnect_script_handlers. Removes the directory from the scripts directory list and unrefs it after disconnecting handlers. * libnautilus-private/nautilus-directory.h: * libnautilus-private/nautilus-directory.c: (is_tentative): Moved from nautilus-directory-async.c. (nautilus_directory_get_file_list): New, made from formerly- private get_non_tentative_file_list in nautilus-directory-async.c. (nautilus_directory_list_ref): New. (nautilus_directory_list_unref): New. (nautilus_directory_list_free): New. (nautilus_directory_list_copy): New. (compare_by_uri), (compare_by_uri_cover), (nautilus_directory_list_sort_by_uri): New. Sorrts directories by URI, parents before children, and children sorted as if by nautilus_file_list_sort_by_name. * libnautilus-private/nautilus-directory-async.c: (nautilus_directory_monitor_add_internal), (ready_callback_call): Use nautilus_directory_get_file_list instead of get_non_tentative_file_list. |
||
Darin Adler
|
784a8062a9 |
Bump version to 1.0.4.1
* configure.in: Bump version to 1.0.4.1 * cut-n-paste-code/widgets/e-paned/e-paned.c: (e_paned_expose): Fix type cast that was causing Ben trouble compiling on Solaris. Take a cut at removing the problem where opening a new window causes all the old windows to act as if all items were re-added. * libnautilus-private/nautilus-directory.h: * libnautilus-private/nautilus-directory.c: (nautilus_directory_file_monitor_add), (nautilus_self_check_directory): * libnautilus-private/nautilus-directory-async.c: (nautilus_directory_monitor_add_internal): * libnautilus-private/nautilus-directory-private.h: * libnautilus-private/nautilus-merged-directory.c: (build_merged_callback_list), (merged_file_monitor_add), (forward_files_added_cover), (forward_files_changed_cover), (monitor_add_directory), (merged_add_real_directory): * libnautilus-private/nautilus-trash-file.c: (real_monitor_add): * libnautilus-private/nautilus-trash-monitor.c: (nautilus_trash_monitor_initialize): * libnautilus-private/nautilus-vfs-directory.c: (vfs_file_monitor_add): * libnautilus-private/nautilus-vfs-file.c: (vfs_file_monitor_add): Change monitor_add to take a parameter for a callback function, and call that instead of sending out a files_added message when someone starts monitoring files. * components/tree/nautilus-tree-model.c: (nautilus_tree_model_node_begin_monitoring_no_connect), (nautilus_tree_model_node_begin_monitoring), (nautilus_tree_model_directory_files_changed_callback): * src/file-manager/fm-directory-view.c: (connect_script_handlers), (finish_loading): Pass in a callback function to monitor_add, and don't hook up the files_added and files_changed signals until after the monitor is added. |
||
Darin Adler
|
106bf09a00 |
Yoann Vandoorselaere <yoann@mandrakesoft.com> discovered that the
code to load a directory was accidentally waiting for all the files to be read in before displaying anything. This fixes the two problems that caused that, but there are remaining loose ends (it's not entirely clear why View As Music is still showing properly in the View menu). * libnautilus-private/nautilus-directory-private.h: * libnautilus-private/nautilus-directory-async.c: (nautilus_directory_call_when_ready_internal): Take a parameter to say whether to wait for all the files in the file list, instead of deducing it from other parameters. * libnautilus-private/nautilus-directory.h: * libnautilus-private/nautilus-directory.c: (nautilus_directory_call_when_ready): Take a parameter to say whether to wait for all the files in the file list, instead of deducing it from other parameters. (nautilus_self_check_directory): Pass TRUE so we wait for the file list. * libnautilus-private/nautilus-merged-directory.c: (merged_call_when_ready): Pass through the new boolean. * libnautilus-private/nautilus-trash-file.c: (real_call_when_ready): Pass FALSE since there is no file list for a single file. * libnautilus-private/nautilus-vfs-directory.c: (vfs_call_when_ready): Pass through the new boolean. * libnautilus-private/nautilus-vfs-file.c: (vfs_file_call_when_ready): Pass FALSE since there is no file list for a single file. * src/nautilus-applicable-views.c: (nautilus_determine_initial_view), (nautilus_determine_initial_view_cancel): Removed the code to get full file attributes after getting the minimum required if nautilus_mime_actions_file_needs_full_file_attributes return TRUE. We want to make the choice fast, and it's OK if we choose poorly as a result. The question is whether this will cause any real end-user problems. * src/file-manager/fm-directory-view.c: (call_when_ready_on_scripts_directory): Pass TRUE so we read the entire scripts directory. (load_directory): Pass FALSE so we don't wait for all the files to be loaded before starting to display them. This is the core of the fix. * components/tree/nautilus-tree-change-queue.c: (nautilus_tree_change_queue_enqueue): A place where we can use g_slist_prepend instead of g_slist_append. * src/nautilus-complex-search-bar.c: (nautilus_complex_search_bar_initialize): A place where we can use g_slist_prepend instead of g_slist_append. |
||
Mike Engber
|
79f2702490 |
reviewed by: Darin Adler <darin@eazel.com>
reviewed by: Darin Adler <darin@eazel.com> * libnautilus-extensions/nautilus-directory-async.c: (is_anyone_waiting_for_metafile), (call_ready_callbacks), (start_or_stop_io), (nautilus_directory_cancel): * libnautilus-extensions/nautilus-directory-metafile-monitor.c: (corba_metafile_ready): * libnautilus-extensions/nautilus-directory-metafile.c: (get_metafile), (nautilus_directory_rename_file_metadata), (nautilus_directory_rename_directory_metadata): * libnautilus-extensions/nautilus-directory-metafile.h: * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_initialize), (nautilus_directory_destroy), (set_directory_uri), (change_directory_uri), (nautilus_self_check_directory): * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-file-utilities.c: (nautilus_file_name_matches_backup_pattern), (nautilus_file_name_matches_metafile_pattern): * libnautilus-extensions/nautilus-file-utilities.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_is_metafile): * libnautilus-extensions/nautilus-file.h: * libnautilus-extensions/nautilus-metafile-factory.c: (corba_open): * libnautilus-extensions/nautilus-metafile-server.idl: * libnautilus-extensions/nautilus-metafile.c: (nautilus_metafile_class_init), (nautilus_metafile_init), (destroy), (construct_private_metafile_vfs_uri), (nautilus_metafile_set_directory_uri), (nautilus_metafile_new), (nautilus_metafile_get), (schedule_next_read), (async_read_start), (async_read_done), (async_read_cancel), (corba_is_read), (corba_get), (corba_get_list), (corba_set), (corba_set_list), (corba_copy), (corba_remove), (corba_rename), (corba_rename_directory), (corba_register_monitor), (corba_unregister_monitor), (nautilus_metafile_notify_metafile_ready), (call_metafile_changed), (call_metafile_changed_for_all_files_mentioned_in_metafile), (call_metafile_changed_for_one_file), (create_metafile_root), (get_file_node), (get_metadata_string_from_metafile), (get_metadata_list_from_metafile), (set_metadata_string_in_metafile), (set_metadata_list_in_metafile), (set_metadata_in_metafile), (get_metadata_string_from_table), (get_metadata_list_from_table), (set_metadata_eat_value), (metafile_free_metadata), (get_file_metadata), (get_file_metadata_list), (set_file_metadata), (set_file_metadata_list), (metafile_get_file_uri), (rename_file_metadata), (apply_one_change), (apply_file_changes), (nautilus_metafile_apply_pending_changes), (copy_file_metadata), (remove_file_metadata), (nautilus_metafile_set_metafile_contents), (metafile_read_cancel), (can_use_public_metafile), (metafile_read_mark_done), (metafile_read_done), (metafile_read_try_public_metafile), (metafile_read_check_for_directory_callback), (metafile_read_check_for_directory), (metafile_read_failed), (metafile_read_done_callback), (metafile_read_restart), (allow_metafile), (metafile_read_start), (metafile_write_done), (metafile_write_failed), (metafile_write_failure_close_callback), (metafile_write_success_close_callback), (metafile_write_callback), (metafile_write_create_callback), (metafile_write_start), (metafile_write), (metafile_write_idle_callback), (directory_request_write_metafile): * libnautilus-extensions/nautilus-metafile.h: * libnautilus-extensions/nautilus-vfs-directory.c: (vfs_is_not_empty): Factored the metadata reading/writing code out of nautilus-directory - bug 6661. |
||
Darin Adler
|
b31cdf226e |
reviewed by: Gene Ragan <gzr@eazel.com>
Finish fixing bug 6286 (need to re-apply optimization where we do a single directory load): * src/nautilus-window-manage-views.c: (begin_location_change): Do the force_reload work in here. We want it on all 4 kinds of location change (forward, back, new location, reload). Other browsers don't do reload on back, so we may want to change this at some point. (nautilus_window_reload): Remove the old code to invalidate from here now that it's done in begin_location_change. * src/file-manager/fm-directory-view.c: (load_location_callback), (load_directory), (finish_loading), (filtering_changed_callback): Remove the old code to do force_reload. The NautilusDirectory part of triggering a reload is now handled by the shell. * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_file_monitor_add): No force_reload parameter any more. (nautilus_directory_force_reload): New separate call used to force a reload. A method call so subclasses can implement. (nautilus_self_check_directory): Removed the FALSE force_reload argument to file_monitor_add. * libnautilus-extensions/nautilus-vfs-directory.c: (vfs_file_monitor_add): No force_reload parameter any more. (vfs_force_reload): Call through to nautilus_directory_force_reload_internal to do the real work. (nautilus_vfs_directory_initialize_class): Install the new force_reload function. * libnautilus-extensions/nautilus-merged-directory.c: (merged_file_monitor_add): No force_reload parameter any more. (merged_force_reload): Tell all of the real directories to force a reload. (monitor_add_directory): No force_reload to track any more. (nautilus_merged_directory_initialize_class): Install the new force_reload function. * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory-async.c: (nautilus_directory_force_reload_internal): Change the name of this function, since there's now a public function that is named nautilus_directory_force_reload. * libnautilus-extensions/nautilus-file-private.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_all_attributes): Made a separate call so other parts of the framework can use it. (nautilus_file_invalidate_all_attributes): Use the new call. * components/tree/nautilus-tree-model.c: (nautilus_tree_model_monitor_add), (nautilus_tree_model_node_begin_monitoring_no_connect): Use the new force_reload call. The old one had more granularity and thus forced less to be reloaded, but it's OK to do a little more here. * libnautilus-extensions/nautilus-trash-monitor.c: (nautilus_trash_monitor_initialize): Removed the FALSE force_reload argument to file_monitor_add. Other stuff: * libnautilus-extensions/nautilus-directory-metafile.c: (get_metafile), (nautilus_directory_get_file_metadata), (nautilus_directory_get_file_metadata_list), (nautilus_directory_set_file_metadata), (nautilus_directory_set_file_metadata_list), (nautilus_directory_copy_file_metadata), (nautilus_directory_remove_file_metadata), (nautilus_directory_rename_file_metadata): Moved FIXMEs around. Pass NULL instead of &ev when calling bonobo_object_release_unref since we don't really want to do anything different if there's some kind of error. * nautilus-installer/install-lib/.cvsignore: * nautilus-installer/libtrilobite/.cvsignore: Gotta create these files when you make new directories. * README: Change xml-i18n-tools to mention the correct branch. |
||
John Sullivan
|
dac8df61bd |
reviewed by: Michael Engber <engber@eazel.com>
Fixed bug 2207 (Search needs to gracefully handle too many items found) * libnautilus-extensions/nautilus-directory-async.c: (directory_load_done): Don't treat GNOME_VFS_OK as an error case here. This was happening when the file limit was reached, and the resulting propogated error was making it to the search list view code, which was putting up an error dialog saying no error had occurred. * libnautilus-extensions/nautilus-directory.h: Added FIXME with bug number for new bug 5603, which complains that the file list limit isn't as hard as it claims. * src/file-manager/fm-directory-view.h: * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize_class), (fm_directory_view_file_limit_reached), (real_file_limit_reached), (check_for_directory_hard_limit): Broke out the code that handles the UI when the directory contains too many files such that subclasses can override the behavior. (fm_directory_view_get_containing_window): Renamed from "get_containing_window" and made public so subclasses don't have to reimplent. (fm_directory_view_confirm_multiple_windows), (fm_directory_view_launch_application), (choose_program), (fm_directory_view_confirm_deletion), (confirm_delete_from_trash), (report_broken_symbolic_link), (fm_directory_view_activate_file): Updated for function name change. * src/file-manager/fm-search-list-view.c: (load_error_callback): Marked strings for localization; reworded to avoid use of "directory". (fm_search_list_view_initialize_class), (real_file_limit_reached): Put up dialog that's been worded specifically for search results when too many items are found. |
||
Darin Adler
|
f649b991af |
reviewed by: Rebecca Schulman <rebecka@eazel.com>
Fixed bug 3811 (shallow file counts and top-left text are fetched even for non-displayed hidden/backup items). * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory-async.c: (allow_metafile): Add "ghelp:" and "gnome-help:" to the unfortunate list of hard-coded schemes. If we hard-code "help:" we have to hard-code its synonyms too. (find_monitor): Use g_new0 so fields in the Monitor are not uninitialized in this case (the fields in question are ignored, but it's still nicer this way). (nautilus_directory_monitor_add_internal): Set up the "monitor hidden files" and "monitor backup files" in the Monitor structure based on new parameters. (should_display_file_name): Use nautilus_file_name_matches_hidden_pattern and nautilus_file_name_matches_backup_pattern. (monitor_includes_file): New function that encapsulates the rule about which monitor includes which file. Handles the new flags for not monitoring hidden or backup files. (is_needy): Call monitor_includes_file. (select_needy_file): Call monitor_includes_file. * libnautilus-extensions/nautilus-file-private.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_name_matches_hidden_pattern), (nautilus_file_name_matches_backup_pattern): New functions to share with the directory code. (nautilus_file_is_hidden_file), (nautilus_file_is_backup_file): Use the new functions and use the raw relative_uri -- no need to unescape to change to a file name since the "." and "~" characters are not encoded. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize): Share more code with the filtering_changed_callback. Handle the desktop view better by never setting the "show hidden" and "show backup" flags (so they are both FALSE) and not setting up the callbacks. (fm_directory_view_destroy): Since we don't set up the callbacks for desktop windows, don't remove them for desktop windows. (queue_pending_files): Remove the desktop special case from here. It was strange to set the flags up then wait until this moment to clear them both. It's better to keep them FALSE. (finish_loading): Renamed and changed to pass the appropriate values in to the nautilus_directory_file_monitor_add call -- this is the actual bug fix. (filtering_changed_callback): Remove the desktop special case, since this function will now never be called for the desktop. * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_file_monitor_add): Pass through the new "monitor hidden files" and "monitor backup files" parameters. (nautilus_self_check_directory): Pass TRUE for both. * libnautilus-extensions/nautilus-vfs-directory.c: (vfs_file_monitor_add): Pass through the new "monitor hidden files" and "monitor backup files" parameters. * libnautilus-extensions/nautilus-merged-directory.c: (merged_file_monitor_add), (monitor_add_directory): Store the "monitor hidden files" and "monitor backup files" and pass them through to the individual directory monitor calls. * components/tree/nautilus-tree-model.c: (nautilus_tree_model_node_begin_monitoring_no_connect): * libnautilus-extensions/nautilus-file.c: (nautilus_file_monitor_add): * libnautilus-extensions/nautilus-trash-monitor.c: (nautilus_trash_monitor_initialize): * src/nautilus-applicable-views.c: (got_minimum_file_info_callback): Pass in TRUE for "monitor hidden files" and "monitor backup files" to get the same behavior as before. (In some cases the booleans are just ignored, in other cases we just monitor all files as we used to.) * RENAMING: Remind myself to change the name of the NAUTILUS_CALL_VIRTUAL macro to NAUTILUS_CALL_METHOD some day. |
||
John Sullivan
|
c61d1983f2 |
reviewed by: Darin Adler <darin@eazel.com>
Fixed bug 5375 (reword the 4000-file limit so it doesn't mention the Nautilus Preview Release) * libnautilus-extensions/nautilus-directory.c: * libnautilus-extensions/nautilus-directory.h: Move the #define for the limit to a public place. * src/file-manager/fm-directory-view.c: (check_for_directory_hard_limit): Reword the dialog so it doesn't promise to go away soon. Also, use #define for the limit in case it changes, which is likely. |
||
Pavel Cisler
|
b43f3c05e0 |
reviewed by: Maciej Stachowiak <mjs@eazel.com>
2000-11-21 Pavel Cisler <pavel@eazel.com> reviewed by: Maciej Stachowiak <mjs@eazel.com> Fixed bugzilla 855 - Renaming a file with thumbnails does not affect the thumbnails and 4654 - Old thumbnails cause problems with renaming. * libnautilus-extensions/nautilus-directory-metafile.c: (nautilus_directory_rename_file_metadata), (nautilus_directory_remove_file_metadata): Finish the metafile rename and metafile remove operation by updating thumbnail files correspondingly, if they exist. * libnautilus-extensions/nautilus-directory.c: * libnautilus-extensions/nautilus-directory.h: (nautilus_directory_get_file_uri): Added a convenience routine. * libnautilus-extensions/nautilus-thumbnails.c: (vfs_file_exists): Tweaked to use the right GnomeVFS call. * libnautilus-extensions/nautilus-thumbnails.h: * libnautilus-extensions/nautilus-thumbnails.c: (nautilus_update_thumbnail_file_renamed_one), (nautilus_update_thumbnail_file_renamed), (nautilus_remove_thumbnail_for_file_one), (nautilus_remove_thumbnail_for_file): Look for an existing thumbnail for a file, if present, rename or remove it respectively to update it to the new state. * libnautilus-extensions/nautilus-thumbnails.c: (make_thumbnail_path), (nautilus_get_thumbnail_uri), (check_for_thumbnails), (make_thumbnails): Added a create_parents_if_needed parameter used by the new thumbnail updating calls. |
||
Rebecca Schulman
|
3c7ded1f7a |
This change is the first part of the fix for bug 3920. The fix will allow
2000-11-15 Rebecca Schulman <rebecka@eazel.com> This change is the first part of the fix for bug 3920. The fix will allow nautilus to tell a user that the search they have requested is newer than their index. This involved communicating errors that occurred while opening and reading the directory outside of the directory model to a view, which can react in a useful way. Reviewed by: John Sullivan <sullivan@eazel.com> * libnautilus-extensions/nautilus-directory-async.c: (directory_load_done): If the directory load did not complete successfully, emit an error signal * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_initialize_class), (nautilus_directory_emit_load_error): Add the load error signal, and a cover function to emit the signal * src/file-manager/fm-directory-view.h: * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize_class), (load_error_callback), (finish_loading_uri), (disconnect_model_handlers): Also add a load_error signal to the fm directory view class, so that subclasses can get information about errors particular to a type of directory, (in this case the search list view) and react correctly. * src/file-manager/fm-search-list-view.c: (load_error_callback), (fm_search_list_view_initialize): Handle the load error SERVICE_OBSOLETE, by displaying a dialog that tells the user that their index is too old for their search to work correctly, and gives them an option to reindex * src/file-manager/nautilus-indexing-info.c: (nautilus_indexing_info_request_reindex): * src/file-manager/nautilus-indexing-info.h: Add a cover function to medusa's request reindex function that the search list view calls. |
||
Darin Adler
|
afb740a8ca |
New set of functions for manipulating a set of case-insensitive strings
* libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-file-private.h: * libnautilus-extensions/nautilus-directory-async.c: (istr_equal), (istr_hash), (istr_set_new), (istr_set_insert), (add_istr_to_list), (istr_set_get_as_list), (istr_set_destroy): New set of functions for manipulating a set of case-insensitive strings (private for now). (mime_list_cancel): Change to use the istr_set. (get_filter_options_for_directory_count): Moved up so it can be used by the directory load code. (load_directory_done): Common function to use when a load is completed or cancelled. (dequeue_pending_idle_callback): Update file count and MIME list as well as just loading the files. (should_get_directory_count): New cover that takes into account the fact that a directory load is already getting the count. (should_get_mime_list): New cover that takes into account the fact that a directory load is already getting the MIME list. (start_monitoring_file_list): Set up more stuff since a load does a lot more now. (directory_count_start): Don't start a directory count if we are already loading the directory's file list. (mime_list_one), (mime_list_callback), (mime_list_load): Change to use the istr_set. Also removed some code that set variables that were never used. (mime_list_start): Don't start a MIME list if we are already loading the directory's file list. * components/adapter/Makefile.am: * components/hardware/Makefile.am: * components/html/Makefile.am: * components/loser/content/Makefile.am: * components/loser/sidebar/Makefile.am: * components/mozilla/Makefile.am: * components/music/Makefile.am: * components/rpmview/Makefile.am: * components/sample/Makefile.am: * components/services/install/command-line/Makefile.am: * components/services/install/lib/Makefile.am: * components/services/install/nautilus-view/Makefile.am: * components/services/install/server/Makefile.am: * components/services/inventory/lib/Makefile.am: * components/services/inventory/nautilus-view/Makefile.am: * components/services/login/nautilus-view/Makefile.am: * components/services/nautilus-dependent-shared/Makefile.am: * components/services/summary/lib/Makefile.am: * components/services/summary/nautilus-view/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/lib/Makefile.am: * components/services/trilobite/sample/nautilus-view/Makefile.am: * components/services/trilobite/sample/service/Makefile.am: * components/services/vault/command-line/Makefile.am: * components/tree/Makefile.am: * helper-utilities/authenticate/Makefile.am: * nautilus-installer/src/Makefile.am: Changed all use of CPPFLAGS to use INCLUDES instead as it says in the automake documentation. * libnautilus-extensions/nautilus-glib-extensions.h: Reformatting. * libnautilus-extensions/nautilus-glib-extensions.c: (nautilus_g_hash_table_remove_deep_custom), (nautilus_g_hash_table_remove_deep), (destroy_deep_helper), (nautilus_g_hash_table_destroy_deep_custom): Reformatting. |
||
Rebecca Schulman
|
0c65eaca24 |
Fix for bug 1768, to put a hard limit on the number of files for PR2. We
2000-10-20 Rebecca Schulman <rebecka@eazel.com> Fix for bug 1768, to put a hard limit on the number of files for PR2. We do this by keeping a count of confirmed files in directories, and stopping a load once the confirmed file count reaches a certain level. * libnautilus-extensions/nautilus-directory-async.c: (set_file_unconfirmed), (dequeue_pending_idle_callback), (directory_load_one), (directory_load_done), (directory_load_callback), (mark_all_files_unconfirmed), (nautilus_directory_stop_monitoring_file_list): Increment or decrement file count when marking a file confirmed or unconfirmed. * libnautilus-extensions/nautilus-directory-private.h: add file count file * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_add_file), (nautilus_directory_remove_file), (nautilus_directory_file_list_length_reached): increment and decrement file counts here when a file is added. A file is always confirmed when it is initially added, so increment always, but only decrement the count when we are removing a confirmed file. * libnautilus-extensions/nautilus-directory.h: Add function nautilus_directory_file_list_length_reached as public * src/file-manager/fm-directory-view.c: (check_for_directory_hard_limit), (done_loading): when we finish loading the directory, display the hard limit dialog if necesssary, to let the user know we've stopped the directory load to prevent nautilus from overloading. 2000-10-20 Rebecca Schulman <rebecka@eazel.com> Fix for bug 1768, to put a hard limit on the number of files for PR2. We do this by keeping a count of confirmed files in directories, and stopping a load once the confirmed file count reaches a certain level. * libnautilus-extensions/nautilus-directory-async.c: (set_file_unconfirmed), (dequeue_pending_idle_callback), (directory_load_one), (directory_load_done), (directory_load_callback), (mark_all_files_unconfirmed), (nautilus_directory_stop_monitoring_file_list): Increment or decrement file count when marking a file confirmed or unconfirmed. * libnautilus-extensions/nautilus-directory-private.h: add file count file * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_add_file), (nautilus_directory_remove_file), (nautilus_directory_file_list_length_reached): increment and decrement file counts here when a file is added. A file is always confirmed when it is initially added, so increment always, but only decrement the count when we are removing a confirmed file. * libnautilus-extensions/nautilus-directory.h: Add function nautilus_directory_file_list_length_reached as public * src/file-manager/fm-directory-view.c: (check_for_directory_hard_limit), (done_loading): when we finish loading the directory, display the hard limit dialog if necesssary, to let the user know we've stopped the directory load to prevent nautilus from overloading. |
||
Maciej Stachowiak
|
36e750319c |
Bye bye to directory metadata. (set_metadata_string_in_metafile): don't
* libnautilus-extensions/nautilus-directory-metafile.h, libnautilus-extensions/nautilus-directory-metafile.c (nautilus_directory_get_metadata, nautilus_directory_set_metadata, nautilus_directory_get_metadata_list, nautilus_directory_set_metadata_list, nautilus_directory_get_boolean_metadata, nautilus_directory_set_boolean_metadata, nautilus_directory_get_integer_metadata, nautilus_directory_set_integer__metadata): Bye bye to directory metadata. (set_metadata_string_in_metafile): don't worry about the directory metadata case any more. (nautilus_directory_get_boolean_file_metadata, nautilus_directory_set_boolean_file_metadata, nautilus_directory_get_integer_file_metadata, nautilus_directory_set_integer_file_metadata): Helper functions for implementing NautilusFile metadata convenience wrappers. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c: (nautilus_file_get_boolean_metadata, nautilus_file_get_integer_metadata, nautilus_file_set_boolean_metadata, nautilus_file_set_integer_metadata): Convenience wrappers for boolean or integer file metadata. * libnautilus-extensions/nautilus-directory.h, libnautilus-extensions/nautilus-directory.c (nautilus_directory_initialize_class, nautilus_directory_emit_metadata_changed): removed "metadata_changed" signal. (got_metadata_callback): Don't assert the file list is NULL. (nautilus_self_check_directory): Use file metadata API. * libnautilus-extensions/nautilus-metadata.h: No more per-directory metadata, it's all per file now. * libnautilus-extensions/nautilus-directory-background.h, libnautilus-extensions/nautilus-directory-background.c (nautilus_file_background_set_desktop, nautilus_file_background_is_desktop, nautilus_file_background_peek_theme_source, nautilus_file_background_get_default_settings, nautilus_file_background_read_desktop_settings, nautilus_file_background_write_desktop_settings, nautilus_file_background_write_desktop_default_settings, call_settings_changed, nautilus_file_background_event_filter, desktop_background_destroyed_callback, nautilus_file_background_receive_root_window_changes, nautilus_file_update_root_window, nautilus_file_background_is_set, background_changed_callback, saved_settings_changed_callback, nautilus_file_background_theme_changed, background_reset_callback, background_destroyed_callback, nautilus_connect_background_to_file_metadata, nautilus_connect_desktop_background_to_file_metadata, nautilus_connect_background_to_file_metadata_by_uri): Work off of file metadata, not directory metadata, and thus take a NautilusFile not a NautilusDirectory. * libnautilus-extensions/nautilus-mime-actions.c: (nautilus_file_wait_for_metadata, nautilus_mime_get_default_action_type_for_uri, nautilus_mime_get_default_application_for_uri_internal, nautilus_mime_get_default_component_for_uri_internal, nautilus_mime_get_short_list_applications_for_uri, nautilus_mime_get_short_list_components_for_uri, nautilus_mime_get_all_applications_for_uri, nautilus_mime_get_all_components_for_uri, nautilus_mime_set_default_action_type_for_uri, nautilus_mime_set_default_application_for_uri, nautilus_mime_set_default_component_for_uri, nautilus_mime_set_short_list_applications_for_uri, nautilus_mime_set_short_list_components_for_uri, nautilus_mime_extend_all_applications_for_uri, nautilus_mime_remove_from_all_applications_for_uri, get_explicit_content_view_iids_from_metafile): Use file metadata, not directory metadata. * src/file-manager/fm-directory-view.h, src/file-manager/fm-directory-view.c (fm_directory_view_get_directory_as_file): Function to access the NautilusFile we now keep around that represents the directory itself. (fm_directory_view_initialize_class, files_have_any_custom_images, compute_menu_item_info, fm_directory_view_activate_file, fm_directory_view_load_uri, metadata_ready_callback, disconnect_model_handlers, fm_directory_view_real_is_read_only, showing_trash_directory): Use file metadata, not directory metadata, and use the new `directory_as_file' field where appropriate. (finish_loading_uri): Monitor more files attributes (the ones needed to get an icon, plus ones we might actually display in a directory view. * src/file-manager/fm-desktop-icon-view.c (fm_desktop_icon_view_create_background_context_menu_items): Use file metadata not directory metadata. * src/file-manager/fm-icon-view.h, src/file-manager/fm-icon-view.c: (set_sort_criterion, tighter_layout_callback, fm_icon_view_get_directory_sort_by, fm_icon_view_real_get_directory_sort_by, fm_icon_view_set_directory_sort_by, fm_icon_view_real_set_directory_sort_by, fm_icon_view_get_directory_sort_reversed, fm_icon_view_real_get_directory_sort_reversed, fm_icon_view_set_directory_sort_reversed, fm_icon_view_real_set_directory_sort_reversed, fm_icon_view_get_directory_auto_layout, fm_icon_view_real_get_directory_auto_layout, fm_icon_view_set_directory_auto_layout, fm_icon_view_real_set_directory_auto_layout, fm_icon_view_get_directory_tighter_layout, fm_icon_view_real_get_directory_tighter_layout, fm_icon_view_set_directory_tighter_layout, fm_icon_view_real_set_directory_tighter_layout, set_sort_reversed, fm_icon_view_begin_loading, fm_icon_view_set_zoom_level, sort_direction_callback, layout_changed_callback, icon_container_preview_callback, icon_position_changed_callback): Use file metadata not directory metadata. * src/file-manager/fm-list-view.c: (fm_list_view_begin_loading, fm_list_view_set_zoom_level, fm_list_view_sort_items): Use file metadata not directory metadata. * src/file-manager/fm-search-list-view.c (real_adding_file): Tweak the code that monitors file attributes. * components/music/nautilus-music-view.c (nautilus_music_view_update_from_uri): Use the new nautilus_file_background API. |
||
Maciej Stachowiak
|
9874534dcf |
Use nautilus_file_get_existing', not nautilus_file_get', to check if a
* libnautilus-extensions/nautilus-directory.c: (nautilus_directory_notify_files_removed, nautilus_directory_notify_files_moved): Use `nautilus_file_get_existing', not `nautilus_file_get', to check if a file is already known. `nautilus_file_get' would have created new NautilusFiles and NautilusDirectories only to do redundant notification later in the function. Also, the old code was a bit silly because `nautilus_file_get' only returns NULL for a NULL URI. Work towards bug 3362, eliminate directory metadata. * libnautilus-extensions/nautilus-file-attributes.h: Added NAUTILUS_FILE_ATTRIBUTE_METADATA attribute. * libnautilus-extensions/nautilus-directory-async.c (set_up_request_by_file_attributes): * libnautilus-extensions/nautilus-wait-until-ready.h, libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-directory.h, libnautilus-extensions/nautilus-directory.c, libnautilus-extensions/nautilus-file.c (nautilus_directory_call_when_ready, nautilus_directory_wait_until_ready, nautilus_directory_file_monitor_add, nautilus_self_check_directory, nautilus_file_monitor_add, nautilus_file_call_when_ready, nautilus_file_wait_until_ready): Remove monitor_metadata or wait_for_metadata attribtues from these calls; the new way to do it is to monitor or wait for the METADATA file attribute. * libnautilus-extensions/nautilus-directory-private.h libnautilus-extensions/nautilus-directory-async.c: (nautilus_directory_monitor_add_internal, nautilus_directory_call_when_ready_internal, nautilus_directory_check_if_ready_internal): Eliminate monitor_metadata, wait_for_metadata, etc arguments. * libnautilus-extensions/nautilus-merged-directory.c: (merged_callback_connect_directory), (merged_call_when_ready), (merged_file_monitor_add), (monitor_add_directory): * libnautilus-extensions/nautilus-vfs-directory.c: (vfs_call_when_ready), (vfs_file_monitor_add): * libnautilus-extensions/nautilus-directory-background.c (nautilus_connect_background_to_directory_metadata): Monitor metadata the new approved way. * libnautilus-extensions/nautilus-mime-actions.c (nautilus_directory_wait_for_metadata, nautilus_mime_get_default_component_for_uri_internal, nautilus_mime_get_short_list_components_for_uri, nautilus_mime_get_all_components_for_uri, get_mime_type_from_file): Wait for metadata the new approved way. * src/file-manager/fm-directory-view.c (fm_directory_view_activate_file, fm_directory_view_load_uri, finish_loading_uri, metadata_ready_callback): Monitor/call_when_ready using the new API. * src/file-manager/fm-properties-window.c: (create_properties_window, fm_properties_window_present): Monitor/call_when_ready using the new API. * src/file-manager/fm-search-list-view.c (real_adding_file): Monitor/call_when_ready using the new API. * src/file-manager/nautilus-trash-monitor.c (nautilus_trash_monitor_initialize): Monitor/call_when_ready using the new API. * src/nautilus-applicable-views.c (nautilus_navigation_info_new): Monitor/call_when_ready using the new API. * components/notes/nautilus-notes.c (notes_load_metainfo): Monitor/call_when_ready using the new API. * components/tree/nautilus-tree-model.c: (nautilus_tree_model_monitor_add, nautilus_tree_model_monitor_node): Monitor/call_when_ready using the new API. * src/nautilus-sidebar-title.c, src/nautilus-sidebar-title.h (nautilus_sidebar_title_set_uri): Monitor/call_when_ready using the new API, and use file metadata instead of directory metadata. * src/nautilus-sidebar.c (nautilus_sidebar_destroy, nautilus_sidebar_add_panel_items, nautilus_sidebar_background_is_default, receive_dropped_uri_list, receive_dropped_color, receive_dropped_keyword, (background_settings_changed_callback, background_appearance_changed_callback, background_reset_callback, open_with_callback, nautilus_sidebar_update_buttons, nautilus_sidebar_update_appearance, nautilus_sidebar_set_uri): Monitor/call_when_ready using the new API, and use file metadata instead of directory metadata. Keep around a NautilusFile representing the current sidebar location, simplifying bunches of code and hopefully eliminating potential redundant I/O. * src/nautilus-window-manage-views.c (viewed_file_changed_callback, position_and_show_window_callback, nautilus_window_end_location_change_callback): Monitor/call_when_ready using the new API, and use file metadata instead of directory metadata. Keep around a NautilusFile representing the current sidebar location, simplifying bunches of code and hopefully eliminating potential redundant I/O. * src/nautilus-window.c (nautilus_window_save_geometry): Use file metadata instead of directory metadata. |
||
Darin Adler
|
4ae258e14e |
Unescape the names of files for display in the tree view. Fixes bug 2892
* components/tree/nautilus-tree-view.c: (nautilus_tree_view_uri_to_name): Unescape the names of files for display in the tree view. Fixes bug 2892 (tree displays files with escaped characters). * libnautilus-extensions/nautilus-directory-async.c: (dequeue_pending_idle_callback): Fixed the structure here to make it more clear that it's handling ref. counts correctly. * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-file.h: Wrote better comments to explain the convenience cover functions. * src/nautilus-window-menus.c: Got rid of some UIH stuff. * src/nautilus-window-toolbars.c: (set_up_button), (nautilus_window_initialize_toolbars), (nautilus_window_toolbar_remove_theme_callback): Changed commented-out code back to ifdef UIH. * src/nautilus-window.c: (nautilus_window_clear_status), (nautilus_window_set_status): Change to use the new Bonobo call for setting status. (navigation_bar_mode_changed_callback): Changed commented-out code back to ifdef UIH. (nautilus_window_constructed): Removed some status-bar-related code. |
||
Maciej Stachowiak
|
63abb313ef |
Rename NAUTILUS_FILE_ATTRIBUTE_FAST_MIME_TYPE to
* libnautilus-extensions/nautilus-file-attributes.h: Rename NAUTILUS_FILE_ATTRIBUTE_FAST_MIME_TYPE to NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE; add NAUTILUS_FILE_ATTRIBUTE_SLOW_MIME_TYPE, for now just a synonym for NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE. * libnautilus-extensions/nautilus-directory-async.c: (set_up_request_by_file_attributes): Handle the new file attributes. * libnautilus-extensions/nautilus-directory.h: move nautilus_directory_wait_until_ready call to nautilus-wait-until-ready.h * libnautilus-extensions/nautilus-directory.c: (nautilus_self_check_directory): Include nautilus-wait-until-ready.h, use new attributes. * libnautilus-extensions/nautilus-wait-until-ready.h: New header for the deprecated wait_until_ready calls. * libnautilus-extensions/nautilus-file.c: (nautilus_file_wait_until_ready): file equivalent of nautilus_directory_wait_until_ready; temporary to help me refactor. (file_wait_until_ready_callback): helper function. * libnautilus-extensions/Makefile.am: Add nautilus-wait-until-ready.h * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_required_file_attributes): Use new attribute for mime type. * libnautilus-extensions/nautilus-mime-actions.h, libnautilus-extensions/nautilus-mime-actions.c: (nautilus_mime_get_default_action_type_for_uri), (nautilus_mime_get_default_action_for_uri), (nautilus_mime_get_default_application_for_uri_internal), (nautilus_mime_get_default_application_for_uri), (nautilus_mime_is_default_application_for_uri_user_chosen), (nautilus_mime_get_default_component_for_uri_internal), (nautilus_mime_get_default_component_for_uri), (nautilus_mime_is_default_component_for_uri_user_chosen), (nautilus_mime_get_short_list_applications_for_uri), (nautilus_mime_get_short_list_components_for_uri), (nautilus_mime_get_short_list_methods_for_uri), (nautilus_mime_get_all_applications_for_uri), (nautilus_mime_has_any_applications_for_uri), (nautilus_mime_get_all_components_for_uri), (nautilus_mime_has_any_components_for_uri), (nautilus_mime_set_default_action_type_for_uri), (nautilus_mime_set_default_application_for_uri), (nautilus_mime_set_default_component_for_uri), (nautilus_mime_set_short_list_applications_for_uri), (nautilus_mime_set_short_list_components_for_uri), (nautilus_mime_add_application_to_short_list_for_uri), (nautilus_mime_remove_application_from_short_list_for_uri), (nautilus_mime_add_component_to_short_list_for_uri), (nautilus_mime_remove_component_from_short_list_for_uri), (nautilus_mime_extend_all_applications_for_uri), (nautilus_mime_remove_from_all_applications_for_uri): All these functions now take a NautilusDirectory and a NautilusFile, rather than a URI. (gnome_vfs_mime_application_has_id), (gnome_vfs_mime_id_matches_application), (gnome_vfs_mime_application_has_id_not_in_list), (string_not_in_list), (extract_prefix_add_suffix), (make_oaf_query_with_known_mime_type), (make_oaf_query_with_uri_scheme_only), (free_key), (server_matches_content_requirements), (nautilus_do_component_query), (str_list_difference), (strv_concat): Reformatted. (get_mime_type_from_file): Changed from get_mime_type_from_uri; uses nautilus_file_wait_until_ready instead of synchronous I/O. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list), (is_application_default_for_uri), (is_component_default_for_uri), (is_component_in_short_list_for_uri), (is_application_in_short_list_for_uri), (program_file_pair_is_default_for_file), (add_to_short_list_for_file), (remove_from_short_list_for_file), (remove_default_for_item), (set_default_for_item): * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): * libnautilus-extensions/nautilus-wait-until-ready.h: * src/file-manager/fm-directory-view.c: (switch_location_and_view), (create_open_with_gtk_menu), (reset_bonobo_open_with_menu), (activate_callback): * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new), (nautilus_navigation_info_free): * src/nautilus-applicable-views.h: * src/nautilus-sidebar.c: (nautilus_sidebar_update_buttons): * src/nautilus-theme-selector.c: (add_theme_to_icons): * src/nautilus-window.c: (nautilus_window_switch_views), (nautilus_window_load_content_view_menu): * test/test-nautilus-mime-actions-set.c: (main): * test/test-nautilus-mime-actions.c: (main): Deal with above API changes. |
||
John Sullivan
|
c4875f4faa |
Fixed bug 437 (Deleting files doesn't affect count in sidebar)
Fixed bug 2001 (adding/removing files doesn't update directory counts) * libnautilus-extensions/nautilus-directory-async.c: (get_corresponding_file): Removed from here, replaced by nautilus_directory_get_existing_corresponding_file, now in nautilus-directory.c (nautilus_directory_invalidate_counts): New function, split out from nautilus_directory_force_reload. (nautilus_directory_force_reload): Now calls _invalidate_counts. * libnautilus-extensions/nautilus-directory-private.h: Added prototypes for nautilus_directory_get_existing_corresponding_file and nautilus_directory_invalidate_counts. * libnautilus-extensions/nautilus-directory.h: Added prototype for nautilus_directory_get_corresponding_file. * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_get_corresponding_file): New public function, returns NautilusFile object for this NautilusDirectory (whether or not one already existed). (nautilus_directory_get_existing_corresponding_file): Moved and renamed private function, returns NautilusFile object for this NautilusDirectory but only if one already exists. (invalidate_count_and_unref): New helper hash table foreach function, invalidates count & unrefs a NautilusDirectory. (collect_parent_directories): New helper function, adds directory to hash table & refs if not already present. (nautilus_directory_notify_files_added), (nautilus_directory_notify_files_removed), (nautilus_directory_notify_files_moved): Use these two new functions to invalidate directory counts when files added/removed. * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_internal): Initialize a variable to NULL to make compiler happy. Reimplemented "select all should be insensitive when there are no files to select" a better way after Darin hinted. * src/file-manager/fm-directory-view.h: Added is_empty function pointer and prototype for fm_directory_view_is_empty. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize_class): made is_empty a MUST_OVERRIDE function. (get_directory_as_file): Simplified implementation by calling new nautilus_directory_get_corresponding_file. (no_items_showing): Removed this function. (compute_menu_item_info): Use fm_directory_view_is_empty instead of no_items_showing. (fm_directory_view_is_empty): New function, calls virtual function. (fm_directory_view_real_create_background_context_menu_items): Fixed bug where "New Folder" item in context menu was sensitive when it shouldn't have been. * src/file-manager/fm-list-view.c: (fm_list_view_initialize_class), (real_is_empty): Overrode is_empty function pointer to check whether row count of list is 0. * libnautilus-extensions/nautilus-icon-container.h: * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_is_empty): New function, checks whether list of icons is NULL. * src/file-manager/fm-icon-view.c: (fm_icon_view_is_empty), (fm_icon_view_initialize_class): Overrode is_empty function pointer to ask icon container. |
||
John Sullivan
|
5d1ba62516 |
Fixed bug 2243 (trash window name should be "Trash"
with a capital T, localized) * libnautilus-extensions/nautilus-directory-private.h: Added prototype for nautilus_directory_get_ name_for_self_as_new_file * libnautilus-extensions/nautilus-directory.h, * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_initialize_class), (nautilus_directory_get_name_for_self_as_new_file), (real_get_name_for_self_as_new_file): wired up new overridable function pointer "get_name_for_self_as_new_file" that's used to get the name from directories that aren't vfs directories. Default implementation returns the scheme. * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_internal): Use nautilus_directory_ get_name_for_self_as_new_file instead of hardwiring scheme-getting logic here. * libnautilus-extensions/nautilus-trash-directory.c: (trash_get_name_for_self_as_new_file), (nautilus_trash_directory_initialize_class): Override get_name_for_self_as_new_file to return _("Trash"). * src/nautilus-window-manage-views.c: (compute_default_title): Use NautilusFile to get the default window title. Formerly it was using some similar but slightly different logic to what nautilus_file uses to get a name to display. * src/nautilus-window-menus.c: (help_menu_about_nautilus_callback): * AUTHORS: Gave credit where credit was due. |
||
Darin Adler
|
56d7a0273d |
Remove extra parameters now that the initial files callback is gone. It
* components/tree/nautilus-tree-model.c: (nautilus_tree_model_monitor_node): * libnautilus-extensions/nautilus-directory-async.c: (nautilus_directory_monitor_add_internal): * libnautilus-extensions/nautilus-directory-background.c: (nautilus_connect_background_to_directory_metadata): * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_file_monitor_add), (nautilus_self_check_directory): * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_monitor_add): * libnautilus-extensions/nautilus-trash-directory.c: (trash_file_monitor_add): * libnautilus-extensions/nautilus-vfs-directory.c: (vfs_file_monitor_add): * src/file-manager/fm-directory-view.c: (finish_loading_uri): * src/file-manager/nautilus-trash-monitor.c: (nautilus_trash_metadata_ready_callback): Remove extra parameters now that the initial files callback is gone. It turns out emitting another files_added signal works just fine. If it wasn't for the search list view, I could also merge the "file_added" and "files_changed" signals easily. Both of these changes would simplify the work on the virtual trash directory. * libnautilus-extensions/nautilus-link.h: * libnautilus-extensions/nautilus-link.c: Get rid of NAUTILUS_LINK constant, which looked like a link type, but was really an unrelated implementation detail. * libnautilus-extensions/nautilus-icon-container.c: (sort_icons), (resort), (lay_down_icons_tblr), (finish_adding_new_icons): Removed the file-manager-specific stuff Gene added for the desktop. I fight the continuing battle to keep NautilusIconContainer a general icon container, and not just for the Nautilus icon view. The drag code is still an exception to this that needs to be fixed some day (for NautilusList too). * src/file-manager/fm-desktop-icon-view.c: (fm_desktop_icon_view_initialize), (get_local_path), (get_sort_category), (desktop_icons_compare_callback): Rewrote sorting code from NautilusIconContainer and moved it here where it belongs. |
||
Darin Adler
|
5baaa57805 |
More prep work for the trash directory.
* libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-trash-directory.c: (nautilus_trash_directory_initialize_class), (nautilus_trash_directory_initialize), (nautilus_trash_directory_destroy): * libnautilus-extensions/nautilus-trash-directory.h: * libnautilus-extensions/nautilus-vfs-directory.c: (nautilus_vfs_directory_initialize_class), (nautilus_vfs_directory_initialize), (nautilus_vfs_directory_destroy): * libnautilus-extensions/nautilus-vfs-directory.h: Add subclasses for the trash and for general VFS directories. Using refactoring techniques to move code down into these subclasses. This is not intended to be a general framework, but should be good enough to handle both these cases. * libnautilus-extensions/nautilus-directory-async.c: (can_use_public_metafile), (metafile_read_check_for_directory), (metafile_read_failed), (metafile_read_start), (allow_metafile), (metafile_write_success_close_callback), (nautilus_metafile_write_start), (start_monitoring_file_list), (get_corresponding_file), (start_getting_file_info): * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_destroy), (make_uri_canonical), (nautilus_directory_get_internal), (nautilus_directory_get_uri), (construct_private_metafile_uri), (nautilus_directory_new), (nautilus_directory_is_local), (nautilus_directory_is_not_empty), (nautilus_self_check_directory): * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_internal), (nautilus_file_rename), (nautilus_file_get_gnome_vfs_uri), (nautilus_file_matches_uri), (nautilus_file_compare_by_name), (nautilus_file_compare_by_directory_name), (nautilus_file_compare_for_sort), (nautilus_file_get_uri), (nautilus_file_set_permissions), (nautilus_file_get_string_attribute), (nautilus_file_get_mime_type), (nautilus_file_is_in_trash), (nautilus_file_contains_text), (nautilus_file_get_directory_name), (nautilus_file_mark_gone), (nautilus_file_changed): * libnautilus-extensions/nautilus-file.h: Add code to handle case of directory that can't be handled by gnome-vfs. Mostly some NULL checks. Also renamed fields to make it clear that the text URI is the "real" one. Added code to handle the "gnome-trash:" and "trash:" schemes specially in the code to make URIs canonical. * libnautilus-extensions/nautilus-mime-actions.c: (get_mime_type_from_uri): Return "application/octet-stream" instead of NULL for unknown MIME type. * src/file-manager/fm-directory-view.c: (fm_directory_view_display_selection_info): Eliminated the nautilus_file_get_real_name call. * src/nautilus-switchable-navigation-bar.c: (nautilus_switchable_navigation_bar_set_location): Eliminated the nautilus_directory_is_search_directory call. * src/file-manager/fm-search-list-view.c: (real_adding_file): Fixed formatting mistake. * src/nautilus-view-frame.c: (set_up_for_new_location): Emit the title_changed signal for each change in location. |
||
Pavel Cisler
|
21c6cffaaa |
Bugzilla bug 1400
2000-08-02 Pavel Cisler <pavel@eazel.com> Bugzilla bug 1400 * libnautilus-extensions/nautilus-directory.c: * libnautilus-extensions/nautilus-directory.h: (any_non_metafile_item), (nautilus_directory_is_not_empty): Added a call I needed to check a directory empty state. * src/file-manager/Makefile.am: * src/file-manager/nautilus-trash-monitor.h: * src/file-manager/nautilus-trash-monitor.c: (nautilus_trash_monitor_initialize_class), (nautilus_trash_files_changed_callback), (nautilus_trash_metadata_ready_callback), (nautilus_trash_monitor_initialize), (nautilus_trash_monitor_get), (nautilus_trash_monitor_shutdown): New trash state monitoring class, used to update the Trash icon, etc. * src/file-manager/fm-directory-view.c: (bonobo_menu_empty_trash_callback), (fm_directory_view_initialize), (fm_directory_view_trash_or_delete_selection), (trash_state_changed_callback): Hook up to the Trash monitor change signal. Tweak the callback Gene prepared for me earlier that updates the Trash icon to use the new signal. * src/file-manager/fm-directory-view.c: (finish_loading_uri): Tiny tweak - use a cover call instead of emitting a signal directly. |
||
Maciej Stachowiak
|
4263a38c52 |
I think I fixed 1693 and 1766 but I can't test them cause medusa
searching is broken right now. * libnautilus-extensions/nautilus-directory.h, libnautilus-extensions/nautilus-directory.c (nautilus_directory_is_search_directory): New call to determine if a directory is a virtual search directory. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c: (nautilus_file_compare_by_real_name, nautilus_file_compare_by_real_directory, nautilus_file_compare_for_sort_internal): Added ability to sort by directory; made name sorting work right for search results. (nautilus_file_is_search_result, nautilus_file_get_real_name, nautilus_file_get_real_directory): New functions to get useful info about search results. (nautilus_file_get_string_attribute): Add real_name and real_directory attributes. * src/file-manager/fm-search-list-view.c: Use real_name and real_directory attributes for name and directory. (sort_criterion_from_column): sort properly by directory. |
||
Darin Adler
|
08b617282b |
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. |
||
Rebecca Schulman
|
0c09cda259 |
got rid of changes before made for putting medusa communication into
2000-07-20 Rebecca Schulman <rebecka@eazel.com> * libnautilus-extensions/nautilus-directory-async.c: (allow_metafile), (start_monitoring_file_list): * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_destroy), (nautilus_directory_get), (construct_alternate_metafile_uri), (nautilus_directory_is_local), (nautilus_directory_file_monitor_remove): * libnautilus-extensions/nautilus-directory.h: got rid of changes before made for putting medusa communication into nautilus. that is all part of gnome-vfs now. * libnautilus-extensions/nautilus-search-async.c: * libnautilus-extensions/nautilus-search-async.h: * libnautilus-extensions/Makefile.am: Deprecated as they are no longer necessary (see above) * libnautilus-extensions/nautilus-string.c: * libnautilus-extensions/nautilus-string.h: (nautilus_str_get_after_prefix): added new function that nautilus-string-uri will use. * src/file-manager/fm-list-view.c: (fm_list_view_create_list): fix list view bug that should have been in my last checkin Someone needs beat me over the head and fix my extensive cvs issues from the last few days! |
||
Maciej Stachowiak
|
5c8338b841 |
Add VFS_CFLAGS
* components/tree/Makefile.am: Add VFS_CFLAGS * components/tree/main.c (main): Initialize more libraries. * components/tree/nautilus-tree-view.h, components/tree/nautilus-tree-view.c: Many changes. The upshot is that basic tree loading now works, but many details remain to be fleshed out (individual bugs were filed on these). * libnautilus-extensions/nautilus-directory-async.c: (dequeue_pending_idle_callback), (directory_load_done): Try to emit done signal exactly once when a monitor load is complete. But I think this might be questionable, see below. * libnautilus-extensions/nautilus-directory-private.h, libnautilus-extensions/nautilus-directory.h, libnautilus-extensions/nautilus-directory.c: Add the "done_loading" signal for when a load initiated by monitoring is done. I just realized this does the wrong thing when more than one thing is monitoring at the same time (both get the signal), so maybe it should be changed to a callback function passed to nautilus_file_monitor_add, but that would be harder to implement. (nautilus_directory_emit_done_loading): Function so the async code can emit it. |
||
Rebecca Schulman
|
d18ad1f885 |
set up search-bar as a virtual class that switches between the available
2000-06-20 Rebecca Schulman <rebecka@eazel.com> * src/Makefile.am: * src/nautilus-search-bar.c: * src/nautilus-search-bar.h: (nautilus_search_bar_initialize_class), (nautilus_search_bar_initialize), (nautilus_search_bar_set_location), (nautilus_search_bar_set_search_controls): * src/nautilus-switchable-search-bar.c: * src/nautilus-switchable-search-bar.h: * src/nautilus-search-bar-criterion.c: * src/nautilus-search-bar-criterion.h: set up search-bar as a virtual class that switches between the available search bars, similar to nautilus-navigation-bar. * src/nautilus-complex-search-bar.c: * src/nautilus-complex-search-bar.h: * src/nautilus-simple-search-bar.c: * src/nautilus-simple-search-bar.h: Added simple and complex search bar skeletons. these need to get filled out a lot more * src/nautilus-switchable-navigation-bar.c: (nautilus_switchable_navigation_bar_initialize): switchable navigation bar uses a switchable search bar instead of a normal search bar, since that class is now virtual * src/nautilus-navigation-bar.c: fixed comment typos * libnautilus-extensions/nautilus-directory.h: Exported nautilus_uri_is_search_uri function * libnautilus-extensions/Makefile.am: Added nautilus-search-uri.c and .h files The functions aren't filled out yet, though * libnautilus-extensions/nautilus-search-uri.c: (nautilus_search_uri_to_simple_search_criteria): * libnautilus-extensions/nautilus-search-uri.h: * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_register_for_ui): * libnautilus-extensions/nautilus-global-preferences.h: Changed search bar preference names from NAUTILUS_SEARCH_BAR_ONE_BOX and NAUTILUS_SEARCH_BAR_MULTI_BOX to NAUTILUS_SIMPLE_SEARCH_BAR and NAUTILUS_COMPLEX_SEARCH_BAR to match respective object names |
||
Rebecca Schulman
|
bd52afb29f |
Initial changes to implement search architecture.
2000-06-13 Rebecca Schulman <rebecka@eazel.com> Initial changes to implement search architecture. * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-directory-async.c: Changed metafile reading to skip this for search directories call a separate sync reader for search directories (the async handle creates a thread but doesn't talk to medusa yet) Added * libnautilus-extensions/nautilus-search-async.c: * libnautilus-extensions/nautilus-search-async.h: location of future async search calls * libnautilus-extensions/nautilus-directory-private.h: added is_search_directory boolean field to NautilusDirectoryDetails * libnautilus-extensions/nautilus-directory.c: * libnautilus-extensions/nautilus-directory.h: nautilus_search_directory_new supplemnts nautilus_directory_new and test functions nautilus_diretory_is_search_directory and nautilus_uri_is_search_uri * src/nautilus-window.c: * src/nautilus-window-toolbars.c: added search button (icon to come!) * src/nautilus.oafinfo: added search: to list of acceptable content for list view |
||
Maciej Stachowiak
|
c54cbed15e |
Non-asynchronous equivalent of `nautilus_directory_call_when_ready'.
* libnautilus-extensions/nautilus-directory.h, libnautilus-extensions/nautilus-directory.c: (nautilus_directory_wait_until_ready): Non-asynchronous equivalent of `nautilus_directory_call_when_ready'. However, it doesn't block the UI while waiting. (nautilus_directory_wait_until_ready_callback): Helper function for implementing the above. * libnautilus-extensions/nautilus-mime-actions.c: (nautilus_mime_get_default_action_type_for_uri, nautilus_mime_get_default_action_for_uri, nautilus_mime_get_default_application_for_uri, nautilus_mime_get_default_component_for_uri): Implemented with fully with proper metadata checking and interface querying, etc. (nautilus_mime_get_short_list_applications_for_uri, nautilus_mime_get_short_list_components_for_uri, nautilus_mime_get_all_applications_for_uri, nautilus_mime_get_all_components_for_uri): Adjusted to deal with the mime type checking function changing names. (OAF_ServerInfo__copy, extract_prefix_add_suffix, mime_type_get_supertype, uri_string_get_scheme), get_explicit_content_view_iids_from_metafile, make_oaf_query_for_explicit_content_view_iids, make_oaf_query_with_known_mime_type, make_oaf_query_with_uri_scheme_only, file_list_to_mime_type_hash_table, free_key, mime_type_hash_table_destroy, server_matches_content_requirements, nautilus_do_component_query): Oodles of helper functions, many cut & pasted from elswhere and only slightly modified. get_mime_type_from_uri: Removed `_hack' from the name. * libnautilus-extensions/nautilus-mime-actions.h: Added prototype for nautilus_mime_get_default_action_type_for_uri. * test/test-nautilus-mime-actions.c (main): Call gnome_init. * src/nautilus-applicable-views.c: Removed a stray comment that no longer applies. |
||
Ian McKellar
|
d2723a29e6 |
Allow users to specify that if they want detailed remote views, and if
they don't, then don't download the top left text of text files. |
||
Darin Adler
|
f3df1c2b67 |
File name changes.
* components/services/trilobite/sample/command-line/.cvsignore: * components/services/trilobite/sample/service/.cvsignore: File name changes. * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_file_monitor_add), (nautilus_self_check_directory): * libnautilus-extensions/nautilus-directory.h: * src/file-manager/fm-directory-view.c: (finish_loading_uri): Added reload interface. * libnautilus/nautilus-undoable.c: (nautilus_undo_register), (undo_atom_destroy), (undo_atom_destroy_notify_cover), (undo_atom_destroy_g_func_cover), (save_callback), (restore_callback), (nautilus_undo_register_full), (nautilus_undo_unregister), (nautilus_undo): * libnautilus/nautilus-undoable.h: Implemented new simplified Undo API. * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_initialize), (nautilus_entry_destroy), (nautilus_entry_key_press), (nautilus_entry_changed), (register_edit_undo), (update_undo_text), (restore_from_undo_snapshot_callback), (nautilus_entry_enable_undo): * libnautilus-extensions/nautilus-icon-container.c: (hide_rename_widget): * libnautilus-extensions/nautilus-icon-text-item.c: (iti_event), (register_rename_undo), (restore_from_undo_snapshot_callback): * src/nautilus-bookmarks-window.c: (on_window_delete_event): * src/nautilus-location-bar.c: (destroy): Use new simplified Undo API. * libnautilus/nautilus-undo-manager.h: Remove UNDO_MANAGER_NAME, which is no longer used. * src/file-manager/fm-icon-view.c: (icon_position_changed_callback): Fixed a bad g_free that was cause seg faults when you resized an icon. |
||
Darin Adler
|
e259c55ee9 |
First cut at metadata cleanup in preparation for fixing bug
with setting metadata before the metafile is read. * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-directory.c: (get_metadata_list_from_node), (nautilus_directory_get_metadata_list), (nautilus_directory_set_boolean_metadata), (nautilus_directory_set_integer_metadata), (nautilus_directory_get_file_metadata_node), (nautilus_directory_get_file_metadata_list), (nautilus_directory_set_file_metadata), (nautilus_directory_set_file_metadata_list), * libnautilus-extensions/nautilus-file.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_metadata), (nautilus_file_get_metadata_list), (nautilus_file_set_metadata), (nautilus_file_set_metadata_list), (nautilus_file_get_keywords), (nautilus_file_set_keywords): Unified code to deal with metadata lists and made both get and set work the same way. Also got rid of the default value. For lists, the default value is always NULL. * components/notes/ntl-notes.c: (notes_load_metainfo): * libnautilus-extensions/nautilus-directory-async.c: (nautilus_directory_monitor_add_internal), (nautilus_directory_call_when_ready_internal): * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_call_when_ready), (nautilus_directory_file_monitor_add), (nautilus_self_check_directory): * libnautilus-extensions/nautilus-file.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_monitor_add), (nautilus_file_call_when_ready): * src/file-manager/fm-directory-view.c: (fm_directory_view_load_uri), (finish_loading_uri): * src/nautilus-index-title.c: (nautilus_index_title_set_uri): * src/ntl-uri-map.c: (set_initial_content_iid), (get_explicit_content_view_iids_from_metafile), (nautilus_navigation_info_new): Converted to use new API that specifies only that metadata is needed, not which keys. Maciej and I agreed that it's no use to specify which keys you are interested in when you can just get it wrong and have everything work anyway. Also the old API didn't work for metadata lists. * components/services/trilobite/sample/command-line/.cvsignore: Added generated files. * libnautilus-extensions/nautilus-xml-extensions.c: (nautilus_xml_get_property_for_children): Format tweak. * src/file-manager/fm-directory-view.c: (bonobo_menu_delete_callback), (bonobo_menu_duplicate_callback), (bonobo_menu_open_properties_window_callback), (display_selection_info), (notify_selection_change_callback), (queue_pending_files), (append_uri_one), (fm_directory_view_duplicate_selection), (fm_directory_view_trash_selection): Formatting tweaks. |
||
Maciej Stachowiak
|
8762c62ed2 | *** empty log message *** | ||
Darin Adler
|
6397f17caa |
Changed to the new Nautilus list instead of the old secret list.
* MAINTAINERS: Changed to the new Nautilus list instead of the old secret list. * components/notes/ntl-notes.c (notes_load_metainfo): * src/file-manager/fm-directory-view.c (fm_directory_view_load_uri), (metadata_ready_callback): * src/ntl-uri-map.c (got_metadata_callback), (nautilus_navigation_info_new): Change calls to use new API, but not to use any of the new features, which are not yet implemented. * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-directory.c * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory-async.c * libnautilus-extensions/nautilus-file.c * libnautilus-extensions/nautilus-file.h: Added the new API and moved functions around a bit to prepare for the new feature needed by Maciej for getting a list of files. * libnautilus-extensions/nautilus-file-attributes.h: Added an attribute constant for MIME type. |
||
Darin Adler
|
a57de9d70d |
Fixed bug where you'd see the name twice under each icon.
Did some work for the new notify hooks that Pavel made. I'll finish those hooks soon. * src/file-manager/fm-icon-view.h: * src/file-manager/fm-icon-text-window.h: * src/file-manager/fm-icon-text-window.c: (set_preference_string), (synch_menus_with_preference), (icon_view_text_attribute_changed_callback), (fm_get_text_attribute_names_preference_or_default): * src/file-manager/fm-icon-view.c: (fm_icon_view_initialize), (fm_icon_view_get_icon_text_attribute_names), (text_attribute_names_changed_callback): Moved attribute names default into FMIconTextWindow and made the callers use a new call that gets either the preference or the default if the preference is invalid. Also simplified the code since we don't need to cache the preference in either the FMIconTextWindow or the FMIconView. * libnautilus-extensions/nautilus-directory.c: (is_canonical_uri): Added a function for use in asserts. (nautilus_directory_get): Assert that we successfully made the URI canonical. (parent_directory_if_exists), (file_if_exists): Helper functions for implementing the notify calls. (nautilus_directory_notify_files_added), (nautilus_directory_notify_files_removed), (nautilus_directory_notify_files_moved): Fleshed out the bones of these routines a bit more. They are still not done. Also changed their interfaces so they are not responsible for freeing their parameters. * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-directory.c: * libnautilus-extensions/nautilus-file.h: (nautilus_directory_contains_file): New call to be used instead of nautilus_file_is_gone for callers that are monitoring a directory. * libnautilus-extensions/nautilus-file-changes-queue.c: (pairs_list_free), (nautilus_file_changes_consume_changes): Make the caller free the list instead of the called function Also reordered the changes so deletions come before additions. * src/file-manager/fm-directory-view.c: (display_pending_files): * src/file-manager/fm-list-view.c: (fm_list_view_file_changed): * src/file-manager/fm-icon-view.c: (fm_icon_view_file_changed): Changed to use nautilus_directory_contains_file instead of nautilus_file_is_gone. |
||
Darin Adler
|
01a320306e |
Finished task 174 (Use deferred calculation to compute directory counts).
Finished task 174 (Use deferred calculation to compute directory counts). * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-file-attributes.h: Added a header file for names of file attributes. * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.c: * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-file-private.h: * libnautilus-extensions/nautilus-file.c: * libnautilus-extensions/nautilus-file.h: Added background computation of the "directory item count" attribute. This is serving as a test case for the API for requesting additional information. * src/file-manager/fm-directory-view.c: (display_selection_info): Changed to use the new interface that can sometimes return "I don't know" for the number of items in a particular directory. (stop_load), (done_loading), (display_pending_files), (fm_directory_view_stop): Fixed a mistake in the old code where we stopped monitoring once the files were discovered. We need to keep monitoring. (finish_loading_uri): Pass in an attribute that we want to monitor: NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_COUNT. |
||
Darin Adler
|
74748cdc3a |
Fixed a bug my changes to GNOME VFS exposed. The callback couldn't handle
* components/html/ntl-web-browser.c: (browser_vfs_read_callback): Fixed a bug my changes to GNOME VFS exposed. The callback couldn't handle a "bytes_read" of 0. * libnautilus/nautilus-directory-private.h: * libnautilus/nautilus-directory.c: * libnautilus/nautilus-directory.h: * src/file-manager/fm-directory-view.c: Added a new interface for monitoring files and directories. Also fixed the self-check code that was failing since the async. changes. * libnautilus/nautilus-file.h: Added the interface for monitoring single files, but it isn't implemented yet. * libnautilus/nautilus-icon-canvas-item.c: * libnautilus/nautilus-icon-canvas-item.h: * libnautilus/nautilus-icon-container.c: * libnautilus/nautilus-icon-container.h: * libnautilus/nautilus-icon-dnd.c: * libnautilus/nautilus-icon-dnd.h: * libnautilus/nautilus-icon-private.h: Restructured Andy's modifier changes so the canvas item doesn't have to know about modifiers. This makes the canvas item private again. Users of NautilusIconContainer shouldn't have to know about the canvas item. * src/file-manager/fm-icon-view.c: Reformatting. |
||
Darin Adler
|
682bcce228 |
Finished task 226 (Read metadata asynchronously instead of
synchronously). Requires new GNOME VFS. * libnautilus/nautilus-directory-private.h: * libnautilus/nautilus-directory.c: * libnautilus/nautilus-directory.h: Changed code to read and write metafiles async. Too many functions modified for me to list here. * libnautilus/nautilus-file-private.h: * libnautilus/nautilus-file.c: * libnautilus/nautilus-file.h: (nautilus_file_changed), (nautilus_file_emit_changed), (nautilus_file_get_metadata), (nautilus_file_set_metadata), (nautilus_file_call_when_ready), (nautilus_file_cancel_callback): Changes to NautilusFile so it can participate in the new. * components/notes/ntl-notes.c (notes_load_metainfo): Fixed a bug in my recent changes where it would use a bad file object when getting metadata. * src/file-manager/fm-directory-view.c (notes_load_metainfo): Renamed "tags" to "keys". |
||
Darin Adler
|
080683794f |
Finished changing all callers that use metadata to use it in a way
that is compatible with async. metadata reading. * components/notes/ntl-notes.c: (notes_load_metainfo): Changed to use nautilus_file_call_when_ready to wait for the metadata. Also fixed a bug that was causing an assert inside the call to gtk_editable_insert_text. (main): Made warnings and criticals stop in the debugger. * libnautilus/nautilus-directory.c: * libnautilus/nautilus-directory.h: (nautilus_directory_call_when_ready): Renamed the call to indicate it can wait for more than just metadata. For now it does only wait for metadata, though. (nautilus_directory_cancel_callback): Renamed this too. * libnautilus/nautilus-file.c: (nautilus_file_call_when_ready), (nautilus_file_cancel_callback): Made a corresponding call for the metadata of a single file. * libnautilus/nautilus-gdk-extensions.c: * src/nautilus-index-title.c: Formatting changes. * libnautilus/nautilus-metadata.h: Clarified that ANNOTATION is a per-file piece of metadata. * src/ntl-uri-map.c: * src/file-manager/fm-directory-view.c: Use new names of calls. * src/file-manager/fm-icon-view.c: * src/file-manager/fm-list-view.c: Added comment. |
||
Darin Adler
|
1ae3a2426a |
Added the hooks needed to make metafile reading asynchronous.
Next I'll change the actual metafile access to work that way. * libnautilus/nautilus-directory.h: * libnautilus/nautilus-directory.c: (nautilus_directory_metadata_call_when_ready): Added function that requests a read of some metadata and calls back when the data is ready. * src/ntl-app.c: (nautilus_app_startup): Got rid of call to nautilus_navinfo_init. * src/ntl-types.h: Moved the NautilusNavigationInfo struct and related defines to ntl-uri-map.h. * src/ntl-uri-map.h: * src/ntl-uri-map.c: Reformatted and changed the names of many functions. Added code to use the new metadata callback. * src/ntl-index-panel.c: * src/ntl-main.c: * src/ntl-view.h: * src/ntl-window-msgs.c: * src/ntl-window.c: * src/ntl-window.h: Had to change includes a bit because of my changes to what header files are including. * src/ntl-window-msgs.c: (nautilus_window_update_state): * src/ntl-window.h: Use the new nautilus_navigation_info_cancel call instead of reaching right in to cancel the underlying call. * src/ntl-view-private.h: Reformatting. |
||
John Sullivan
|
5f2f9cb986 |
Some cleanups from the file-renaming checkin I did
yesterday. The largest change was making NautilusDirectory send "files-changed" signal instead of "files-removed" signal when a file is removed. That way interested callers need register only for one signal. The callers can use nautilus_file_is_gone () to test whether the file was removed. * libnautilus/nautilus-directory-private.h: (nautilus_directory_files_removed): Removed function. * libnautilus/nautilus-directory.h: (files_removed): Removed signal definition, updated comments. * libnautilus/nautilus-directory.c: Removed FILES_REMOVED signal enum entry; (nautilus_directory_initialize_class): Removed FILES_REMOVED signal creation. (nautilus_directory_files_removed): Removed function. * libnautilus/nautilus-file.c: (get_file_for_parent_directory): New private function. (nautilus_file_can_rename): This function was quite broken in its initial check-in. It worked only on a random basis. Now it works quite a bit better. It should only return FALSE if it's darn well sure that the user can't rename the file; it returns TRUE even if it isn't sure, so clients must handle failed renames (which they would have to anyway). (nautilus_file_delete): Call nautilus_file_changed instead of nautilus_directory_files_removed when file is deleted. * src/file-manager/fm-directory-view.h: (remove_file): Remove signal definition, update comments. * src/file-manager/fm-directory-view.c: remove REMOVE_FILE signal enum entry; remove files_removed_handler_id and pending_files_removed from Details struct; (fm_directory_view_initialize_class): remove REMOVE_FILE signal initialization (display_pending_files): remove "removed" case; made "changed" case handle updating uri table; made "changed" case send signal even if file is gone. (files_removed_cb): Removed function. (fm_directory_view_load_uri): removed connection to "files_removed" signal (disconnect_model_handlers): removed disconnect of files_removed_handler. * src/file-manager/fm-icon-view.c: (fm_icon_view_remove_file): Removed function. (fm_icon_view_initialize_class): Remove remove_file signal handler override. (fm_icon_view_file_changed): check if file is gone and do what fm_icon_view_remove_file used to do if so. * src/file-manager/fm-list-view.c: (fm_list_view_remove_file): Removed function. (fm_list_view_initialize_class): Remove remove_file signal handler override. (fm_list_view_file_changed): check if file is gone and do what fm_list_view_remove_file used to do if so. * src/file-manager/fm-properties-window.c: (properties_window_file_changed_callback): Don't update the window title if you just nuked the window -- Doh! Now the Properties window will vanish silently if the file is deleted. |
||
Darin Adler
|
e4d81832b7 |
Improved the background handling code so more is shared.
There's even more we could do in this direction. * components/music/nautilus-music-view.c: (nautilus_music_view_initialize): Got rid of redundant background color initialization. (nautilus_music_view_realize): Got rid of background color initialization. (nautilus_music_view_update_from_uri): Changed background color handling to use new nautilus_directory_background calls. (nautilus_music_view_background_changed): Not needed any more. * components/notes/ntl-notes.c: Did some cleanup and reformatting. * libnautilus/Makefile.am: * libnautilus/nautilus-directory-background.c: * libnautilus/nautilus-directory-background.h: Created a new file with functions that manage the background for a window connected with a particular directory. Later we might generalize it further to work for windows that are connected to any URI, not just a directory. * libnautilus/nautilus-directory.c: * libnautilus/nautilus-directory.h: Added a new "metdata_changed" signal so that the background can be updated if the underlying data changes. (nautilus_directory_initialize_class): Create the new signal. (nautilus_directory_ref), (nautilus_directory_unref): Made these functions quietly do nothing for NULL. This simplifies life for callers. (nautilus_directory_set_metadata): Emit the "metadata_changed" signal. * libnautilus/nautilus-file.c: (nautilus_file_ref), (nautilus_file_unref): Made these functions quietly do nothing for NULL. This simplifies life for callers. * libnautilus/nautilus-metadata.h: Renamed all the constants to be consistent. Got rid of separate constants for the icon view and list view backgrounds. Changed some of the underlying XML tags as well. * libnautilus/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_for_file): * src/nautilus-index-title.c: (nautilus_index_title_update_info): * src/ntl-index-panel: (nautilus_index_panel_update_info), (receive_dropped_uri_list), (nautilus_index_panel_background_changed): * src/ntl-uri-map.c: (set_initial_content_iid), (add_components_from_metadata): * src/ntl-window-msgs.c: (view_menu_switch_views_cb): * src/file-manager/fm-icon-view.c: (add_icon_if_already_positioned), (fm_icon_view_begin_loading), (fm_icon_view_set_zoom_level), (fm_icon_view_icon_changed_callback): * src/file-manager/fm-list-view.c: (fm_list_view_begin_loading), (fm_list_view_set_zoom_level), (fm_list_view_sort_items): Updated uses of metadata constants to use the new names. * src/ntl-index-panel: (nautilus_index_panel_destroy), (nautilus_index_panel_update_info): * src/ntl-uri-map.c: (add_components_from_metadata): * src/file-manager/fm-directory-view.c: (fm_directory_view_destroy), (fm_directory_view_load_uri): Used new nautilus_directory_unref to simplify code. * src/ntl-uri-map.c: (set_initial_content_iid): * src/ntl-window-msgs.c: (view_menu_switch_views_cb): Added missing nautilus_directory_unref (storage leak). * src/file-manager/fm-icon-view.c: (create_icon_container), (fm_icon_view_background_changed_callback): Removed "changed" signal handler on NautilusBackground since that's now handled by the new nautilus_directory_background calls instead. (fm_icon_view_begin_loading): Used nautilus_directory_background to replace background customization code. * src/file-manager/fm-icon-view.c: (fm_icon_view_get_zoom_level): Fixed a bug where it would try to use view as an FMIconView after the FM_IS_ICON_VIEW check failed. * src/file-manager/fm-list-view.c: (create_list), (fm_list_view_background_changed_callback): Removed "changed" signal handler on NautilusBackground since that's now handled by the new nautilus_directory_background calls instead. (fm_list_view_begin_loading): Used nautilus_directory_background to replace background customization code. |
||
Darin Adler
|
4c8d9b0be9 |
Added convenience functions so people don't have to be constantly reminded
* libnautilus/nautilus-directory.c: * libnautilus/nautilus-directory.h: (nautilus_directory_ref), (nautilus_directory_unref): Added convenience functions so people don't have to be constantly reminded that a NautilusDirectory is a a GtkObject. * libnautilus/nautilus-directory.c: (nautilus_directory_destroy): Fixed a problem where the pending files callback might fire after the NautilusDirectory is gone. * libnautilus/nautilus-directory.c: (nautilus_directory_destroy), (nautilus_directory_monitor_files_ref), (nautilus_directory_monitor_files_unref), (dequeue_pending_idle_callback), (nautilus_directory_new_file): * libnautilus/nautilus-file-private.h: * libnautilus/nautilus-file.c: (nautilus_file_get), (nautilus_file_ref), (nautilus_file_unref), (nautilus_file_free), (nautilus_file_delete): To prepare for changing NautilusFile to a GtkObject, made it use ref counts in a way that is standard. Now the directory keeps a list of the files, but only keeps a ref to the files if it is monitoring them. * src/file-manager/fm-directory-view.c: Tiny formatting tweak. |
||
Darin Adler
|
ee495dba40 |
Tell people about the gnome-xml branch.
* HACKING: Tell people about the gnome-xml branch. * libnautilus/Makefile.am: * libnautilus/gnome-icon-container-grid.c: * libnautilus/gnome-icon-container-grid.h: * libnautilus/gnome-icon-container-private.h: * libnautilus/gnome-icon-container.c: Broke out the grid code from the main container code. This is a first step toward improving the layout code. * libnautilus/nautilus-directory-private.h: * libnautilus/nautilus-directory.c: * libnautilus/nautilus-directory.h: * src/fm-directory-view.c: Got started on making the directory I/O async. There's still a long way to go, this was a baby step. * libnautilus/nautilus-bookmark.c: * libnautilus/nautilus-bookmark.h: * libnautilus/nautilus-self-checks.c: General cleanup. * libnautilus/nautilus-file.h: Rearranged a little bit. * libnautilus/nautilus-file-utilities.c: Put FIXME in where there's code that needs to be changed. |
||
Darin Adler
|
6ba4e1e5e3 |
Broke the file part of nautilus-directory.[ch] into nautilus-file.[ch].
* components/music/nautilus-music-view.c, components/notes/ntl-notes.c, libnautilus/Makefile.am, libnautilus/nautilus-directory-private.h, libnautilus/nautilus-directory.h, libnautilus/nautilus-directory.c, libnautilus/nautilus-file-private.h, libnautilus/nautilus-file.h, libnautilus/nautilus-file.c, libnautilus/nautilus-icon-factory.h, src/ntl-index-panel.c, src/file-manager/fm-directory-view.h: Broke the file part of nautilus-directory.[ch] into nautilus-file.[ch]. * libnautilus/nautilus-string.c (nautilus_strstrip): Added more tests. Changed algorithm on strstrip so it's linear instead of n^2. * libnautilus/gnome-icon-container.c (gnome_icon_container_initialize): Fixed font for "larger" zoom level. Also made it assert if the font can't be loaded. * components/help/hyperbola-nav-index.c (despace): Fixed warning. * libnautilus/gnome-icon-container-dnd.c, libnautilus/nautilus-string.h: Whitespace. * src/file-manager/Makefile.am, src/file-manager/fm-directory-view.c, src/file-manager/fm-properties-window.h, src/file-manager/fm-properties-window.c: Added properties window hook, but no window yet. The menu item still needs to be added to the main menus as well as the context menus. * src/file-manager/fm-directory-view.c, src/file-manager/fm-directory-view-icons.c, src/file-manager/fm-icon-text-window.h, src/file-manager/fm-icon-text-window.c: A little cleanup. Shorter names. |
||
Darin Adler
|
f026b4a2ce |
Reimplemented the delete command to use NautilusFile instead of
going directly to the file system. * libnautilus/gnome-icon-container.h, libnautilus/gnome-icon-container.c (gnome_icon_container_clear_selected_items), (gnome_icon_container_remove): Got rid of the call that removes all the icons in the selection and replaced it with a call that removes a specific icon. * libnautilus/nautilus-directory.h, libnautilus/nautilus-directory.c (nautilus_directory_initialize_class), (nautilus_file_unref), (nautilus_file_detach), (nautilus_file_free), (nautilus_file_delete), (nautilus_file_is_gone): Implemented a call to delete a file and emit the files_removed signal as needed. * src/file-manager/fm-directory-view.h, src/file-manager/fm-directory-view.c (fm_directory_view_delete_selection), (fm_directory_view_begin_adding_entries), (fm_directory_view_add_entry), (fm_directory_view_done_adding_entries), (display_pending_files), (add_or_remove_files), (add_files_cb), (remove_files_cb), (delete_one): Changed the delete implementation to call nautilus_file_delete and got rid of the explicit call to delete_selection. The views now will remove their entries in response to the change in the model. * src/file-manager/fm-directory-view-icons.c (fm_directory_view_icons_remove_entry), (fm_directory_view_icons_delete_selection), src/file-manager/fm-directory-view-list.c (fm_directory_view_list_remove_entry), (fm_directory_view_list_delete_selection): Eliminated the delete_selection function in favor of the remove_entry function. |
||
Darin Adler
|
8a960c5ea6 |
Added nautilus_file_get_keywords, which returns a GList of keywords.
* libnautilus/nautilus-directory.h, libnautilus/nautilus-directory.c (get_file_metadata_node), (nautilus_directory_get_file_metadata), (nautilus_file_get_keywords): Added nautilus_file_get_keywords, which returns a GList of keywords. * libnautilus/nautilus-icon-factory.c (add_size_to_image_name), (get_themed_icon_file_path), (get_icon_file_path), (add_emblem), (nautilus_icon_factory_get_emblem_icons_for_file): Changed icon names to not include the extension and wired some extensions into the icon-reading code. The old code wired the entire file name, so this is a bit more flexible. Added code to return an emblem for each keyword attached to a file as well as the symbolic link emblem. * libnautilus/gnome-icon-container.c (update_icon): Handle NULL pixbufs for emblems. This happens when a keyword is specified that doesn't have a corresponding emblem icon. Add g_list_reverse call to keep emblems in the correct order. * src/file-manager/fm-directory-view-icons.c (fm_directory_view_icons_merge_menus): Took out g_message left over from Bonobo menu merge work. * libnautilus/nautilus-glib-extensions.h, libnautilus/nautilus-glib-extensions.c (nautilus_g_list_free_deep): Added convenience function for getting rid of a GList of things that can be freed with g_free. * icons/Makefile.am, icons/certified.gif, icons/changed.gif, icons/confidential.gif, icons/emblem-certified.gif, icons/emblem-changed.gif, icons/emblem-confidential.gif, icons/emblem-encrypted.gif, icons/emblem-important.gif, icons/emblem-new.gif, icons/emblem-personal.gif, icons/emblem-remote.gif, icons/emblem-symbolic-link.png, icons/encrypted.gif, icons/i-symlink.png, icons/important.gif, icons/new.gif, icons/personal.gif, icons/remote.gif: Changed all emblem icons to have names that start with "emblem-". |
||
Darin Adler
|
4f2240f04d |
Some of the underlying work to prepare for emblems on the icons.
* style-guide.html: Some minor updates to the style guide, including rules about headers. * libnautilus/nautilus-icon-factory.h, libnautilus/nautilus-icon-factory.c: (nautilus_icon_factory_get_emblem_icons_for_file), (nautilus_scalable_icon_get), (nautilus_icon_factor_clear), (nautilus_icon_factory_load_file), (nautilus_gdk_pixbuf_composite_corner), (nautilus_icon_factor_load_icon), (nautilus_scalable_icon_hash), (nautilus_scalable_icon_equal), (nautilus_icon_factory_get_icon_for_file), (load_specific_image): Added interface for getting emblem icons for a file, and got rid of the symbolic-link overlay that was previously built into the icon. * libnautilus/gnome-icon-container.c (update_icon): Get pixbufs for all emblems and pass into the icon object. * libnautilus/nautilus-icons-controller.c (nautius_icons_controller_get_icon_image): src/file-manager/fm-icons-controller.h, src/file-manager/fm-icons-controller.c (fm_icons_controller_get_icon_image): Return a list of emblem images along with the main image. * libnautilus/nautilus-icons-view-icon-item.h, libnautilus/nautilus-icons-view-icon-item.c (nautilus_icons_view_icon_item_set_emblems), (nautilus_icons_view_icon_item_destroy): Keep a list of emblem pixbufs in each icon. We don't draw them quite yet. * libnautilus/gdk-extensions.h, libnautilus/gdk-extensions.c: (nautilus_gdk_pixbuf_list_ref), (nautilus_gdk_pixbuf_list_unref), (nautilus_gdk_pixbuf_list_free): Convenience functions for manipulating lists of GdkPixbuf objects. * libnautilus/nautilus-directory.h, libnautilus/nautilus-directory.c: (nautilus_file_list_ref), (nautilus_file_list_unref), (nautilus_file_list_free): Convenience functions for manipulating lists of NautilusFile objects. Also got rid of NautilusFileList typedef. * libnautilus/nautilus-icon-factory.h, libnautilus/nautilus-icon-factory.h: (nautilus_scalable_icon_list_free): Convenience function for manipulating lists of NautilusScalableIcon objects. * libnautilus/nautilus-glib-extensions.h, libnautilus/nautilus-glib-extensions.c: (nautilus_g_list_equal): Function to compare two GLists to see if they are identical. Particularly useful with lists of reference-counted objects. * src/file-manager/fm-directory-view-icons.c (fm_directory_view_icons_destroy), (add_icon_if_already_positioned), (fm_directory_view_icons_append_selection_context_menu_items), (display_icons_not_already_positioned), (fm_direectory_view_icons_get_selection): src/file-manager/fm-directory-view-list.c (fm_directory_view_list_get_selection): src/file-manager/fm-directory-view.c (display_selection_info), (display_pending_files), (add_files_cb), (open_in_new_window_cb), (fm_directory_view_real_append_selection_context_menu_items): Got rid of use of NautilusFileList typedef, corrected ref. counting of files in the lists by using new calls. * src/nautilus-bookmarklist.c, src/nautilus-bookmarks-menu.c, src/nautilus-index-tabs.c, src/file-manager/fm-directory-view-icons.c, src/file-manager/fm-directory-view.c, src/file-manager/fm-icons-controller.c: A bit of reformatting. |
||
John Sullivan
|
26fc2ec616 |
Improved the status text that appears in the file manager after changing the
selection (now accounts for directories and other files separately). |
||
John Sullivan
|
e9c820b5ce |
More groundwork for displaying more textual info under icons at higher zoom
levels. |