2006-02-27 Alexander Larsson * NEWS: Update for release 2006-02-27 Alexander Larsson * src/file-manager/fm-icon-view.c (fm_icon_view_add_file): Use lazy positioning for volumes only, not all desktop file icons, as this can cause icons to move around, and its mainly required for removable volumes anyway. 2006-02-27 Alexander Larsson * src/nautilus-navigation-window.c: * src/nautilus-spatial-window.c: * src/nautilus-window.[ch]: Don't shortcut the title change when the bookmark name changes. Fixes #331383 Patch from Christian Neumair. 2006-02-26 Zbigniew Chyla Get users' and groups' names via a cache to avoid calling getpwuid/getgrgid too often (i.e. many times during single redraw). * libnautilus-private/Makefile.am: (libnautilus_private_la_SOURCES): Added nautilus-users-groups-cache.[ch] * libnautilus-private/nautilus-users-groups-cache.[ch]: New, implementation of cache for getpwuid/getgrgid results. * libnautilus-private/nautilus-file.c: (get_user_name_from_id): removed (get_real_name): accept "name + gecos" pair instead of "struct passwd". (get_user_and_real_name_from_id): get user name and gecos using nautilus_users_cache_* functions instead of using getpwuid directly. (nautilus_get_user_names): adjusted to changed signature of get_real_name. (nautilus_file_get_group_name): get group name using nautilus_groups_cache_get_name instead of using getgrgid directly. (nautilus_file_get_owner_as_string): get user name using nautilus_users_cache_get_name. 2006-02-26 Zbigniew Chyla Don't add all possible columns to GtkTreeView when initializing FMListView, only the ones we actually show. This way we avoid getting unnecessary data from the model, e.g. quite heavy "owner" and "group" columns with the default settings. * src/file-manager/fm-list-view.c: (apply_visible_columns_foreach, apply_visible_columns, apply_column_order): removed (apply_columns_settings): new function, updates a list of columns in GtkTreeView given both a list of visible columns and their ordering, replacement for apply_visible_columns and apply_column_order. (create_and_set_up_tree_view): when creating details->columns hash table, pass g_object_unref as value_destroy_func; before adding columns to the hash call g_object_ref+gtk_object_sink on them, don't add columns to the view, the appropriate columns will be added when applying the configuration; in order to apply initial columns settings, call apply_columns_settings (instead of apply_visible_columns + apply_column_order). (set_visible_columns_from_metadata_and_preferences, set_column_order_from_metadata_and_preferences): removed (set_columns_settings_from_metadata_and_preferences): new, replacement for set_visible_columns_* and set_column_order_*. (fm_list_view_begin_loading, column_chooser_changed_callback, column_chooser_use_default_callback, fm_list_view_reset_to_defaults, default_visible_columns_changed_callback, default_column_order_changed_callback): use newly added set_columns_settings_from_metadata_and_preferences. 2006-02-26 Zbigniew Chyla Avoid heavy operations inside "motion_notify_event" handler: don't call gtk_tree_model_row_changed (which causes updating the whole view), don't create new mouse cursor, change cursor only when necessary. As a bonus we avoid leaking hand cursor in nautilus and X server. * src/file-manager/fm-list-view.c: (hand_cursor): new global variable for storing hand cursor used in single click mode (motion_notify_callback): don't call gtk_tree_model_row_changed on the model when changing rows, it's very slow and unnecessary - GTK+ automatically invalidates parts of the view occupied by old and new row; don't leak the hand cursor (GdkCursor), change mouse cursor only when necessary (from GDK_HAND2 to default and the other way round) (leave_notify_callback): don't call gtk_tree_model_row_changed on the current row in the model, GTK+ automatically redraws the current row (enter_notify_callback): in case single click mode is used, update details->hover_path and set hand cursor if necessary (create_and_set_up_tree_view): connect to enter_notify_event signal in addition to leave_notify_event. (fm_list_view_click_policy_changed): unref global hand_cursor and set it to NULL when changing to double click mode, create new cursor and assign it to hand_cursor when changing to single click one. (fm_list_view_finalize): free details->hover_path if necessary (fm_list_view_init): explicitly set details->hover_path to NULL 2006-02-27 Alexander Larsson * src/nautilus-window-manage-views.c: Don't close window if old file changed when we're loading a new one (#137027). Based on patch from Christian Neumair. 2006-02-27 Alexander Larsson * libnautilus-private/nautilus-icon-container.c: Correctly handle *_margins as pixel values, not world-coords. Based on patch from Christian Neumair. 2006-02-27 Federico Mena Quintero * libnautilus-private/nautilus-icon-container.c (finish_adding_new_icons): Do not place icons both in the no_position_icons and semi_position_icons lists! (snap_position): The final *x could be negative if (start_x + icon_width / 2) is less than SNAP_SIZE_X, as SNAP_NEAREST_HORIZONTAL() would return DESKTOP_PAD_HORIZONTAL. Then, we would subtract icon_width / 2, getting a negative number. So, we initially test for this and start that the first snap column. The same reasoning applies to *y and the baseline. 2006-02-27 Alexander Larsson * src/nautilus-navigation-window.c: Allow saving a sidebar width of 0 (#331475) Patch from Christian Neumair 2006-02-27 Alexander Larsson * libnautilus-private/nautilus-icon-canvas-item.c (create_label_layout): Allow line-breaks after '-', '_', '.' (although not when a short number follows '.') Patch from Christian Neumair 2006-02-27 Martin Wehner * src/nautilus-places-sidebar.c: (can_accept_file_as_bookmark), (can_accept_items_as_bookmarks), (drag_motion_callback), (bookmarks_drop_uris), (build_selection_list), (drag_data_received_callback): Only allow creation of bookmarks for directories. Fixes #328074. 2006-02-26 Christian Neumair * libnautilus-private/nautilus-directory.c: (nautilus_directory_notify_files_removed): Plug potential leak. 2006-02-26 Martin Wehner * src/file-manager/fm-directory-view.c: (done_loading): Only use the idle reveal mechanism for the list view. 2006-02-26 Martin Wehner * src/file-manager/fm-directory-view.c: (fm_directory_view_destroy), (reveal_selection_idle_callback), (done_loading): Call reveal_selection in an idle callback to work around a bug in GtkTreeView which produces buggy scroll states when the nodes have not yet been allocated. It would make the selection always the top row even when it should ignore alignment, among other oddities. 2006-02-26 Christian Neumair * src/nautilus-application.c: (nautilus_application_get_n_windows): * src/nautilus-application.h: * src/nautilus-window-manage-views.c: (got_file_info_for_view_selection_callback): Also consider desktop windows when deciding whether to fallback to home or not. Fixes #331605. 2006-02-25 Chao-Hsiung Liao * configure.in: Add "zh_HK" to ALL_LINGUAS. 2006-02-24 Alexander Larsson * libnautilus-private/nautilus-directory-async.c: (directory_count_start): Use new GNOME_VFS_FILE_INFO_NAME_ONLY flag when counting files. This avoids lots of stats. * configure.in: Require vfs 2.13.92 (cvs for now) for the above. 2006-02-23 Martin Wehner * src/nautilus-places-sidebar.c: (bookmarks_drop_uris): Don't leak bookmark. 2006-02-23 Martin Wehner * src/nautilus-places-sidebar.c: (bookmarks_drop_uris): Resolve the dropped uris to their drop target, use the same naming logic as the bookmark menu and use gnome-fs-directory icon when adding. If something more fitting is available it will be updated anyway. Fixes #332235. 2006-02-23 Martin Wehner * src/nautilus-places-sidebar.c: (bookmarks_edited): Set the has_custom_name_flag before setting the name - which would otherwise immediately commit the bookmarks to disk without the name. Fixes #327744. 2006-02-23 Martin Wehner * src/nautilus-places-sidebar.c: (bookmarks_popup_menu): (bookmarks_button_press_event_cb): Open the popup menu non-modal and pass the button event on to the tree view. Makes a right click select the item under the cursor before bringing up the menu. Fixes #329778. 2006-02-21 Martin Wehner * libnautilus-private/nautilus-file.c: (nautilus_file_get_size_as_string_with_real_size): Add a cast to fix build for platforms where GnomeVFSFileSize is not defined as long long (e.g. AMD64). Fixes bug #331636. 2006-02-21 Alexander Larsson * src/file-manager/fm-error-reporting.[ch]: Add callback to fm_rename_file. * src/file-manager/fm-icon-view.c: Pass NULL as above callback * src/file-manager/fm-list-view.c: Don't activate file when renaming, delay until rename done. After rename, scroll to renamed file if not visibile, because it may have moved. Above based on initial patch by Nelson Benítez * src/file-manager/fm-list-model.c: On file change, if file was re-sorted emit rows_reordered. This fixes bug #326581 2006-02-19 Martin Wehner * libnautilus-private/nautilus-mime-actions.c: (file_compare_by_mime_type), (file_compare_by_guessed_mime_type), (file_compare_by_uri_scheme), (nautilus_mime_get_default_application_for_files), (nautilus_mime_get_open_with_applications_for_files), (nautilus_mime_get_applications_for_files), (nautilus_mime_has_any_applications_for_files): Avoid redundant application lookups by sorting the files by mime type and skipping the ones which have the same mime type / parent uri combination as the previous one. Prevents nautilus from blocking for seconds when selecting many files of similar type. 2006-02-17 Martin Wehner * libnautilus-private/nautilus-file-operations.c: (get_link_name): Fall back to locale encoding or force utf8 if the utf8 conversion of the link target filename fails. (#331379) 2006-02-15 Alexander Larsson * src/file-manager/fm-properties-window.c (append_extension_pages): Pass the original files, not the target files to property page providers. (#329426) (create_permissions_page): Make sure we can get permissions from target before showing permissions page. 2006-02-13 Alexander Larsson * configure.in: Post release version bump. === nautilus 2.13.91 ===