Added commands for Auto vs. Manual layout, but the guts behind
them is not yet implemented. Did some cleanup on the new renaming code. * nautilus-glib-extensions.c: * nautilus-glib-extensions.h: Added nautilus_g_list_exactly_one_item and nautilus_g_list_more_than_one_item. These are more-efficient versions of g_list_length (x) == 1 and g_list_length (x) > 1. * nautilus-icon-canvas-item.c: (draw_or_measure_label_text): Add a line break between the editable text and the additional text. (nautilus_icon_canvas_get_text_bounds), (nautilus_icon_canvas_get_editable_text_bounds), (nautilus_icon_canvas_get_editable_text), (nautilus_icon_canvas_set_renaming): Replaced g_assert with g_return_if_fail calls, and added the complete set of g_return_if_fail. (nautilus_icon_canvas_set_renaming): Don't update the item unless the renaming state has actually changed. * nautilus-icon-canvas-item.h: Fixed formatting. * nautilus-icon-container.c: * nautilus-icon-container.h: Added nautilus_icon_container_set_auto_layout and nautilus_icon_container_is_auto_layout. For now they are placeholders that just modify a boolean. * nautilus-icon-private.h: Added the auto_layout boolean. * nautilus-icon-text-item.c: * nautilus-icon-text-item.h: Just some formatting and other minor cleanup. * nautilus-metadata.h: Added NAUTILUS_METADATA_KEY_ICON_VIEW_AUTO_LAYOUT. * nautilus-location-bar.c (drag_data_received_cb): Use the new nautilus_g_list_more_than_one_item function. * fm-directory-view.c (bonobo_menu_open_cb), (open_cb): Use the new nautilus_g_list_exactly_one_item. * fm-icon-text-window.c (attribute_names_string_is_good), (set_preference_string), (synch_menus_with_preference), (preference_changed_callback), (changed_attributes_option_menu_cb): Got rid of the hard-coded first item "name" which is no longer needed. Also changed to handle bad data in the preferences. * fm-icon-view.c (fm_icon_view_initialize_class): Updated since there's no "name" item needed any more. (fm_icon_view_compute_menu_item_info): Merged MENU_PATH_RENAME with MENU_RENAME_TEXT and simplified the logic. (fm_icon_view_append_selection_context_menu_items): Merged MENU_PATH_RENAME with MENU_RENAME_TEXT. (update_layout_menus), (auto_layout_callback), (manual_layout_callback), (fm_icon_view_merge_menus): Added menu items for auto layout and for manual layout. (fm_icon_view_begin_loading): Load setting for auto layout from metadata. (fm_icon_view_get_icon_text_attribute_names): Changed to get rid of the "name" first item from the list of text attributes. (get_icon_editable_text_callback): Simplified since the editable text is always the icon name. Also got rid of copied and pasted code that's no longer needed for this case. (get_icon_additional_text_callback): Got rid of special case for name, since the name is no longer treated as an attribute.
Showing with 846 additions and 555 deletions