nautilus/libnautilus-private/nautilus-global-preferences.h

146 lines
5.8 KiB
C
Raw Normal View History

/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-global-prefs.h - Nautilus main preferences api.
Copyright (C) 1999, 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: Ramiro Estrugo <ramiro@eazel.com>
*/
#ifndef NAUTILUS_PREFS_GLOBAL_H
#define NAUTILUS_PREFS_GLOBAL_H
Move the nautilus-widgets classes to libnautilus-extensions. * Makefile.am: * components/hardware/Makefile.am: * components/help/Makefile.am: * components/history/Makefile.am: * components/html/Makefile.am: * components/loser/content/Makefile.am: * components/loser/sidebar/Makefile.am: * components/music/Makefile.am: * components/notes/Makefile.am: * components/rpmview/Makefile.am: * components/sample/Makefile.am: * components/services/startup/nautilus-view/Makefile.am: * components/services/time/nautilus-view/Makefile.am: * components/services/trilobite/sample/nautilus-view/Makefile.am: * components/websearch/Makefile.am: * configure.in: * helper-utilities/authenticate/Makefile.am: * helper-utilities/authenticate/nautilus-authenticate.c: * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-caption-table.c: * libnautilus-extensions/nautilus-caption.c: * libnautilus-extensions/nautilus-file-utilities.c: * libnautilus-extensions/nautilus-global-preferences.c: * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-lib-self-check-functions.h: * libnautilus-extensions/nautilus-link-set.c: * libnautilus-extensions/nautilus-link.c: * libnautilus-extensions/nautilus-password-dialog.c: * libnautilus-extensions/nautilus-preference.c: (nautilus_self_check_preference): * libnautilus-extensions/nautilus-preferences-box.c: * libnautilus-extensions/nautilus-preferences-box.h: * libnautilus-extensions/nautilus-preferences-dialog.c: * libnautilus-extensions/nautilus-preferences-dialog.h: * libnautilus-extensions/nautilus-preferences-group.c: * libnautilus-extensions/nautilus-preferences-group.h: * libnautilus-extensions/nautilus-preferences-item.c: * libnautilus-extensions/nautilus-preferences-item.h: * libnautilus-extensions/nautilus-preferences-pane.c: * libnautilus-extensions/nautilus-preferences-pane.h: * libnautilus-extensions/nautilus-preferences.c: * libnautilus-extensions/nautilus-preferences.h: * libnautilus-extensions/nautilus-radio-button-group.c: * libnautilus-extensions/nautilus-string-picker.c: * libnautilus-extensions/nautilus-string-picker.h: * libnautilus-extensions/nautilus-text-caption.c: * libnautilus-extensions/nautilus-text-caption.h: * libnautilus-extensions/nautilus-undo-manager.c: * libnautilus-extensions/nautilus-user-level-manager.c: * libnautilus-extensions/nautilus-user-level-manager.h: * libnautilus-extensions/nautilus-widgets-self-check-functions.c: * libnautilus-extensions/nautilus-widgets-self-check-functions.h: * libnautilus-extensions/test-nautilus-preferences.c: * libnautilus-extensions/test-preferences.c: * nautilus-widgets/Makefile.am: * nautilus-widgets/nautilus-caption-table.c: * nautilus-widgets/nautilus-caption-table.h: * nautilus-widgets/nautilus-caption.c: * nautilus-widgets/nautilus-caption.h: * nautilus-widgets/nautilus-password-dialog.c: * nautilus-widgets/nautilus-password-dialog.h: * nautilus-widgets/nautilus-preference.c: * nautilus-widgets/nautilus-preference.h: * nautilus-widgets/nautilus-preferences-box.c: * nautilus-widgets/nautilus-preferences-box.h: * nautilus-widgets/nautilus-preferences-dialog.c: * nautilus-widgets/nautilus-preferences-dialog.h: * nautilus-widgets/nautilus-preferences-group.c: * nautilus-widgets/nautilus-preferences-group.h: * nautilus-widgets/nautilus-preferences-item.c: * nautilus-widgets/nautilus-preferences-item.h: * nautilus-widgets/nautilus-preferences-pane.c: * nautilus-widgets/nautilus-preferences-pane.h: * nautilus-widgets/nautilus-preferences.c: * nautilus-widgets/nautilus-preferences.h: * nautilus-widgets/nautilus-radio-button-group.c: * nautilus-widgets/nautilus-radio-button-group.h: * nautilus-widgets/nautilus-string-picker.c: * nautilus-widgets/nautilus-string-picker.h: * nautilus-widgets/nautilus-text-caption.c: * nautilus-widgets/nautilus-text-caption.h: * nautilus-widgets/nautilus-user-level-manager.c: * nautilus-widgets/nautilus-user-level-manager.h: * nautilus-widgets/nautilus-widgets-self-check-functions.c: * nautilus-widgets/nautilus-widgets-self-check-functions.h: * nautilus-widgets/test-nautilus-preferences.c: * nautilus-widgets/test-nautilus-widgets.c: * nautilus-widgets/test-preferences.c: * src/Makefile.am: * src/nautilus-main.c: (main): * src/nautilus-sidebar.c: * src/nautilus-window-menus.c: * test/Makefile.am: Move the nautilus-widgets classes to libnautilus-extensions.
2000-06-10 00:38:01 +00:00
#include <libnautilus-extensions/nautilus-preferences.h>
BEGIN_GNOME_DECLS
/* Which theme is active */
reviewed by: Pavel Cisler <pavel@eazel.com> Lots of bug fixes: 2848 - User level agnostic config settings have nowhere to live. 2654 - Need default values even for non user level preferences. 3414 - Show more preferences at higher user levels. 3415 - Make preference the same for all levels at which it is not visible 3416 - Make preference changes affect all levels at which they are visible 4357 - Web search URL setting should be reset upon Nautilus update 5160 - Tree view doesnt exist when starting nautilus as a beginner 5234 - Sidebar panel preferences are not properly separated among user levels * components/mozilla/mozilla-preferences.cpp: Update for gnome vfs proxy changes. Proxy host and port are now stored in separate gconf settings. * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-enumeration.h: * libnautilus-extensions/nautilus-enumeration.c: (nautilus_enumeration_new), (nautilus_enumeration_free), (nautilus_enumeration_insert), (nautilus_enumeration_get_nth_entry), (nautilus_enumeration_get_nth_description), (nautilus_enumeration_get_nth_value), (nautilus_enumeration_get_num_entries), (nautilus_self_check_enumeration): New files. An enumeration data structure. * components/tree/nautilus-tree-expansion-state.c: No longer need to give the full path to a gconf setting. * components/tree/nautilus-tree-view.c: (filtering_changed_callback), (nautilus_tree_view_initialize): * libnautilus-extensions/nautilus-directory-async.c: (can_use_public_metafile), (get_filter_options_for_directory_count): * libnautilus-extensions/nautilus-file-operations.c: (confirm_empty_trash): * libnautilus-extensions/nautilus-file.c: (nautilus_file_should_get_top_left_text): * libnautilus-extensions/nautilus-font-factory.c: (nautilus_font_factory_get_font_from_preferences): Update for preferences api changes. * libnautilus-extensions/nautilus-gconf-extensions.h: * libnautilus-extensions/nautilus-gconf-extensions.c: (global_client_free), (nautilus_gconf_client_get_global), (nautilus_gconf_handle_error), (nautilus_gconf_set_boolean), (nautilus_gconf_get_boolean), (nautilus_gconf_set_int), (nautilus_gconf_get_int), (nautilus_gconf_set_string), (nautilus_gconf_get_string), (nautilus_gconf_set_string_list), (nautilus_gconf_get_string_list), (nautilus_gconf_is_default), (nautilus_gconf_monitor_directory): New files. Useful gconf extensions; make peeking and poking settings a little easier. * libnautilus-extensions/nautilus-icon-container.c: (button_press_event): * libnautilus-extensions/nautilus-icon-canvas-item.c: (in_single_click_mode): Update for preferences api changes. * libnautilus-extensions/nautilus-icon-factory.c: (icon_theme_changed_callback), (should_display_image_file_as_itself): Update for preferences api changes. Also no longer need to define a default theme. * libnautilus-extensions/nautilus-lib-self-check-functions.h: Add entries for enumeration and preferences. Remove preference entry. Note plural vs not. * libnautilus-extensions/nautilus-preference.c: * libnautilus-extensions/nautilus-preference.h: Retire these 2. No longer use a GtkObject to store each preference. We simply use the string name instead. * libnautilus-extensions/nautilus-preferences-box.h: * libnautilus-extensions/nautilus-preferences-box.c: (nautilus_preferences_box_add_pane), (nautilus_preferences_box_update): New function. Should be called when user level changes so that the box updates its panes. * libnautilus-extensions/nautilus-preferences-dialog.h: * libnautilus-extensions/nautilus-preferences-dialog.c: (nautilus_preferences_dialog_initialize), (nautilus_preferences_dialog_destroy), (nautilus_preferences_dialog_get_prefs_box), (nautilus_preferences_dialog_update), (user_level_changed_callback): Keep track of user level changes. New function to update the dialog when user level changes. * libnautilus-extensions/nautilus-preferences-group.h: * libnautilus-extensions/nautilus-preferences-group.c: (nautilus_preferences_group_initialize), (nautilus_preferences_group_destroy), (nautilus_preferences_group_add_item): Collect the group's items in a list. Update to user a string to represent a preference instead of a GtkObject. (nautilus_preferences_group_update): New function. Updates the group's items to respect preferences visibility based on the user level. (nautilus_preferences_get_num_visible_items): New function. Return the number of currently visible items. Collect the group's items in a list. Update to user a string to represent a preference instead of a GtkObject. * libnautilus-extensions/nautilus-preferences-item.h: * libnautilus-extensions/nautilus-preferences-item.c: (preferences_item_construct), (preferences_item_create_enum), (preferences_item_create_short_enum), (preferences_item_create_boolean), (preferences_item_create_editable_string), (preferences_item_create_integer), (preferences_item_create_font_family), (preferences_item_create_theme), (enum_radio_group_changed_callback), (editable_string_changed_callback), (integer_changed_callback), (nautilus_preferences_item_get_name): New function to fetch the item's preference name. Add a new kind of preference - INTEGER. Update for string vs. GtkObject preferences representation changes. * libnautilus-extensions/nautilus-preferences-pane.h: * libnautilus-extensions/nautilus-preferences-pane.c: (nautilus_preferences_pane_update): New function. Updates the pane's groups to respect preferences visibility based on the user level. * libnautilus-extensions/nautilus-preferences.h: * libnautilus-extensions/nautilus-preferences.c: (preferences_get_path), (preferences_get_defaults_path), (preferences_get_visibility_path), (preferences_get_user_level_key), (preferences_preference_is_internal), (preferences_preference_is_user_level), (preferences_key_make), (preferences_key_make_for_default), (preferences_key_make_for_default_getter), (preferences_key_make_for_visibility), (preferences_global_client_remove_notification), (preferences_global_client_get), (preferences_preference_is_default), (preferences_make_user_level_filtered_key), (nautilus_preferences_get_visible_user_level), (nautilus_preferences_set_visible_user_level), (nautilus_preferences_set_boolean), (preferences_key_make_for_getter), (nautilus_preferences_get_boolean), (nautilus_preferences_set_int), (nautilus_preferences_get_int), (nautilus_preferences_set), (nautilus_preferences_get), (nautilus_preferences_set_string_list), (nautilus_preferences_get_string_list), (nautilus_preferences_get_user_level), (nautilus_preferences_set_user_level), (nautilus_preferences_default_set_int), (nautilus_preferences_default_get_int), (nautilus_preferences_default_set_boolean), (nautilus_preferences_default_get_boolean), (nautilus_preferences_default_set_string), (nautilus_preferences_default_get_string), (nautilus_preferences_default_set_string_list), (nautilus_preferences_default_get_string_list), (preferences_callback_entry_invoke_function), (preferences_something_changed_notice), (preferences_global_table_check_changes_function), (preferences_user_level_changed_notice), (preferences_entry_add_callback), (preferences_entry_remove_callback), (preferences_callback_entry_free), (preferences_callback_entry_free_func), (preferences_entry_free), (preferences_entry_free_func), (preferences_global_table_free), (preferences_global_table_get_global), (preferences_global_table_lookup), (preferences_global_table_insert), (preferences_global_table_lookup_or_insert), (nautilus_preferences_add_callback), (preferences_while_alive_disconnector), (nautilus_preferences_add_callback_while_alive), (nautilus_preferences_remove_callback), (nautilus_preferences_enumeration_insert), (nautilus_preferences_enumeration_get_nth_entry), (nautilus_preferences_enumeration_get_nth_description), (nautilus_preferences_enumeration_get_nth_value), (nautilus_preferences_enumeration_get_num_entries), (nautilus_preferences_set_description), (nautilus_preferences_get_description), (nautilus_preferences_get_user_level_name_for_display), (nautilus_preferences_get_user_level_name_for_storage), (preferences_user_level_check_range), (nautilus_preferences_monitor_directory), (nautilus_preferences_is_visible), (nautilus_self_check_preferences): Many changes. Redid to support the preferences system described in bugs 3414, 3415 and 3416. * libnautilus-extensions/nautilus-smooth-widget.c: (preferences_get_is_smooth): * libnautilus-extensions/nautilus-sound.c: (kill_sound_if_necessary), (nautilus_sound_initialize), (nautilus_sound_kill_sound), (nautilus_sound_register_sound), (nautilus_sound_can_play_sound): * libnautilus-extensions/nautilus-theme.c: (nautilus_theme_get_theme), (nautilus_theme_get_theme_data), (nautilus_theme_get_image_path): Update for preferences api changes. * libnautilus-extensions/nautilus-user-level-manager.c: * libnautilus-extensions/nautilus-user-level-manager.h: Retire. No longer needed. User level things are handled in nautilus-preferences.[ch] now. The current user level design is much simpler and does no require its own GtkObject. * src/file-manager/fm-desktop-icon-view.c: (update_home_link_and_delete_copies), (real_update_menus): * src/file-manager/fm-directory-view.c: (open_location), (confirm_delete_from_trash), (real_update_menus), (fm_directory_view_activate_files), (filtering_changed_callback): * src/file-manager/fm-icon-text-window.c: (changed_attributes_option_menu_callback), (fm_get_text_attribute_names_preference_or_default): * src/file-manager/fm-icon-view.c: (should_preview_sound), (fm_icon_view_update_click_mode), (fm_icon_view_update_smooth_graphics_mode): * src/file-manager/fm-list-view.c: (fm_list_view_update_click_mode): * src/file-manager/fm-properties-window.c: (create_permissions_page): * src/nautilus-application.c: (desktop_changed_callback): * src/nautilus-complex-search-bar.c: (nautilus_complex_search_bar_get_location): * src/nautilus-first-time-druid.c: (user_level_selection_changed), (make_hbox_user_level_radio_button), (set_up_user_level_page): * src/nautilus-main.c: (main): * src/nautilus-property-browser.c: (nautilus_property_browser_update_contents): * src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled), (toggle_sidebar_panel), (nautilus_sidebar_size_allocate): * src/nautilus-switchable-search-bar.c: (nautilus_switchable_search_bar_new), (nautilus_search_uri_to_search_bar_mode): Update for preferences api changes. * src/nautilus-window-manage-views.c: (position_and_show_window_callback), (nautilus_window_end_location_change_callback): Update for preferences api changes. Also, no longer need to pass in a default location to the preferences getter. * src/nautilus-window-menus.c: (user_level_customize_callback), (switch_to_user_level), (refresh_bookmarks_menu), (user_level_changed_callback), (add_user_level_menu_item), (nautilus_window_initialize_menus), (update_user_level_menu_items), (convert_user_level_to_path): A lot of simplification. The "Edit Settings..." menu item no longer changes it wording based on the user level. We know allow it to edit settings on all user levels, since we have the ability to hide preferences at higher user levels. No longer need to update the preferences dialog or its title. * src/nautilus-window.c: (nautilus_window_constructed), (nautilus_window_close), (nautilus_window_go_web_search), (nautilus_window_go_home), (nautilus_window_show): Update for preferences api changes. * libnautilus-extensions/nautilus-global-preferences.h: Update all the preferences defines to not include a full gconf path. We dont need to do this anymore to get non user level coupled prefernces. * libnautilus-extensions/nautilus-global-preferences.c: (compare_view_identifiers), (global_preferences_create_dialog), (nautilus_global_preferences_get_enabled_sidebar_panel_view_identif iers), (global_preferences_install_sidebar_panel_defaults), (global_preferences_is_sidebar_panel_enabled), (global_preferences_install_speed_tradeoff_descriptions), (register_proxy_preferences), (global_preferences_register), (global_preferences_install_defaults), (nautilus_global_preferences_set_dialog_title): Lots of changes to support new preferences design. Set the WM_CLASS here once instead of everytime the dialog title is changed. This was causing criticals. No longer need to create parallel proxy preferences and map them to the gconf ones. We can use the gconf ones directly now. * test/.cvsignore: * test/Makefile.am: * test/test-nautilus-preferences-change.c: (user_level_changed_callback), (fruits_changed_callback), (int_picker_changed_callback), (user_level_picker_changed_callback), (picker_new), (user_level_picker_new), (main): * test/test-nautilus-preferences-display.c: (text_caption_update), (user_level_caption_update), (user_level_changed_callback), (green_changed_callback), (yellow_changed_callback), (red_changed_callback), (apple_changed_callback), (orange_changed_callback), (pear_changed_callback), (entry_new), (user_level_frame_new), (colors_frame_new), (fruits_frame_new), (main): * test/test.c: (test_pixbuf_draw_rectangle_tiled), (test_text_caption_set_text_for_int_preferences), (test_text_caption_set_text_for_string_preferences), (test_text_caption_set_text_for_default_int_preferences), (test_text_caption_set_text_for_default_string_preferences), (test_text_caption_get_text_as_int), (test_window_set_title_with_pid): * test/test.h: New tests for preferences changes. * test/test-nautilus-preferences.c: Retire old prefs test which didnt really work. * test/test-nautilus-smooth-graphics.c: (smooth_graphics_mode_changed_callback), (main): Update for preferences api changes.
2001-01-18 08:52:40 +00:00
#define NAUTILUS_PREFERENCES_THEME "preferences/theme"
/* Which text attributes appear beneath icon names */
reviewed by: Pavel Cisler <pavel@eazel.com> Lots of bug fixes: 2848 - User level agnostic config settings have nowhere to live. 2654 - Need default values even for non user level preferences. 3414 - Show more preferences at higher user levels. 3415 - Make preference the same for all levels at which it is not visible 3416 - Make preference changes affect all levels at which they are visible 4357 - Web search URL setting should be reset upon Nautilus update 5160 - Tree view doesnt exist when starting nautilus as a beginner 5234 - Sidebar panel preferences are not properly separated among user levels * components/mozilla/mozilla-preferences.cpp: Update for gnome vfs proxy changes. Proxy host and port are now stored in separate gconf settings. * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-enumeration.h: * libnautilus-extensions/nautilus-enumeration.c: (nautilus_enumeration_new), (nautilus_enumeration_free), (nautilus_enumeration_insert), (nautilus_enumeration_get_nth_entry), (nautilus_enumeration_get_nth_description), (nautilus_enumeration_get_nth_value), (nautilus_enumeration_get_num_entries), (nautilus_self_check_enumeration): New files. An enumeration data structure. * components/tree/nautilus-tree-expansion-state.c: No longer need to give the full path to a gconf setting. * components/tree/nautilus-tree-view.c: (filtering_changed_callback), (nautilus_tree_view_initialize): * libnautilus-extensions/nautilus-directory-async.c: (can_use_public_metafile), (get_filter_options_for_directory_count): * libnautilus-extensions/nautilus-file-operations.c: (confirm_empty_trash): * libnautilus-extensions/nautilus-file.c: (nautilus_file_should_get_top_left_text): * libnautilus-extensions/nautilus-font-factory.c: (nautilus_font_factory_get_font_from_preferences): Update for preferences api changes. * libnautilus-extensions/nautilus-gconf-extensions.h: * libnautilus-extensions/nautilus-gconf-extensions.c: (global_client_free), (nautilus_gconf_client_get_global), (nautilus_gconf_handle_error), (nautilus_gconf_set_boolean), (nautilus_gconf_get_boolean), (nautilus_gconf_set_int), (nautilus_gconf_get_int), (nautilus_gconf_set_string), (nautilus_gconf_get_string), (nautilus_gconf_set_string_list), (nautilus_gconf_get_string_list), (nautilus_gconf_is_default), (nautilus_gconf_monitor_directory): New files. Useful gconf extensions; make peeking and poking settings a little easier. * libnautilus-extensions/nautilus-icon-container.c: (button_press_event): * libnautilus-extensions/nautilus-icon-canvas-item.c: (in_single_click_mode): Update for preferences api changes. * libnautilus-extensions/nautilus-icon-factory.c: (icon_theme_changed_callback), (should_display_image_file_as_itself): Update for preferences api changes. Also no longer need to define a default theme. * libnautilus-extensions/nautilus-lib-self-check-functions.h: Add entries for enumeration and preferences. Remove preference entry. Note plural vs not. * libnautilus-extensions/nautilus-preference.c: * libnautilus-extensions/nautilus-preference.h: Retire these 2. No longer use a GtkObject to store each preference. We simply use the string name instead. * libnautilus-extensions/nautilus-preferences-box.h: * libnautilus-extensions/nautilus-preferences-box.c: (nautilus_preferences_box_add_pane), (nautilus_preferences_box_update): New function. Should be called when user level changes so that the box updates its panes. * libnautilus-extensions/nautilus-preferences-dialog.h: * libnautilus-extensions/nautilus-preferences-dialog.c: (nautilus_preferences_dialog_initialize), (nautilus_preferences_dialog_destroy), (nautilus_preferences_dialog_get_prefs_box), (nautilus_preferences_dialog_update), (user_level_changed_callback): Keep track of user level changes. New function to update the dialog when user level changes. * libnautilus-extensions/nautilus-preferences-group.h: * libnautilus-extensions/nautilus-preferences-group.c: (nautilus_preferences_group_initialize), (nautilus_preferences_group_destroy), (nautilus_preferences_group_add_item): Collect the group's items in a list. Update to user a string to represent a preference instead of a GtkObject. (nautilus_preferences_group_update): New function. Updates the group's items to respect preferences visibility based on the user level. (nautilus_preferences_get_num_visible_items): New function. Return the number of currently visible items. Collect the group's items in a list. Update to user a string to represent a preference instead of a GtkObject. * libnautilus-extensions/nautilus-preferences-item.h: * libnautilus-extensions/nautilus-preferences-item.c: (preferences_item_construct), (preferences_item_create_enum), (preferences_item_create_short_enum), (preferences_item_create_boolean), (preferences_item_create_editable_string), (preferences_item_create_integer), (preferences_item_create_font_family), (preferences_item_create_theme), (enum_radio_group_changed_callback), (editable_string_changed_callback), (integer_changed_callback), (nautilus_preferences_item_get_name): New function to fetch the item's preference name. Add a new kind of preference - INTEGER. Update for string vs. GtkObject preferences representation changes. * libnautilus-extensions/nautilus-preferences-pane.h: * libnautilus-extensions/nautilus-preferences-pane.c: (nautilus_preferences_pane_update): New function. Updates the pane's groups to respect preferences visibility based on the user level. * libnautilus-extensions/nautilus-preferences.h: * libnautilus-extensions/nautilus-preferences.c: (preferences_get_path), (preferences_get_defaults_path), (preferences_get_visibility_path), (preferences_get_user_level_key), (preferences_preference_is_internal), (preferences_preference_is_user_level), (preferences_key_make), (preferences_key_make_for_default), (preferences_key_make_for_default_getter), (preferences_key_make_for_visibility), (preferences_global_client_remove_notification), (preferences_global_client_get), (preferences_preference_is_default), (preferences_make_user_level_filtered_key), (nautilus_preferences_get_visible_user_level), (nautilus_preferences_set_visible_user_level), (nautilus_preferences_set_boolean), (preferences_key_make_for_getter), (nautilus_preferences_get_boolean), (nautilus_preferences_set_int), (nautilus_preferences_get_int), (nautilus_preferences_set), (nautilus_preferences_get), (nautilus_preferences_set_string_list), (nautilus_preferences_get_string_list), (nautilus_preferences_get_user_level), (nautilus_preferences_set_user_level), (nautilus_preferences_default_set_int), (nautilus_preferences_default_get_int), (nautilus_preferences_default_set_boolean), (nautilus_preferences_default_get_boolean), (nautilus_preferences_default_set_string), (nautilus_preferences_default_get_string), (nautilus_preferences_default_set_string_list), (nautilus_preferences_default_get_string_list), (preferences_callback_entry_invoke_function), (preferences_something_changed_notice), (preferences_global_table_check_changes_function), (preferences_user_level_changed_notice), (preferences_entry_add_callback), (preferences_entry_remove_callback), (preferences_callback_entry_free), (preferences_callback_entry_free_func), (preferences_entry_free), (preferences_entry_free_func), (preferences_global_table_free), (preferences_global_table_get_global), (preferences_global_table_lookup), (preferences_global_table_insert), (preferences_global_table_lookup_or_insert), (nautilus_preferences_add_callback), (preferences_while_alive_disconnector), (nautilus_preferences_add_callback_while_alive), (nautilus_preferences_remove_callback), (nautilus_preferences_enumeration_insert), (nautilus_preferences_enumeration_get_nth_entry), (nautilus_preferences_enumeration_get_nth_description), (nautilus_preferences_enumeration_get_nth_value), (nautilus_preferences_enumeration_get_num_entries), (nautilus_preferences_set_description), (nautilus_preferences_get_description), (nautilus_preferences_get_user_level_name_for_display), (nautilus_preferences_get_user_level_name_for_storage), (preferences_user_level_check_range), (nautilus_preferences_monitor_directory), (nautilus_preferences_is_visible), (nautilus_self_check_preferences): Many changes. Redid to support the preferences system described in bugs 3414, 3415 and 3416. * libnautilus-extensions/nautilus-smooth-widget.c: (preferences_get_is_smooth): * libnautilus-extensions/nautilus-sound.c: (kill_sound_if_necessary), (nautilus_sound_initialize), (nautilus_sound_kill_sound), (nautilus_sound_register_sound), (nautilus_sound_can_play_sound): * libnautilus-extensions/nautilus-theme.c: (nautilus_theme_get_theme), (nautilus_theme_get_theme_data), (nautilus_theme_get_image_path): Update for preferences api changes. * libnautilus-extensions/nautilus-user-level-manager.c: * libnautilus-extensions/nautilus-user-level-manager.h: Retire. No longer needed. User level things are handled in nautilus-preferences.[ch] now. The current user level design is much simpler and does no require its own GtkObject. * src/file-manager/fm-desktop-icon-view.c: (update_home_link_and_delete_copies), (real_update_menus): * src/file-manager/fm-directory-view.c: (open_location), (confirm_delete_from_trash), (real_update_menus), (fm_directory_view_activate_files), (filtering_changed_callback): * src/file-manager/fm-icon-text-window.c: (changed_attributes_option_menu_callback), (fm_get_text_attribute_names_preference_or_default): * src/file-manager/fm-icon-view.c: (should_preview_sound), (fm_icon_view_update_click_mode), (fm_icon_view_update_smooth_graphics_mode): * src/file-manager/fm-list-view.c: (fm_list_view_update_click_mode): * src/file-manager/fm-properties-window.c: (create_permissions_page): * src/nautilus-application.c: (desktop_changed_callback): * src/nautilus-complex-search-bar.c: (nautilus_complex_search_bar_get_location): * src/nautilus-first-time-druid.c: (user_level_selection_changed), (make_hbox_user_level_radio_button), (set_up_user_level_page): * src/nautilus-main.c: (main): * src/nautilus-property-browser.c: (nautilus_property_browser_update_contents): * src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled), (toggle_sidebar_panel), (nautilus_sidebar_size_allocate): * src/nautilus-switchable-search-bar.c: (nautilus_switchable_search_bar_new), (nautilus_search_uri_to_search_bar_mode): Update for preferences api changes. * src/nautilus-window-manage-views.c: (position_and_show_window_callback), (nautilus_window_end_location_change_callback): Update for preferences api changes. Also, no longer need to pass in a default location to the preferences getter. * src/nautilus-window-menus.c: (user_level_customize_callback), (switch_to_user_level), (refresh_bookmarks_menu), (user_level_changed_callback), (add_user_level_menu_item), (nautilus_window_initialize_menus), (update_user_level_menu_items), (convert_user_level_to_path): A lot of simplification. The "Edit Settings..." menu item no longer changes it wording based on the user level. We know allow it to edit settings on all user levels, since we have the ability to hide preferences at higher user levels. No longer need to update the preferences dialog or its title. * src/nautilus-window.c: (nautilus_window_constructed), (nautilus_window_close), (nautilus_window_go_web_search), (nautilus_window_go_home), (nautilus_window_show): Update for preferences api changes. * libnautilus-extensions/nautilus-global-preferences.h: Update all the preferences defines to not include a full gconf path. We dont need to do this anymore to get non user level coupled prefernces. * libnautilus-extensions/nautilus-global-preferences.c: (compare_view_identifiers), (global_preferences_create_dialog), (nautilus_global_preferences_get_enabled_sidebar_panel_view_identif iers), (global_preferences_install_sidebar_panel_defaults), (global_preferences_is_sidebar_panel_enabled), (global_preferences_install_speed_tradeoff_descriptions), (register_proxy_preferences), (global_preferences_register), (global_preferences_install_defaults), (nautilus_global_preferences_set_dialog_title): Lots of changes to support new preferences design. Set the WM_CLASS here once instead of everytime the dialog title is changed. This was causing criticals. No longer need to create parallel proxy preferences and map them to the gconf ones. We can use the gconf ones directly now. * test/.cvsignore: * test/Makefile.am: * test/test-nautilus-preferences-change.c: (user_level_changed_callback), (fruits_changed_callback), (int_picker_changed_callback), (user_level_picker_changed_callback), (picker_new), (user_level_picker_new), (main): * test/test-nautilus-preferences-display.c: (text_caption_update), (user_level_caption_update), (user_level_changed_callback), (green_changed_callback), (yellow_changed_callback), (red_changed_callback), (apple_changed_callback), (orange_changed_callback), (pear_changed_callback), (entry_new), (user_level_frame_new), (colors_frame_new), (fruits_frame_new), (main): * test/test.c: (test_pixbuf_draw_rectangle_tiled), (test_text_caption_set_text_for_int_preferences), (test_text_caption_set_text_for_string_preferences), (test_text_caption_set_text_for_default_int_preferences), (test_text_caption_set_text_for_default_string_preferences), (test_text_caption_get_text_as_int), (test_window_set_title_with_pid): * test/test.h: New tests for preferences changes. * test/test-nautilus-preferences.c: Retire old prefs test which didnt really work. * test/test-nautilus-smooth-graphics.c: (smooth_graphics_mode_changed_callback), (main): Update for preferences api changes.
2001-01-18 08:52:40 +00:00
#define NAUTILUS_PREFERENCES_ICON_CAPTIONS "icon_view/captions"
/* How wide the sidebar is (or how wide it will be when expanded) */
reviewed by: Pavel Cisler <pavel@eazel.com> Lots of bug fixes: 2848 - User level agnostic config settings have nowhere to live. 2654 - Need default values even for non user level preferences. 3414 - Show more preferences at higher user levels. 3415 - Make preference the same for all levels at which it is not visible 3416 - Make preference changes affect all levels at which they are visible 4357 - Web search URL setting should be reset upon Nautilus update 5160 - Tree view doesnt exist when starting nautilus as a beginner 5234 - Sidebar panel preferences are not properly separated among user levels * components/mozilla/mozilla-preferences.cpp: Update for gnome vfs proxy changes. Proxy host and port are now stored in separate gconf settings. * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-enumeration.h: * libnautilus-extensions/nautilus-enumeration.c: (nautilus_enumeration_new), (nautilus_enumeration_free), (nautilus_enumeration_insert), (nautilus_enumeration_get_nth_entry), (nautilus_enumeration_get_nth_description), (nautilus_enumeration_get_nth_value), (nautilus_enumeration_get_num_entries), (nautilus_self_check_enumeration): New files. An enumeration data structure. * components/tree/nautilus-tree-expansion-state.c: No longer need to give the full path to a gconf setting. * components/tree/nautilus-tree-view.c: (filtering_changed_callback), (nautilus_tree_view_initialize): * libnautilus-extensions/nautilus-directory-async.c: (can_use_public_metafile), (get_filter_options_for_directory_count): * libnautilus-extensions/nautilus-file-operations.c: (confirm_empty_trash): * libnautilus-extensions/nautilus-file.c: (nautilus_file_should_get_top_left_text): * libnautilus-extensions/nautilus-font-factory.c: (nautilus_font_factory_get_font_from_preferences): Update for preferences api changes. * libnautilus-extensions/nautilus-gconf-extensions.h: * libnautilus-extensions/nautilus-gconf-extensions.c: (global_client_free), (nautilus_gconf_client_get_global), (nautilus_gconf_handle_error), (nautilus_gconf_set_boolean), (nautilus_gconf_get_boolean), (nautilus_gconf_set_int), (nautilus_gconf_get_int), (nautilus_gconf_set_string), (nautilus_gconf_get_string), (nautilus_gconf_set_string_list), (nautilus_gconf_get_string_list), (nautilus_gconf_is_default), (nautilus_gconf_monitor_directory): New files. Useful gconf extensions; make peeking and poking settings a little easier. * libnautilus-extensions/nautilus-icon-container.c: (button_press_event): * libnautilus-extensions/nautilus-icon-canvas-item.c: (in_single_click_mode): Update for preferences api changes. * libnautilus-extensions/nautilus-icon-factory.c: (icon_theme_changed_callback), (should_display_image_file_as_itself): Update for preferences api changes. Also no longer need to define a default theme. * libnautilus-extensions/nautilus-lib-self-check-functions.h: Add entries for enumeration and preferences. Remove preference entry. Note plural vs not. * libnautilus-extensions/nautilus-preference.c: * libnautilus-extensions/nautilus-preference.h: Retire these 2. No longer use a GtkObject to store each preference. We simply use the string name instead. * libnautilus-extensions/nautilus-preferences-box.h: * libnautilus-extensions/nautilus-preferences-box.c: (nautilus_preferences_box_add_pane), (nautilus_preferences_box_update): New function. Should be called when user level changes so that the box updates its panes. * libnautilus-extensions/nautilus-preferences-dialog.h: * libnautilus-extensions/nautilus-preferences-dialog.c: (nautilus_preferences_dialog_initialize), (nautilus_preferences_dialog_destroy), (nautilus_preferences_dialog_get_prefs_box), (nautilus_preferences_dialog_update), (user_level_changed_callback): Keep track of user level changes. New function to update the dialog when user level changes. * libnautilus-extensions/nautilus-preferences-group.h: * libnautilus-extensions/nautilus-preferences-group.c: (nautilus_preferences_group_initialize), (nautilus_preferences_group_destroy), (nautilus_preferences_group_add_item): Collect the group's items in a list. Update to user a string to represent a preference instead of a GtkObject. (nautilus_preferences_group_update): New function. Updates the group's items to respect preferences visibility based on the user level. (nautilus_preferences_get_num_visible_items): New function. Return the number of currently visible items. Collect the group's items in a list. Update to user a string to represent a preference instead of a GtkObject. * libnautilus-extensions/nautilus-preferences-item.h: * libnautilus-extensions/nautilus-preferences-item.c: (preferences_item_construct), (preferences_item_create_enum), (preferences_item_create_short_enum), (preferences_item_create_boolean), (preferences_item_create_editable_string), (preferences_item_create_integer), (preferences_item_create_font_family), (preferences_item_create_theme), (enum_radio_group_changed_callback), (editable_string_changed_callback), (integer_changed_callback), (nautilus_preferences_item_get_name): New function to fetch the item's preference name. Add a new kind of preference - INTEGER. Update for string vs. GtkObject preferences representation changes. * libnautilus-extensions/nautilus-preferences-pane.h: * libnautilus-extensions/nautilus-preferences-pane.c: (nautilus_preferences_pane_update): New function. Updates the pane's groups to respect preferences visibility based on the user level. * libnautilus-extensions/nautilus-preferences.h: * libnautilus-extensions/nautilus-preferences.c: (preferences_get_path), (preferences_get_defaults_path), (preferences_get_visibility_path), (preferences_get_user_level_key), (preferences_preference_is_internal), (preferences_preference_is_user_level), (preferences_key_make), (preferences_key_make_for_default), (preferences_key_make_for_default_getter), (preferences_key_make_for_visibility), (preferences_global_client_remove_notification), (preferences_global_client_get), (preferences_preference_is_default), (preferences_make_user_level_filtered_key), (nautilus_preferences_get_visible_user_level), (nautilus_preferences_set_visible_user_level), (nautilus_preferences_set_boolean), (preferences_key_make_for_getter), (nautilus_preferences_get_boolean), (nautilus_preferences_set_int), (nautilus_preferences_get_int), (nautilus_preferences_set), (nautilus_preferences_get), (nautilus_preferences_set_string_list), (nautilus_preferences_get_string_list), (nautilus_preferences_get_user_level), (nautilus_preferences_set_user_level), (nautilus_preferences_default_set_int), (nautilus_preferences_default_get_int), (nautilus_preferences_default_set_boolean), (nautilus_preferences_default_get_boolean), (nautilus_preferences_default_set_string), (nautilus_preferences_default_get_string), (nautilus_preferences_default_set_string_list), (nautilus_preferences_default_get_string_list), (preferences_callback_entry_invoke_function), (preferences_something_changed_notice), (preferences_global_table_check_changes_function), (preferences_user_level_changed_notice), (preferences_entry_add_callback), (preferences_entry_remove_callback), (preferences_callback_entry_free), (preferences_callback_entry_free_func), (preferences_entry_free), (preferences_entry_free_func), (preferences_global_table_free), (preferences_global_table_get_global), (preferences_global_table_lookup), (preferences_global_table_insert), (preferences_global_table_lookup_or_insert), (nautilus_preferences_add_callback), (preferences_while_alive_disconnector), (nautilus_preferences_add_callback_while_alive), (nautilus_preferences_remove_callback), (nautilus_preferences_enumeration_insert), (nautilus_preferences_enumeration_get_nth_entry), (nautilus_preferences_enumeration_get_nth_description), (nautilus_preferences_enumeration_get_nth_value), (nautilus_preferences_enumeration_get_num_entries), (nautilus_preferences_set_description), (nautilus_preferences_get_description), (nautilus_preferences_get_user_level_name_for_display), (nautilus_preferences_get_user_level_name_for_storage), (preferences_user_level_check_range), (nautilus_preferences_monitor_directory), (nautilus_preferences_is_visible), (nautilus_self_check_preferences): Many changes. Redid to support the preferences system described in bugs 3414, 3415 and 3416. * libnautilus-extensions/nautilus-smooth-widget.c: (preferences_get_is_smooth): * libnautilus-extensions/nautilus-sound.c: (kill_sound_if_necessary), (nautilus_sound_initialize), (nautilus_sound_kill_sound), (nautilus_sound_register_sound), (nautilus_sound_can_play_sound): * libnautilus-extensions/nautilus-theme.c: (nautilus_theme_get_theme), (nautilus_theme_get_theme_data), (nautilus_theme_get_image_path): Update for preferences api changes. * libnautilus-extensions/nautilus-user-level-manager.c: * libnautilus-extensions/nautilus-user-level-manager.h: Retire. No longer needed. User level things are handled in nautilus-preferences.[ch] now. The current user level design is much simpler and does no require its own GtkObject. * src/file-manager/fm-desktop-icon-view.c: (update_home_link_and_delete_copies), (real_update_menus): * src/file-manager/fm-directory-view.c: (open_location), (confirm_delete_from_trash), (real_update_menus), (fm_directory_view_activate_files), (filtering_changed_callback): * src/file-manager/fm-icon-text-window.c: (changed_attributes_option_menu_callback), (fm_get_text_attribute_names_preference_or_default): * src/file-manager/fm-icon-view.c: (should_preview_sound), (fm_icon_view_update_click_mode), (fm_icon_view_update_smooth_graphics_mode): * src/file-manager/fm-list-view.c: (fm_list_view_update_click_mode): * src/file-manager/fm-properties-window.c: (create_permissions_page): * src/nautilus-application.c: (desktop_changed_callback): * src/nautilus-complex-search-bar.c: (nautilus_complex_search_bar_get_location): * src/nautilus-first-time-druid.c: (user_level_selection_changed), (make_hbox_user_level_radio_button), (set_up_user_level_page): * src/nautilus-main.c: (main): * src/nautilus-property-browser.c: (nautilus_property_browser_update_contents): * src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled), (toggle_sidebar_panel), (nautilus_sidebar_size_allocate): * src/nautilus-switchable-search-bar.c: (nautilus_switchable_search_bar_new), (nautilus_search_uri_to_search_bar_mode): Update for preferences api changes. * src/nautilus-window-manage-views.c: (position_and_show_window_callback), (nautilus_window_end_location_change_callback): Update for preferences api changes. Also, no longer need to pass in a default location to the preferences getter. * src/nautilus-window-menus.c: (user_level_customize_callback), (switch_to_user_level), (refresh_bookmarks_menu), (user_level_changed_callback), (add_user_level_menu_item), (nautilus_window_initialize_menus), (update_user_level_menu_items), (convert_user_level_to_path): A lot of simplification. The "Edit Settings..." menu item no longer changes it wording based on the user level. We know allow it to edit settings on all user levels, since we have the ability to hide preferences at higher user levels. No longer need to update the preferences dialog or its title. * src/nautilus-window.c: (nautilus_window_constructed), (nautilus_window_close), (nautilus_window_go_web_search), (nautilus_window_go_home), (nautilus_window_show): Update for preferences api changes. * libnautilus-extensions/nautilus-global-preferences.h: Update all the preferences defines to not include a full gconf path. We dont need to do this anymore to get non user level coupled prefernces. * libnautilus-extensions/nautilus-global-preferences.c: (compare_view_identifiers), (global_preferences_create_dialog), (nautilus_global_preferences_get_enabled_sidebar_panel_view_identif iers), (global_preferences_install_sidebar_panel_defaults), (global_preferences_is_sidebar_panel_enabled), (global_preferences_install_speed_tradeoff_descriptions), (register_proxy_preferences), (global_preferences_register), (global_preferences_install_defaults), (nautilus_global_preferences_set_dialog_title): Lots of changes to support new preferences design. Set the WM_CLASS here once instead of everytime the dialog title is changed. This was causing criticals. No longer need to create parallel proxy preferences and map them to the gconf ones. We can use the gconf ones directly now. * test/.cvsignore: * test/Makefile.am: * test/test-nautilus-preferences-change.c: (user_level_changed_callback), (fruits_changed_callback), (int_picker_changed_callback), (user_level_picker_changed_callback), (picker_new), (user_level_picker_new), (main): * test/test-nautilus-preferences-display.c: (text_caption_update), (user_level_caption_update), (user_level_changed_callback), (green_changed_callback), (yellow_changed_callback), (red_changed_callback), (apple_changed_callback), (orange_changed_callback), (pear_changed_callback), (entry_new), (user_level_frame_new), (colors_frame_new), (fruits_frame_new), (main): * test/test.c: (test_pixbuf_draw_rectangle_tiled), (test_text_caption_set_text_for_int_preferences), (test_text_caption_set_text_for_string_preferences), (test_text_caption_set_text_for_default_int_preferences), (test_text_caption_set_text_for_default_string_preferences), (test_text_caption_get_text_as_int), (test_window_set_title_with_pid): * test/test.h: New tests for preferences changes. * test/test-nautilus-preferences.c: Retire old prefs test which didnt really work. * test/test-nautilus-smooth-graphics.c: (smooth_graphics_mode_changed_callback), (main): Update for preferences api changes.
2001-01-18 08:52:40 +00:00
#define NAUTILUS_PREFERENCES_SIDEBAR_WIDTH "preferences/sidebar_width"
/* Keep track of the sound playing process */
reviewed by: Pavel Cisler <pavel@eazel.com> Lots of bug fixes: 2848 - User level agnostic config settings have nowhere to live. 2654 - Need default values even for non user level preferences. 3414 - Show more preferences at higher user levels. 3415 - Make preference the same for all levels at which it is not visible 3416 - Make preference changes affect all levels at which they are visible 4357 - Web search URL setting should be reset upon Nautilus update 5160 - Tree view doesnt exist when starting nautilus as a beginner 5234 - Sidebar panel preferences are not properly separated among user levels * components/mozilla/mozilla-preferences.cpp: Update for gnome vfs proxy changes. Proxy host and port are now stored in separate gconf settings. * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-enumeration.h: * libnautilus-extensions/nautilus-enumeration.c: (nautilus_enumeration_new), (nautilus_enumeration_free), (nautilus_enumeration_insert), (nautilus_enumeration_get_nth_entry), (nautilus_enumeration_get_nth_description), (nautilus_enumeration_get_nth_value), (nautilus_enumeration_get_num_entries), (nautilus_self_check_enumeration): New files. An enumeration data structure. * components/tree/nautilus-tree-expansion-state.c: No longer need to give the full path to a gconf setting. * components/tree/nautilus-tree-view.c: (filtering_changed_callback), (nautilus_tree_view_initialize): * libnautilus-extensions/nautilus-directory-async.c: (can_use_public_metafile), (get_filter_options_for_directory_count): * libnautilus-extensions/nautilus-file-operations.c: (confirm_empty_trash): * libnautilus-extensions/nautilus-file.c: (nautilus_file_should_get_top_left_text): * libnautilus-extensions/nautilus-font-factory.c: (nautilus_font_factory_get_font_from_preferences): Update for preferences api changes. * libnautilus-extensions/nautilus-gconf-extensions.h: * libnautilus-extensions/nautilus-gconf-extensions.c: (global_client_free), (nautilus_gconf_client_get_global), (nautilus_gconf_handle_error), (nautilus_gconf_set_boolean), (nautilus_gconf_get_boolean), (nautilus_gconf_set_int), (nautilus_gconf_get_int), (nautilus_gconf_set_string), (nautilus_gconf_get_string), (nautilus_gconf_set_string_list), (nautilus_gconf_get_string_list), (nautilus_gconf_is_default), (nautilus_gconf_monitor_directory): New files. Useful gconf extensions; make peeking and poking settings a little easier. * libnautilus-extensions/nautilus-icon-container.c: (button_press_event): * libnautilus-extensions/nautilus-icon-canvas-item.c: (in_single_click_mode): Update for preferences api changes. * libnautilus-extensions/nautilus-icon-factory.c: (icon_theme_changed_callback), (should_display_image_file_as_itself): Update for preferences api changes. Also no longer need to define a default theme. * libnautilus-extensions/nautilus-lib-self-check-functions.h: Add entries for enumeration and preferences. Remove preference entry. Note plural vs not. * libnautilus-extensions/nautilus-preference.c: * libnautilus-extensions/nautilus-preference.h: Retire these 2. No longer use a GtkObject to store each preference. We simply use the string name instead. * libnautilus-extensions/nautilus-preferences-box.h: * libnautilus-extensions/nautilus-preferences-box.c: (nautilus_preferences_box_add_pane), (nautilus_preferences_box_update): New function. Should be called when user level changes so that the box updates its panes. * libnautilus-extensions/nautilus-preferences-dialog.h: * libnautilus-extensions/nautilus-preferences-dialog.c: (nautilus_preferences_dialog_initialize), (nautilus_preferences_dialog_destroy), (nautilus_preferences_dialog_get_prefs_box), (nautilus_preferences_dialog_update), (user_level_changed_callback): Keep track of user level changes. New function to update the dialog when user level changes. * libnautilus-extensions/nautilus-preferences-group.h: * libnautilus-extensions/nautilus-preferences-group.c: (nautilus_preferences_group_initialize), (nautilus_preferences_group_destroy), (nautilus_preferences_group_add_item): Collect the group's items in a list. Update to user a string to represent a preference instead of a GtkObject. (nautilus_preferences_group_update): New function. Updates the group's items to respect preferences visibility based on the user level. (nautilus_preferences_get_num_visible_items): New function. Return the number of currently visible items. Collect the group's items in a list. Update to user a string to represent a preference instead of a GtkObject. * libnautilus-extensions/nautilus-preferences-item.h: * libnautilus-extensions/nautilus-preferences-item.c: (preferences_item_construct), (preferences_item_create_enum), (preferences_item_create_short_enum), (preferences_item_create_boolean), (preferences_item_create_editable_string), (preferences_item_create_integer), (preferences_item_create_font_family), (preferences_item_create_theme), (enum_radio_group_changed_callback), (editable_string_changed_callback), (integer_changed_callback), (nautilus_preferences_item_get_name): New function to fetch the item's preference name. Add a new kind of preference - INTEGER. Update for string vs. GtkObject preferences representation changes. * libnautilus-extensions/nautilus-preferences-pane.h: * libnautilus-extensions/nautilus-preferences-pane.c: (nautilus_preferences_pane_update): New function. Updates the pane's groups to respect preferences visibility based on the user level. * libnautilus-extensions/nautilus-preferences.h: * libnautilus-extensions/nautilus-preferences.c: (preferences_get_path), (preferences_get_defaults_path), (preferences_get_visibility_path), (preferences_get_user_level_key), (preferences_preference_is_internal), (preferences_preference_is_user_level), (preferences_key_make), (preferences_key_make_for_default), (preferences_key_make_for_default_getter), (preferences_key_make_for_visibility), (preferences_global_client_remove_notification), (preferences_global_client_get), (preferences_preference_is_default), (preferences_make_user_level_filtered_key), (nautilus_preferences_get_visible_user_level), (nautilus_preferences_set_visible_user_level), (nautilus_preferences_set_boolean), (preferences_key_make_for_getter), (nautilus_preferences_get_boolean), (nautilus_preferences_set_int), (nautilus_preferences_get_int), (nautilus_preferences_set), (nautilus_preferences_get), (nautilus_preferences_set_string_list), (nautilus_preferences_get_string_list), (nautilus_preferences_get_user_level), (nautilus_preferences_set_user_level), (nautilus_preferences_default_set_int), (nautilus_preferences_default_get_int), (nautilus_preferences_default_set_boolean), (nautilus_preferences_default_get_boolean), (nautilus_preferences_default_set_string), (nautilus_preferences_default_get_string), (nautilus_preferences_default_set_string_list), (nautilus_preferences_default_get_string_list), (preferences_callback_entry_invoke_function), (preferences_something_changed_notice), (preferences_global_table_check_changes_function), (preferences_user_level_changed_notice), (preferences_entry_add_callback), (preferences_entry_remove_callback), (preferences_callback_entry_free), (preferences_callback_entry_free_func), (preferences_entry_free), (preferences_entry_free_func), (preferences_global_table_free), (preferences_global_table_get_global), (preferences_global_table_lookup), (preferences_global_table_insert), (preferences_global_table_lookup_or_insert), (nautilus_preferences_add_callback), (preferences_while_alive_disconnector), (nautilus_preferences_add_callback_while_alive), (nautilus_preferences_remove_callback), (nautilus_preferences_enumeration_insert), (nautilus_preferences_enumeration_get_nth_entry), (nautilus_preferences_enumeration_get_nth_description), (nautilus_preferences_enumeration_get_nth_value), (nautilus_preferences_enumeration_get_num_entries), (nautilus_preferences_set_description), (nautilus_preferences_get_description), (nautilus_preferences_get_user_level_name_for_display), (nautilus_preferences_get_user_level_name_for_storage), (preferences_user_level_check_range), (nautilus_preferences_monitor_directory), (nautilus_preferences_is_visible), (nautilus_self_check_preferences): Many changes. Redid to support the preferences system described in bugs 3414, 3415 and 3416. * libnautilus-extensions/nautilus-smooth-widget.c: (preferences_get_is_smooth): * libnautilus-extensions/nautilus-sound.c: (kill_sound_if_necessary), (nautilus_sound_initialize), (nautilus_sound_kill_sound), (nautilus_sound_register_sound), (nautilus_sound_can_play_sound): * libnautilus-extensions/nautilus-theme.c: (nautilus_theme_get_theme), (nautilus_theme_get_theme_data), (nautilus_theme_get_image_path): Update for preferences api changes. * libnautilus-extensions/nautilus-user-level-manager.c: * libnautilus-extensions/nautilus-user-level-manager.h: Retire. No longer needed. User level things are handled in nautilus-preferences.[ch] now. The current user level design is much simpler and does no require its own GtkObject. * src/file-manager/fm-desktop-icon-view.c: (update_home_link_and_delete_copies), (real_update_menus): * src/file-manager/fm-directory-view.c: (open_location), (confirm_delete_from_trash), (real_update_menus), (fm_directory_view_activate_files), (filtering_changed_callback): * src/file-manager/fm-icon-text-window.c: (changed_attributes_option_menu_callback), (fm_get_text_attribute_names_preference_or_default): * src/file-manager/fm-icon-view.c: (should_preview_sound), (fm_icon_view_update_click_mode), (fm_icon_view_update_smooth_graphics_mode): * src/file-manager/fm-list-view.c: (fm_list_view_update_click_mode): * src/file-manager/fm-properties-window.c: (create_permissions_page): * src/nautilus-application.c: (desktop_changed_callback): * src/nautilus-complex-search-bar.c: (nautilus_complex_search_bar_get_location): * src/nautilus-first-time-druid.c: (user_level_selection_changed), (make_hbox_user_level_radio_button), (set_up_user_level_page): * src/nautilus-main.c: (main): * src/nautilus-property-browser.c: (nautilus_property_browser_update_contents): * src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled), (toggle_sidebar_panel), (nautilus_sidebar_size_allocate): * src/nautilus-switchable-search-bar.c: (nautilus_switchable_search_bar_new), (nautilus_search_uri_to_search_bar_mode): Update for preferences api changes. * src/nautilus-window-manage-views.c: (position_and_show_window_callback), (nautilus_window_end_location_change_callback): Update for preferences api changes. Also, no longer need to pass in a default location to the preferences getter. * src/nautilus-window-menus.c: (user_level_customize_callback), (switch_to_user_level), (refresh_bookmarks_menu), (user_level_changed_callback), (add_user_level_menu_item), (nautilus_window_initialize_menus), (update_user_level_menu_items), (convert_user_level_to_path): A lot of simplification. The "Edit Settings..." menu item no longer changes it wording based on the user level. We know allow it to edit settings on all user levels, since we have the ability to hide preferences at higher user levels. No longer need to update the preferences dialog or its title. * src/nautilus-window.c: (nautilus_window_constructed), (nautilus_window_close), (nautilus_window_go_web_search), (nautilus_window_go_home), (nautilus_window_show): Update for preferences api changes. * libnautilus-extensions/nautilus-global-preferences.h: Update all the preferences defines to not include a full gconf path. We dont need to do this anymore to get non user level coupled prefernces. * libnautilus-extensions/nautilus-global-preferences.c: (compare_view_identifiers), (global_preferences_create_dialog), (nautilus_global_preferences_get_enabled_sidebar_panel_view_identif iers), (global_preferences_install_sidebar_panel_defaults), (global_preferences_is_sidebar_panel_enabled), (global_preferences_install_speed_tradeoff_descriptions), (register_proxy_preferences), (global_preferences_register), (global_preferences_install_defaults), (nautilus_global_preferences_set_dialog_title): Lots of changes to support new preferences design. Set the WM_CLASS here once instead of everytime the dialog title is changed. This was causing criticals. No longer need to create parallel proxy preferences and map them to the gconf ones. We can use the gconf ones directly now. * test/.cvsignore: * test/Makefile.am: * test/test-nautilus-preferences-change.c: (user_level_changed_callback), (fruits_changed_callback), (int_picker_changed_callback), (user_level_picker_changed_callback), (picker_new), (user_level_picker_new), (main): * test/test-nautilus-preferences-display.c: (text_caption_update), (user_level_caption_update), (user_level_changed_callback), (green_changed_callback), (yellow_changed_callback), (red_changed_callback), (apple_changed_callback), (orange_changed_callback), (pear_changed_callback), (entry_new), (user_level_frame_new), (colors_frame_new), (fruits_frame_new), (main): * test/test.c: (test_pixbuf_draw_rectangle_tiled), (test_text_caption_set_text_for_int_preferences), (test_text_caption_set_text_for_string_preferences), (test_text_caption_set_text_for_default_int_preferences), (test_text_caption_set_text_for_default_string_preferences), (test_text_caption_get_text_as_int), (test_window_set_title_with_pid): * test/test.h: New tests for preferences changes. * test/test-nautilus-preferences.c: Retire old prefs test which didnt really work. * test/test-nautilus-smooth-graphics.c: (smooth_graphics_mode_changed_callback), (main): Update for preferences api changes.
2001-01-18 08:52:40 +00:00
#define NAUTILUS_PREFERENCES_CURRENT_SOUND_STATE "preferences/sound_state"
Task 1229. Need support for preferences not coupled to user level. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_register): Add FIXME for the issue of setting default values for non user level specific preferences. * libnautilus-extensions/nautilus-global-preferences.h: Add blurb explaining preferences that are user level specific and those that arent. * libnautilus-extensions/nautilus-preferences.c: (preferences_hash_node_add_by_user_level_callbacks), (preferences_hash_node_add_callback), New functions to deal with callbacks for preferences that are coupled to the user level. (preferences_hash_node_check_changes_func), (preferences_make_make_gconf_key), (preferences_gconf_by_user_level_callback), (preferences_gconf_callback), (nautilus_preferences_add_callback), New functions to deal with callbacks for preferences that are NOT coupled to the user level. (nautilus_preferences_set_boolean), (nautilus_preferences_get_boolean), (nautilus_preferences_set_string_list), (nautilus_preferences_get_string_list), (nautilus_preferences_set_enum), (nautilus_preferences_get_enum), (nautilus_preferences_set), (nautilus_preferences_get): Add support for preferences that are not coupled to the user level. Compute gconf keys by taking the preference name into account. If it begins with a "/" (indicating it is fully qualified) then treat it as a regular gconf key and use it as is. Otherwise, use the user_level_manager to compute a key according to the current user level. * libnautilus-extensions/nautilus-preferences.h: Add documentation explaining the two different ways to specify preference names depending on whether they are user level specific or not. * src/nautilus-first-time-druid.c: (set_http_proxy): Use the non user level specific perferences support instead of poking gconf directly.
2000-08-31 15:54:01 +00:00
/* Window options */
Task 518. Support for changing preferecens individually within each confgurable user level. * libnautilus-extensions/nautilus-global-preferences.h: Change all preferences strings to not include the "/nautilus" prefix. The prefix is not automatically computed by the prefences api taking into account the user level. Add (nautilus_global_preferences_dialog_update) to rebuild the preferences dialog when the user level changes. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_get_dialog), (global_preferences_register_sidebar_panels_preferences_for_ui), (global_preferences_register_with_defaults), (global_preferences_register_boolean_with_defaults), (global_preferences_register_string_with_defaults), (global_preferences_register_enum_with_defaults), (global_preferences_register_for_ui), (global_preferences_initialize_if_needed), (nautilus_global_preferences_show_dialog), (nautilus_global_preferences_hide_dialog), (nautilus_global_preferences_set_dialog_title), (nautilus_global_preferences_dialog_update), (nautilus_global_preferences_shutdown): remove the user level tracking hack. We now set default values for each of the user levels. * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * libnautilus-extensions/nautilus-list.c: (nautilus_list_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * nautilus-widgets/nautilus-preference.c: (preference_initialize_if_needed), (preference_hash_node_alloc), (preference_hash_node_free_func), (preference_hash_node_free), (preference_register), (preference_hash_node_lookup), (preference_hash_node_lookup_with_registration), (nautilus_preference_shutdown), (nautilus_preference_find_by_name), (nautilus_preference_set_info_by_name), (nautilus_preference_enum_add_entry_by_name): * nautilus-widgets/nautilus-preference.h: Move the preference description hash table here from nautilus-preferences. These are preferences that are expected to have nice defaults as well as descriptions and possibly extra data for the preferences widgets to use (like enumeration values) I moved the tabulation and hashing stuff intactly even though it contains many turds. I plan to fix these soon. * nautilus-widgets/nautilus-preferences-group.c: (nautilus_preferences_group_add_item): * nautilus-widgets/nautilus-preferences-item.c: (preferences_item_construct), (enum_radio_group_changed_callback): Update for the above. * nautilus-widgets/nautilus-preferences.c: (preferences_hash_node_alloc), (preferences_hash_node_free), (preferences_hash_node_add_callback), (preferences_hash_node_remove_callback), (preferences_hash_node_check_changes_func), (preferneces_callback_node_invoke_func), (preferences_register), (preferences_hash_node_lookup_with_registration), (preferences_gconf_callback), (user_level_changed_callback), (preferences_initialize_if_needed), (nautilus_preferences_add_callback), (nautilus_preferences_set_boolean), (nautilus_preferences_get_boolean), (nautilus_preferences_set_enum), (nautilus_preferences_get_enum), (nautilus_preferences_set), (nautilus_preferences_get), (nautilus_preferences_shutdown): * nautilus-widgets/nautilus-preferences.h: Move the tabulation of nice preferences to nautilus-preference. Install one gconf notification for each user level. Remove all the extra unused registration parameters. Use generated keys that take into account the current user level to communicato with GConf. Keep track of user level changes so that we can compare preferences between user levels and fire callbacks accordingly. This simplifies the lifes of preferences callers as they can continue to install one simple callback as before. They will get notified when a preference changes for whatever reason. That could be the user manaually tweaking it, or a sweeping user level change. Again, i tried to keep as much of the original hashing logic intact. It needs cleaning up as well. * nautilus-widgets/nautilus-user-level-manager.c: (nautilus_user_level_manager_set_default_value_if_needed), (nautilus_user_level_manager_compare_preference_between_user_levels ): * nautilus-widgets/nautilus-user-level-manager.h: Add a public function to determine whether a preference is the same between 2 user levels. * nautilus-widgets/test-nautilus-preferences.c: (register_global_preferences): Update to reflect api changes. * src/nautilus-window-menus.c: (nautilus_window_initialize_menus), (user_level_changed_callback), (get_customize_user_level_setttings_menu_string), (update_preferences_dialog_title): Update the preferences dialog whenever the user level changes. This is an easy way to have the dialog reflect reallity. It would be a lot nicer it the contents updated on the fly instead of rebuilding the whole thing. I can do that later.
2000-06-02 16:41:42 +00:00
#define NAUTILUS_PREFERENCES_WINDOW_ALWAYS_NEW "preferences/window_always_new"
Fixed bug 1563 (Optionally hide ~-suffix files created by emacs) Fixed bug 2274 (Implement Empty Trash confirmation preference) * libnautilus-extensions/nautilus-global-preferences.h: define NAUTILUS_PREFERENCES_CONFIRM_TRASH and NAUTILUS_PREFERENCES_SHOW_BACKUP_FILES. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_create_dialog): Put these two new preferences on the Directory Views page; rename it Folder Views. (global_preferences_register): Register default values for new preferences. * libnautilus-extensions/nautilus-preferences-dialog.c: Increase initial height of window to account for new preferences. There's an open bug about reorganizing the whole window for later. * libnautilus-extensions/nautilus-file-operations.c: (confirm_empty_trash): Don't confirm if preference says not to. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize), (fm_directory_view_destroy): Add & remove callbacks to monitor these two new preferences. (queue_pending_files): Take SHOW_BACKUP_FILES preference into account. (file_name_from_uri): New helper routine to save a little code duplication. (fm_directory_view_confirm_deletion): Use yes_no dialog instead of simple dialog to match other usage; improve dialog title. (confirm_delete_from_trash): New function, confirms deleting items from trash unless preference says not to bother. (fm_directory_view_trash_or_delete_files): Call confirm_delete_from_trash before deleting items from trash. (compute_menu_item_info): Do or don't add ellipses to "Empty Trash" and "Delete From Trash" depending on preference setting. (schedule_update_menus_callback): New function, simple wrapper for schedule_update_menus (called when CONFIRM_TRASH preference changes). (filtering_changed_callback): Renamed and slightly generalized from show_hidden_files_changed_callback, called when either the SHOW_HIDDEN_FILES or SHOW_BACKUP_FILES preference changes.
2000-09-15 22:46:21 +00:00
/* Trash options */
#define NAUTILUS_PREFERENCES_CONFIRM_TRASH "preferences/confirm_trash"
/* Desktop options */
#define NAUTILUS_PREFERENCES_SHOW_DESKTOP "preferences/show_desktop"
/* Display */
Task 518. Support for changing preferecens individually within each confgurable user level. * libnautilus-extensions/nautilus-global-preferences.h: Change all preferences strings to not include the "/nautilus" prefix. The prefix is not automatically computed by the prefences api taking into account the user level. Add (nautilus_global_preferences_dialog_update) to rebuild the preferences dialog when the user level changes. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_get_dialog), (global_preferences_register_sidebar_panels_preferences_for_ui), (global_preferences_register_with_defaults), (global_preferences_register_boolean_with_defaults), (global_preferences_register_string_with_defaults), (global_preferences_register_enum_with_defaults), (global_preferences_register_for_ui), (global_preferences_initialize_if_needed), (nautilus_global_preferences_show_dialog), (nautilus_global_preferences_hide_dialog), (nautilus_global_preferences_set_dialog_title), (nautilus_global_preferences_dialog_update), (nautilus_global_preferences_shutdown): remove the user level tracking hack. We now set default values for each of the user levels. * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * libnautilus-extensions/nautilus-list.c: (nautilus_list_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * nautilus-widgets/nautilus-preference.c: (preference_initialize_if_needed), (preference_hash_node_alloc), (preference_hash_node_free_func), (preference_hash_node_free), (preference_register), (preference_hash_node_lookup), (preference_hash_node_lookup_with_registration), (nautilus_preference_shutdown), (nautilus_preference_find_by_name), (nautilus_preference_set_info_by_name), (nautilus_preference_enum_add_entry_by_name): * nautilus-widgets/nautilus-preference.h: Move the preference description hash table here from nautilus-preferences. These are preferences that are expected to have nice defaults as well as descriptions and possibly extra data for the preferences widgets to use (like enumeration values) I moved the tabulation and hashing stuff intactly even though it contains many turds. I plan to fix these soon. * nautilus-widgets/nautilus-preferences-group.c: (nautilus_preferences_group_add_item): * nautilus-widgets/nautilus-preferences-item.c: (preferences_item_construct), (enum_radio_group_changed_callback): Update for the above. * nautilus-widgets/nautilus-preferences.c: (preferences_hash_node_alloc), (preferences_hash_node_free), (preferences_hash_node_add_callback), (preferences_hash_node_remove_callback), (preferences_hash_node_check_changes_func), (preferneces_callback_node_invoke_func), (preferences_register), (preferences_hash_node_lookup_with_registration), (preferences_gconf_callback), (user_level_changed_callback), (preferences_initialize_if_needed), (nautilus_preferences_add_callback), (nautilus_preferences_set_boolean), (nautilus_preferences_get_boolean), (nautilus_preferences_set_enum), (nautilus_preferences_get_enum), (nautilus_preferences_set), (nautilus_preferences_get), (nautilus_preferences_shutdown): * nautilus-widgets/nautilus-preferences.h: Move the tabulation of nice preferences to nautilus-preference. Install one gconf notification for each user level. Remove all the extra unused registration parameters. Use generated keys that take into account the current user level to communicato with GConf. Keep track of user level changes so that we can compare preferences between user levels and fire callbacks accordingly. This simplifies the lifes of preferences callers as they can continue to install one simple callback as before. They will get notified when a preference changes for whatever reason. That could be the user manaually tweaking it, or a sweeping user level change. Again, i tried to keep as much of the original hashing logic intact. It needs cleaning up as well. * nautilus-widgets/nautilus-user-level-manager.c: (nautilus_user_level_manager_set_default_value_if_needed), (nautilus_user_level_manager_compare_preference_between_user_levels ): * nautilus-widgets/nautilus-user-level-manager.h: Add a public function to determine whether a preference is the same between 2 user levels. * nautilus-widgets/test-nautilus-preferences.c: (register_global_preferences): Update to reflect api changes. * src/nautilus-window-menus.c: (nautilus_window_initialize_menus), (user_level_changed_callback), (get_customize_user_level_setttings_menu_string), (update_preferences_dialog_title): Update the preferences dialog whenever the user level changes. This is an easy way to have the dialog reflect reallity. It would be a lot nicer it the contents updated on the fly instead of rebuilding the whole thing. I can do that later.
2000-06-02 16:41:42 +00:00
#define NAUTILUS_PREFERENCES_SHOW_HIDDEN_FILES "preferences/show_hidden_files"
Fixed bug 1563 (Optionally hide ~-suffix files created by emacs) Fixed bug 2274 (Implement Empty Trash confirmation preference) * libnautilus-extensions/nautilus-global-preferences.h: define NAUTILUS_PREFERENCES_CONFIRM_TRASH and NAUTILUS_PREFERENCES_SHOW_BACKUP_FILES. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_create_dialog): Put these two new preferences on the Directory Views page; rename it Folder Views. (global_preferences_register): Register default values for new preferences. * libnautilus-extensions/nautilus-preferences-dialog.c: Increase initial height of window to account for new preferences. There's an open bug about reorganizing the whole window for later. * libnautilus-extensions/nautilus-file-operations.c: (confirm_empty_trash): Don't confirm if preference says not to. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize), (fm_directory_view_destroy): Add & remove callbacks to monitor these two new preferences. (queue_pending_files): Take SHOW_BACKUP_FILES preference into account. (file_name_from_uri): New helper routine to save a little code duplication. (fm_directory_view_confirm_deletion): Use yes_no dialog instead of simple dialog to match other usage; improve dialog title. (confirm_delete_from_trash): New function, confirms deleting items from trash unless preference says not to bother. (fm_directory_view_trash_or_delete_files): Call confirm_delete_from_trash before deleting items from trash. (compute_menu_item_info): Do or don't add ellipses to "Empty Trash" and "Delete From Trash" depending on preference setting. (schedule_update_menus_callback): New function, simple wrapper for schedule_update_menus (called when CONFIRM_TRASH preference changes). (filtering_changed_callback): Renamed and slightly generalized from show_hidden_files_changed_callback, called when either the SHOW_HIDDEN_FILES or SHOW_BACKUP_FILES preference changes.
2000-09-15 22:46:21 +00:00
#define NAUTILUS_PREFERENCES_SHOW_BACKUP_FILES "preferences/show_backup_files"
#define NAUTILUS_PREFERENCES_SHOW_SPECIAL_FLAGS "preferences/show_special_flags"
Expand margins around expander by 3 pixels on each side to make it easier * libnautilus-extensions/nautilus-ctree.c (ctree_is_hot_spot): Expand margins around expander by 3 pixels on each side to make it easier to click the disclosure triangle (triangle will prelight when within range), to fix bug 4479 Fix bugs 4497 (Add configuration option to show only folders in tree view) and 2419 (Tree view should track "show hidden files" preference): * components/tree/nautilus-tree-view.c: (nautilus_tree_view_should_skip_file, nautilus_tree_view_insert_model_node, nautilus_tree_view_remove_model_node, nautilus_tree_view_update_model_node): Handle possibly filtering out hidden files, backup files or non-directories. (filtering_changed_callback, nautilus_tree_view_initialize): Initialize from and watch filtering preferences, reload whole tree when prefs change. (nautilus_tree_view_destroy): Stop watching filtering prefs. (reload_model_node, reload_whole_tree, expand_node_for_file, nautilus_tree_view_receive_dropped_icons): Update code for reloading the tree on expand/collapse etc. * components/tree/nautilus-tree-model.c (nautilus_tree_model_directory_files_added_callback): Check if we already have a node for each file before trying to create a new one. This was needed because otherwise chaning the preference settins mentioned above would result in crashes. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c: (nautilus_file_is_hidden_file, nautilus_file_is_backup_file, nautilus_file_should_show, filter_hidden_and_backup_partition_callback, nautilus_file_list_filter_hidden_and_backup): Move hidden file and backup file filtering logic here from fm-directory-view.c. * src/file-manager/fm-directory-view.c (queue_pending_files): Use `nautilus_file_list_filter_hidden_and_backup' to do filtering. * libnautilus-extensions/nautilus-global-preferences.h, libnautilus-extensions/nautilus-global-preferences.c (global_preferences_create_dialog, global_preferences_register): Add a new preference for showing only directories in the tree view. * libnautilus-extensions/nautilus-preferences-dialog.c: Make preferences dialog a bit bigger to accomodate the new setting.
2000-11-13 13:18:43 +00:00
#define NAUTILUS_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES "sidebar-panels/tree/show_only_directories"
/* Navigation */
Task 518. Support for changing preferecens individually within each confgurable user level. * libnautilus-extensions/nautilus-global-preferences.h: Change all preferences strings to not include the "/nautilus" prefix. The prefix is not automatically computed by the prefences api taking into account the user level. Add (nautilus_global_preferences_dialog_update) to rebuild the preferences dialog when the user level changes. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_get_dialog), (global_preferences_register_sidebar_panels_preferences_for_ui), (global_preferences_register_with_defaults), (global_preferences_register_boolean_with_defaults), (global_preferences_register_string_with_defaults), (global_preferences_register_enum_with_defaults), (global_preferences_register_for_ui), (global_preferences_initialize_if_needed), (nautilus_global_preferences_show_dialog), (nautilus_global_preferences_hide_dialog), (nautilus_global_preferences_set_dialog_title), (nautilus_global_preferences_dialog_update), (nautilus_global_preferences_shutdown): remove the user level tracking hack. We now set default values for each of the user levels. * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * libnautilus-extensions/nautilus-list.c: (nautilus_list_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * nautilus-widgets/nautilus-preference.c: (preference_initialize_if_needed), (preference_hash_node_alloc), (preference_hash_node_free_func), (preference_hash_node_free), (preference_register), (preference_hash_node_lookup), (preference_hash_node_lookup_with_registration), (nautilus_preference_shutdown), (nautilus_preference_find_by_name), (nautilus_preference_set_info_by_name), (nautilus_preference_enum_add_entry_by_name): * nautilus-widgets/nautilus-preference.h: Move the preference description hash table here from nautilus-preferences. These are preferences that are expected to have nice defaults as well as descriptions and possibly extra data for the preferences widgets to use (like enumeration values) I moved the tabulation and hashing stuff intactly even though it contains many turds. I plan to fix these soon. * nautilus-widgets/nautilus-preferences-group.c: (nautilus_preferences_group_add_item): * nautilus-widgets/nautilus-preferences-item.c: (preferences_item_construct), (enum_radio_group_changed_callback): Update for the above. * nautilus-widgets/nautilus-preferences.c: (preferences_hash_node_alloc), (preferences_hash_node_free), (preferences_hash_node_add_callback), (preferences_hash_node_remove_callback), (preferences_hash_node_check_changes_func), (preferneces_callback_node_invoke_func), (preferences_register), (preferences_hash_node_lookup_with_registration), (preferences_gconf_callback), (user_level_changed_callback), (preferences_initialize_if_needed), (nautilus_preferences_add_callback), (nautilus_preferences_set_boolean), (nautilus_preferences_get_boolean), (nautilus_preferences_set_enum), (nautilus_preferences_get_enum), (nautilus_preferences_set), (nautilus_preferences_get), (nautilus_preferences_shutdown): * nautilus-widgets/nautilus-preferences.h: Move the tabulation of nice preferences to nautilus-preference. Install one gconf notification for each user level. Remove all the extra unused registration parameters. Use generated keys that take into account the current user level to communicato with GConf. Keep track of user level changes so that we can compare preferences between user levels and fire callbacks accordingly. This simplifies the lifes of preferences callers as they can continue to install one simple callback as before. They will get notified when a preference changes for whatever reason. That could be the user manaually tweaking it, or a sweeping user level change. Again, i tried to keep as much of the original hashing logic intact. It needs cleaning up as well. * nautilus-widgets/nautilus-user-level-manager.c: (nautilus_user_level_manager_set_default_value_if_needed), (nautilus_user_level_manager_compare_preference_between_user_levels ): * nautilus-widgets/nautilus-user-level-manager.h: Add a public function to determine whether a preference is the same between 2 user levels. * nautilus-widgets/test-nautilus-preferences.c: (register_global_preferences): Update to reflect api changes. * src/nautilus-window-menus.c: (nautilus_window_initialize_menus), (user_level_changed_callback), (get_customize_user_level_setttings_menu_string), (update_preferences_dialog_title): Update the preferences dialog whenever the user level changes. This is an easy way to have the dialog reflect reallity. It would be a lot nicer it the contents updated on the fly instead of rebuilding the whole thing. I can do that later.
2000-06-02 16:41:42 +00:00
#define NAUTILUS_PREFERENCES_HOME_URI "preferences/home_uri"
#define NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS "preferences/hide_built_in_bookmarks"
/* Proxy */
#define NAUTILUS_PREFERENCES_HTTP_PROXY "preferences/http-proxy"
#define NAUTILUS_PREFERENCES_HTTP_PROXY_PORT "preferences/http-proxy-port"
#define NAUTILUS_PREFERENCES_HTTP_USE_PROXY "preferences/http-use-proxy"
/* adding/removing from property browser */
Task 518. Support for changing preferecens individually within each confgurable user level. * libnautilus-extensions/nautilus-global-preferences.h: Change all preferences strings to not include the "/nautilus" prefix. The prefix is not automatically computed by the prefences api taking into account the user level. Add (nautilus_global_preferences_dialog_update) to rebuild the preferences dialog when the user level changes. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_get_dialog), (global_preferences_register_sidebar_panels_preferences_for_ui), (global_preferences_register_with_defaults), (global_preferences_register_boolean_with_defaults), (global_preferences_register_string_with_defaults), (global_preferences_register_enum_with_defaults), (global_preferences_register_for_ui), (global_preferences_initialize_if_needed), (nautilus_global_preferences_show_dialog), (nautilus_global_preferences_hide_dialog), (nautilus_global_preferences_set_dialog_title), (nautilus_global_preferences_dialog_update), (nautilus_global_preferences_shutdown): remove the user level tracking hack. We now set default values for each of the user levels. * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * libnautilus-extensions/nautilus-list.c: (nautilus_list_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * nautilus-widgets/nautilus-preference.c: (preference_initialize_if_needed), (preference_hash_node_alloc), (preference_hash_node_free_func), (preference_hash_node_free), (preference_register), (preference_hash_node_lookup), (preference_hash_node_lookup_with_registration), (nautilus_preference_shutdown), (nautilus_preference_find_by_name), (nautilus_preference_set_info_by_name), (nautilus_preference_enum_add_entry_by_name): * nautilus-widgets/nautilus-preference.h: Move the preference description hash table here from nautilus-preferences. These are preferences that are expected to have nice defaults as well as descriptions and possibly extra data for the preferences widgets to use (like enumeration values) I moved the tabulation and hashing stuff intactly even though it contains many turds. I plan to fix these soon. * nautilus-widgets/nautilus-preferences-group.c: (nautilus_preferences_group_add_item): * nautilus-widgets/nautilus-preferences-item.c: (preferences_item_construct), (enum_radio_group_changed_callback): Update for the above. * nautilus-widgets/nautilus-preferences.c: (preferences_hash_node_alloc), (preferences_hash_node_free), (preferences_hash_node_add_callback), (preferences_hash_node_remove_callback), (preferences_hash_node_check_changes_func), (preferneces_callback_node_invoke_func), (preferences_register), (preferences_hash_node_lookup_with_registration), (preferences_gconf_callback), (user_level_changed_callback), (preferences_initialize_if_needed), (nautilus_preferences_add_callback), (nautilus_preferences_set_boolean), (nautilus_preferences_get_boolean), (nautilus_preferences_set_enum), (nautilus_preferences_get_enum), (nautilus_preferences_set), (nautilus_preferences_get), (nautilus_preferences_shutdown): * nautilus-widgets/nautilus-preferences.h: Move the tabulation of nice preferences to nautilus-preference. Install one gconf notification for each user level. Remove all the extra unused registration parameters. Use generated keys that take into account the current user level to communicato with GConf. Keep track of user level changes so that we can compare preferences between user levels and fire callbacks accordingly. This simplifies the lifes of preferences callers as they can continue to install one simple callback as before. They will get notified when a preference changes for whatever reason. That could be the user manaually tweaking it, or a sweeping user level change. Again, i tried to keep as much of the original hashing logic intact. It needs cleaning up as well. * nautilus-widgets/nautilus-user-level-manager.c: (nautilus_user_level_manager_set_default_value_if_needed), (nautilus_user_level_manager_compare_preference_between_user_levels ): * nautilus-widgets/nautilus-user-level-manager.h: Add a public function to determine whether a preference is the same between 2 user levels. * nautilus-widgets/test-nautilus-preferences.c: (register_global_preferences): Update to reflect api changes. * src/nautilus-window-menus.c: (nautilus_window_initialize_menus), (user_level_changed_callback), (get_customize_user_level_setttings_menu_string), (update_preferences_dialog_title): Update the preferences dialog whenever the user level changes. This is an easy way to have the dialog reflect reallity. It would be a lot nicer it the contents updated on the fly instead of rebuilding the whole thing. I can do that later.
2000-06-02 16:41:42 +00:00
#define NAUTILUS_PREFERENCES_CAN_ADD_CONTENT "preferences/can_add_content"
/* Single/Double click preference */
Task 518. Support for changing preferecens individually within each confgurable user level. * libnautilus-extensions/nautilus-global-preferences.h: Change all preferences strings to not include the "/nautilus" prefix. The prefix is not automatically computed by the prefences api taking into account the user level. Add (nautilus_global_preferences_dialog_update) to rebuild the preferences dialog when the user level changes. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_get_dialog), (global_preferences_register_sidebar_panels_preferences_for_ui), (global_preferences_register_with_defaults), (global_preferences_register_boolean_with_defaults), (global_preferences_register_string_with_defaults), (global_preferences_register_enum_with_defaults), (global_preferences_register_for_ui), (global_preferences_initialize_if_needed), (nautilus_global_preferences_show_dialog), (nautilus_global_preferences_hide_dialog), (nautilus_global_preferences_set_dialog_title), (nautilus_global_preferences_dialog_update), (nautilus_global_preferences_shutdown): remove the user level tracking hack. We now set default values for each of the user levels. * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * libnautilus-extensions/nautilus-list.c: (nautilus_list_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * nautilus-widgets/nautilus-preference.c: (preference_initialize_if_needed), (preference_hash_node_alloc), (preference_hash_node_free_func), (preference_hash_node_free), (preference_register), (preference_hash_node_lookup), (preference_hash_node_lookup_with_registration), (nautilus_preference_shutdown), (nautilus_preference_find_by_name), (nautilus_preference_set_info_by_name), (nautilus_preference_enum_add_entry_by_name): * nautilus-widgets/nautilus-preference.h: Move the preference description hash table here from nautilus-preferences. These are preferences that are expected to have nice defaults as well as descriptions and possibly extra data for the preferences widgets to use (like enumeration values) I moved the tabulation and hashing stuff intactly even though it contains many turds. I plan to fix these soon. * nautilus-widgets/nautilus-preferences-group.c: (nautilus_preferences_group_add_item): * nautilus-widgets/nautilus-preferences-item.c: (preferences_item_construct), (enum_radio_group_changed_callback): Update for the above. * nautilus-widgets/nautilus-preferences.c: (preferences_hash_node_alloc), (preferences_hash_node_free), (preferences_hash_node_add_callback), (preferences_hash_node_remove_callback), (preferences_hash_node_check_changes_func), (preferneces_callback_node_invoke_func), (preferences_register), (preferences_hash_node_lookup_with_registration), (preferences_gconf_callback), (user_level_changed_callback), (preferences_initialize_if_needed), (nautilus_preferences_add_callback), (nautilus_preferences_set_boolean), (nautilus_preferences_get_boolean), (nautilus_preferences_set_enum), (nautilus_preferences_get_enum), (nautilus_preferences_set), (nautilus_preferences_get), (nautilus_preferences_shutdown): * nautilus-widgets/nautilus-preferences.h: Move the tabulation of nice preferences to nautilus-preference. Install one gconf notification for each user level. Remove all the extra unused registration parameters. Use generated keys that take into account the current user level to communicato with GConf. Keep track of user level changes so that we can compare preferences between user levels and fire callbacks accordingly. This simplifies the lifes of preferences callers as they can continue to install one simple callback as before. They will get notified when a preference changes for whatever reason. That could be the user manaually tweaking it, or a sweeping user level change. Again, i tried to keep as much of the original hashing logic intact. It needs cleaning up as well. * nautilus-widgets/nautilus-user-level-manager.c: (nautilus_user_level_manager_set_default_value_if_needed), (nautilus_user_level_manager_compare_preference_between_user_levels ): * nautilus-widgets/nautilus-user-level-manager.h: Add a public function to determine whether a preference is the same between 2 user levels. * nautilus-widgets/test-nautilus-preferences.c: (register_global_preferences): Update to reflect api changes. * src/nautilus-window-menus.c: (nautilus_window_initialize_menus), (user_level_changed_callback), (get_customize_user_level_setttings_menu_string), (update_preferences_dialog_title): Update the preferences dialog whenever the user level changes. This is an easy way to have the dialog reflect reallity. It would be a lot nicer it the contents updated on the fly instead of rebuilding the whole thing. I can do that later.
2000-06-02 16:41:42 +00:00
#define NAUTILUS_PREFERENCES_CLICK_POLICY "preferences/click_policy"
reviewed by: Darin Adler <darin@eazel.com> Fixed bug 4427 (Should not execute text files by default). Now it asks whether to run or display executable text files. Advanced users can set a new preference. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (create_message_box): New bottleneck function, contains former guts of show_message_box but doesn't call gtk_widget_show. (show_message_box): Now just a simple wrapper for calling create_message_box and showing the result. (nautilus_show_info_dialog), (nautilus_show_warning_dialog), (nautilus_show_error_dialog), (nautilus_show_yes_no_dialog), (nautilus_show_error_dialog_with_details): Renamed to add verb "show" to names. (nautilus_run_simple_dialog): Renamed to add verb "run" to name. (nautilus_create_question_dialog): New public function, does not show the dialog yet so caller can add more buttons or whatever before showing. * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_install_descriptions), (global_preferences_install_defaults), (global_preferences_install_visibility), (global_preferences_create_dialog): Add new preference for what to do when an executable text file is activated. It defaults to "Ask" and is visible only at Advanced level. * libnautilus-extensions/nautilus-file-private.h: * libnautilus-extensions/nautilus-file.h: Moved nautilus_file_contains_text into public header. * src/file-manager/fm-directory-view.c: (get_executable_text_file_action): New function, uses preference and dialog (if necessary) to determine how to handle activating an executable text file. (activate_callback): Now handles executable text files specially by using get_executable_text_file_action. Restructured the control flow a little. * components/music/nautilus-music-view.c: (set_album_cover), (play_current_file), (nautilus_music_view_update): * components/rpmview/nautilus-rpm-view-install.c: (nautilus_rpm_view_install_done): * components/services/summary/nautilus-view/nautilus-summary-dialogs.c: (nautilus_summary_login_failure_dialog), (generate_error_dialog): * components/text/nautilus-text-view.c: (file_read_callback): * libnautilus-extensions/nautilus-file-operations.c: (confirm_empty_trash), (handle_transfer_vfs_error), (handle_transfer_overwrite), (nautilus_file_operations_copy_move), (handle_new_folder_vfs_error), (nautilus_file_operations_move_to_trash): * libnautilus-extensions/nautilus-icon-dnd.c: (confirm_switch_to_manual_layout): * libnautilus-extensions/nautilus-program-chooser.c: (nautilus_program_chooser_show_no_choices_message): * libnautilus-extensions/nautilus-program-choosing.c: (nautilus_launch_application): * libnautilus-extensions/nautilus-volume-monitor.c: (display_mount_status): * src/file-manager/fm-desktop-icon-view.c: (icon_view_create_nautilus_links): * src/file-manager/fm-directory-view.c: (fm_directory_view_confirm_multiple_windows), (real_file_limit_reached), (fm_directory_view_confirm_deletion), (confirm_delete_from_trash), (report_broken_symbolic_link), * src/file-manager/fm-error-reporting.c: (fm_report_error_renaming_file), (fm_report_error_setting_group), (fm_report_error_setting_owner), (fm_report_error_setting_permissions): * src/file-manager/fm-properties-window.c: (set_custom_image): * src/file-manager/fm-search-list-view.c: (load_location_callback), (load_error_callback), (display_indexed_search_problems_dialog), (real_file_limit_reached): * src/file-manager/nautilus-indexing-info.c: (update_file_index_callback), (show_search_service_not_available_dialog): * src/nautilus-application.c: (check_required_directories), (nautilus_application_startup): * src/nautilus-location-bar.c: (drag_data_received_callback): * src/nautilus-property-browser.c: (remove_pattern), (remove_emblem), (emblem_image_file_changed), (add_pattern_to_browser), (add_color_to_browser), (emblem_dialog_clicked): * src/nautilus-sidebar.c: (receive_dropped_uri_list): * src/nautilus-theme-selector.c: (add_theme_to_icons), (theme_select_row_callback): * src/nautilus-window-manage-views.c: (handle_unreadable_location), (report_content_view_failure_to_user_internal), (report_sidebar_panel_failure_to_user), (nautilus_window_end_location_change_callback): * src/nautilus-window-menus.c: (forget_history_if_confirmed), (show_bogus_bookmark_window): Updated for dialog API name changes. * libnautilus-extensions/nautilus-file.c: (get_description): Lucky Aaron gets missing mime description complaints now.
2001-01-29 19:29:56 +00:00
/* Activating executable text files */
#define NAUTILUS_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION "preferences/executable_text_activation"
/* Smooth graphics mode (smoother but slower) */
#define NAUTILUS_PREFERENCES_SMOOTH_GRAPHICS_MODE "preferences/smooth_graphics_mode"
Fixed bug 1653 (new menu layout). View menu now contains Show/Hide items for tool bar, location bar, sidebar, and status bar. The preference now controls only what you get for new windows. Any future "menus aren't quite right" issues should be filed as new bugs. * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_create_dialog), (global_preferences_register): Renamed NAUTILUS_PREFERENCES_DISPLAY_SIDEBAR and its ilk to NAUTILUS_PREFERENCES_START_WITH_SIDEBAR since these preferences now only affect the initial appearance of new windows. Also, clarified the text that appears in the preferences window for these. * src/nautilus-window-menus.c: Removed a bunch of code #ifdeffed WINDOW_ITEMS_TEST since the functionality it partly implemented is now implemented for real. (view_menu_show_hide_sidebar_callback), (view_menu_show_hide_tool_bar_callback), (view_menu_show_hide_location_bar_callback), (view_menu_show_hide_status_bar_callback): New menu callback functions that toggle the visibility of the various views. (nautilus_window_update_show_hide_menu_items): New function, sets the text in the show/hide menu items based on current visibility. (nautilus_window_initialize_menus): Put the Show/Hide menu items in the menu. * src/nautilus-window-private.h: Add prototype for nautilus_window_update_show_hide_menu_items. * src/nautilus-window.h: Renamed statusbar_ctx -> status_bar_context_id and statusbar_clear_id -> status_bar_clear_id; renamed show/hide locationbar/toolbar/statusbar to use location_bar, tool_bar, and status_bar (GTK bad English usage notwithstanding); added prototypes for nautilus_window_sidebar_showing and its ilk. * src/nautilus-window.c: (nautilus_window_initialize), (nautilus_window_destroy): Removed monitoring & unmonitoring of DISPLAY_SIDEBAR-type preferences since changing these preferences now has no dynamic effect. (nautilus_window_clear_status), (nautilus_window_set_status), (nautilus_window_constructed): Fixed wordgroupingification of status_bar et al. (show_dock_item), (hide_dock_item): New functions to share code of show/hide location bar & tool bar functions; these call nautilus_window_update_show_hide_menu_items now also. (dock_item_showing): New function, tests visibility of named dock item. (nautilus_window_hide_location_bar), (nautilus_window_show_location_bar), (nautilus_window_hide_tool_bar), (nautilus_window_show_tool_bar): Use new code-sharing functions. (nautilus_window_location_bar_showing), (nautilus_window_tool_bar_showing), (nautilus_window_sidebar_showing), (nautilus_window_status_bar_showing): New functions to test visibility (nautilus_window_hide_sidebar), (nautilus_window_show_sidebar), (nautilus_window_hide_status_bar), (nautilus_window_show_status_bar): These call nautilus_window_update_show_hide_menu_items now. (nautilus_window_show): Updated for naming changes. * RENAMING: Noted that the evil one-word "toolbar" phrase is still rampant in Nautilus.
2000-08-24 18:45:29 +00:00
/* Which views should be displayed for new windows */
#define NAUTILUS_PREFERENCES_START_WITH_TOOL_BAR "preferences/start_with_tool_bar"
#define NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR "preferences/start_with_location_bar"
#define NAUTILUS_PREFERENCES_START_WITH_STATUS_BAR "preferences/start_with_status_bar"
#define NAUTILUS_PREFERENCES_START_WITH_SIDEBAR "preferences/start_with_sidebar"
/* The sidebar panel preferences are computed from their oafids, which aren't known at
* compile time. We publish the namespace so that interested parties can monitor changes
* to all of them collectively, without having to know the exact oaf iids.
*/
Task 518. Support for changing preferecens individually within each confgurable user level. * libnautilus-extensions/nautilus-global-preferences.h: Change all preferences strings to not include the "/nautilus" prefix. The prefix is not automatically computed by the prefences api taking into account the user level. Add (nautilus_global_preferences_dialog_update) to rebuild the preferences dialog when the user level changes. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_get_dialog), (global_preferences_register_sidebar_panels_preferences_for_ui), (global_preferences_register_with_defaults), (global_preferences_register_boolean_with_defaults), (global_preferences_register_string_with_defaults), (global_preferences_register_enum_with_defaults), (global_preferences_register_for_ui), (global_preferences_initialize_if_needed), (nautilus_global_preferences_show_dialog), (nautilus_global_preferences_hide_dialog), (nautilus_global_preferences_set_dialog_title), (nautilus_global_preferences_dialog_update), (nautilus_global_preferences_shutdown): remove the user level tracking hack. We now set default values for each of the user levels. * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * libnautilus-extensions/nautilus-list.c: (nautilus_list_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * nautilus-widgets/nautilus-preference.c: (preference_initialize_if_needed), (preference_hash_node_alloc), (preference_hash_node_free_func), (preference_hash_node_free), (preference_register), (preference_hash_node_lookup), (preference_hash_node_lookup_with_registration), (nautilus_preference_shutdown), (nautilus_preference_find_by_name), (nautilus_preference_set_info_by_name), (nautilus_preference_enum_add_entry_by_name): * nautilus-widgets/nautilus-preference.h: Move the preference description hash table here from nautilus-preferences. These are preferences that are expected to have nice defaults as well as descriptions and possibly extra data for the preferences widgets to use (like enumeration values) I moved the tabulation and hashing stuff intactly even though it contains many turds. I plan to fix these soon. * nautilus-widgets/nautilus-preferences-group.c: (nautilus_preferences_group_add_item): * nautilus-widgets/nautilus-preferences-item.c: (preferences_item_construct), (enum_radio_group_changed_callback): Update for the above. * nautilus-widgets/nautilus-preferences.c: (preferences_hash_node_alloc), (preferences_hash_node_free), (preferences_hash_node_add_callback), (preferences_hash_node_remove_callback), (preferences_hash_node_check_changes_func), (preferneces_callback_node_invoke_func), (preferences_register), (preferences_hash_node_lookup_with_registration), (preferences_gconf_callback), (user_level_changed_callback), (preferences_initialize_if_needed), (nautilus_preferences_add_callback), (nautilus_preferences_set_boolean), (nautilus_preferences_get_boolean), (nautilus_preferences_set_enum), (nautilus_preferences_get_enum), (nautilus_preferences_set), (nautilus_preferences_get), (nautilus_preferences_shutdown): * nautilus-widgets/nautilus-preferences.h: Move the tabulation of nice preferences to nautilus-preference. Install one gconf notification for each user level. Remove all the extra unused registration parameters. Use generated keys that take into account the current user level to communicato with GConf. Keep track of user level changes so that we can compare preferences between user levels and fire callbacks accordingly. This simplifies the lifes of preferences callers as they can continue to install one simple callback as before. They will get notified when a preference changes for whatever reason. That could be the user manaually tweaking it, or a sweeping user level change. Again, i tried to keep as much of the original hashing logic intact. It needs cleaning up as well. * nautilus-widgets/nautilus-user-level-manager.c: (nautilus_user_level_manager_set_default_value_if_needed), (nautilus_user_level_manager_compare_preference_between_user_levels ): * nautilus-widgets/nautilus-user-level-manager.h: Add a public function to determine whether a preference is the same between 2 user levels. * nautilus-widgets/test-nautilus-preferences.c: (register_global_preferences): Update to reflect api changes. * src/nautilus-window-menus.c: (nautilus_window_initialize_menus), (user_level_changed_callback), (get_customize_user_level_setttings_menu_string), (update_preferences_dialog_title): Update the preferences dialog whenever the user level changes. This is an easy way to have the dialog reflect reallity. It would be a lot nicer it the contents updated on the fly instead of rebuilding the whole thing. I can do that later.
2000-06-02 16:41:42 +00:00
#define NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE "sidebar-panels"
/* Directory view */
Task 518. Support for changing preferecens individually within each confgurable user level. * libnautilus-extensions/nautilus-global-preferences.h: Change all preferences strings to not include the "/nautilus" prefix. The prefix is not automatically computed by the prefences api taking into account the user level. Add (nautilus_global_preferences_dialog_update) to rebuild the preferences dialog when the user level changes. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_get_dialog), (global_preferences_register_sidebar_panels_preferences_for_ui), (global_preferences_register_with_defaults), (global_preferences_register_boolean_with_defaults), (global_preferences_register_string_with_defaults), (global_preferences_register_enum_with_defaults), (global_preferences_register_for_ui), (global_preferences_initialize_if_needed), (nautilus_global_preferences_show_dialog), (nautilus_global_preferences_hide_dialog), (nautilus_global_preferences_set_dialog_title), (nautilus_global_preferences_dialog_update), (nautilus_global_preferences_shutdown): remove the user level tracking hack. We now set default values for each of the user levels. * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * libnautilus-extensions/nautilus-list.c: (nautilus_list_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize): Simplified preference callback api by having a single add_callback function. Use it here. * nautilus-widgets/nautilus-preference.c: (preference_initialize_if_needed), (preference_hash_node_alloc), (preference_hash_node_free_func), (preference_hash_node_free), (preference_register), (preference_hash_node_lookup), (preference_hash_node_lookup_with_registration), (nautilus_preference_shutdown), (nautilus_preference_find_by_name), (nautilus_preference_set_info_by_name), (nautilus_preference_enum_add_entry_by_name): * nautilus-widgets/nautilus-preference.h: Move the preference description hash table here from nautilus-preferences. These are preferences that are expected to have nice defaults as well as descriptions and possibly extra data for the preferences widgets to use (like enumeration values) I moved the tabulation and hashing stuff intactly even though it contains many turds. I plan to fix these soon. * nautilus-widgets/nautilus-preferences-group.c: (nautilus_preferences_group_add_item): * nautilus-widgets/nautilus-preferences-item.c: (preferences_item_construct), (enum_radio_group_changed_callback): Update for the above. * nautilus-widgets/nautilus-preferences.c: (preferences_hash_node_alloc), (preferences_hash_node_free), (preferences_hash_node_add_callback), (preferences_hash_node_remove_callback), (preferences_hash_node_check_changes_func), (preferneces_callback_node_invoke_func), (preferences_register), (preferences_hash_node_lookup_with_registration), (preferences_gconf_callback), (user_level_changed_callback), (preferences_initialize_if_needed), (nautilus_preferences_add_callback), (nautilus_preferences_set_boolean), (nautilus_preferences_get_boolean), (nautilus_preferences_set_enum), (nautilus_preferences_get_enum), (nautilus_preferences_set), (nautilus_preferences_get), (nautilus_preferences_shutdown): * nautilus-widgets/nautilus-preferences.h: Move the tabulation of nice preferences to nautilus-preference. Install one gconf notification for each user level. Remove all the extra unused registration parameters. Use generated keys that take into account the current user level to communicato with GConf. Keep track of user level changes so that we can compare preferences between user levels and fire callbacks accordingly. This simplifies the lifes of preferences callers as they can continue to install one simple callback as before. They will get notified when a preference changes for whatever reason. That could be the user manaually tweaking it, or a sweeping user level change. Again, i tried to keep as much of the original hashing logic intact. It needs cleaning up as well. * nautilus-widgets/nautilus-user-level-manager.c: (nautilus_user_level_manager_set_default_value_if_needed), (nautilus_user_level_manager_compare_preference_between_user_levels ): * nautilus-widgets/nautilus-user-level-manager.h: Add a public function to determine whether a preference is the same between 2 user levels. * nautilus-widgets/test-nautilus-preferences.c: (register_global_preferences): Update to reflect api changes. * src/nautilus-window-menus.c: (nautilus_window_initialize_menus), (user_level_changed_callback), (get_customize_user_level_setttings_menu_string), (update_preferences_dialog_title): Update the preferences dialog whenever the user level changes. This is an easy way to have the dialog reflect reallity. It would be a lot nicer it the contents updated on the fly instead of rebuilding the whole thing. I can do that later.
2000-06-02 16:41:42 +00:00
#define NAUTILUS_PREFERENCES_DIRECTORY_VIEW_FONT_FAMILY "directory-view/font_family"
/* File Indexing */
#define NAUTILUS_PREFERENCES_SEARCH_BAR_TYPE "preferences/search_bar_type"
Remove the "backup unindexed search" preference for 1.0, which is 2001-02-21 Rebecca Schulman <rebecka@eazel.com> Remove the "backup unindexed search" preference for 1.0, which is bugzilla.eazel.com bug 6775. We will not be doing backup searches, and with Ramiro's help redo preference changes more cleanly, and to be more compatible with his preference changes. reviewed by: Ramiro Estrugo <ramiro@eazel.com> * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_install_descriptions), (global_preferences_install_defaults), (global_preferences_install_visibility), (global_preferences_create_dialog), (global_preferences_install_home_location_defaults), (global_preferences_use_fast_search_changed_callback), (global_preferences_medusa_state_changed_callback), (global_preferences_install_medusa_defaults): * libnautilus-extensions/nautilus-global-preferences.h: Remove the old BACKUP_SEARCH preference, and add functions to install medusa preference defaults, and to synchronize the gconf value of the preference with the system configuration file used by medusa. * libnautilus-extensions/nautilus-preferences.c: (nautilus_preferences_set_boolean), (nautilus_preferences_get_boolean): Remove old system preferences calls * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-system-preferences.c: * libnautilus-extensions/nautilus-system-preferences.h: Remove these * libnautilus-extensions/nautilus-medusa-support.c: (nautilus_medusa_services_have_been_enabled_by_user), (nautilus_medusa_blocked), (nautilus_medusa_enable_services), (nautilus_medusa_add_system_state_changed_callback): * libnautilus-extensions/nautilus-medusa-support.h: Add this file to hide potentially ifdef'd out medusa code. * src/file-manager/fm-search-list-view.c: (load_location_callback): * src/nautilus-complex-search-bar.c: (nautilus_complex_search_bar_get_location): Remove logic related to the BACKUP_SEARCH feature.
2001-02-22 00:03:28 +00:00
#define NAUTILUS_PREFERENCES_MEDUSA_BLOCKED "preferences/medusa_blocked"
#define NAUTILUS_PREFERENCES_USE_FAST_SEARCH "preferences/use_fast_search"
/* searching */
#define NAUTILUS_PREFERENCES_SEARCH_WEB_URI "preferences/search_web_uri"
enum
{
NAUTILUS_CLICK_POLICY_SINGLE,
NAUTILUS_CLICK_POLICY_DOUBLE
};
reviewed by: Darin Adler <darin@eazel.com> Fixed bug 4427 (Should not execute text files by default). Now it asks whether to run or display executable text files. Advanced users can set a new preference. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (create_message_box): New bottleneck function, contains former guts of show_message_box but doesn't call gtk_widget_show. (show_message_box): Now just a simple wrapper for calling create_message_box and showing the result. (nautilus_show_info_dialog), (nautilus_show_warning_dialog), (nautilus_show_error_dialog), (nautilus_show_yes_no_dialog), (nautilus_show_error_dialog_with_details): Renamed to add verb "show" to names. (nautilus_run_simple_dialog): Renamed to add verb "run" to name. (nautilus_create_question_dialog): New public function, does not show the dialog yet so caller can add more buttons or whatever before showing. * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_install_descriptions), (global_preferences_install_defaults), (global_preferences_install_visibility), (global_preferences_create_dialog): Add new preference for what to do when an executable text file is activated. It defaults to "Ask" and is visible only at Advanced level. * libnautilus-extensions/nautilus-file-private.h: * libnautilus-extensions/nautilus-file.h: Moved nautilus_file_contains_text into public header. * src/file-manager/fm-directory-view.c: (get_executable_text_file_action): New function, uses preference and dialog (if necessary) to determine how to handle activating an executable text file. (activate_callback): Now handles executable text files specially by using get_executable_text_file_action. Restructured the control flow a little. * components/music/nautilus-music-view.c: (set_album_cover), (play_current_file), (nautilus_music_view_update): * components/rpmview/nautilus-rpm-view-install.c: (nautilus_rpm_view_install_done): * components/services/summary/nautilus-view/nautilus-summary-dialogs.c: (nautilus_summary_login_failure_dialog), (generate_error_dialog): * components/text/nautilus-text-view.c: (file_read_callback): * libnautilus-extensions/nautilus-file-operations.c: (confirm_empty_trash), (handle_transfer_vfs_error), (handle_transfer_overwrite), (nautilus_file_operations_copy_move), (handle_new_folder_vfs_error), (nautilus_file_operations_move_to_trash): * libnautilus-extensions/nautilus-icon-dnd.c: (confirm_switch_to_manual_layout): * libnautilus-extensions/nautilus-program-chooser.c: (nautilus_program_chooser_show_no_choices_message): * libnautilus-extensions/nautilus-program-choosing.c: (nautilus_launch_application): * libnautilus-extensions/nautilus-volume-monitor.c: (display_mount_status): * src/file-manager/fm-desktop-icon-view.c: (icon_view_create_nautilus_links): * src/file-manager/fm-directory-view.c: (fm_directory_view_confirm_multiple_windows), (real_file_limit_reached), (fm_directory_view_confirm_deletion), (confirm_delete_from_trash), (report_broken_symbolic_link), * src/file-manager/fm-error-reporting.c: (fm_report_error_renaming_file), (fm_report_error_setting_group), (fm_report_error_setting_owner), (fm_report_error_setting_permissions): * src/file-manager/fm-properties-window.c: (set_custom_image): * src/file-manager/fm-search-list-view.c: (load_location_callback), (load_error_callback), (display_indexed_search_problems_dialog), (real_file_limit_reached): * src/file-manager/nautilus-indexing-info.c: (update_file_index_callback), (show_search_service_not_available_dialog): * src/nautilus-application.c: (check_required_directories), (nautilus_application_startup): * src/nautilus-location-bar.c: (drag_data_received_callback): * src/nautilus-property-browser.c: (remove_pattern), (remove_emblem), (emblem_image_file_changed), (add_pattern_to_browser), (add_color_to_browser), (emblem_dialog_clicked): * src/nautilus-sidebar.c: (receive_dropped_uri_list): * src/nautilus-theme-selector.c: (add_theme_to_icons), (theme_select_row_callback): * src/nautilus-window-manage-views.c: (handle_unreadable_location), (report_content_view_failure_to_user_internal), (report_sidebar_panel_failure_to_user), (nautilus_window_end_location_change_callback): * src/nautilus-window-menus.c: (forget_history_if_confirmed), (show_bogus_bookmark_window): Updated for dialog API name changes. * libnautilus-extensions/nautilus-file.c: (get_description): Lucky Aaron gets missing mime description complaints now.
2001-01-29 19:29:56 +00:00
enum
{
NAUTILUS_EXECUTABLE_TEXT_LAUNCH,
NAUTILUS_EXECUTABLE_TEXT_DISPLAY,
NAUTILUS_EXECUTABLE_TEXT_ASK
};
Finished task 1552 (Need "never" option for display-embedded-text preference) Finished task 1553 (Need always/local-only/never preference for creating image thumbnails) * libnautilus-extensions/nautilus-radio-button-group.h: * libnautilus-extensions/nautilus-radio-button-group.c: Added "horizontal" field in Details struct. (nautilus_radio_button_group_initialize): Initialize "horizontal" to FALSE (the default; what you get when calling plain "nautilus_radio_button_group_new"). (nautilus_radio_button_group_new_horizontal): New function, used when radio buttons should be laid out in one row; sets details->horizontal to TRUE. (nautilus_radio_button_group_insert): Lay out the items differently depending on value of details->horizontal. (nautilus_radio_button_group_set_entry_pixbuf), (nautilus_radio_button_group_set_entry_description_text): Added g_return_if_fails if details->horizontal is true (because the horizontal layout doesn't have a place to put an icon or longer description; we could change that later if we needed to) * libnautilus-extensions/nautilus-preferences-item.h: Added new NAUTILUS_PREFERENCE_ITEM_SHORT_ENUM type for preferences dialog, to be used when the choices are small enough to fit in one row. * libnautilus-extensions/nautilus-preferences-item.c: (preferences_item_create_short_enum): New function, just like preferences_item_create_enum but uses horizontal radio button group. (preferences_item_construct): Call create_short_enum when type is NAUTILUS_PREFERENCE_ITEM_SHORT_ENUM * libnautilus-extensions/nautilus-global-preferences.h: Took the "REMOTE" out of the name of NAUTILUS_PREFERENCES_SHOW_TEXT_IN_REMOTE_ICONS; added NAUTILUS_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS; added NautilusSpeedTradeoffValue enum. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_create_dialog): Added thumbnails preference to Speed Tradeoffs pane. (global_preferences_register_speed_tradeoff_with_defaults): New convenience function for registering always/local-only/never preferences. (global_preferences_register_for_ui): Register the embedded text and thumbnail-creation speed-tradeoff preferences. * libnautilus-extensions/nautilus-file.c: (nautilus_file_should_get_top_left_text): Respect all three states of the embedded-text preference. * libnautilus-extensions/nautilus-icon-factory.c: (should_display_image_file_as_itself): New function, respects the three states of the create-thumbnails preference. (nautilus_icon_factory_get_icon_for_file): Check preference before creating thumbnails (including image-as-itself case). * src/file-manager/fm-directory-view.h: New handlers for subclasses to fill in for when embedded-text and thumbnail preferences change. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize): Start monitoring embedded-text and thumbnail preferences. (fm_directory_view_destroy): Stop monitoring preferences. (embedded_text_policy_changed_callback), (image_display_policy_changed_callback): React when preferences change by executing subclass's handler, if any. I also put a hideous hack in here for kick-starting the embedded-text-reading code that otherwise wasn't working in some cases (will fix with Darin). * src/file-manager/fm-icon-view.c: (fm_icon_view_initialize_class): Install handlers for embedded-text and thumbnail preference changes. (fm_icon_view_embedded_text_policy_changed), (fm_icon_view_image_display_policy_changed): New functions; these are said handlers. * src/file-manager/fm-list-view.c: (fm_list_view_initialize_class): Install handlers for embedded-text and thumbnail preference changes. (fm_list_view_embedded_text_policy_changed), (fm_list_view_image_display_policy_changed): New functions; these are said handlers.
2000-08-01 21:21:00 +00:00
typedef enum
{
NAUTILUS_SPEED_TRADEOFF_ALWAYS,
NAUTILUS_SPEED_TRADEOFF_LOCAL_ONLY,
NAUTILUS_SPEED_TRADEOFF_NEVER
} NautilusSpeedTradeoffValue;
#define NAUTILUS_PREFERENCES_SHOW_TEXT_IN_ICONS "preferences/show_icon_text"
reviewed by: Darin Adler <darin@eazel.com> Fixed bug 6162 (need option to stop "xx items" from being calculated for ftp:// locations) Added a speed tradeoff preference for showing directory counts. It's "local-only" for Beginner and "always" (but changeable) for Intermediate/Advanced. Fixed bug 1856 (fix hideous hack to kick-start embedded-text reading when preference changes) Fixed bug 2396 (properties window doesn't show/hide "special flags" when preference changes) * libnautilus-extensions/nautilus-directory-async.c: (dequeue_pending_idle_callback): Update for name change. (lacks_directory_count): Now checks preference by calling nautilus_file_should_show_directory_item_count. (should_get_directory_count_now): Renamed to add the "_now" to help distinguish from nautilus_file_should_show_directory_item_count. (directory_count_start): Update for name change. * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory.c: (emit_change_signals_for_all_files): New function, emits change signals for self-as-file (if applicable) and all contained files. (async_state_changed_one): New hash-table function, calls emit_change_signals_for_all_files on a directory. (async_data_preference_changed_callback): New preferences-changed callback, calls async_state_changed_one on each directory. (add_preferences_callbacks): Renamed from add_filtering_callbacks, now adds callbacks for top-left text and item counts preferences. (remove_preferences_callbacks): Renamed from remove_filtering_callbacks, now removes callbacks for top-left text and item counts preferences. (nautilus_directory_get_internal): Update for name change. (nautilus_directory_emit_change_signals): renamed from _emit_change_signals_deep to avoid recursion connotation. (nautilus_directory_emit_metadata_changed), (call_files_changed_free_list), (call_files_changed_unref_free_list): Update for name change. * libnautilus-extensions/nautilus-file.c: (get_speed_tradeoff_preference_for_file): New utility function, returns boolean based on local-ness of file and value of specified speed-tradeoff preference. (nautilus_file_should_get_top_left_text): Now calls get_speed_tradeoff_preference_for_file. (nautilus_file_should_show_directory_item_count): New function, calls get_speed_tradeoff_preference_for_file. (nautilus_file_get_directory_item_count), (nautilus_file_get_deep_counts): Bail out early without computation if _should_show_directory_item_count is FALSE. (nautilus_file_changed): Update for name change. * libnautilus-extensions/nautilus-file.h: Make nautilus_file_should_show_directory_item_count public so the preferences window can make UI decisions based on it. * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_install_descriptions), (global_preferences_install_defaults), (global_preferences_install_visibility), (global_preferences_create_dialog): Add new preference NAUTILUS_PREFERENCES_SHOW_DIRECTORY_ITEM_COUNTS and wire up default values and UI. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize), (fm_directory_view_destroy): Remove hideous hack. * src/file-manager/fm-properties-window.c: (append_separator): Return widget instead of row number. (attach_directory_contents_value_field): Return widget. (update_visibility_of_table_rows): New helper function to update visibility of a series of table rows & contained widgets. (update_visibility_of_item_count_fields): New function to update visibility of directory item count widgetry. (update_visibility_of_item_count_fields_wrapper): Simple wrapper for above. (remember_directory_contents_widget), (append_directory_contents_fields): Remember item counts widgetry so it can be shown/hidden later; set up prefs callback; change signature for to pass window. (create_basic_page), (create_permissions_page): store table in window->details; update for changed signatures. (append_special_execution_checkbox): Now takes window, don't use GTK_EXPAND to avoid resizing column unnecessarily, count number of special flags rows. (remember_special_flags_widget), (update_visibility_of_special_flags_widgets): New function to update visibility of special flags widgetry. (update_visibility_of_special_flags_widgets_wrapper): Simple wrapper for above. (append_special_execution_flags): Remember special flags widgetry so it can be shown/hidden later; set up prefs callback; change signature to pass window. (real_destroy): free widget lists.
2001-02-01 02:07:39 +00:00
#define NAUTILUS_PREFERENCES_SHOW_DIRECTORY_ITEM_COUNTS "preferencees/show_directory_item_counts"
Finished task 1552 (Need "never" option for display-embedded-text preference) Finished task 1553 (Need always/local-only/never preference for creating image thumbnails) * libnautilus-extensions/nautilus-radio-button-group.h: * libnautilus-extensions/nautilus-radio-button-group.c: Added "horizontal" field in Details struct. (nautilus_radio_button_group_initialize): Initialize "horizontal" to FALSE (the default; what you get when calling plain "nautilus_radio_button_group_new"). (nautilus_radio_button_group_new_horizontal): New function, used when radio buttons should be laid out in one row; sets details->horizontal to TRUE. (nautilus_radio_button_group_insert): Lay out the items differently depending on value of details->horizontal. (nautilus_radio_button_group_set_entry_pixbuf), (nautilus_radio_button_group_set_entry_description_text): Added g_return_if_fails if details->horizontal is true (because the horizontal layout doesn't have a place to put an icon or longer description; we could change that later if we needed to) * libnautilus-extensions/nautilus-preferences-item.h: Added new NAUTILUS_PREFERENCE_ITEM_SHORT_ENUM type for preferences dialog, to be used when the choices are small enough to fit in one row. * libnautilus-extensions/nautilus-preferences-item.c: (preferences_item_create_short_enum): New function, just like preferences_item_create_enum but uses horizontal radio button group. (preferences_item_construct): Call create_short_enum when type is NAUTILUS_PREFERENCE_ITEM_SHORT_ENUM * libnautilus-extensions/nautilus-global-preferences.h: Took the "REMOTE" out of the name of NAUTILUS_PREFERENCES_SHOW_TEXT_IN_REMOTE_ICONS; added NAUTILUS_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS; added NautilusSpeedTradeoffValue enum. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_create_dialog): Added thumbnails preference to Speed Tradeoffs pane. (global_preferences_register_speed_tradeoff_with_defaults): New convenience function for registering always/local-only/never preferences. (global_preferences_register_for_ui): Register the embedded text and thumbnail-creation speed-tradeoff preferences. * libnautilus-extensions/nautilus-file.c: (nautilus_file_should_get_top_left_text): Respect all three states of the embedded-text preference. * libnautilus-extensions/nautilus-icon-factory.c: (should_display_image_file_as_itself): New function, respects the three states of the create-thumbnails preference. (nautilus_icon_factory_get_icon_for_file): Check preference before creating thumbnails (including image-as-itself case). * src/file-manager/fm-directory-view.h: New handlers for subclasses to fill in for when embedded-text and thumbnail preferences change. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize): Start monitoring embedded-text and thumbnail preferences. (fm_directory_view_destroy): Stop monitoring preferences. (embedded_text_policy_changed_callback), (image_display_policy_changed_callback): React when preferences change by executing subclass's handler, if any. I also put a hideous hack in here for kick-starting the embedded-text-reading code that otherwise wasn't working in some cases (will fix with Darin). * src/file-manager/fm-icon-view.c: (fm_icon_view_initialize_class): Install handlers for embedded-text and thumbnail preference changes. (fm_icon_view_embedded_text_policy_changed), (fm_icon_view_image_display_policy_changed): New functions; these are said handlers. * src/file-manager/fm-list-view.c: (fm_list_view_initialize_class): Install handlers for embedded-text and thumbnail preference changes. (fm_list_view_embedded_text_policy_changed), (fm_list_view_image_display_policy_changed): New functions; these are said handlers.
2000-08-01 21:21:00 +00:00
#define NAUTILUS_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS "preferences/show_image_thumbnails"
#define NAUTILUS_PREFERENCES_USE_PUBLIC_METADATA "preferences/use_public_metadata"
#define NAUTILUS_PREFERENCES_PREVIEW_SOUND "preferences/preview_sound"
Finished task 1552 (Need "never" option for display-embedded-text preference) Finished task 1553 (Need always/local-only/never preference for creating image thumbnails) * libnautilus-extensions/nautilus-radio-button-group.h: * libnautilus-extensions/nautilus-radio-button-group.c: Added "horizontal" field in Details struct. (nautilus_radio_button_group_initialize): Initialize "horizontal" to FALSE (the default; what you get when calling plain "nautilus_radio_button_group_new"). (nautilus_radio_button_group_new_horizontal): New function, used when radio buttons should be laid out in one row; sets details->horizontal to TRUE. (nautilus_radio_button_group_insert): Lay out the items differently depending on value of details->horizontal. (nautilus_radio_button_group_set_entry_pixbuf), (nautilus_radio_button_group_set_entry_description_text): Added g_return_if_fails if details->horizontal is true (because the horizontal layout doesn't have a place to put an icon or longer description; we could change that later if we needed to) * libnautilus-extensions/nautilus-preferences-item.h: Added new NAUTILUS_PREFERENCE_ITEM_SHORT_ENUM type for preferences dialog, to be used when the choices are small enough to fit in one row. * libnautilus-extensions/nautilus-preferences-item.c: (preferences_item_create_short_enum): New function, just like preferences_item_create_enum but uses horizontal radio button group. (preferences_item_construct): Call create_short_enum when type is NAUTILUS_PREFERENCE_ITEM_SHORT_ENUM * libnautilus-extensions/nautilus-global-preferences.h: Took the "REMOTE" out of the name of NAUTILUS_PREFERENCES_SHOW_TEXT_IN_REMOTE_ICONS; added NAUTILUS_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS; added NautilusSpeedTradeoffValue enum. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_create_dialog): Added thumbnails preference to Speed Tradeoffs pane. (global_preferences_register_speed_tradeoff_with_defaults): New convenience function for registering always/local-only/never preferences. (global_preferences_register_for_ui): Register the embedded text and thumbnail-creation speed-tradeoff preferences. * libnautilus-extensions/nautilus-file.c: (nautilus_file_should_get_top_left_text): Respect all three states of the embedded-text preference. * libnautilus-extensions/nautilus-icon-factory.c: (should_display_image_file_as_itself): New function, respects the three states of the create-thumbnails preference. (nautilus_icon_factory_get_icon_for_file): Check preference before creating thumbnails (including image-as-itself case). * src/file-manager/fm-directory-view.h: New handlers for subclasses to fill in for when embedded-text and thumbnail preferences change. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize): Start monitoring embedded-text and thumbnail preferences. (fm_directory_view_destroy): Stop monitoring preferences. (embedded_text_policy_changed_callback), (image_display_policy_changed_callback): React when preferences change by executing subclass's handler, if any. I also put a hideous hack in here for kick-starting the embedded-text-reading code that otherwise wasn't working in some cases (will fix with Darin). * src/file-manager/fm-icon-view.c: (fm_icon_view_initialize_class): Install handlers for embedded-text and thumbnail preference changes. (fm_icon_view_embedded_text_policy_changed), (fm_icon_view_image_display_policy_changed): New functions; these are said handlers. * src/file-manager/fm-list-view.c: (fm_list_view_initialize_class): Install handlers for embedded-text and thumbnail preference changes. (fm_list_view_embedded_text_policy_changed), (fm_list_view_image_display_policy_changed): New functions; these are said handlers.
2000-08-01 21:21:00 +00:00
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
2000-06-21 02:25:54 +00:00
typedef enum
{
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
2000-06-21 02:25:54 +00:00
NAUTILUS_COMPLEX_SEARCH_BAR,
NAUTILUS_SIMPLE_SEARCH_BAR
} NautilusSearchBarMode;
/* Gnome session management */
#define NAUTILUS_PREFERENCES_ADD_TO_SESSION "preferences/add_to_session"
More work on whittling the state machine down to size. * README: libunicode, libglade, and eog are no longer required. * components/history/nautilus-history-view.c: (history_title_changed): * libnautilus/nautilus-view-component.idl: * libnautilus/nautilus-view.c: (impl_Nautilus_View_title_changed), (nautilus_view_initialize_class): * libnautilus/nautilus-view.h: * src/nautilus-view-frame.c: (nautilus_view_frame_title_changed): * src/nautilus-view-frame.h: Added title parameter for the title_changed function. * src/nautilus-view-frame.c: (nautilus_view_frame_report_load_complete): Got rid of extra emission of report_load_complete, which is handled by view_frame_loaded now. * libnautilus-extensions/nautilus-background.c: (nautilus_background_initialize_class): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_initialize_class): * libnautilus-extensions/nautilus-icon-text-item.c: (iti_class_init): * libnautilus-extensions/nautilus-list.c: (nautilus_list_initialize_class): * src/nautilus-bookmark-list.c: (nautilus_bookmark_list_initialize_class): * src/nautilus-navigation-bar.c: (nautilus_navigation_bar_initialize_class): * src/nautilus-search-bar-criterion.c: (nautilus_search_bar_criterion_initialize_class): * src/nautilus-sidebar.c: (nautilus_sidebar_initialize_class): * src/nautilus-switchable-navigation-bar.c: (nautilus_switchable_navigation_bar_initialize_class): Use GTK_RUN_LAST instead of GTK_RUN_FIRST. * libnautilus-extensions/nautilus-directory-background.c: * libnautilus-extensions/nautilus-link-set.c: * libnautilus-extensions/nautilus-link.c: * src/file-manager/fm-icon-text-window.c: * src/file-manager/fm-icon-view.c: * src/file-manager/fm-properties-window.c: * src/nautilus-complex-search-bar.c: * src/nautilus-link-set-window.c: * src/nautilus-simple-search-bar.c: * src/nautilus-switchable-search-bar.c: Add includes needed now that the #include <gnome.h> was removed from nautilus-global-preferences.h. * libnautilus-extensions/nautilus-string.h: * libnautilus-extensions/nautilus-string.c: (nautilus_strcmp_case_breaks_ties): Added function, like g_strcasecmp, but falls back on strcmp for strings that match case-insensitive-wise. (nautilus_istr_compare): Use nautilus_strcmp_case_breaks_ties instead of nautilus_strcasecmp. * libnautilus-extensions/nautilus-file.c: (nautilus_file_compare_by_name): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (nautilus_file_compare_by_directory_name): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (get_automatic_emblems_as_integer): Convert automatic emblems to integer form for simple sorting. (prepend_automatic_emblem_names): Separate out the code that puts on automatic emblem names, and make it put them first, before any keyword-based emblems. (nautilus_file_compare_by_emblems): Compare the automatic emblems first, using the integer form. (nautilus_file_compare_by_type): Use nautilus_strcmp_case_breaks_ties instead of nautilus_strcmp. (nautilus_file_compare_for_sort): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (nautilus_file_compare_name): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (nautilus_file_is_mime_type): Use nautilus_strcasecmp instead of nautilus_strcmp. (nautilus_file_get_emblem_names): Use prepend_automatic_emblem_names. (sort_keyword_list_and_remove_duplicates): Sort with nautilus_strcmp_case_breaks_ties instead of compare_emblem_names. Automatic emblem names are now dealt with elsewhere. * libnautilus-extensions/nautilus-icon-container.c: (compare_icons_by_name): Use nautilus_strcmp_case_breaks_ties instead of nautilus_strcasecmp. * libnautilus-extensions/nautilus-glib-extensions.c: (nautilus_g_str_list_sort): Use nautilus_str_compare. (nautilus_g_str_list_sort_case_insensitive): Use nautilus_istr_compare. * components/services/vault/command-line/main.c: (main): * test/test-nautilus-mime-actions-set.c: (str_to_action_type): Use g_strcasecmp, not strcasecmp, for portability. * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-global-preferences.c: Removed _get_disabled_sidebar_panel_view_identifiers since the logic now removes any not in the enabled list instead. * libnautilus-extensions/nautilus-view-identifier.h: * libnautilus-extensions/nautilus-view-identifier.c: (nautilus_view_identifier_list_copy): New function. (nautilus_view_identifier_compare): Now sorts properly instead of returning 1 for any two identifiers that are !=. * nautilus-clean.sh: Removed unadorned gconfd now that it's ancient history and because it makes the script seem to fail all the time. * src/nautilus-window-manage-views.h: * src/nautilus-window-manage-views.c: (compute_title): Renamed to a shorter name since it's a local function. (update_title): Renamed to a shorter name since it's a local function and made it do nothing if the title is already correct. (nautilus_window_update_internals): Simplified code by using the new cached title. (nautilus_window_has_really_changed): Removed sidebar panel logic that is no longer needed. (nautilus_window_free_load_info): Remove some unused fields. (nautilus_window_open_location): Removed unused parameter. (nautilus_window_open_location_in_new_window): Removed unused parameter. (load_content_view): Renamed to shorter name since it's a local function. (handle_view_failure), (cancel_location_change), (load_view_for_new_location), (set_view_location_and_selection): Broke out big pieces of code used by the state machine. Soon we won't have a state machine at all, but we'll still need functions like these. (nautilus_window_update_state): Removed a lot of the code and broke the remaining bits into the above functions. (nautilus_window_set_state_info): Removed sidebar management code and some now-unused state variables. (nautilus_window_stop_loading): Moved this function in here and renamed it so the whole state machine is in one place. (nautilus_window_set_content_view): Moved this function in here and renamed it so the whole state machine is in one place. (compare_view_identifier_with_iid), (nautilus_window_set_sidebar_panels): Wrote new code to set up the sidebar panels based on a list of view identifiers, based on the code that was used before when preferences change. Moved here so the whole state machine is in one place. * src/nautilus-window-toolbars.c: (toolbar_stop_callback): Call the new function nautilus_window_stop_loading. * src/nautilus-window-private.h: * src/nautilus-window.h: * src/nautilus-window.c: (nautilus_window_initialize_class): Removed the "content_view" argument. (nautilus_window_goto_uri): Removed the view frame parameter from the open_location call. (nautilus_window_constructed): Set up sidebars based on preferences when the window is created. (nautilus_window_set_arg): Removed the "content_view" argument. (nautilus_window_get_arg): Removed the "content_view" argument. (view_menu_switch_views_callback): Call the new function nautilus_window_set_content_view. (chose_component_callback), Call the new function nautilus_window_set_content_view. (nautilus_window_open_location_callback): Removed the view frame parameter from the open_location call. (nautilus_window_open_location_in_new_window_callback): Removed the view frame parameter from the open_location_in_new_window call. (nautilus_window_connect_view): Don't connect to report_load_progress any more. The view frame now handles this for us. (nautilus_window_set_content_view_widget): Renamed this to avoid confusion with the new nautilus_window_set_content_view which is used to change content views, given a new view identifier. (update_sidebar_panels_from_preferences): Renamed and changed to use the new nautilus_window_set_sidebar_panels call.
2000-10-03 02:02:10 +00:00
void nautilus_global_preferences_initialize (void);
void nautilus_global_preferences_show_dialog (void);
void nautilus_global_preferences_hide_dialog (void);
void nautilus_global_preferences_set_dialog_title (const char *title);
/* Sidebar */
More work on whittling the state machine down to size. * README: libunicode, libglade, and eog are no longer required. * components/history/nautilus-history-view.c: (history_title_changed): * libnautilus/nautilus-view-component.idl: * libnautilus/nautilus-view.c: (impl_Nautilus_View_title_changed), (nautilus_view_initialize_class): * libnautilus/nautilus-view.h: * src/nautilus-view-frame.c: (nautilus_view_frame_title_changed): * src/nautilus-view-frame.h: Added title parameter for the title_changed function. * src/nautilus-view-frame.c: (nautilus_view_frame_report_load_complete): Got rid of extra emission of report_load_complete, which is handled by view_frame_loaded now. * libnautilus-extensions/nautilus-background.c: (nautilus_background_initialize_class): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_initialize_class): * libnautilus-extensions/nautilus-icon-text-item.c: (iti_class_init): * libnautilus-extensions/nautilus-list.c: (nautilus_list_initialize_class): * src/nautilus-bookmark-list.c: (nautilus_bookmark_list_initialize_class): * src/nautilus-navigation-bar.c: (nautilus_navigation_bar_initialize_class): * src/nautilus-search-bar-criterion.c: (nautilus_search_bar_criterion_initialize_class): * src/nautilus-sidebar.c: (nautilus_sidebar_initialize_class): * src/nautilus-switchable-navigation-bar.c: (nautilus_switchable_navigation_bar_initialize_class): Use GTK_RUN_LAST instead of GTK_RUN_FIRST. * libnautilus-extensions/nautilus-directory-background.c: * libnautilus-extensions/nautilus-link-set.c: * libnautilus-extensions/nautilus-link.c: * src/file-manager/fm-icon-text-window.c: * src/file-manager/fm-icon-view.c: * src/file-manager/fm-properties-window.c: * src/nautilus-complex-search-bar.c: * src/nautilus-link-set-window.c: * src/nautilus-simple-search-bar.c: * src/nautilus-switchable-search-bar.c: Add includes needed now that the #include <gnome.h> was removed from nautilus-global-preferences.h. * libnautilus-extensions/nautilus-string.h: * libnautilus-extensions/nautilus-string.c: (nautilus_strcmp_case_breaks_ties): Added function, like g_strcasecmp, but falls back on strcmp for strings that match case-insensitive-wise. (nautilus_istr_compare): Use nautilus_strcmp_case_breaks_ties instead of nautilus_strcasecmp. * libnautilus-extensions/nautilus-file.c: (nautilus_file_compare_by_name): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (nautilus_file_compare_by_directory_name): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (get_automatic_emblems_as_integer): Convert automatic emblems to integer form for simple sorting. (prepend_automatic_emblem_names): Separate out the code that puts on automatic emblem names, and make it put them first, before any keyword-based emblems. (nautilus_file_compare_by_emblems): Compare the automatic emblems first, using the integer form. (nautilus_file_compare_by_type): Use nautilus_strcmp_case_breaks_ties instead of nautilus_strcmp. (nautilus_file_compare_for_sort): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (nautilus_file_compare_name): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (nautilus_file_is_mime_type): Use nautilus_strcasecmp instead of nautilus_strcmp. (nautilus_file_get_emblem_names): Use prepend_automatic_emblem_names. (sort_keyword_list_and_remove_duplicates): Sort with nautilus_strcmp_case_breaks_ties instead of compare_emblem_names. Automatic emblem names are now dealt with elsewhere. * libnautilus-extensions/nautilus-icon-container.c: (compare_icons_by_name): Use nautilus_strcmp_case_breaks_ties instead of nautilus_strcasecmp. * libnautilus-extensions/nautilus-glib-extensions.c: (nautilus_g_str_list_sort): Use nautilus_str_compare. (nautilus_g_str_list_sort_case_insensitive): Use nautilus_istr_compare. * components/services/vault/command-line/main.c: (main): * test/test-nautilus-mime-actions-set.c: (str_to_action_type): Use g_strcasecmp, not strcasecmp, for portability. * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-global-preferences.c: Removed _get_disabled_sidebar_panel_view_identifiers since the logic now removes any not in the enabled list instead. * libnautilus-extensions/nautilus-view-identifier.h: * libnautilus-extensions/nautilus-view-identifier.c: (nautilus_view_identifier_list_copy): New function. (nautilus_view_identifier_compare): Now sorts properly instead of returning 1 for any two identifiers that are !=. * nautilus-clean.sh: Removed unadorned gconfd now that it's ancient history and because it makes the script seem to fail all the time. * src/nautilus-window-manage-views.h: * src/nautilus-window-manage-views.c: (compute_title): Renamed to a shorter name since it's a local function. (update_title): Renamed to a shorter name since it's a local function and made it do nothing if the title is already correct. (nautilus_window_update_internals): Simplified code by using the new cached title. (nautilus_window_has_really_changed): Removed sidebar panel logic that is no longer needed. (nautilus_window_free_load_info): Remove some unused fields. (nautilus_window_open_location): Removed unused parameter. (nautilus_window_open_location_in_new_window): Removed unused parameter. (load_content_view): Renamed to shorter name since it's a local function. (handle_view_failure), (cancel_location_change), (load_view_for_new_location), (set_view_location_and_selection): Broke out big pieces of code used by the state machine. Soon we won't have a state machine at all, but we'll still need functions like these. (nautilus_window_update_state): Removed a lot of the code and broke the remaining bits into the above functions. (nautilus_window_set_state_info): Removed sidebar management code and some now-unused state variables. (nautilus_window_stop_loading): Moved this function in here and renamed it so the whole state machine is in one place. (nautilus_window_set_content_view): Moved this function in here and renamed it so the whole state machine is in one place. (compare_view_identifier_with_iid), (nautilus_window_set_sidebar_panels): Wrote new code to set up the sidebar panels based on a list of view identifiers, based on the code that was used before when preferences change. Moved here so the whole state machine is in one place. * src/nautilus-window-toolbars.c: (toolbar_stop_callback): Call the new function nautilus_window_stop_loading. * src/nautilus-window-private.h: * src/nautilus-window.h: * src/nautilus-window.c: (nautilus_window_initialize_class): Removed the "content_view" argument. (nautilus_window_goto_uri): Removed the view frame parameter from the open_location call. (nautilus_window_constructed): Set up sidebars based on preferences when the window is created. (nautilus_window_set_arg): Removed the "content_view" argument. (nautilus_window_get_arg): Removed the "content_view" argument. (view_menu_switch_views_callback): Call the new function nautilus_window_set_content_view. (chose_component_callback), Call the new function nautilus_window_set_content_view. (nautilus_window_open_location_callback): Removed the view frame parameter from the open_location call. (nautilus_window_open_location_in_new_window_callback): Removed the view frame parameter from the open_location_in_new_window call. (nautilus_window_connect_view): Don't connect to report_load_progress any more. The view frame now handles this for us. (nautilus_window_set_content_view_widget): Renamed this to avoid confusion with the new nautilus_window_set_content_view which is used to change content views, given a new view identifier. (update_sidebar_panels_from_preferences): Renamed and changed to use the new nautilus_window_set_sidebar_panels call.
2000-10-03 02:02:10 +00:00
GList *nautilus_global_preferences_get_enabled_sidebar_panel_view_identifiers (void);
Fixed bug 1247 ("Edit Novice Settings" menu item needs to be handled better) Now this menu item is enabled, and choosing it explains that you can't edited the Novice settings but offers to switch to Intermediate and let you edit those settings. * libnautilus-extensions/nautilus-user-level-manager.c, * libnautilus-extensions/nautilus-user-level-manager.h: Made the #defines for the user level ints public, so code elsewhere could use them rather than hardwiring a bunch of 0s, 1s, and 2s. * libnautilus-extensions/nautilus-caption-table.h: * libnautilus-extensions/nautilus-caption.h: * libnautilus-extensions/nautilus-font-picker.h: * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-password-dialog.h: * libnautilus-extensions/nautilus-preference.h: * libnautilus-extensions/nautilus-preferences-box.h: * libnautilus-extensions/nautilus-preferences-dialog.h: * libnautilus-extensions/nautilus-preferences-group.h: * libnautilus-extensions/nautilus-preferences-item.h: * libnautilus-extensions/nautilus-preferences-pane.h: * libnautilus-extensions/nautilus-preferences-private.h: * libnautilus-extensions/nautilus-preferences.h: * libnautilus-extensions/nautilus-radio-button-group.h: * libnautilus-extensions/nautilus-string-picker.h: * libnautilus-extensions/nautilus-text-caption.h: Changed the closing BEGIN_GNOME_DECLS in these header files to END_GNOME_DECLS. * src/nautilus-window-menus.c: (get_user_level_string_for_display): New function, extracted from get_customize_user_level_string. Returns the user level string to be put into user messages or menu item names. (get_customize_user_level_string): Now calls get_user_level_string_for_display (switch_and_show_intermediate_settings_callback): New function, switches to intermediate level and displays the user level settings dialog. (user_level_customize_callback): If the current user level is NAUTILUS_USER_LEVEL_NOVICE, puts up a dialog telling the user that the Novice settings can't be changed, and asking them if they want to switch to Intermediate and edit those settings. (get_user_level_image), (user_level_changed_callback), (nautilus_window_initialize_menus), (convert_menu_path_to_user_level), (convert_user_level_to_menu_path): Use #defines for user levels instead of hardwiring integers. (switch_to_user_level): New function, extracted from user_level_menu_item_callback. Switches to a specified user level and updates menu items & title image appropriately. (user_level_menu_item_callback): Now calls switch_to_user_level. (update_user_level_menu_items): Don't desensitize the Edit Settings item at Novice user level anymore.
2000-09-05 19:39:30 +00:00
END_GNOME_DECLS
#endif /* NAUTILUS_PREFS_GLOBAL_H */